1import{Q as m}from"./QSelect.72a5b75e.js";import{Q as h}from"./QPage.5b01b7db.js";import{d as f,R as p,l as u,m as b,n as y,p as e,u as o,C as l,a5 as i,x as g,q as _,v as c,f as v,aQ as d}from"./index.1d2b7042.js";import{_ as $}from"./plugin-vue_export-helper.21dcd24c.js";import"./use-key-composition.e3c8c2b6.js";import"./use-id.a0aeebed.js";import"./uid.937d8ee7.js";import"./use-dark.22afb965.js";import"./focus-manager.40072c15.js";import"./QItemLabel.41e31786.js";import"./selection.608ab59f.js";import"./scroll.da7e6e27.js";import"./QDialog.2add44d7.js";import"./use-timeout.27aa0eb3.js";import"./format.959830d0.js";const C=f({name:"ProfileEdit",data(){return{is_korean:!1,email:"",name:"",postal_code:"",address1:"",address2:"",user_type:"",phone1:"010",phone2:"",phone3:"",phoneTypeOptions:["010","011","016","017","018","019"]}},methods:{goWithdraw(){const s=this.$route.path.startsWith("/en");this.$router.push(s?"/en/mypage/withdraw":"/mypage/withdraw")},clearAddress(){this.postal_code="",this.address1="",this.address2=""},change(){const s={name:this.name,postal_code:this.postal_code,address1:this.address1,address2:this.address2,phone_number:this.phone1+this.phone2+this.phone3,user_type:this.user_type};if(!this.name){alert(this.is_korean?"\uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694":"Please enter your name.");return}if(s.phone_number.length<10){alert("\uC62C\uBC14\uB978 \uD734\uB300\uD3F0 \uBC88\uD638\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694");return}if(!this.user_type){alert("\uD68C\uC6D0\uAD6C\uBD84\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694");return}p.patch("/api/users/me",s).then(t=>{this.$router.go()}).catch(t=>{var n,r;((n=t.response.data)==null?void 0:n.detail)==="\uC790\uACA9 \uC778\uC99D\uB370\uC774\uD130(authentication credentials)\uAC00 \uC81C\uACF5\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."?(alert("\uC138\uC158\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uB85C\uADF8\uC778\uD574\uC8FC\uC138\uC694."),this.$store.dispatch("auth/logout",{type:"force"})):((r=t.response.data)==null?void 0:r.error)==="\uC790\uACA9 \uC778\uC99D\uB370\uC774\uD130(authentication credentials)\uAC00 \uC81C\uACF5\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."?(alert("\uC138\uC158\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uB85C\uADF8\uC778\uD574\uC8FC\uC138\uC694."),this.$store.dispatch("auth/logout",{type:"force"})):t.response.data.message?alert(t.response.data.message):t.response.data.error?alert(t.response.data.error):alert("\uC5D0\uB7EC\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uC5F0\uB77D\uD574\uC8FC\uC138\uC694."),console.log(t),console.log(t.response)})}},mounted(){const s=localStorage.getItem("kmusical_language_setting");s||localStorage.setItem("kmusical_language_setting","korean"),s=="korean"?(this.$i18n.locale="ko",this.is_korean=!0):s=="english"&&(this.$i18n.locale="en-US",this.is_korean=!1),p.get("/api/users/me").then(t=>{const n=t.data;this.email=n.email,this.name=n.name,this.postal_code=n.postal_code,this.address1=n.address1,this.address2=n.address2,this.user_type=n.user_type,this.phone1=n.phone_number.substring(0,3),this.phone2=n.phone_number.substring(3,7),this.phone3=n.phone_number.substring(7,11),console.log(t.data)}).catch(t=>{var n,r;((n=t.response.data)==null?void 0:n.detail)==="\uC790\uACA9 \uC778\uC99D\uB370\uC774\uD130(authentication credentials)\uAC00 \uC81C\uACF5\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."?(alert("\uC138\uC158\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uB85C\uADF8\uC778\uD574\uC8FC\uC138\uC694."),this.$store.dispatch("auth/logout",{type:"force"})):((r=t.response.data)==null?void 0:r.error)==="Authentication provider encountered an internal error."?(alert("\uC138\uC158\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uB85C\uADF8\uC778\uD574\uC8FC\uC138\uC694."),this.$store.dispatch("auth/logout",{type:"force"})):t.response.data.message?alert(t.response.data.message):t.response.data.error?alert(t.response.data.error):alert("\uC5D0\uB7EC\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uC5F0\uB77D\uD574\uC8FC\uC138\uC694."),console.log(t),console.log(t.response)})}}),w={class:"title-head"},S={class:"wrapper"},k={class:"font_SCDream6"},D={class:"contents-wrap signup-contents-wrap"},V={class:"wrapper"},T={class:"form-head"},U={class:"caption"},A={class:"font_SCDream6"},P={class:"form-wrap"},Q={class:"label-box esst"},B={class:"inner font_SCDream5"},W={class:"ko-label"},q={class:"write-box"},E={class:"label-box esst"},I={class:"inner font_SCDream5"},N={class:"ko-label"},R={class:"write-box"},F={class:"label-box"},M={class:"inner font_SCDream5"},O={class:"ko-label"},z={class:"write-box"},L={class:"address-wrap"},j={class:"address-search"},G={class:"font_SCDream5"},H={class:"label-box esst"},J={class:"inner font_SCDream5"},K={class:"ko-label"},X={class:"write-box"},Y={class:"phone-number-wrap"},Z={class:"form-head"},x={class:"caption"},ee={class:"font_SCDream6"},se={class:"member-type"},te={class:"edit-btn-wrap"};function ae(s,t,n,r,oe,ne){return u(),b(h,{class:"page-container siguppage-container"},{default:y(()=>[e("div",w,[e("div",S,[e("h2",k,o(s.$t("auth.editProfile")),1)])]),e("div",D,[e("div",V,[e("ul",null,[e("li",null,[e("div",T,[e("div",U,[e("p",null,o(s.$t("auth.requiredField")),1)]),e("h3",A,o(s.$t("auth.basicInfo")),1)]),e("div",P,[e
1("ul",null,[e("li",null,[e("div",Q,[e("div",B,[e("span",W,o(s.$t("auth.email")),1)])]),e("div",q,[l(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>s.email=a),disabled:"",type:"text",class:"text-input font_SCDream5"},null,512),[[i,s.email]])])]),e("li",null,[e("div",E,[e("div",I,[e("span",N,o(s.$t("auth.name")),1)])]),e("div",R,[l(e("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>s.name=a),type:"text",class:"text-input font_SCDream5"},null,512),[[i,s.name]])])]),e("li",{class:g({en:!s.is_korean})},[e("div",F,[e("div",M,[e("span",O,o(s.$t("auth.address")),1)])]),e("div",z,[e("div",L,[e("div",j,[l(e("input",{"onUpdate:modelValue":t[2]||(t[2]=a=>s.postal_code=a),class:"text-input font_SCDream5",placeholder:"\uC6B0\uD3B8\uBC88\uD638",disabled:""},null,512),[[i,s.postal_code]]),e("button",G,o(s.$t("auth.searchAddress")),1)]),l(e("input",{"onUpdate:modelValue":t[3]||(t[3]=a=>s.address1=a),disabled:"",type:"text",class:"text-input font_SCDream5",placeholder:"\uAE30\uBCF8\uC8FC\uC18C"},null,512),[[i,s.address1]]),l(e("input",{"onUpdate:modelValue":t[4]||(t[4]=a=>s.address2=a),type:"text",class:"text-input font_SCDream5",placeholder:"\uB098\uBA38\uC9C0\uC8FC\uC18C(\uC120\uD0DD \uC785\uB825 \uAC00\uB2A5)"},null,512),[[i,s.address2]]),s.postal_code||s.address1||s.address2?(u(),_("button",{key:0,type:"button",class:"font_SCDream5",style:{"margin-top":"6px",padding:"4px 12px",border:"1px solid #eb004f",color:"#eb004f",background:"#fff","border-radius":"4px",cursor:"pointer"},onClick:t[5]||(t[5]=(...a)=>s.clearAddress&&s.clearAddress(...a))},o(s.is_korean?"\uC8FC\uC18C \uC0AD\uC81C":"Remove Address"),1)):c("",!0)])])],2),e("li",null,[e("div",H,[e("div",J,[e("span",K,o(s.$t("auth.phone")),1)])]),e("div",X,[e("div",Y,[v(m,{modelValue:s.phone1,"onUpdate:modelValue":t[6]||(t[6]=a=>s.phone1=a),options:s.phoneTypeOptions,"menu-anchor":"bottom left","menu-self":"top left",behavior:"menu","map-options":""},null,8,["modelValue","options"]),t[17]||(t[17]=e("span",{class:"dash"},null,-1)),l(e("input",{type:"text","onUpdate:modelValue":t[7]||(t[7]=a=>s.phone2=a),maxlength:"4",class:"text-input font_SCDream5"},null,512),[[i,s.phone2]]),t[18]||(t[18]=e("span",{class:"dash"},null,-1)),l(e("input",{type:"text","onUpdate:modelValue":t[8]||(t[8]=a=>s.phone3=a),maxlength:"4",class:"text-input font_SCDream5"},null,512),[[i,s.phone3]])])])])])])]),e("li",null,[e("div",Z,[e("div",x,[e("p",null,o(s.$t("auth.requiredField")),1)]),e("h3",ee,o(s.$t("auth.memberType")),1)]),e("div",se,[e("label",null,[l(e("input",{"onUpdate:modelValue":t[9]||(t[9]=a=>s.user_type=a),type:"radio",value:"investor",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_investor")),1)]),e("label",null,[l(e("input",{"onUpdate:modelValue":t[10]||(t[10]=a=>s.user_type=a),value:"producer",type:"radio",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_producer")),1)]),e("label",null,[l(e("input",{"onUpdate:modelValue":t[11]||(t[11]=a=>s.user_type=a),type:"radio",value:"general",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_general")),1)]),e("label",null,[l(e("input",{"onUpdate:modelValue":t[12]||(t[12]=a=>s.user_type=a),type:"radio",value:"student",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_student")),1)]),e("label",null,[l(e("input",{type:"radio","onUpdate:modelValue":t[13]||(t[13]=a=>s.user_type=a),value:"institute",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_institute")),1)]),e("label",null,[l(e("input",{"onUpdate:modelValue":t[14]||(t[14]=a=>s.user_type=a),type:"radio",value:"group",class:"radio-input",name:"memberType"},null,512),[[d,s.user_type]]),e("span",null,o(s.$t("auth.memberType_group")),1)])])])]),e("div",te,[e("button",{class:"font_SCDream5",onClick:t[15]||(t[15]=(...a)=>s.change&&s.change(...a))},o(s.$t("auth.edit")),1),e("button",{type:"button",class:"font_SCDream5 withdraw-btn",onClick:t[16]||(t[16]=(...a)=>s.goWithdraw&&s.goWithdraw(...a))},o(s.$t("auth.withdraw")),1)])])])]),_:1})}var $e=$(C,[["render",ae]]);export{$e 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.