{"version":3,"sources":["webpack:///./src/services/queries.js","webpack:///./src/services/accounts.js","webpack:///./src/views/PublicSite/QueryCreation/selectionUserType.vue?2e0f","webpack:///./src/views/PublicSite/QueryCreation/selectionUserType.vue?0fa1","webpack:///src/views/PublicSite/QueryCreation/selectionUserType.vue","webpack:///./src/views/PublicSite/QueryCreation/selectionUserType.vue?dcd7","webpack:///./src/views/PublicSite/QueryCreation/selectionUserType.vue?149f","webpack:///./src/mixins/currentQueryInCreation.js"],"names":["apiQueries","axios","create","baseURL","Vue","prototype","$Settings","all","coreApi","url","withCredentials","headers","Accept","jwt","excecutionMode","apiEvents","axiosRetry","retries","shouldResetTimeout","retryDelay","retryCount","interceptors","request","use","configuration","currentUserAccount","$Authentication","getAccount","sessionId","getSessionId","CurrentUserToken","token","response","error","status","store","dispatch","Promise","reject","queryData","claimCreatorId","claimCreatorRolId","post","CurrentUserId","CurrentUserRoleId","GetQueriesByClient","get","getById","id","getResumeByWfStatus","changeWfStatusFromAction","data","getByWfStatusesV2","wfStateType","pageNumber","pageSize","channel","filter","expectedPageNumber","expectedPageSize","expectedChannel","currentfilters","JSON","stringify","apiAccounts","accountsApi","config","checkIsValidPasswordPattern","password","getByIdentification","number","identificationNumber","btoa","exists","getByUserTypeAndIdentification","userType","getByRole","roleId","accountData","update","put","forceChangePassword","passwordData","sendOtp","verifyOtp","verifyOtpData","render","_vm","this","_h","$createElement","_c","_self","_m","staticClass","_v","staticStyle","attrs","nativeOn","$event","enter","allConstants","security","userTypes","person","business","staticRenderFns","mixins","baseView","methods","currentQueryInCreation","currentQueryInCreationCreateOrUpdate","then","component","allConstantsMixin","computed","$store","getters","startCurrentQueryInCreation","isRegisteredUser","fromPublicSite","initialStep","queries","creationSteps","previousStep","collectInstitutionData","collectBasicData","registeredUser","currentStep","query","currentQueryInCreationClear","currentQueryInCreationGoForeward","actualQueryInCreation","currentQueryInCreationGoBackward","createRealQuery","claimantIdentificationNumber","claimantName","currentUserIsAuthenticated","roles","role","userRolesCodes","claimant","length","chanelCodes","claimantApp","userName","visiblename","ddcExecutive","ddcDefender","ddcApp","collectedBasicData","currentClaimInCreation","name","surname","accountId","rut","finnancialInstitute","collectedInstitutionData","comments","collectedRequestData","productType","collectedProductData","documents","collectedDocumentsData","map","document","blobId","typeName","fileName","realName","contentType","blobContentType","contentLenght","blobSize","toString","queriesService","createAccount","email","phone","cellphone","address","region","collectedAddressData","city","province","commune","streetAddress","street","apartment","building","bank","code","includeCredentialCreation","passwordForCredential","secret","accountsService","updateAccount"],"mappings":"4MAKMA,EAAaC,IAAMC,OAAO,CAC9BC,QAAS,GAAF,OAAKC,OAAIC,UAAUC,UAAUC,IAAIC,QAAQC,IAAzC,YACPC,iBAAiB,EACjBC,QAAS,CACPC,OAAQ,mBACR,eAAgB,mBAChB,2CAAqCR,OAAIC,UAAUC,UAAUC,IAAIM,KACjE,2BAAqBT,OAAIC,UAAUC,UAAUC,IAAIO,mBAI/CC,EAAYd,IAAMC,OAAO,CAC7BC,QAAS,GAAF,OAAKC,OAAIC,UAAUC,UAAUC,IAAIC,QAAQC,IAAzC,kBACPC,iBAAiB,EACjBC,QAAS,CACPC,OAAQ,mBACR,eAAgB,mBAChB,2CAAqCR,OAAIC,UAAUC,UAAUC,IAAIM,KACjE,2BAAqBT,OAAIC,UAAUC,UAAUC,IAAIO,mBAIrDE,IAAWhB,EAAY,CACrBiB,QAAS,EACTC,oBAAoB,EACpBC,WAAY,SAACC,GACX,OAAoB,IAAbA,KAIXJ,IAAWD,EAAW,CACpBE,QAAS,EACTC,oBAAoB,EACpBC,WAAY,SAACC,GACX,OAAoB,IAAbA,KAIXpB,EAAWqB,aAAaC,QAAQC,KAAI,SAACC,GACnC,IAAMC,EAAqBrB,OAAIC,UAAUqB,gBAAgBC,aACnDC,EAAYxB,OAAIC,UAAUqB,gBAAgBG,eAMhD,OALIJ,IACFD,EAAcb,QAAQmB,iBAAmBL,EAAmBM,MACxDH,IAAWJ,EAAcb,QAAQiB,UAAYA,IAG5CJ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,qBAAqBM,UAC5DC,SAAUrG,KAAKsB,uBAAuBwE,qBAAqBO,UAE7DC,KAAM,CACJC,KAAM,KAERlH,OAAQW,KAAKa,aAAaC,SAASsC,eAAeC,SAClDmD,2BAA2B,EAC3BC,sBAAuBzG,KAAKsB,uBAAuBwC,mBAChD4C,OACHvH,SAAUa,KAAKsB,uBAAuBnC,UAGxC,OAAOwH,OAAgBjM,OAAO4E,IAEhCsH,cAtJO,WAuJL,IAAMtH,EAAc,CAClB0E,KAAMhE,KAAKsB,uBAAuBwC,mBAAmBE,KACrDC,QAASjE,KAAKsB,uBAAuBwC,mBAAmBG,QACxDwB,MAAOzF,KAAKsB,uBAAuBwC,mBAAmB2B,MACtDC,MAAO1F,KAAKsB,uBAAuBwC,mBAAmB4B,MAAMJ,WAC5DK,UAAW3F,KAAKsB,uBAAuBwC,mBAAmB6B,UAAUL,WACpEM,QAAS,CACPC,OAAQ7F,KAAKsB,uBAAuBwE,qBAAqBD,OACzDE,KAAM/F,KAAKsB,uBAAuBwE,qBAAqBE,SACvDC,QAASjG,KAAKsB,uBAAuBwE,qBAAqBG,QAC1DC,cAAelG,KAAKsB,uBAAuBwE,qBACxCK,OACHC,UAAWpG,KAAKsB,uBAAuBwE,qBAAqBM,UAC5DC,SAAUrG,KAAKsB,uBAAuBwE,qBAAqBO,WAI/D,OAAOM,OAAgBpH,OACrBS,KAAKsB,uBAAuBwC,mBAAmBI,UAC/C5E","file":"js/chunk-233b2792.b2bed6ee.js","sourcesContent":["import Vue from \"vue\";\r\nimport axios from \"axios\";\r\nimport axiosRetry from \"axios-retry\";\r\nimport store from \"@/store/index\";\r\n\r\nconst apiQueries = axios.create({\r\n baseURL: `${Vue.prototype.$Settings.all.coreApi.url}/queries`,\r\n withCredentials: true, //true para soportar cookies de respuests\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n \"Authorization-Middleware\": `Basic ${Vue.prototype.$Settings.all.jwt}`,\r\n \"Execution-Mode\": `${Vue.prototype.$Settings.all.excecutionMode}`,\r\n },\r\n});\r\n\r\nconst apiEvents = axios.create({\r\n baseURL: `${Vue.prototype.$Settings.all.coreApi.url}/currentevents`,\r\n withCredentials: true, //true para soportar cookies de respuests\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n \"Authorization-Middleware\": `Basic ${Vue.prototype.$Settings.all.jwt}`,\r\n \"Execution-Mode\": `${Vue.prototype.$Settings.all.excecutionMode}`,\r\n },\r\n});\r\n\r\naxiosRetry(apiQueries, {\r\n retries: 3,\r\n shouldResetTimeout: true,\r\n retryDelay: (retryCount) => {\r\n return retryCount * 1000;\r\n },\r\n});\r\n\r\naxiosRetry(apiEvents, {\r\n retries: 3,\r\n shouldResetTimeout: true,\r\n retryDelay: (retryCount) => {\r\n return retryCount * 1000;\r\n },\r\n});\r\n\r\napiQueries.interceptors.request.use((configuration) => {\r\n const currentUserAccount = Vue.prototype.$Authentication.getAccount();\r\n const sessionId = Vue.prototype.$Authentication.getSessionId();\r\n if (currentUserAccount) {\r\n configuration.headers.CurrentUserToken = currentUserAccount.token;\r\n if (sessionId) configuration.headers.sessionId = sessionId;\r\n }\r\n\r\n return configuration;\r\n});\r\n\r\napiEvents.interceptors.request.use((configuration) => {\r\n const currentUserAccount = Vue.prototype.$Authentication.getAccount();\r\n const sessionId = Vue.prototype.$Authentication.getSessionId();\r\n if (currentUserAccount) {\r\n configuration.headers.CurrentUserToken = currentUserAccount.token;\r\n if (sessionId) configuration.headers.sessionId = sessionId;\r\n }\r\n return configuration;\r\n});\r\n\r\napiQueries.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n (error) => {\r\n if (error.response && error.response.status == 500) {\r\n store.dispatch(\r\n \"notifications/addError\",\r\n \"Servicio no disponible. Vuelva a intentar\"\r\n );\r\n }\r\n\r\n if (\r\n (error.response && error.response.status == 401) ||\r\n (error.response && error.response.status == 403)\r\n ) {\r\n store.dispatch(\"currentUser/logout\");\r\n store.dispatch(\"notifications/addInfo\", \"Su sesión ha expirado\");\r\n store.dispatch(\"notifications/setMiddleware\");\r\n }\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\napiEvents.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n (error) => {\r\n if (error.response && error.response.status == 500) {\r\n store.dispatch(\r\n \"notifications/addError\",\r\n \"Servicio no disponible. Vuelva a intentar\"\r\n );\r\n }\r\n\r\n if (\r\n (error.response && error.response.status == 401) ||\r\n (error.response && error.response.status == 403)\r\n ) {\r\n store.dispatch(\"currentUser/logout\");\r\n store.dispatch(\"notifications/addInfo\", \"Su sesión ha expirado\");\r\n store.dispatch(\"notifications/setMiddleware\");\r\n }\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default {\r\n create(queryData, claimCreatorId, claimCreatorRolId) {\r\n const currentUserAccount = Vue.prototype.$Authentication.getAccount();\r\n\r\n if (currentUserAccount) {\r\n return apiQueries.post(\"/\", queryData); //el interceptor de axios agrega el encabezado para este caso\r\n } else {\r\n const headers = {\r\n CurrentUserId: claimCreatorId,\r\n CurrentUserRoleId: claimCreatorRolId,\r\n };\r\n return apiQueries.post(\"/\", queryData, { headers: headers });\r\n }\r\n },\r\n GetQueriesByClient() {\r\n return apiQueries.get(`/GetQueriesByClient`);\r\n },\r\n getById(id) {\r\n return apiQueries.get(`/${id}`);\r\n },\r\n getResumeByWfStatus() {\r\n return apiQueries.get(\"/resume\");\r\n },\r\n changeWfStatusFromAction(id, data) {\r\n return apiQueries.post(`/${id}/actionStates`, data);\r\n },\r\n getByWfStatusesV2(wfStateType, pageNumber, pageSize, channel, filter) {\r\n const expectedPageNumber = pageNumber ? pageNumber : 1;\r\n const expectedPageSize = pageSize ? pageSize : 10;\r\n const expectedChannel = channel ?? \"\";\r\n\r\n return apiQueries.get(\r\n `/bystate/v2/${wfStateType}?currentPage=${expectedPageNumber}&pageSize=${expectedPageSize}&channel=${expectedChannel}`,\r\n {\r\n headers: {\r\n currentfilters: JSON.stringify(filter),\r\n },\r\n }\r\n );\r\n },\r\n};\r\n","import Vue from \"vue\";\r\nimport axios from \"axios\";\r\nimport axiosRetry from \"axios-retry\";\r\nimport store from \"@/store/index\";\r\n\r\nconst apiAccounts = axios.create({\r\n baseURL: `${Vue.prototype.$Settings.all.accountsApi.url}/useraccounts`,\r\n withCredentials: true, //true para soportar cookies de respuests\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n \"Authorization-Middleware\": `Basic ${Vue.prototype.$Settings.all.jwt}`,\r\n \"Execution-Mode\": `${Vue.prototype.$Settings.all.excecutionMode}`,\r\n },\r\n});\r\n\r\naxiosRetry(apiAccounts, {\r\n retries: 3,\r\n shouldResetTimeout: true,\r\n retryDelay: (retryCount) => {\r\n return retryCount * 1000;\r\n },\r\n});\r\n\r\napiAccounts.interceptors.request.use((configuration) => {\r\n const currentUserAccount = Vue.prototype.$Authentication.getAccount();\r\n if (currentUserAccount) {\r\n configuration.headers.CurrentUserToken = currentUserAccount.token;\r\n }\r\n return configuration;\r\n});\r\n\r\napiAccounts.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n (error) => {\r\n\r\n if (error.response && error.response.status == 500) {\r\n if (error.response.config.url!=\"/sendOtp\")\r\n store.dispatch(\r\n \"notifications/addError\",\r\n \"Servicio no disponible. Vuelva a intentar\"\r\n );\r\n }\r\n\r\n if (\r\n (error.response && error.response.status == 401) ||\r\n (error.response && error.response.status == 403)\r\n ) {\r\n store.dispatch(\"currentUser/logout\");\r\n\r\n store.dispatch(\"notifications/addInfo\", \"Su sesión ha expirado\");\r\n store.dispatch(\"notifications/setMiddleware\");\r\n }\r\n\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default {\r\n checkIsValidPasswordPattern(password) {\r\n return apiAccounts.post(\"/CheckIsValidPasswordPattern\", {\r\n password: password,\r\n });\r\n },\r\n getByIdentification(number) {\r\n return apiAccounts.post(\"/Information\", {\r\n identificationNumber: btoa(number),\r\n });\r\n },\r\n exists(number) {\r\n return apiAccounts.get(`/Exists/${number}`);\r\n },\r\n getByUserTypeAndIdentification(userType, number) {\r\n return apiAccounts.get(\r\n `/ByUserTypeAndIdentification/${userType}/${number}`\r\n );\r\n },\r\n getById(id) {\r\n return apiAccounts.get(`/ById/${id}`);\r\n },\r\n getByRole(roleId) {\r\n return apiAccounts.get(`/ByRole/${roleId}`);\r\n },\r\n create(accountData) {\r\n return apiAccounts.post(\"/\", accountData);\r\n },\r\n update(id, accountData) {\r\n return apiAccounts.put(`/${id}`, accountData);\r\n },\r\n forceChangePassword(passwordData) {\r\n return apiAccounts.post(\"/ForceChangePassword\", passwordData);\r\n },\r\n sendOtp(number) {\r\n return apiAccounts.post(`/sendOtp`, {\r\n identificationNumber: number,\r\n });\r\n },\r\n verifyOtp(verifyOtpData) {\r\n return apiAccounts.post(\"/verifyOtp\", verifyOtpData);\r\n },\r\n};\r\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectionUserType.vue?vue&type=style&index=0&id=87ec7d4a&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._m(0),_c('section',{staticClass:\"container-fluid g-px-100--lg g-px-50--sm g-py-80\"},[_c('h1',{staticClass:\"g-font-weight-500 g-mb-15 font-color-title\"},[_vm._v(\" Ingresar una Consulta \")]),_c('hr',{staticClass:\"g-my-40\",staticStyle:{\"border\":\"1px solid\",\"color\":\"#555\"}}),_c('div',{staticClass:\"row no-gutters g-mx-minus-10\"},[_c('div',{staticClass:\"col-sm-6 col-lg-6 g-px-10 text-center\"},[_c('router-link',{staticClass:\"btn btn-xl u-btn-blue-b u-btn-content g-mr-2 g-mb-15\",attrs:{\"to\":\"#\"},nativeOn:{\"click\":function($event){return _vm.enter(_vm.allConstants.security.userTypes.person)}}},[_c('img',{attrs:{\"src\":\"assets/img/natural-person.svg\"}}),_vm._v(\" Persona Natural\")])],1),_c('div',{staticClass:\"col-sm-6 col-lg-6 g-px-10 text-center\"},[_c('router-link',{staticClass:\"btn btn-xl u-btn-cyan u-btn-content g-mr-2 g-mb-15\",attrs:{\"to\":\"#\"},nativeOn:{\"click\":function($event){return _vm.enter(_vm.allConstants.security.userTypes.business)}}},[_c('img',{attrs:{\"src\":\"assets/img/legal-person.svg \"}}),_vm._v(\" Persona Jurídica\")])],1)])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"g-bg-pos-center g-bg-size-cover\",staticStyle:{\"background-image\":\"url(assets/img/fondo-ingreso-wide.jpg)\",\"height\":\"300px\"}},[_c('div',{staticClass:\"container g-color-white text-center g-py-210\"})])}]\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectionUserType.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectionUserType.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./selectionUserType.vue?vue&type=template&id=87ec7d4a&scoped=true&\"\nimport script from \"./selectionUserType.vue?vue&type=script&lang=js&\"\nexport * from \"./selectionUserType.vue?vue&type=script&lang=js&\"\nimport style0 from \"./selectionUserType.vue?vue&type=style&index=0&id=87ec7d4a&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"87ec7d4a\",\n null\n \n)\n\nexport default component.exports","import queriesService from \"@/services/queries\";\r\nimport accountsService from \"@/services/accounts\";\r\nimport allConstantsMixin from \"@/mixins/allConstants\";\r\n\r\nexport default {\r\n mixins: [allConstantsMixin],\r\n computed: {\r\n currentQueryInCreation() {\r\n return this.$store.getters[\"currentQueryInCreation/currentQuery\"];\r\n },\r\n },\r\n methods: {\r\n startCurrentQueryInCreation(isRegisteredUser, fromPublicSite) {\r\n let initialStep = this.allConstants.queries.creationSteps.previousStep;\r\n if (fromPublicSite) {\r\n initialStep = isRegisteredUser\r\n ? this.allConstants.queries.creationSteps.collectInstitutionData\r\n : this.allConstants.queries.creationSteps.collectBasicData;\r\n }\r\n\r\n return this.currentQueryInCreationCreateOrUpdate({\r\n registeredUser: isRegisteredUser,\r\n fromPublicSite: fromPublicSite,\r\n currentStep: initialStep,\r\n });\r\n },\r\n currentQueryInCreationCreateOrUpdate(query) {\r\n return this.$store.dispatch(\r\n \"currentQueryInCreation/createOrUpdate\",\r\n query\r\n );\r\n },\r\n currentQueryInCreationClear() {\r\n return this.$store.dispatch(\"currentQueryInCreation/clear\");\r\n },\r\n currentQueryInCreationGoForeward() {\r\n const actualQueryInCreation = this.currentQueryInCreation;\r\n actualQueryInCreation.currentStep++;\r\n return this.currentQueryInCreationCreateOrUpdate(actualQueryInCreation);\r\n },\r\n currentQueryInCreationGoBackward() {\r\n const actualQueryInCreation = this.currentQueryInCreation;\r\n actualQueryInCreation.currentStep--;\r\n return this.currentQueryInCreationCreateOrUpdate(actualQueryInCreation);\r\n },\r\n createRealQuery() {\r\n let channel;\r\n\r\n let claimantIdentificationNumber;\r\n let claimantName;\r\n\r\n let claimCreatorId;\r\n let claimCreatorRolId;\r\n\r\n const currentUserAccount = this.$Authentication.getAccount();\r\n const currentUserIsAuthenticated = currentUserAccount ? true : false;\r\n\r\n if (!currentUserIsAuthenticated) {\r\n //Aquí se sabe que el reclamo esta siendo creado por un usuario anonimo auto-regitrado en el paso 2, desde el sitio publico\r\n\r\n channel = this.allConstants.queries.chanelCodes.claimantApp; //front\r\n claimantIdentificationNumber = this.currentQueryInCreation\r\n .collectedBasicData.identificationNumber;\r\n claimantName = `${this.currentQueryInCreation.collectedBasicData.name} ${this.currentQueryInCreation.collectedBasicData.surname}`;\r\n\r\n claimCreatorId = this.currentQueryInCreation.collectedBasicData\r\n .accountId;\r\n claimCreatorRolId = this.allConstants.security.userRolesCodes.claimant;\r\n } else {\r\n //Aquí se sabe que el reclamo esta siendo creado por un usuario identificado (no-animo)\r\n //Puede ser un cliente reclamente autenticado o un usuario del WF\r\n\r\n if (\r\n currentUserAccount.roles.filter(\r\n (role) => role == this.allConstants.security.userRolesCodes.claimant\r\n ).length > 0\r\n ) {\r\n channel = this.allConstants.queries.chanelCodes.claimantApp; //front\r\n claimantIdentificationNumber = currentUserAccount.userName;\r\n claimantName = currentUserAccount.visiblename;\r\n\r\n claimCreatorId = currentUserAccount.id;\r\n claimCreatorRolId = this.allConstants.security.userRolesCodes\r\n .claimant;\r\n }\r\n\r\n if (\r\n currentUserAccount.roles.filter(\r\n (role) =>\r\n role == this.allConstants.security.userRolesCodes.ddcExecutive ||\r\n role == this.allConstants.security.userRolesCodes.ddcDefender\r\n ).length > 0\r\n ) {\r\n channel = this.allConstants.queries.chanelCodes.ddcApp; //wf-ddc\r\n claimantIdentificationNumber = this.currentQueryInCreation\r\n .collectedBasicData.identificationNumber;\r\n claimantName = `${this.currentClaimInCreation.collectedBasicData.name} ${this.currentClaimInCreation.collectedBasicData.surname}`;\r\n\r\n claimCreatorId = currentUserAccount.id;\r\n claimCreatorRolId = currentUserAccount.roles[0];\r\n }\r\n }\r\n\r\n const queryData = {\r\n rut: claimantIdentificationNumber,\r\n name: claimantName,\r\n channel: channel,\r\n finnancialInstitute: this.currentQueryInCreation\r\n .collectedInstitutionData,\r\n comments: this.currentQueryInCreation.collectedRequestData,\r\n productType: this.currentQueryInCreation.collectedProductData[0],\r\n\r\n documents: this.currentQueryInCreation.collectedDocumentsData.map(\r\n (document) => {\r\n return {\r\n blobId: document.blobId,\r\n name: document.typeName,\r\n fileName: document.realName,\r\n contentType: document.blobContentType,\r\n contentLenght: document.blobSize.toString(),\r\n };\r\n }\r\n ),\r\n };\r\n\r\n return queriesService.create(\r\n queryData,\r\n claimCreatorId,\r\n claimCreatorRolId\r\n );\r\n },\r\n createAccount() {\r\n const accountData = {\r\n identificationNumber: this.currentQueryInCreation.collectedBasicData\r\n .identificationNumber,\r\n name: this.currentQueryInCreation.collectedBasicData.name,\r\n surname: this.currentQueryInCreation.collectedBasicData.surname,\r\n email: this.currentQueryInCreation.collectedBasicData.email,\r\n phone: this.currentQueryInCreation.collectedBasicData.phone.toString(),\r\n cellphone: this.currentQueryInCreation.collectedBasicData.cellphone.toString(),\r\n address: {\r\n region: this.currentQueryInCreation.collectedAddressData.region,\r\n city: this.currentQueryInCreation.collectedAddressData.province,\r\n commune: this.currentQueryInCreation.collectedAddressData.commune,\r\n streetAddress: this.currentQueryInCreation.collectedAddressData\r\n .street,\r\n apartment: this.currentQueryInCreation.collectedAddressData.apartment,\r\n building: this.currentQueryInCreation.collectedAddressData.building,\r\n },\r\n bank: {\r\n code: \"0\",\r\n },\r\n roleId: this.allConstants.security.userRolesCodes.claimant,\r\n includeCredentialCreation: true,\r\n passwordForCredential: this.currentQueryInCreation.collectedBasicData\r\n .secret,\r\n userType: this.currentQueryInCreation.userType,\r\n };\r\n\r\n return accountsService.create(accountData);\r\n },\r\n updateAccount() {\r\n const accountData = {\r\n name: this.currentQueryInCreation.collectedBasicData.name,\r\n surname: this.currentQueryInCreation.collectedBasicData.surname,\r\n email: this.currentQueryInCreation.collectedBasicData.email,\r\n phone: this.currentQueryInCreation.collectedBasicData.phone.toString(),\r\n cellphone: this.currentQueryInCreation.collectedBasicData.cellphone.toString(),\r\n address: {\r\n region: this.currentQueryInCreation.collectedAddressData.region,\r\n city: this.currentQueryInCreation.collectedAddressData.province,\r\n commune: this.currentQueryInCreation.collectedAddressData.commune,\r\n streetAddress: this.currentQueryInCreation.collectedAddressData\r\n .street,\r\n apartment: this.currentQueryInCreation.collectedAddressData.apartment,\r\n building: this.currentQueryInCreation.collectedAddressData.building,\r\n },\r\n };\r\n\r\n return accountsService.update(\r\n this.currentQueryInCreation.collectedBasicData.accountId,\r\n accountData\r\n );\r\n },\r\n },\r\n};\r\n"],"sourceRoot":""}