1import{d as J,r as a,c as P,w as n,o as v,h as i,b as t,f as S,a as r,j as f,v as b,k as _,g as w,n as u,a1 as $}from"./app.0910bc5f.js";import{J as C}from"./Button.90643302.js";import{J as k}from"./FormSection.53973ca0.js";import{J as I}from"./Input.26e7b69c.js";import{J as U}from"./InputError.5a0db5db.js";import{J as N}from"./Label.560aa550.js";import{J as B}from"./ActionMessage.22c37a04.js";import{J as F}from"./SecondaryButton.5b07997f.js";import{_ as M}from"./_plugin-vue_export-helper.cdc0426e.js";import"./SectionTitle.4c564fdc.js";const A=J({components:{JetActionMessage:B,JetButton:C,JetFormSection:k,JetInput:I,JetInputError:U,JetLabel:N,JetSecondaryButton:F},props:["user"],data(){var e,o,m,h,c;return{form:this.$inertia.form({_method:"PUT",name:(e=this.user)==null?void 0:e.name,contact_number:(o=this.user)==null?void 0:o.contact_number,gender:(m=this.user)==null?void 0:m.gender,birth_date:(h=this.user)==null?void 0:h.birth_date,email:(c=this.user)==null?void 0:c.email,photo:null}),photoPreview:null}},methods:{updateProfileInformation(){this.$refs.photo&&(this.form.photo=this.$refs.photo.files[0]),this.form.post(route("user-profile-information.update"),{errorBag:"updateProfileInformation",preserveScroll:!0,onSuccess:()=>this.clearPhotoFileInput()})},selectNewPhoto(){this.$refs.photo.click()},updatePhotoPreview(){const e=this.$refs.photo.files[0];if(!e)return;const o=new FileReader;o.onload=m=>{this.photoPreview=m.target.result},o.readAsDataURL(e)},deletePhoto(){this.$inertia.delete(route("current-user-photo.destroy"),{preserveScroll:!0,onSuccess:()=>{this.photoPreview=null,this.clearPhotoFileInput()}})},clearPhotoFileInput(){var e;(e=this.$refs.photo)!=null&&e.value&&(this.$refs.photo.value=null)}}}),D={key:0,class:"mb-3"},E={class:"mt-2"},L=["src"],R={class:"mt-2"},T=["src"],z={class:"mb-3"},G={class:"mb-3"},q={class:"mb-3"},H={class:"mb-3"},K={class:"mb-3"},O={class:"spinner-border spinner-border-sm",role:"status"};function Q(e,o,m,h,c,W){const y=a("jet-action-message"),l=a("jet-label"),g=a("jet-secondary-button"),d=a("jet-input-error"),p=a("jet-input"),V=a("jet-button"),j=a("jet-form-section");return v(),P(j,{onSubmitted:e.updateProfileInformation},{title:n(()=>o[6]||(o[6]=[i(" Profile Information ")])),description:n(()=>o[7]||(o[7]=[i(" Update your account's profile information and email address. ")])),form:n(()=>[t(y,{on:e.form.recentlySuccessful},{default:n(()=>o[8]||(o[8]=[i(" Saved. ")])),_:1,__:[8]},8,["on"]),e.$page.props.jetstream.managesProfilePhotos?(v(),S("div",D,[r("input",{type:"file",hidden:"",ref:"photo",onChange:o[0]||(o[0]=(...s)=>e.updatePhotoPreview&&e.updatePhotoPreview(...s))},null,544),t(l,{for:"photo",value:"Photo"}),f(r("div",E,[r("img",{src:e.user.profile_photo_url,alt:"Current Profile Photo",class:"rounded-circle"},null,8,L)],512),[[b,!e.photoPreview]]),f(r("div",R,[r("img",{src:e.photoPreview,class:"rounded-circle",width:"80px",height:"80px"},null,8,T)],512),[[b,e.photoPreview]]),t(g,{class:"mt-2 me-2",type:"button",onClick:_(e.selectNewPhoto,["prevent"])},{default:n(()=>o[9]||(o[9]=[i(" Select A New Photo ")])),_:1,__:[9]},8,["onClick"]),e.user.profile_photo_path?(v(),P(g,{key:0,type:"button",class:"mt-2",onClick:_(e.deletePhoto,["prevent"])},{default:n(()=>o[10]||(o[10]=[i(" Remove Photo ")])),_:1,__:[10]},8,["onClick"])):w("",!0),t(d,{message:e.form.errors.photo,class:"mt-2"},null,8,["message"])])):w("",!0),r("div",null,[r("div",z,[t(l,{for:"name",value:"First Name"}),t(p,{id:"name",type:"text",modelValue:e.form.name,"onUpdate:modelValue":o[1]||(o[1]=s=>e.form.name=s),class:u({"is-invalid":e.form.errors.name}),autocomplete:"given-name"},null,8,["modelValue","class"]),t(d,{message:e.form.errors.name},null,8,["message"])]),r("div",G,[t(l,{for:"contact_number",value:"Contact No."}),t(p,{id:"contact_number",type:"text",modelValue:e.form.contact_number,"onUpdate:modelValue":o[2]||(o[2]=s=>e.form.contact_number=s),class:u({"is-invalid":e.form.errors.contact_number}),autocomplete:"tel"},null,8,["modelValue","class"]),t(d,{message:e.form.errors.contact_number},null,8,["message"])]),r("div",q,[t(l,{for:"birth_date",value:"Birth Date"}),t(p,{id:"birth_date",type:"date",modelValue:e.form.birth_date,"onUpdate:modelValue":o[3]||(o[3]=s=>e.form.birth_date=s),class:u({"is-invalid":e.form.errors.birth_date}),autocomplete:"bday"},null,8,["modelValue","class"]),t(d,{message:e.form.errors.birth_date},null,8,["message"])]),r("div",H,[t(l,{for:"gender",value:"Gender"}),f(r("select",{name:"gender",id:"gender",class:"form-select","onUpdate:modelValue":o[4]||(o[4]=s=>e.form.gender=s)},o[11]||(o[11]=[r("option",{value:""},"Unspecified",-1),r("option",{value:"male"},"Male",-1),r("option",{value:"female"},"Female",-1)]),512),[[$,e.form.gender]])]),r("div",K,[t(l,{for:"email",value:"Email"}),t(p,{id:"email",type:"email",modelValue:e.form.email,"onUpdate:modelValue":o[5]||(o[5]=s=>e.form.email=s),class:u({"is-invalid":e.form.errors.email})},null,8,["modelValue","class"]),t(d,{message:e.form.errors.email},null,8,["message"])])])]),actions:n(()=>[t(V,{class:u({"text-white-50":e.form.processing}),disabled:e.form.processing},{default:n(()=>[f(r("div",O,o[12]||(o[12]=[r("span",{class:"visually-hidden"},"Loading...",-1)]),512),[[b,e.form.processing]]),o[13]||(o[13]=i(" Save "))]),_:1,__:[13]},8,["class","disabled"])]),_:1},8,["onSubmitted"])}const ae=M(A,[["render",Q]]);
1export{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.