{"version":3,"sources":["webpack:///./src/pages/account/profile/AccountProfile.vue?e2c6","webpack:///./src/pages/account/profile/AccountProfile.vue","webpack:///./src/pages/account/profile/AccountProfile.vue?f2b2","webpack:///./src/pages/account/profile/AccountProfile.vue?cb98"],"names":["render","this$1","this","_vm","_h","$createElement","_c","_self","staticClass","attrs","_v","$v","user","firstName","$error","scopedSlots","_u","key","fn","required","_e","lastName","alpha","proxy","model","value","callback","$$v","$set","expression","userRole","email","phone","on","keyupPhoneNumber","listOptions","maritalStatus","education","industry","position","keyupOfficeNumber","keyupHomeNumber","address","getProvinces","province","onProvinceChange","cityPlaceholder","getCities","city","resetUserInfo","onSubmit","_s","saveButtonText","staticRenderFns","userModule","configModule","use","loading","label","roles","Object","entries","role","provinces","length","find","name","cities","id","provinceId","list","map","_constructUserInfo","currentUserInfo","officeNumber","homeNumber","$touch","$invalid","payload","updateUserInfo","getUserInfo","console","log","data","employerName","line1","line2","district","zipCode","userInfoExists","Getter","Action","immediate","components","TabLayout","Loader","Dropdown","CustomInput","validations","component"],"mappings":"uHAAA,IAAIA,EAAS,WACb,IAAIC,EAASC,KACTC,EAAID,KAASE,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,aAAa,CAACE,YAAY,aAAaC,MAAM,CAAC,QAAU,UAAU,UAAY,eAAe,CAACH,EAAG,MAAM,CAACE,YAAY,SAAS,CAACF,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACF,EAAG,MAAM,CAACE,YAAY,sDAAsD,CAACF,EAAG,KAAK,CAACE,YAAY,8CAA8C,CAACL,EAAIO,GAAG,aAAaJ,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAG,MAAM,CAACE,YAAY,6BAA6B,CAACF,EAAG,cAAc,CAACG,MAAM,CAAC,MAAQ,aAAa,WAAa,QAAQ,MAAQN,EAAIQ,GAAGC,KAAKC,UAAUC,QAAQC,YAAYZ,EAAIa,GAAG,CAAC,CAACC,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EAAK/C,cACpBC,UAAW8C,EAAK9C,UAChBC,SAAU6C,EAAK7C,SACfC,SAAU4C,EAAK5C,SACf6C,aAAcD,EAAKC,aACnBV,aAAcS,EAAKT,aACnBC,WAAYQ,EAAKR,WACjBjC,QAAS,CACP2C,MAAK,UAAEF,EAAKzC,eAAP,aAAE,EAAc2C,MACrBC,MAAK,UAAEH,EAAKzC,eAAP,aAAE,EAAc4C,MACrB1C,SAAQ,UAAEuC,EAAKzC,eAAP,aAAE,EAAcE,SACxBI,KAAI,UAAEmC,EAAKzC,eAAP,aAAE,EAAcM,KACpBuC,SAAQ,UAAEJ,EAAKzC,eAAP,aAAE,EAAc6C,SACxBC,QAAO,UAAEL,EAAKzC,eAAP,aAAE,EAAc8C,YAxI/B,iCA8IE,SAAoBC,GACdA,IACFvF,KAAKU,KAAOV,KAAKsE,mBAAmBtE,KAAKuE,sBAhJ/C,GAA4C,QACJ,gBAArCnB,EAAWoC,OAAO,oB,sCACkB,gBAApCpC,EAAWoC,OAAO,mB,qCACY,gBAA9BnC,EAAamC,OAAO,W,6BACa,gBAAjCnC,EAAamC,OAAO,c,gCACgB,gBAApCpC,EAAWqC,OAAO,mB,qCAGe,gBAAjCrC,EAAWqC,OAAO,gB,kCAsInB,gBADC,eAAM,iBAAkB,CAAEC,WAAW,K,kCAKrC,MAlJkB,EAAc,gBArBlC,eAAU,CACTC,WAAY,CACVC,UAAA,OACAC,OAAA,OACAC,SAAA,OACAC,YAAA,QAEFC,YAAa,CACXtF,KAAM,CACJC,UAAW,CACTM,SAAA,eAEFE,SAAU,CACRF,SAAA,eAEFa,MAAO,CACLb,SAAA,oBAKa,WCxO0vB,I,YCO3wBgF,EAAY,eACd,EACAnG,EACAqD,GACA,EACA,KACA,KACA,MAIa,aAAA8C,E","file":"js/chunk-2d0b30bc.a67d2c80.js","sourcesContent":["var render = function () {\nvar this$1 = this;\nvar _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('tab-layout',{staticClass:\"pt-6 px-12\",attrs:{\"tabName\":\"Account\",\"activeTab\":\"My Profile\"}},[_c('div',{staticClass:\"py-10\"},[_c('div',{staticClass:\"flex flex-col\"},[_c('div',{staticClass:\"w-full px-10 py-6 mb-10 bg-white shadow-md rounded\"},[_c('h3',{staticClass:\"uppercase font-semibold text-blue-900 mb-4\"},[_vm._v(\"ACCOUNT\")]),_c('div',{staticClass:\"-mx-2 flex flex-wrap\"},[_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"First Name\",\"validation\":\"alpha\",\"error\":_vm.$v.user.firstName.$error},scopedSlots:_vm._u([{key:\"input-error\",fn:function(){return [(!_vm.$v.user.firstName.required)?_c('div',{staticClass:\"mt-2 error-message\"},[_vm._v(\" Firstname is required \")]):_vm._e(),(!_vm.$v.user.lastName.alpha)?_c('div',{staticClass:\"mt-2 error-message\"},[_vm._v(\" Firstname should be letters only. \")]):_vm._e()]},proxy:true}]),model:{value:(_vm.$v.user.firstName.$model),callback:function ($$v) {_vm.$set(_vm.$v.user.firstName, \"$model\", $$v)},expression:\"$v.user.firstName.$model\"}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('CustomInput',{attrs:{\"validation\":\"alpha\",\"label\":\"Last Name\",\"error\":_vm.$v.user.lastName.$error},scopedSlots:_vm._u([{key:\"input-error\",fn:function(){return [(!_vm.$v.user.lastName.required)?_c('div',{staticClass:\"mt-2 error-message\"},[_vm._v(\" Lastname should be letters only. \")]):_vm._e(),(!_vm.$v.user.lastName.alpha)?_c('div',{staticClass:\"mt-2 error-message\"},[_vm._v(\" Invalid character string \")]):_vm._e()]},proxy:true}]),model:{value:(_vm.$v.user.lastName.$model),callback:function ($$v) {_vm.$set(_vm.$v.user.lastName, \"$model\", $$v)},expression:\"$v.user.lastName.$model\"}})],1),_c('div',{staticClass:\"w-1/2 px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Role\",\"readonly\":true,\"value\":_vm.userRole}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Email\",\"readonly\":true,\"value\":_vm.user.email}})],1),_c('div',{staticClass:\"w-full px-2\"},[_c('CustomInput',{attrs:{\"label\":\"Mobile Number\",\"type\":\"number\",\"maxlength\":\"14\",\"error\":_vm.$v.user.phone.$error},on:{\"keyup\":_vm.keyupPhoneNumber},scopedSlots:_vm._u([{key:\"input-error\",fn:function(){return [(!_vm.$v.user.phone.required)?_c('div',{staticClass:\"mt-2 error-message\"},[_vm._v(\" Mobile Number is required \")]):_vm._e()]},proxy:true}]),model:{value:(_vm.$v.user.phone.$model),callback:function ($$v) {_vm.$set(_vm.$v.user.phone, \"$model\", $$v)},expression:\"$v.user.phone.$model\"}})],1)])]),_c('div',{staticClass:\"w-full px-10 py-6 mb-10 bg-white shadow-md rounded\"},[_c('h3',{staticClass:\"uppercase font-semibold text-blue-900 mb-4\"},[_vm._v(\"PROFILE\")]),_c('div',{staticClass:\"-mx-2 flex flex-wrap\"},[_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"Marital Status\",\"placeholder\":\"\",\"options\":_vm.listOptions.maritalStatus,\"value\":_vm.user.maritalStatus},on:{\"input\":function (value) { return (this$1.user.maritalStatus = value); }}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"Education\",\"placeholder\":\"\",\"options\":_vm.listOptions.education,\"value\":_vm.user.education},on:{\"input\":function (value) { return (this$1.user.education = value); }}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"Industry\",\"placeholder\":\"\",\"options\":_vm.listOptions.industry,\"value\":_vm.user.industry},on:{\"input\":function (value) { return (this$1.user.industry = value); }}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"Position/Title\",\"placeholder\":\"\",\"options\":_vm.listOptions.position,\"value\":_vm.user.position},on:{\"input\":function (value) { return (this$1.user.position = value); }}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Employer Name\"},model:{value:(_vm.user.employerName),callback:function ($$v) {_vm.$set(_vm.user, \"employerName\", $$v)},expression:\"user.employerName\"}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Office Number\"},on:{\"keyup\":_vm.keyupOfficeNumber},model:{value:(_vm.user.officeNumber),callback:function ($$v) {_vm.$set(_vm.user, \"officeNumber\", $$v)},expression:\"user.officeNumber\"}})],1),_c('div',{staticClass:\"w-full px-2\"},[_c('CustomInput',{attrs:{\"label\":\"Home Number\"},on:{\"keyup\":_vm.keyupHomeNumber},model:{value:(_vm.user.homeNumber),callback:function ($$v) {_vm.$set(_vm.user, \"homeNumber\", $$v)},expression:\"user.homeNumber\"}})],1)]),_c('div',{staticClass:\"w-full px-2 mb-6 h-8 border-b border-grey\"}),_c('h3',{staticClass:\"uppercase font-semibold text-blue-900 mb-4\"},[_vm._v(\"ADDRESS\")]),_c('div',{staticClass:\"-mx-2 flex flex-wrap\"},[_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Address 1\"},model:{value:(_vm.user.address.line1),callback:function ($$v) {_vm.$set(_vm.user.address, \"line1\", $$v)},expression:\"user.address.line1\"}})],1),_c('div',{staticClass:\"w-full px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Address 2\"},model:{value:(_vm.user.address.line2),callback:function ($$v) {_vm.$set(_vm.user.address, \"line2\", $$v)},expression:\"user.address.line2\"}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"Province\",\"placeholder\":\"\",\"options\":_vm.getProvinces,\"value\":_vm.user.address.province},on:{\"input\":_vm.onProvinceChange}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('Dropdown',{attrs:{\"mainLabel\":\"City\",\"placeholder\":_vm.cityPlaceholder,\"options\":_vm.getCities,\"value\":_vm.user.address.city},on:{\"input\":function (value) { return (this$1.user.address.city = value); }}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2 mb-4\"},[_c('CustomInput',{attrs:{\"label\":\"Barangay\"},model:{value:(_vm.user.address.district),callback:function ($$v) {_vm.$set(_vm.user.address, \"district\", $$v)},expression:\"user.address.district\"}})],1),_c('div',{staticClass:\"w-full md:w-1/2 px-2\"},[_c('CustomInput',{attrs:{\"type\":\"number\",\"label\":\"Zip Code/Postal\"},model:{value:(_vm.user.address.zipCode),callback:function ($$v) {_vm.$set(_vm.user.address, \"zipCode\", $$v)},expression:\"user.address.zipCode\"}})],1)])]),_c('div',{staticClass:\"px-10 flex items-center justify-end\"},[_c('div',{staticClass:\"flex\"},[_c('button',{staticClass:\"btn btn-grey mr-3\",on:{\"click\":_vm.resetUserInfo}},[_vm._v(\" Cancel \")]),_c('button',{staticClass:\"min-w-36 btn btn-orange flex items-center justify-center\",on:{\"click\":_vm.onSubmit}},[(_vm.loading)?_c('loader',{attrs:{\"icon-class\":\"w-5 h-5 mr-4\"}}):_vm._e(),_c('span',[_vm._v(_vm._s(_vm.saveButtonText))])],1)])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Watch } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\nimport Vuelidate from \"vuelidate\";\nimport { required } from \"vuelidate/lib/validators\";\n\nimport { MARITAL_STATUS, EDUCATION, INDUSTRY, POSITION } from \"@/constants\";\nimport { TabLayout } from \"@/layouts\";\nimport { UserInfo } from \"@/types\";\nimport { getRoles, formatPhoneNumberUtil } from \"@/utils/common\";\nimport { Loader, Dropdown, CustomInput } from \"@/components\";\n\nconst userModule = namespace(\"user\");\nconst configModule = namespace(\"config\");\n\nVue.use(Vuelidate);\n\n@Component({\n components: {\n TabLayout,\n Loader,\n Dropdown,\n CustomInput,\n },\n validations: {\n user: {\n firstName: {\n required,\n },\n lastName: {\n required,\n },\n phone: {\n required,\n },\n },\n },\n})\nexport default class AccountProfile extends Vue {\n @userModule.Getter(\"currentUserInfo\") currentUserInfo!: UserInfo;\n @userModule.Getter(\"userInfoExists\") userInfoExists!: boolean;\n @configModule.Getter(\"cities\") cities!: Array;\n @configModule.Getter(\"provinces\") provinces!: Array;\n @userModule.Action(\"updateUserInfo\") updateUserInfo!: (\n userInfo: UserInfo\n ) => void;\n @userModule.Action(\"getUserInfo\") getUserInfo!: () => void;\n\n user = {} as UserInfo;\n loading = false;\n\n get saveButtonText(): string {\n return this.loading ? \"Saving User Info\" : \"Save\";\n }\n\n get listOptions() {\n return {\n maritalStatus: MARITAL_STATUS,\n education: EDUCATION,\n industry: INDUSTRY,\n position: POSITION,\n };\n }\n\n get userRole(): string {\n let label = \"\";\n const roles = getRoles();\n\n for (const [key, value] of Object.entries(roles)) {\n if (value === this.user.role) {\n label = key;\n }\n }\n\n return label;\n }\n\n get getCities(): Array {\n // return [\"Manila\", \"Quezon\"];\n if (!this.provinces.length) {\n return [];\n }\n\n const province = this.provinces.find((province) => {\n return province.name === this.user.address!.province;\n });\n\n if (!province) {\n return [];\n }\n\n const city = this.cities.find((city) => {\n return province.id === city.provinceId;\n });\n\n const list = city.list.map((city: any) => city.name);\n\n return list;\n }\n\n get getProvinces(): Array {\n if (!this.provinces.length) {\n return [];\n }\n\n return this.provinces.map((province) => {\n return province.name;\n });\n }\n\n get cityPlaceholder() {\n return !this.user.address!.province ? \"Please select a province first\" : \"\";\n }\n\n onProvinceChange(value: any) {\n this.user.address!.province = value;\n }\n\n resetUserInfo() {\n this.user = this._constructUserInfo(this.currentUserInfo);\n }\n\n keyupOfficeNumber() {\n this.user.officeNumber = formatPhoneNumberUtil(\n this.user.officeNumber as string\n );\n }\n\n keyupHomeNumber() {\n this.user.homeNumber = formatPhoneNumberUtil(\n this.user.homeNumber as string\n );\n }\n\n keyupPhoneNumber() {\n this.user.phone = formatPhoneNumberUtil(this.user.phone as string);\n }\n\n async onSubmit(): Promise {\n this.$v.$touch();\n if (this.$v.$invalid) return;\n this.loading = true;\n\n try {\n const payload = this._constructUserInfo(this.user);\n await this.updateUserInfo(payload);\n await this.getUserInfo();\n } catch (error) {\n console.log(error);\n } finally {\n this.loading = false;\n }\n }\n\n _constructUserInfo(data: UserInfo): UserInfo {\n return {\n firstName: data.firstName,\n lastName: data.lastName,\n role: data.role,\n email: data.email,\n phone: data.phone,\n maritalStatus: data.maritalStatus,\n education: data.education,\n industry: data.industry,\n position: data.position,\n employerName: data.employerName,\n officeNumber: data.officeNumber,\n homeNumber: data.homeNumber,\n address: {\n line1: data.address?.line1,\n line2: data.address?.line2,\n province: data.address?.province,\n city: data.address?.city,\n district: data.address?.district,\n zipCode: data.address?.zipCode,\n },\n };\n }\n\n @Watch(\"userInfoExists\", { immediate: true })\n watchUserInfoExists(userInfoExists: boolean) {\n if (userInfoExists) {\n this.user = this._constructUserInfo(this.currentUserInfo);\n }\n }\n}\n","import mod from \"-!../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/.pnpm/thread-loader@2.1.3_webpack@4.46.0/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/.pnpm/babel-loader@8.2.3_7f185b6b63b1b293762538aa414d8c1b/node_modules/babel-loader/lib/index.js!../../../../node_modules/.pnpm/ts-loader@6.2.2_typescript@3.9.10/node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountProfile.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/.pnpm/thread-loader@2.1.3_webpack@4.46.0/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/.pnpm/babel-loader@8.2.3_7f185b6b63b1b293762538aa414d8c1b/node_modules/babel-loader/lib/index.js!../../../../node_modules/.pnpm/ts-loader@6.2.2_typescript@3.9.10/node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/node_modules/vue-loader/lib/index.js??vue-loader-options!./AccountProfile.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AccountProfile.vue?vue&type=template&id=48307552&\"\nimport script from \"./AccountProfile.vue?vue&type=script&lang=ts&\"\nexport * from \"./AccountProfile.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}