1"use strict";(self["webpackChunkgo2joy_ha"]=self["webpackChunkgo2joy_ha"]||[]).push([[1935],{40607:function(s,e,t){t.d(e,{A:function(){return c}});var r=function(){var s=this,e=s._self._c;return e("section",{staticClass:"section"},[e("header",{staticClass:"section__header"},[s.title||s.description?e("div",[s.title?e("h1",{staticClass:"section__title",domProps:{textContent:s._s(s.title)}}):s._e(),s.description?e("p",{staticClass:"section__description",domProps:{textContent:s._s(s.description)}}):s._e()]):s._e(),s.isHeaderCustom||!s.$route.meta.breadcrumb?.title||s.$route.meta.noShowHeader?s._e():e("el-row",[e("div",{staticClass:"flex-center"},[e("el-col",{attrs:{span:16,offset:s.isMobile?1:4}},[e("el-link",{attrs:{underline:!1,type:"primary"},on:{click:function(e){return s.onBack()}}},[e("span",{directives:[{name:"show",rawName:"v-show",value:s.isAccountHotelGroup()&&"notification"!==s.$route.name,expression:"isAccountHotelGroup() && $route.name !== 'notification'"}],staticClass:"icon-arrow-left-2",staticStyle:{"margin-right":"8px"}})]),e("span",{staticClass:"title3 neutral-900"},[s._v(s._s(s.setBreadcrumbTitle(s.$route)))])],1)],1)]),s._t("header")],2),e("div",{staticClass:"section__body",class:{"
1is-mobile":s.isMobile}},[e("el-row",[e("el-col",{attrs:{span:s.isMobile?22:16,offset:s.isMobile?1:4}},[s._t("default")],2)],1)],1),e("div",{staticClass:"section__footer"},[s._t("footer")],2)])},a=[],o=t(4780),i=t(12966),l={name:"TrueSection",props:{title:{type:String,default:""},description:{type:String,default:""},isHeaderCustom:{type:Boolean,default:!1}},data(){return{OS:i.OS,detectDevice:o.e}},methods:{onBack(){this.$router.go(-1)}}},n=l,m=t(81656),d=(0,m.A)(n,r,a,!1,null,"5ea6e298",null),c=d.exports},61935:function(s,e,t){t.r(e),t.d(e,{default:function(){return u}});var r=function(){var s=this,e=s._self._c;return e("ha-offset-section",[e("div",{staticClass:"flex-between"},[s.$route.meta.breadcrumb?.title?e("div",{staticClass:"title2 neutral-900",staticStyle:{margin:"10px 0 12px"}},[s._v(" "+s._s(s.setBreadcrumbTitle(s.$route))+" ")]):s._e(),e("div",{staticClass:"flex-center"},[e("el-button",{attrs:{type:"info",size:"small"},on:{click:function(e){return s.$router.go(-1)}}},[s._v(" "+s._s(s.$t("button.back"))+" ")]),s.hasPermission("profile","pModify")?e("el-button",{attrs:{type:"primary",size:"small",loading:s.isSubmitting},on:{click:s.checkButtonDisable}},[s._v(" "+s._s(s.$t("button.save"))+" ")]):s._e()],1)]),e("div",[e("el-form",{ref:"form",attrs:{model:s.form,rules:s.rules}},[e("div",{staticClass:"custom-card-grid"},[e("div",[e("p",{staticClass:"body-medium-semi-bold neutral-700"},[s._v(" "+s._s(s.$t("profile.enterprise_information"))+" ")]),e("p",{staticClass:"body-small-regular neutral-500"},[s._v(" "+s._s(s.$t("profile.basic_information_about_the_enterprise_or_the_hotel_household_business"))+" ")])]),e("div",{staticClass:"w-100"},[e("div",{staticClass:"flex-gap-md"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.name_of_enterprise"))+" ")]),e("el-form-item",[e("el-input",{attrs:{disabled:"",value:s.form.companyName?s.form.companyName:s.$t("profile.updating")}})],1)],1)]),e("div",{staticClass:"flex-gap-md"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.tax_code"))+" ")]),e("el-form-item",[e("el-input",{attrs:{disabled:"",value:s.form.taxId?s.form.taxId:"N/A"}})],1)],1),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.number_enterprise_registration_certificate"))+" ")]),e("el-form-item",[e("el-input",{attrs:{disabled:"",value:s.form.businessLicense?s.form.businessLicense:s.$t("profile.updating")}})],1)],1)])])]),e("el-divider",{staticClass:"custom-divider"}),e("div",{staticClass:"custom-card-grid"},[e("div",[e("p",{staticClass:"body-medium-semi-bold neutral-700"},[s._v(" "+s._s(s.$t("profile.account_information"))+" ")]),e("p",{staticClass:"body-small-regular neutral-500"},[s._v(" "+s._s(s.$t("profile.basic_information_about_the_hotels_hotel_admin_account"))+" ")])]),e("div",{staticClass:"w-100"},[e("div",{staticClass:"flex-gap-md"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.user_id"))+" ")]),e("el-form-item",[e("el-input",{attrs:{disabled:!0,placeholder:s.$t("profile.user_id")},model:{value:s.form.userId,callback:function(e){s.$set(s.form,"userId",e)},expression:"form.userId"}})],1)],1),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_name"))+" "),e("span",{staticClass:"secondary-red-600"},[s._v("*")])]),e("el-form-item",{attrs:{prop:"fullName"}},[e("el-input",{attrs:{placeholder:s.$t("profile.profile_name")},model:{value:s.form.fullName,callback:function(e){s.$set(s.form,"fullName",e)},expression:"form.fullName"}})],1)],1)]),e("div",{staticClass:"flex-gap-md"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_mobile"))+" "),e("span",{staticClass:"secondary-red-600"},[s._v("*")])]),e("el-form-item",{attrs:{prop:"mobile"}},[e("el-input-number",{staticClass:"input-number",attrs:{controls:!1,placeholder:s.$t("profile.profile_mobile")},model:{value:s.form.mobile,callback:function(e){s.$set(s.form,"mobile",e)},expression:"form.mobile"}})],1)],1),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_email"))+" ")]),e("el-form-item",[e("el-input",{attrs:{placeholder:s.$t("profile.profile_email")},model:{value:s.form.email,callback:function(e){s.$set(s.form,"email",e)},expression:"form.email"}})],1)],1)]),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_address"))+" ")]),e("el-form-item",[e("el-input",{attrs:{placeholder:s.$t("profile.profile_address")},model:{value:s.form.address,callback:function(e){s.$set(s.form,"address",e)},expression:"form.address"}})],1)],1),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_memo"))+" ")]),e("el-form-item",[e("el-input",{staticStyle:{"padding-bottom":"10px"},attrs:{type:"textarea",rows:5,placeholder:s.$t("profile.profile_memo")},model:{value:s.form.memo,callback:function(e){s.$set(s.form,"memo",e)},expression:"form.memo"}})],1)],1)])]),e("el-divider",{staticClass:"custom-divider"}),e("div",{staticClass:"custom-card-grid"},[e("div",[e("p",{staticClass:"body-medium-semi-bold neutral-700"},[s._v(" "+s._s(s.$t("profile.change_password"))+" ")]),e("p",{staticClass:"body-small-regular neutral-500"},[s._v(" "+s._s(s.$t("profile.change_the_login_password_for_your_account"))+" ")])]),e("div",{ref:"passwordSection",staticClass:"w-100"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_password"))+" ")]),e("el-form-item",[e("el-input",{ref:"passwordInput",attrs:{placeholder:s.$t("profile.profile_password"),type:s.showPassword?"text":"password"},model:{value:s.form.curPassword,callback:function(e){s.$set(s.form,"curPassword","string"===typeof e?e.trim():e)},expression:"form.curPassword"}},[e("span",{staticClass:"el-input__icon",attrs:{slot:"suffix"},on:{click:function(e){s.showPassword=!s.showPassword}},slot:"suffix"},[e("span",{class:s.showPassword?"icon-eye-on":"icon-eye-off"}
1)])])],1)],1),e("div",{staticClass:"flex-gap-md"},[e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_new_password"))+" ")]),e("el-form-item",{attrs:{prop:"newPassword"}},[e("el-input",{attrs:{placeholder:s.$t("profile.profile_new_password"),type:s.showNewPassword?"text":"password"},model:{value:s.form.newPassword,callback:function(e){s.$set(s.form,"newPassword","string"===typeof e?e.trim():e)},expression:"form.newPassword"}},[e("span",{staticClass:"el-input__icon",attrs:{slot:"suffix"},on:{click:function(e){s.showNewPassword=!s.showNewPassword}},slot:"suffix"},[e("span",{class:s.showNewPassword?"icon-eye-on":"icon-eye-off"})])])],1)],1),e("div",{staticClass:"w-100"},[e("p",{staticClass:"body-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.profile_confirm_password"))+" ")]),e("el-form-item",{attrs:{prop:"confirmPassword"}},[e("el-input",{attrs:{placeholder:s.$t("profile.profile_confirm_password"),type:s.showConfirmPassword?"text":"password"},model:{value:s.form.confirmPassword,callback:function(e){s.$set(s.form,"confirmPassword","string"===typeof e?e.trim():e)},expression:"form.confirmPassword"}},[e("span",{staticClass:"el-input__icon",attrs:{slot:"suffix"},on:{click:function(e){s.showConfirmPassword=!s.showConfirmPassword}},slot:"suffix"},[e("span",{class:s.showConfirmPassword?"icon-eye-on":"icon-eye-off"})])])],1)],1)]),e("div",{staticClass:"custom-card-info"},[e("ul",[e("li",[e("p",{staticClass:"body-extra-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.password_length_must_be_between_8_and_32_characters_no_spaces_allowed"))+" ")])]),e("li",[e("p",{staticClass:"body-extra-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.must_include_uppercase_letters_lowercase_letters_and_numbers"))+" ")])]),e("li",[e("p",{staticClass:"body-extra-small-regular neutral-700"},[s._v(" "+s._s(s.$t("profile.cannot_be_the_same_as_your_current_password"))+" ")])])])])])])],1)],1)])},a=[],o=t(73586),i=t(40607),l=t(12966),n=t(49459),m={name:"Profile",components:{HaOffsetSection:i.A},data(s){const e=(e,t,r)=>{const a=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)\S{8,32}$/;t&&!a.test(t)?r(new Error(s.$t("profile.password_must_be_x_to_y_characters_long"))):r()},t=(e,t,r)=>{s.form.newPassword&&!s.form.confirmPassword?r(new Error(s.$t("validation.required"))):s.form.confirmPassword&&s.form.newPassword!==s.form.confirmPassword?r(new Error(s.$t("profile.passwords_do_not_match_please_try_again"))):r()};return{isSubmitting:!1,ui:{isLoading:!1},form:{userId:"",taxId:"",fullName:"",mobile:"",address:"",email:"",memo:"",numOfRecord:"",curPassword:"",newPassword:"",confirmPassword:"",businessLicense:"",companyName:""},dataProfile:[],showPassword:!1,showNewPassword:!1,showConfirmPassword:!1,originalForm:{},rules:{fullName:[{validator:s.validateRequired,trigger:["blur"]}],mobile:[{validator:s.validateRequired,trigger:["blur"]}],newPassword:[{validator:e,trigger:["blur","change"]}],confirmPassword:[{validator:t,trigger:["blur","change"]}]}}},created(){this.show()},methods:{checkButtonDisable(){this.$refs.form.validate(s=>{if(!s)return!1;this.onSave()})},show(){try{let s=this;o.A.profile.show().then(function(e){let t=e.data.data;s.form.userId=t.userId,s.form.taxId=t.hotel.taxId,s.form.fullName=t.fullName,s.form.mobile=t.mobile,s.form.address=t.address,s.form.email=t.email,s.form.memo=t.memo,s.form.numOfRecord=t.numOfRecord,s.form.businessLicense=t.hotel.businessLicense,s.form.companyName=t.hotel.companyName,s.originalForm=JSON.parse(JSON.stringify(s.form)),setTimeout(()=>{s.$refs.passwordInput?.focus()},1200)}).catch(e=>{s.$message({type:"error",message:e.response?e.response.data.message:e})})}catch(s){return}finally{this.ui.isLoading=!1}},onSave(){this.onTrackingAmplitude(l.So.clickSaveAtEditMyProfile,{NewPassword:this.form.newPassword!==this.originalForm.newPassword?"Changed":"Unchanged",Name:this.form.fullName!==this.originalForm.fullName?"Changed":"Unchanged",Mobile:this.form.mobile!==this.originalForm.mobile?"Changed":"Unchanged",Email:this.form.email!==this.originalForm.email?"Changed":"Unchanged"}),this.isSubmitting=!0;let s=this;try{let e={userId:s.form.userId,fullName:s.form.fullName,mobile:s.form.mobile?`0${s.form.mobile}`:null,address:s.form.address,email:s.form.email,memo:s.form.memo,numOfRecord:s.form.numOfRecord,curPassword:s.form.curPassword?s.form.curPassword:null,password:s.form.newPassword?s.form.newPassword:null,confirmPassword:s.form.confirmPassword?s.form.confirmPassword:null};o.A.profile.update(e).then(function(){s.$message({type:"success",message:`${s.$t("message.update.success")}`}),s.form.newPassword&&s.form.confirmPassword&&n.A.$emit("onUpdateBannerRequestChangePassword",!1)}).catch(s=>{console.log("error",s)})}catch(e){s.$message({type:"error",message:e.response?e.response.data.message:e})}finally{s.isSubmitting=!1}}}},d=m,c=t(81656),f=(0,c.A)(d,r,a,!1,null,"626f54e0",null),u=f.exports}}]);
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.