PageSourceSearch

https://my.nestwork.bg/build/assets/Profile-BGTV_J6u.js

js nestwork.bg collected 2026-10-04 22:10:20 UTC 14,240 bytes, 1 lines download raw bytes

1import{d as N,r as g,c as z,w as h,a as _,i,j as a,b as e,e as L,h as I,o as r,t as n,f as T,g as x,l as u,v as m,F as C,p as P,q as V,k as E,n as j,s as U,x as D,B as F}from"./app-DzGoEZyg.js";import{_ as O}from"./MemberLayout.vue_vue_type_script_setup_true_lang-J8fsJN9K.js";import{_ as q}from"./AccountTabs.vue_vue_type_script_setup_true_lang-jWOfJ-td.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const H={key:0,class:"mb-6 rounded-lg bg-green-50 border border-green-200 p-4"},W={class:"flex items-center"},G={class:"text-green-700"},J={class:"bg-white rounded-xl border border-gray-200 p-6"},R={class:"flex items-center gap-6"},Y={class:"relative"},$=["src","alt"],K={key:1,class:"w-24 h-24 rounded-full bg-indigo-100 flex items-center justify-center border-2 border-gray-200"},X={class:"text-2xl font-semibold text-indigo-600"},Q={key:2,class:"absolute inset-0 bg-black/50 rounded-full flex items-center justify-center"},Z={class:"cursor-pointer inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-lg text-sm font-medium text-gray-700 hover:bg-gray-50"},ee={class:"bg-white rounded-xl border border-gray-200 p-6"},te={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},le={key:0,class:"mt-1 text-sm text-red-600"},oe=["value"],se={key:0,class:"mt-1 text-sm text-red-600"},re={key:0,class:"mt-1 text-sm text-red-600"},ie=["value"],ne={key:0,class:"mt-1 text-sm text-red-600"},ae={class:"bg-white rounded-xl border border-gray-200 p-6"},de={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},ue={key:0,class:"mt-1 text-sm text-red-600"},me={key:0,class:"mt-1 text-sm text-red-600"},be=["value"],ge={key:0,class:"mt-1 text-sm text-red-600"},pe={class:"bg-white rounded-xl border border-gray-200 p-6"},ye={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},fe={key:0,class:"mt-1 text-sm text-red-600"},ve={key:0,class:"mt-1 text-sm text-red-600"},ce={class:"bg-white rounded-xl border border-gray-200 p-6"},xe={class:"mt-1 flex justify-between text-xs text-gray-500"},ke={key:0,class:"text-red-600"},we={class:"bg-white rounded-xl border border-gray-200 p-6"},he={class:"space-y-3"},_e={key:0,class:"mt-2 text-sm text-red-600"},Ce={class:"flex justify-end"},Pe=["disabled"],Ve={key:0,class:"flex items-center"},je={key:1},Ae=N({__name:"Profile",props:{user:{},countries:{},industries:{}},setup(f){const d=f,S=F(),l=g({name:d.user.name,phone:d.user.phone??"",country:d.user.country??"",job_title:d.user.job_title??"",company_name:d.user.company_name??"",industry:d.user.industry??"",linkedin_url:d.user.linkedin_url??"",website_url:d.user.website_url??"",birthday:d.user.birthday??"",bio:d.user.bio??"",profile_visibility:d.user.profile_visibility}),k=g(d.user.avatar_url),v=g(!1),w=g(!1),s=g({}),p=g(""),B=E(()=>l.value.bio.length);function M(){v.value=!0,s.value={},p.value="",D.patch(route("members.account.profile.update"),l.value,{onSuccess:()=>{p.value="Profile updated successfully!",setTimeout(()=>{p.value=""},3e3)},onError:c=>{s.value=c},onFinish:()=>{v.value=!1}})}function A(c){const t=c.target;if(!t.files?.length)return;const o=t.files[0],y=new FormData;y.append("avatar",o),w.value=!0,fetch(route("members.account.profile.upload-avatar"),{method:"POST",headers:{"X-CSRF-TOKEN":S.props.csrf_token||document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")||""},body:y}).then(b=>b.json()).then(b=>{b.avatar_url&&(k.value=b.avatar_url)}).catch(b=>{console.error("Avatar upload failed:",b)}).finally(()=>{w.value=!1})}return(c,t)=>(r(),z(O,null,{header:h(()=>[...t[12]||(t[12]=[e("h1",{class:"text-2xl font-bold text-gray-900"},"Account",-1),e("p",{class:"mt-1 text-sm text-gray-500"},"Manage your account settings and services.",-1)])]),default:h(()=>[_(L(I),{title:"Account - Profile"}),_(q),p.value?(r(),i("div",H,[e("div",W,[t[13]||(t[13]=e("svg",{class:"h-5 w-5 text-green-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1)),e("span",G,n(p.value),1)])])):a("",!0),e("form",{onSubmit:T(M,["prevent"]),class:"space-y-6"},[e("div",J,[t[18]||(t[18]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Profile Photo",-1)),e("div",R,[e("div",Y,[k.value?(r(),i("img",{key:0,src:k.value,alt:l.value.name,class:"w-24 h-24 rounded-full object-cover border-2 border-gray-200"},null,8,$)):(r(),i("div",K,[e("span",X,n(l.value.name.charAt(0).toUpperCase()),1)])),w.value?(r(),i("div",Q,[...t[14]||(t[14]=[e("svg",{class:"animate-spin h-6 w-6 text-white",f
1ill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):a("",!0)]),e("div",null,[e("label",Z,[t[15]||(t[15]=e("svg",{class:"w-5 h-5 mr-2 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),t[16]||(t[16]=x(" Change Photo ",-1)),e("input",{type:"file",accept:"image/jpeg,image/png",class:"hidden",onChange:A},null,32)]),t[17]||(t[17]=e("p",{class:"mt-2 text-xs text-gray-500"},"JPG or PNG, max 5MB",-1))])])]),e("div",ee,[t[26]||(t[26]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Personal Information",-1)),e("div",te,[e("div",null,[t[19]||(t[19]=e("label",{for:"name",class:"block text-sm font-medium text-gray-700 mb-1"},"Name *",-1)),u(e("input",{id:"name","onUpdate:modelValue":t[0]||(t[0]=o=>l.value.name=o),type:"text",required:"",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.name]]),s.value.name?(r(),i("p",le,n(s.value.name),1)):a("",!0)]),e("div",null,[t[20]||(t[20]=e("label",{for:"email",class:"block text-sm font-medium text-gray-700 mb-1"},"Email",-1)),e("input",{id:"email",value:f.user.email,type:"email",disabled:"",class:"w-full px-4 py-2 border border-gray-200 rounded-lg bg-gray-50 text-gray-500 cursor-not-allowed"},null,8,oe),t[21]||(t[21]=e("p",{class:"mt-1 text-xs text-gray-500"},"Email is managed via your WordPress account",-1))]),e("div",null,[t[22]||(t[22]=e("label",{for:"phone",class:"block text-sm font-medium text-gray-700 mb-1"},"Phone",-1)),u(e("input",{id:"phone","onUpdate:modelValue":t[1]||(t[1]=o=>l.value.phone=o),type:"tel",placeholder:"+359 888 123 456",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.phone]]),s.value.phone?(r(),i("p",se,n(s.value.phone),1)):a("",!0)]),e("div",null,[t[23]||(t[23]=e("label",{for:"birthday",class:"block text-sm font-medium text-gray-700 mb-1"},"Birthday",-1)),u(e("input",{id:"birthday","onUpdate:modelValue":t[2]||(t[2]=o=>l.value.birthday=o),type:"date",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.birthday]]),s.value.birthday?(r(),i("p",re,n(s.value.birthday),1)):a("",!0)]),e("div",null,[t[25]||(t[25]=e("label",{for:"country",class:"block text-sm font-medium text-gray-700 mb-1"},"Country *",-1)),u(e("select",{id:"country","onUpdate:modelValue":t[3]||(t[3]=o=>l.value.country=o),required:"",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 bg-white"},[t[24]||(t[24]=e("option",{value:""},"Select country",-1)),(r(!0),i(C,null,P(f.countries,(o,y)=>(r(),i("option",{key:y,value:y},n(o),9,ie))),128))],512),[[V,l.value.country]]),s.value.country?(r(),i("p",ne,n(s.value.country),1)):a("",!0)])])]),e("div",ae,[t[31]||(t[31]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Professional Information",-1)),e("div",de,[e("div",null,[t[27]||(t[27]=e("label",{for:"job_title",class:"block text-sm font-medium text-gray-700 mb-1"},"Job Title",-1)),u(e("input",{id:"job_title","onUpdate:modelValue":t[4]||(t[4]=o=>l.value.job_title=o),type:"text",placeholder:"e.g., Software Engineer",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.job_title]]),s.value.job_title?(r(),i("p",ue,n(s.value.job_title),1)):a("",!0)]),e("div",null,[t[28]||(t[28]=e("label",{for:"company_name",class:"block text-sm font-medium text-gray-700 mb-1"},"Company",-1)),u(e("input",{id:"company_name","onUpdate:modelValue":t[5]||(t[5]=o=>l.value.company_name=o),type:"text",placeholder:"e.g., Acme Inc.",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.company_name]]),s.value.company_name?(r(),i("p",me,n(s.value.company_name),1)):a("",!0)]),e("div",null,[t[30]||(t[30]=e("label",{for:"industry",class:"block text-sm font-medium text-gray-700 mb-1"},"Industry",-1)),u(e("select",{id:"industry","onUpdate:modelValue":t[6]||(t[6]=o=>l.value.industry=o),class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 bg-white"},[t[29]||(t[29]=e("option",{value:""},"Select industry",-1)),(r(!0),i(C,null,P(f.industries,o=>(r(),i("option",{key:o,value:o},n(o),9,be))),128))],512),[[V,l.value.industry]]),s.value.industry?(r(),i("p",ge,n(s.value.industry),1)):a("",!0)])])]),e("div",pe,[t[34]||(t[34]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Links",-1)),e("div",ye,[e("div",null,[t[32]||(t[32]=e("label",{for:"linkedin_url",class:"block text-sm font-medium text-gray-700 mb-1"},"LinkedIn",-1)),u(e("input",{id:"linkedin_url","onUpdate:modelValue":t[7]||(t[7]=o=>l.value.linkedin_url=o),type:"text",placeholder:"linkedin.com/in/yourprofile or just yourprofile",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.linkedin_url]]),s.value.linkedin_url?(r(),i("p",fe,n(s.value.linkedin_url),1)):a("",!0)]),e("div",null,[t[33]||(t[33]=e("label",{for:"website_url",class:"block text-sm font-medium text-gray-700 mb-1"},"Website",-1)),u(e("input",{id:"website_url","onUpdate:modelValue":t[8]||(t[8]=o=>l.value.website_url=o),type:"url",placeholder:"https://yourwebsite.com",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.website_url]]),s.value.website_url?(r(),i("p",ve,n(s.value.website_url),1)):a("",!0)])])]),e("div",ce,[t[36]||(t[36]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"About You",-1)),e("div",null,[t[35]||(t[35]=e("label",{for:"bio",class:"block text-sm font-medium text-gray-700 mb-1"},"Bio",-1)),u(e("textarea",{id:"bio","onUpdate:modelValue":t[9]||(t[9]=o=>l.value.bio=o),rows:"4",maxlength:"500",placeholder:"Tell other members about yourself...",class:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"},null,512),[[m,l.value.bio]]),e("div",xe,[e("span",null,n(B.value)+"/500 characters",1),s.value.bio?(r(),i("span",ke,n(s.value.bio),1)):a("",!0)])])]),e("div",we,[t[41]||(t[41]=e("h2",{class:"text-lg font-semibold text-gray-900 mb-4"},"Privacy Settings",-1)),e("div",null,[t[39]||(t[39]=e("label",{class:"block text-sm font-medium text-gray-700 mb-3"},"Profile Visibility",-1)),e("div",he,[e("label",{class:j(["flex items-start p-4 border rounded-lg cursor-pointer transition-colors",{"border-indigo-500 bg-indigo-50":l.value.profile_visibility==="private","border-gray-200 hover:border-gray-300":l.value.profile_visibility!=="private"}])},[u(e("input",{type:"radio","onUpdate:modelValue":t[10]||(t[10]=o=>l.value.profile_visibility=o),value:"private",class:"mt-1 text-indigo-600 focus:ring-indigo-500"},null,512),[[U,l.value.profile_visibility]]),t[37]||(t[37]=e("div",{class:"ml-3"},[e("span",{class:"font-medium text-gray-900"},"Private"),e("p",{class:"text-sm text-gray-500"},"Only Nestwork staff can see your profile details")],-1))],2),e("label",{class:j(["flex items-start p-4 border rounded-lg cursor-pointer transition-colors",{"border-indigo-500 bg-indigo-50":l.value.profile_visibility==="public","border-gray-200 hover:border-gray-300":l.value.profile_visibility!=="public"}])},[u(e("input",{type:"radio","onUpdate:modelValue":t[11]||(t[11]=o=>l.value.profile_visibility=o),value:"public",class:"mt-1 text-indigo-600 focus:ring-indigo-500"},null,512),[[U,l.value.profile_visibility]]),t[38]||(t[38]=e("div",{class:"ml-3"},[e("span",{class:"font-medium text-gray-900"},"Public"),e("p",{class:"text-sm text-gray-500"},"Other members can see your bio, LinkedIn, and website")],-1))],2)]),s.value.profile_visibility?(r(),i("p",_e,n(s.value.profile_visibility),1)):a("",!0),t[40]||(t[40]=e("div",{class:"mt-4 p-4 bg-blue-50 rounded-lg text-sm text-blue-700"},[e("p",{class:"font-medium mb-1"},"What does this mean?"),e("ul",{class:"list-disc list-inside space-y-1"},[e("li",null,[e("strong",null,"Private:"),x(" Your profile is only visible to Nestwork staff")]),e("li",null,[e("strong",null,"Public:"),x(" Other members can see your name, photo, bio, LinkedIn, and website")])])],-1))])]),e("div",Ce,[e("button",{type:"submit",disabled:v.value,class:"px-6 py-3 bg-indigo-600 text-white font-medium rounded-lg hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed"},[v.value?(r(),i("span",Ve,[...t[42]||(t[42]=[e("svg",{class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",f
1ill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),x(" Saving... ",-1)])])):(r(),i("span",je,"Save Changes"))],8,Pe)])],32)]),_:1}))}});export{Ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.