{"version":3,"sources":["webpack:///./src/modules/company/infra/LoadCompany.vue?b94d","webpack:///./src/modules/company/application/LoadCompany.ts","webpack:///./src/modules/company/domain/Company.ts","webpack:///./src/modules/company/infra/ApiCompanyRepository.ts","webpack:///./src/modules/company/infra/VueLoadCompanyScreenData.ts","webpack:///src/modules/company/infra/LoadCompany.vue","webpack:///./src/modules/company/infra/LoadCompany.vue?6c69","webpack:///./src/modules/company/infra/LoadCompany.vue?8747","webpack:///./src/modules/company/infra/LoadCompany.vue?968b"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","model","value","screen_data","callback","$$v","$set","expression","_v","on","$event","goToCompany","createCompany","staticRenderFns","LoadCompanyScreen","company_repo","user_id","code","cdb_type","company","find_by_type_and_code","setLoading","setCompany","setFound","setNotFound","Company","id","type","query_dispatcher","data","params","companydb_type","inv_data","dispatch","api_to_domain","VueLoadCompanyScreenData","loading","show_found_popup","show_not_found_popup","name","props","String","required","screen","getCompany","userData","methods","window","location","href","computed","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VContainer","VDialog","VDivider","VProgressCircular","VSpacer"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACE,YAAY,4CAA4CC,MAAM,CAAC,MAAQ,KAAK,CAACH,EAAG,WAAW,CAACG,MAAM,CAAC,YAAY,OAAOC,MAAM,CAACC,MAAOT,EAAIU,YAAmB,QAAEC,SAAS,SAAUC,GAAMZ,EAAIa,KAAKb,EAAIU,YAAa,UAAWE,IAAME,WAAW,wBAAwB,CAACV,EAAG,SAAS,CAACE,YAAY,cAAc,CAACF,EAAG,eAAe,CAACA,EAAG,OAAO,CAACE,YAAY,iBAAiB,CAACN,EAAIe,GAAG,wBAAwBX,EAAG,aAAaA,EAAG,cAAc,CAACE,YAAY,QAAQ,CAACF,EAAG,sBAAsB,CAACE,YA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AEdzB,KAAM,CACFU,KAAMc,OACNC,UAAU,IAGlB,OACI,MAAM3B,EAAe,IAAI,EACnBZ,EAAc,IAAIgC,EAClBQ,EAAS,IAAI7B,EAAkBC,EAAcZ,GACnD,MAAO,CACHwC,SACAxC,gBAGR,UACIT,KAAKiD,OAAOC,WAAWlD,KAAKmD,SAASnB,GAAIhC,KAAKuB,KAAMvB,KAAKqC,iBAE7De,QAAS,CACL,cACIC,OAAOC,SAASC,KAAO,IAAMvD,KAAKS,YAAYgB,QAAQO,GAAK,cAE/D,gBACIqB,OAAOC,SAASC,KAAO,sBAG/BC,SAAU,IACH,eAAW,CACVL,SAAU,kBC9F0L,I,6ICQ5MM,EAAY,eACd,EACA3D,EACAqB,GACA,EACA,KACA,WACA,MAIa,aAAAsC,EAAiB,QAchC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,aAAA,OAAaC,UAAA,OAAUC,WAAA,OAAWC,aAAA,KAAWC,UAAA,KAAQC,WAAA,KAASC,oBAAA,KAAkBC,UAAA,Q,6DCjCzH","file":"js/chunk-10be01fb.1bef02ba.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"invoice_container container-full-bg-white\",attrs:{\"fluid\":\"\"}},[_c('v-dialog',{attrs:{\"max-width\":\"660\"},model:{value:(_vm.screen_data.loading),callback:function ($$v) {_vm.$set(_vm.screen_data, \"loading\", $$v)},expression:\"screen_data.loading\"}},[_c('v-card',{staticClass:\"rounded-lg\"},[_c('v-card-title',[_c('span',{staticClass:\"primary__blue\"},[_vm._v(\"Cargando Empresa\")])]),_c('v-divider'),_c('v-card-text',{staticClass:\"mt-3\"},[_c('v-progress-circular',{staticClass:\"mr-5\",attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}}),_c('span',{staticClass:\"text-subtitle-1\"},[_vm._v(\"Se está buscando la empresa solicitada.\")])],1)],1)],1),_c('v-dialog',{attrs:{\"max-width\":\"660\"},model:{value:(_vm.screen_data.show_found_popup),callback:function ($$v) {_vm.$set(_vm.screen_data, \"show_found_popup\", $$v)},expression:\"screen_data.show_found_popup\"}},[_c('v-card',{staticClass:\"rounded-lg\"},[_c('v-card-title',[_c('span',{staticClass:\"primary__blue\"},[_vm._v(\"Empresa Encontrada\")])]),_c('v-divider'),_c('v-card-text',{staticClass:\"mt-3\"},[_c('span',{staticClass:\"text-subtitle-1\"},[_vm._v(\"Se ha encontrado la empresa solicitada.\")])]),_c('v-card-actions',{staticClass:\"acction_btns\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\"},on:{\"click\":function($event){return _vm.goToCompany()}}},[_vm._v(\"\\n Aceptar\\n \")])],1)],1)],1),_c('v-dialog',{attrs:{\"max-width\":\"660\"},model:{value:(_vm.screen_data.show_not_found_popup),callback:function ($$v) {_vm.$set(_vm.screen_data, \"show_not_found_popup\", $$v)},expression:\"screen_data.show_not_found_popup\"}},[_c('v-card',{staticClass:\"rounded-lg\"},[_c('v-card-title',[_c('span',{staticClass:\"primary__blue\"},[_vm._v(\"Empresa No Encontrada\")])]),_c('v-divider'),_c('v-card-text',{staticClass:\"mt-3\"},[_c('span',{staticClass:\"text-subtitle-1\"},[_vm._v(\"No se ha encontrado la empresa solicitada, se redirigirá a la pantalla de creación.\")])]),_c('v-card-actions',{staticClass:\"acction_btns\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\"},on:{\"click\":function($event){return _vm.createCompany()}}},[_vm._v(\"\\n Aceptar\\n \")])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Company, ICompanyRepository } from \"../domain/Company\"\n\n\nexport class LoadCompanyScreen {\n company_repo: ICompanyRepository\n screen_data: ILoadCompanyScreenData\n\n constructor(\n company_repo: ICompanyRepository,\n screen_data: ILoadCompanyScreenData\n ) {\n this.company_repo = company_repo\n this.screen_data = screen_data\n }\n\n async getCompany(user_id:number, code:string, cdb_type:string) {\n const company = await this.company_repo.find_by_type_and_code(user_id, code, cdb_type)\n this.screen_data.setLoading(false)\n\n if (company) {\n this.screen_data.setCompany(company)\n this.screen_data.setFound(true)\n } else {\n this.screen_data.setNotFound(true);\n }\n\n }\n\n}\n\nexport interface ILoadCompanyScreenData {\n company: Company|null\n loading: boolean\n show_found_popup: boolean\n show_not_found_popup: boolean\n\n setCompany(company:Company): void;\n setLoading(value:boolean): void;\n setFound(value:boolean): void;\n setNotFound(value:boolean): void;\n}","\n\nexport class Company {\n id: number\n code: string\n type: string\n\n constructor(id: number, code:string, type:string) {\n this.id = id\n this.code = code\n this.type = type\n }\n\n clone(): Company {\n return new Company(this.id, this.code, this.type);\n }\n}\n\nexport interface ICompanyRepository {\n find_by_type_and_code(user_id:number, code:string, cdb_type:string): Promise;\n}","import { QueryDispatcher } from \"@/modules/shared/domain/QueryDispatcher\"\nimport { Company, ICompanyRepository } from \"../domain/Company\"\nimport { query_dispatcher_get } from \"@/api/client\";\n\n\nexport class ApiCompanyRepository implements ICompanyRepository {\n query_dispatcher: QueryDispatcher\n constructor() {\n this.query_dispatcher = query_dispatcher_get\n }\n\n api_to_domain(data) {\n return new Company(data.id, data.code, data.type)\n }\n\n async find_by_type_and_code(user_id: number, code: string, cdb_type: string): Promise {\n const params = { user_id, code, companydb_type:cdb_type }\n let inv_data = await this.query_dispatcher.dispatch('company_by_type_code', params)\n if (inv_data){\n return this.api_to_domain(inv_data)\n }\n return null\n }\n}","import { ILoadCompanyScreenData } from \"../application/LoadCompany\";\nimport { Company } from \"../domain/Company\";\n\n\nexport class VueLoadCompanyScreenData implements ILoadCompanyScreenData {\n company: Company;\n loading: boolean;\n show_found_popup: boolean;\n show_not_found_popup: boolean;\n\n constructor() {\n this.loading = true;\n }\n\n setCompany(company:Company) {\n this.company = company;\n }\n\n setLoading(value: boolean): void {\n this.loading = value;\n }\n\n setFound(value: boolean): void {\n this.show_found_popup = value;\n }\n \n setNotFound(value: boolean): void {\n this.show_not_found_popup = value;\n }\n}","\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadCompany.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadCompany.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./LoadCompany.vue?vue&type=template&id=4e2294a0&scoped=true&\"\nimport script from \"./LoadCompany.vue?vue&type=script&lang=js&\"\nexport * from \"./LoadCompany.vue?vue&type=script&lang=js&\"\nimport style0 from \"./LoadCompany.vue?vue&type=style&index=0&id=4e2294a0&scoped=true&lang=css&\"\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 \"4e2294a0\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VContainer,VDialog,VDivider,VProgressCircular,VSpacer})\n","export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadCompany.vue?vue&type=style&index=0&id=4e2294a0&scoped=true&lang=css&\""],"sourceRoot":""}