{"version":3,"sources":["webpack:///./src/modules/facturae/domain/Product.ts","webpack:///./src/views/ProductList.vue?b1c6","webpack:///./src/modules/jobs/domain/Job.ts","webpack:///./src/modules/jobs/infra/ApiJobRepository.ts","webpack:///./src/views/ProductList.vue?4dc2","webpack:///./src/modules/facturae/infra/VueProductListScreenData.ts","webpack:///./src/modules/facturae/app/ProductListComponent.ts","webpack:///src/views/ProductList.vue","webpack:///./src/views/ProductList.vue?d38d","webpack:///./src/views/ProductList.vue?6dfe","webpack:///./src/modules/facturae/infra/ApiProductRepository.ts"],"names":["Product","id","code","description","price","company_id","taxes","deleted","taxes_withheld","special_taxable_event","selected_retention","selected_tax","selected_tax_event","this","kind","map","tax","Job","state","output_info","error","line","res","client","get","api_to_domain","data","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","screen_data","snackbar","color","timeout","model","value","callback","$$v","$set","expression","_v","_s","text","_e","product","on","$event","product_list_component","updateTaxes","computed_tax_type","toUpperCase","computed_tax_items","newRate","tax_change","type_0_options","tax_event_change","line_retentions","retention_change","toggleAddProductPopup","loadingAddProduct","addProduct","selectedItems","length","toString","toggleDeletePopup","setLoadingDeleteProduct","deleteProducts","loadingUploadProducts","v","error_upload_file","error_message_upload_file","dialogUploadProducts","file","uploadProductsFile","$router","push","name","params","companydb_id","_t","scopedSlots","_u","key","fn","ref","_g","_b","loadingItems","refreshList","loadingDeleteProduct","showDeletePopUp","uploadProductsJobId","uploadProductsJobDone","uploadProductsJobState","proxy","listFilters","updateFilter","removeAllFilt","products","products_headers","showSelect","footerItemsPerPageText","footerItemsPerPageOptions","textNoResults","textLoading","itemKey","mobile","tableHeight","limit","updateLimit","_l","header","item","directives","rawName","staticStyle","domProps","target","composing","setDirty","calculateFinalPrice","saveProduct","isDirty","loadingProducts","items","pageStart","pageStop","itemsLength","staticRenderFns","VueProductListScreenData","sortable","width","align","hideHeaderCheckbox","totalItems","isVisible","showAddProductDialog","dirty","deletePopup","tax_type","message","loading","calculateTableHeight","initNumItemsPerPage","Math","min","tempTableHeight","visible","product_id","filter","includes","cp","Object","assign","show","job_id","product_repo","jobs_repo","file_repo","filters","setLoading","getProductList","parseInt","setProducts","setTotalItems","changeLimit","product_to_update","rate","parseFloat","reason","product_to_save","setLoadingAddProduct","changeLoadingProduct","save","success_message","removeDirty","create_empty_product","setProduct","error_message","delete","job","find_by_id","setUploadProductsJobState","updateProductList","setLoadingUploadProducts","file_path","uploadFile","upload_products_file","setUploadProductsJobId","components","AppTextField","AppBtn","AppCol","AppRow","AppConfirmModal","AppAutocomplete","AppSearchBar","JobProgress","props","type","Number","String","required","watch","creds","AWS","CognitoIdentityCredentials","IdentityPoolId","Logins","session_information","signInUserSession","idToken","jwtToken","expired","config","update","region","credentials","s3_repo","S3Repository","ApiProductRepository","currentCompany","ApiJobRepository","methods","updateObject","p","removeAllFilters","updateTableLimit","tax_amount","withheld_amount","amount","toFixed","setAddProductDialogVisibility","productId","uploadProductsExcel","uploadProductsDone","computed","got_feature","ttype","tax_items","some","component","VAutocomplete","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCol","VContainer","VDataTable","VDialog","VDivider","VFileInput","VIcon","VImg","VProgressCircular","VRow","VSelect","VSnackbar","VSpacer","VTextField","VTooltip","objectToDict","obj","dict","prototype","hasOwnProperty","call","Array","isArray","command_dispatcher","async_command_dispatcher","query_dispatcher","base","recargo_rate","recargo_amount","JSON","parse","stringify","args","entries","forEach","productData","dispatch","productList","inv","product_data","domain_to_api","filename","og_file_name"],"mappings":"kHAEA,kCAAO,MAAMA,EAeX,YACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEAC,KAAKZ,GAAKA,EACVY,KAAKC,KAAO,SACZD,KAAKX,KAAOA,EACZW,KAAKV,YAAcA,EACnBU,KAAKT,MAAQA,EACbS,KAAKR,WAAaA,EAClBQ,KAAKP,MAAQA,EACbO,KAAKN,QAAUA,EAEbM,KAAKH,mBADJA,GAIyB,KAG1BG,KAA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EX,cAAcrL,GACV,OAAOyO,KAAKC,MAAMD,KAAKE,UAAUhB,EAAa3N,KAG5C,eAAe5C,EAAmB+J,G,yCACpC,IAAIyH,EAAO,CACPxR,WAAYA,EACZ+J,QAAS,IAGZP,OAAOiI,QAAQ1H,GAA6B2H,QAAQ,EAAExM,EAAK/C,MACrDA,EAAMA,OACLqP,EAAKzH,QAAQpF,KAAK,CAACO,IAAKA,EAAK/C,MAAOA,EAAMA,UAGlD,IAAIwP,QAAoBnR,KAAKyQ,iBAAiBW,SAAS,mBAAoBJ,GACvEK,EAAyB,GAC7B,IAAK,IAAIC,KAAOH,EACZE,EAAYlN,KAAKnE,KAAKY,cAAcuQ,EAAYG,KAEpD,OAAOD,KAGL,KAAKjP,G,yCACP,IAAImP,EAAevR,KAAKwR,cAAcpP,GAClC3B,QAAYT,KAAKuQ,mBAAmBa,SAAS,eAAgB,CAAEhP,QAASmP,IAC5E,OAAO9Q,EAAI,aAGf,qBAAqBjB,GACjB,OAAO,IAAI,OAAQ,iBAAU,GAAI,GAAI,EAAKkK,SAASlK,EAAW+D,YAAa,CAAC,IAAI,OAAI,IAAM,EAAG,KAAK,GAGhG,OAAOmC,G,yCACT,IAAIsL,EAAO,CACPtL,SAAUA,EAASxF,IAAIkC,GAAWpC,KAAKwR,cAAcpP,KAErD3B,QAAYT,KAAKuQ,mBAAmBa,SAAS,kBAAmBJ,GACpE,OAAOvQ,EAAI,aAGT,qBAAqBjB,EAAYyL,EAAWwG,G,yCAC9C,IAAIT,EAAO,CACPxR,WAAYA,EACZyL,UAAWA,EACXyG,aAAcD,GAEZhR,QAAYT,KAAKwQ,yBAAyBY,SAAS,6BAA8BJ,GACrF,OAAOvQ,EAAI0I,a","file":"js/chunk-4800dad1.4d5ea992.js","sourcesContent":["import { Tax } from \"./Invoiceable\";\n\nexport class Product {\n id: string;\n kind: string;\n code: string;\n description: string;\n price: number;\n company_id: number;\n taxes: Tax[];\n deleted: boolean;\n taxes_withheld : Tax[];\n special_taxable_event?: Object;\n selected_retention?:any;\n selected_tax?:any; \n selected_tax_event?: string\n\n constructor(\n id: string,\n code: string,\n description: string,\n price: number,\n company_id: number,\n taxes: Tax[],\n deleted: boolean,\n taxes_withheld? : Tax[],\n special_taxable_event?: Object,\n selected_retention?:any,\n selected_tax?:any, \n selected_tax_event?: string\n ) {\n this.id = id;\n this.kind = 'simple'\n this.code = code;\n this.description = description;\n this.price = price;\n this.company_id = company_id;\n this.taxes = taxes;\n this.deleted = deleted;\n if(selected_retention){\n this.selected_retention = selected_retention;\n }\n else{\n this.selected_retention = 'na';\n }\n if(selected_tax){\n this.selected_tax = selected_tax;\n }\n else{\n this.selected_tax = 0.21;\n }\n if (taxes_withheld){\n this.taxes_withheld = taxes_withheld;\n }\n else{\n this.taxes_withheld = [];\n }\n if (selected_tax_event){\n this.selected_tax_event = selected_tax_event;\n }\n else{\n this.selected_tax_event = 'N/A';\n }\n this.special_taxable_event = special_taxable_event;\n }\n clone(): Product {\n return new Product(\n this.id,\n this.code,\n this.description,\n this.price,\n this.company_id,\n this.taxes.map(tax => tax),\n this.deleted,\n this.taxes_withheld.map(tax => tax),\n this.special_taxable_event\n );\n }\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!./ProductList.vue?vue&type=style&index=0&id=151f47bc&scoped=true&lang=css&\"","export class Job {\n id: number;\n state: string;\n output_info: any;\n error: string; \n\n constructor(id: number, state: string, output_info: any, error:string) {\n this.id = id;\n this.state = state;\n this.output_info = output_info;\n this.error = error;\n }\n\n clone(): Job {\n return new Job(this.id, this.state, this.output_info, this.error);\n }\n}\n","import { client } from \"@/api/client\";\nimport { JobRepository } from \"@/modules/jobs/domain/JobRepository\";\nimport { Job } from \"@/modules/jobs/domain/Job\";\n\nexport class ApiJobRepository implements JobRepository { \n api_to_domain(line){\n return new Job(line.id, line.state, line.output_info, line.error)\n }\n \n async find_by_id(id: number):Promise { \n let res = await client.get(`/jobs/jobs/${id}/`)\n if (res) {\n return this.api_to_domain(res.data)\n }\n else {\n return null;\n }\n }\n }\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"container-full-bg-gray\",attrs:{\"fluid\":\"\"}},[(_vm.screen_data)?_c('v-snackbar',{attrs:{\"color\":_vm.screen_data.snackbar.color,\"timeout\":_vm.screen_data.snackbar.timeout},model:{value:(_vm.screen_data.snackbar.isVisible),callback:function ($$v) {_vm.$set(_vm.screen_data.snackbar, \"isVisible\", $$v)},expression:\"screen_data.snackbar.isVisible\"}},[_vm._v(\"\\n \"+_vm._s(_vm.screen_data.snackbar.text)+\"\\n \")]):_vm._e(),(_vm.screen_data && _vm.screen_data.product)?_c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"500\"},model:{value:(_vm.screen_data.showAddProductDialog),callback:function ($$v) {_vm.$set(_vm.screen_data, \"showAddProductDialog\", $$v)},expression:\"screen_data.showAddProductDialog\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline\"},[_c('span',{staticClass:\"text-h5 primary_blue--text py-1 ml-2\"},[_vm._v(\"Añadir producto \")])]),_c('v-divider'),_c('v-card-text',[_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(\"Código\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\"},model:{value:(_vm.screen_data.product.code),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"code\", $$v)},expression:\"screen_data.product.code\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(\"Descripción\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\"},model:{value:(_vm.screen_data.product.description),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"description\", $$v)},expression:\"screen_data.product.description\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(\"Precio\")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"\",\"type\":\"number\"},on:{\"change\":function($event){return _vm.product_list_component.updateTaxes(_vm.screen_data.product)}},model:{value:(_vm.screen_data.product.price),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"price\", $$v)},expression:\"screen_data.product.price\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(_vm._s(_vm.computed_tax_type.toUpperCase()))]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"dense\":\"\",\"items\":_vm.computed_tax_items,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.tax_change(newRate, _vm.screen_data.product, false); }},model:{value:(_vm.screen_data.product.selected_tax),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"selected_tax\", $$v)},expression:\"screen_data.product.selected_tax\"}})],1)],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[(_vm.screen_data.product.selected_tax == 0.0)?_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(\"Tipo 0%\")]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"dense\":\"\",\"items\":_vm.type_0_options,\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.tax_event_change(newRate, _vm.screen_data.product, false); }},model:{value:(_vm.screen_data.product.selected_tax_event),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"selected_tax_event\", $$v)},expression:\"screen_data.product.selected_tax_event\"}})],1):_vm._e()],1),_c('app-row',{attrs:{\"contains-input-fields\":\"\"}},[_c('app-col',{attrs:{\"contains-input-fields\":\"\",\"cols\":\"12\"}},[_c('label',[_vm._v(\"Retención\")]),_c('v-autocomplete',{attrs:{\"autocomplete\":\"off\",\"outlined\":\"\",\"dense\":\"\",\"items\":_vm.line_retentions,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.retention_change(newRate, _vm.screen_data.product, false); }},model:{value:(_vm.screen_data.product.selected_retention),callback:function ($$v) {_vm.$set(_vm.screen_data.product, \"selected_retention\", $$v)},expression:\"screen_data.product.selected_retention\"}})],1)],1)],1),_c('v-card-actions',{staticClass:\"pb-10 mr-8\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){return _vm.toggleAddProductPopup(false)}}},[_vm._v(\"Cancelar\")]),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\",\"loading\":_vm.screen_data.loadingAddProduct,\"disabled\":_vm.screen_data.product && (_vm.screen_data.product.code=='' || _vm.screen_data.product.description=='' || _vm.screen_data.product.price<=0)},on:{\"click\":function($event){return _vm.addProduct(_vm.screen_data.product)}}},[_vm._v(\"\\n Crear\\n \")])],1)],1)],1):_vm._e(),_c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"500\"},model:{value:(_vm.screen_data.deletePopup),callback:function ($$v) {_vm.$set(_vm.screen_data, \"deletePopup\", $$v)},expression:\"screen_data.deletePopup\"}},[_c('v-card',[_c('v-card-title',[_c('span',{staticClass:\"primary_blue--text\"},[_vm._v(\"Eliminar productos\")])]),_c('v-divider'),_c('v-card-text',[_c('p',{staticClass:\"text-subtitle-1 mt-4\"},[_vm._v(\"\\n Se eliminarán permanentemente \"+_vm._s(_vm.screen_data.selectedItems.length.toString())+\" producto(s)\\n \")])]),_c('v-card-actions',{staticClass:\"acction_btns\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"action__btn\",attrs:{\"outlined\":\"\"},on:{\"click\":function($event){_vm.screen_data.toggleDeletePopup(false); _vm.screen_data.setLoadingDeleteProduct(false);}}},[_vm._v(\"Cancelar\")]),_c('v-btn',{staticClass:\"white--text action__btn\",attrs:{\"color\":\"#060647\"},on:{\"click\":function($event){return _vm.deleteProducts()}}},[_vm._v(\"\\n Confirmar\\n \")])],1)],1)],1),_c('v-dialog',{attrs:{\"max-width\":\"660\"},model:{value:(_vm.screen_data.dialogUploadProducts),callback:function ($$v) {_vm.$set(_vm.screen_data, \"dialogUploadProducts\", $$v)},expression:\"screen_data.dialogUploadProducts\"}},[_c('v-card',{staticClass:\"rounded-lg\"},[_c('v-card-title',[_c('span',{staticClass:\"text-h6 primary--text\"},[_vm._v(\"Carga de productos por fichero excel\")])]),_c('v-divider'),_c('v-card-text',[_c('v-container',{staticClass:\"px-7\"},[_c('v-row',[_c('v-col',{staticClass:\"pb-0\",attrs:{\"align\":\"center\"}},[_c('v-img',{attrs:{\"src\":\"/icon_table.svg\",\"width\":\"39\"}})],1)],1),_c('v-row',[_c('v-col',{attrs:{\"align\":\"center\"}},[_c('span',{staticClass:\"text-h6 primary--text\"},[_vm._v(\"Orden Cabecera\")])])],1),_c('v-row',[_c('v-col',{attrs:{\"align\":\"center\"}},[_c('p',{staticClass:\"mb-0\"},[_vm._v(\"Necesitamos la siguiente estructura\")]),_c('p',{staticClass:\"font-weight-bold\"},[_vm._v(\"Código / Descripción / Precio / Impuesto (Ej.0.21)/ Retención (Ej 0.07)\")])])],1),_c('span',[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-file-input',{staticClass:\"rounded-lg\",attrs:{\"label\":\"Archivo\",\"prepend-icon\":\"mdi-paperclip\",\"color\":\"primary\",\"accept\":\" .xls, .xlsx, .xlsm, .ods\",\"clearable\":false,\"loading\":_vm.screen_data.loadingUploadProducts,\"rules\":[function (v) { return !!v || 'Archivo requerido'; }],\"error\":_vm.screen_data.error_upload_file,\"error-messages\":_vm.screen_data.error_message_upload_file,\"outlined\":\"\"},model:{value:(_vm.screen_data.file),callback:function ($$v) {_vm.$set(_vm.screen_data, \"file\", $$v)},expression:\"screen_data.file\"}})],1)],1)],1)],1)],1),_c('v-card-actions',{staticClass:\"mr-4\"},[_c('v-spacer'),_c('app-btn',{attrs:{\"outlined\":\"\"},on:{\"click\":function($event){_vm.screen_data.dialogUploadProducts = false;}}},[_vm._v(\"Cancelar\")]),_c('app-btn',{attrs:{\"color\":\"primary\",\"variant\":\"text\",\"disabled\":!_vm.screen_data.file,\"loading\":_vm.screen_data.loadingUploadProducts},on:{\"click\":function($event){return _vm.uploadProductsFile()}}},[_vm._v(\"\\n Subir\\n \")])],1)],1)],1),_c('app-row',[_c('app-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',{staticClass:\"rounded-10\",attrs:{\"width\":\"100%\"}},[_c('v-card-title',{staticClass:\"primary--text text--darken-2 px-5 pb-0 d-flex card-title-footer-color\"},[_c('span',[(_vm.companydb_id)?_c('v-btn',{attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.$router.push({name: 'invoice-list', params: {'companydb_id': _vm.companydb_id}})}}},[_c('img',{attrs:{\"src\":require(\"../assets/back-arrow.svg\")}})]):_vm._e(),_c('span',{staticClass:\"primary_blue--text ml-4\"},[_vm._v(\"Productos\")])],1),_c('v-row',{staticClass:\"pa-0 ma-0\"},[_c('v-col',{staticClass:\"pa-0 ma-0\",attrs:{\"cols\":\"3\"}}),_c('v-col',{staticClass:\"pa-0 ma-0\",attrs:{\"cols\":\"9\"}},[_vm._t(\"search_right\",function(){return [_c('div',{staticClass:\"d-flex justify-end\",attrs:{\"align\":\"right\"}},[_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"icon\":\"\",\"loading\":_vm.screen_data.loadingItems},on:{\"click\":function($event){return _vm.refreshList()}}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\"mdi-refresh\")])],1)]}}])},[_c('span',[_vm._v(\"Actualizar\")])]),_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"icon\":\"\",\"loading\":_vm.screen_data.loadingDeleteProduct,\"disabled\":_vm.screen_data.selectedItems.length==0},on:{\"click\":_vm.showDeletePopUp}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\"mdi-delete\")])],1)]}}])},[_c('span',[_vm._v(\"Eliminar\")])]),_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.toggleAddProductPopup(true)}}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\"mdi-plus\")])],1)]}}])},[_c('span',[_vm._v(\"Añadir producto\")])]),(_vm.currentCompany)?_c('JobProgress',{staticClass:\"progress_circular\",attrs:{\"job_id\":_vm.screen_data.uploadProductsJobId},on:{\"done\":function($event){return _vm.uploadProductsJobDone(true)}},scopedSlots:_vm._u([{key:\"progress\",fn:function(){return [(_vm.screen_data.uploadProductsJobState==='running')?_c('v-progress-circular',{staticClass:\"progress_circle\",attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}}):_vm._e()]},proxy:true},{key:\"done\",fn:function(){return [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"color\":\"primary\",\"loading\":_vm.screen_data.loadingUploadProducts,\"icon\":\"\"},on:{\"click\":function($event){_vm.screen_data.dialogUploadProducts=true;}}},'v-btn',attrs,false),on),[_c('v-icon',{staticClass:\"material-symbols-outlined\"},[_vm._v(\"upload_file\")])],1)]}}],null,false,3655488367)},[_c('span',[_vm._v(\"Cargar Productos desde Excel\")])])]},proxy:true}],null,false,1858541647),model:{value:(_vm.screen_data.uploadProductsJobState),callback:function ($$v) {_vm.$set(_vm.screen_data, \"uploadProductsJobState\", $$v)},expression:\"screen_data.uploadProductsJobState\"}}):_vm._e()],1)]})],2)],1)],1),_c('v-divider'),_c('v-card-text',{staticClass:\"px-0 pt-0 card-title-footer-color\"},[_c('v-row',[_c('app-search-bar',{attrs:{\"filters\":_vm.listFilters},on:{\"updateObject\":_vm.updateFilter,\"resetAllFilters\":_vm.removeAllFilt}})],1),_c('v-data-table',{attrs:{\"items\":_vm.screen_data.products,\"headers\":_vm.screen_data.products_headers,\"show-select\":_vm.screen_data.showSelect,\"loading\":_vm.screen_data.loadingItems,\"footer-props\":{\n 'items-per-page-text': _vm.screen_data.footerItemsPerPageText,\n 'items-per-page-options': _vm.screen_data.footerItemsPerPageOptions,\n },\"no-data-text\":_vm.screen_data.textNoResults,\"loading-text\":_vm.screen_data.textLoading,\"fixed-header\":\"\",\"item-key\":_vm.screen_data.itemKey,\"mobile\":_vm.screen_data.mobile,\"height\":_vm.screen_data.tableHeight,\"items-per-page\":_vm.screen_data.limit},on:{\"update:items-per-page\":_vm.updateLimit},scopedSlots:_vm._u([_vm._l((_vm.screen_data.products_headers),function(header){return {key:(\"header.\" + (header.value)),fn:function(ref){\n var header = ref.header;\nreturn [_c('span',{attrs:{\"tabindex\":\"0\"}},[_vm._v(\"\\n \"+_vm._s(header.text)+\"\\n \")])]}}}),_vm._l((_vm.screen_data.products_headers),function(header){return {key:(\"item.\" + (header.value)),fn:function(ref){\n var item = ref.item;\nreturn [_c('span',{staticClass:\"font-color\"},[(header.value == 'code')?_vm._t(header.value,function(){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(item[header.value]),expression:\"item[header.value]\"}],staticStyle:{\"min-width\":\"275px\"},domProps:{\"value\":(item[header.value])},on:{\"input\":[function($event){if($event.target.composing){ return; }_vm.$set(item, header.value, $event.target.value)},function($event){return _vm.setDirty(item.id)}],\"change\":function($event){return _vm.setDirty(item.id)}}})]},null,item):(header.value == 'description')?_vm._t(header.value,function(){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(item[header.value]),expression:\"item[header.value]\"}],staticStyle:{\"min-width\":\"375px\"},domProps:{\"value\":(item[header.value])},on:{\"input\":[function($event){if($event.target.composing){ return; }_vm.$set(item, header.value, $event.target.value)},function($event){return _vm.setDirty(item.id)}],\"change\":function($event){return _vm.setDirty(item.id)}}})]},null,item):(header.value == 'price')?_vm._t(header.value,function(){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(item[header.value]),expression:\"item[header.value]\"}],staticStyle:{\"min-width\":\"150px\"},attrs:{\"type\":\"number\"},domProps:{\"value\":(item[header.value])},on:{\"input\":[function($event){if($event.target.composing){ return; }_vm.$set(item, header.value, $event.target.value)},function($event){return _vm.setDirty(item.id)}],\"change\":function($event){return _vm.setDirty(item.id)}}})]},null,item):(header.value == 'taxes')?_vm._t(\"default\",function(){return [_c('v-select',{staticStyle:{\"min-width\":\"100px\",\"font-size\":\"0.875rem\"},attrs:{\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"transparent\",\"items\":_vm.computed_tax_items,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.tax_change(newRate, item, true); }},model:{value:(item.selected_tax),callback:function ($$v) {_vm.$set(item, \"selected_tax\", $$v)},expression:\"item.selected_tax\"}})]},null,item):(header.value == 'special_taxable_event')?_vm._t(\"default\",function(){return [(item.selected_tax == 0.0)?_c('v-select',{staticStyle:{\"min-width\":\"100px\",\"font-size\":\"0.875rem\"},attrs:{\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"transparent\",\"items\":_vm.type_0_options,\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.tax_event_change(newRate, item, true); }},model:{value:(item.selected_tax_event),callback:function ($$v) {_vm.$set(item, \"selected_tax_event\", $$v)},expression:\"item.selected_tax_event\"}}):_vm._e()]},null,item):(header.value == 'taxes_withheld')?_vm._t(\"default\",function(){return [_c('v-select',{staticStyle:{\"min-width\":\"100px\",\"font-size\":\"0.875rem\"},attrs:{\"dense\":\"\",\"flat\":\"\",\"solo\":\"\",\"background-color\":\"transparent\",\"items\":_vm.line_retentions,\"item-text\":\"name\",\"item-value\":\"value\",\"return-object\":false,\"hide-details\":\"\"},on:{\"change\":function (newRate) { return _vm.retention_change(newRate, item, true); }},model:{value:(item.selected_retention),callback:function ($$v) {_vm.$set(item, \"selected_retention\", $$v)},expression:\"item.selected_retention\"}})]},null,item):(header.value == 'final_price')?_vm._t(\"default\",function(){return [_c('div',{staticClass:\"text-right\"},[_vm._v(\"\\n \"+_vm._s(_vm.calculateFinalPrice(item))+\" €\\n \")])]}):_vm._t(header.value,function(){return [_vm._v(_vm._s(item[header.value]))]},null,item)],2)]}}}),{key:\"item.actions\",fn:function(ref){\n var item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\n var on = ref.on;\n var attrs = ref.attrs;\nreturn [_c('div',_vm._g(_vm._b({attrs:{\"color\":\"primary\"},on:{\"click\":function($event){return _vm.saveProduct(item)},\"change\":function($event){return _vm.setDirty(item.id)}}},'div',attrs,false),on),[(!_vm.isDirty(item.id))?_c('img',{attrs:{\"src\":require(\"../assets/bank-save-transaction-disabled.svg\")}}):(!_vm.screen_data.loadingProducts[item.id])?_c('img',{attrs:{\"src\":require(\"../assets/bank-save-transaction.svg\")}}):_c('v-progress-circular',{attrs:{\"size\":15,\"width\":2,\"indeterminate\":\"\"}})],1)]}}],null,true)},[_c('span',[_vm._v(\"Guardar\")])])],1)]}},{key:\"footer.page-text\",fn:function(items){return [_vm._v(\"\\n \"+_vm._s(items.pageStart)+\" - \"+_vm._s(items.pageStop)+\" de\\n \"+_vm._s(items.itemsLength)+\"\\n \")]}}],null,true),model:{value:(_vm.screen_data.selectedItems),callback:function ($$v) {_vm.$set(_vm.screen_data, \"selectedItems\", $$v)},expression:\"screen_data.selectedItems\"}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Product } from \"@/modules/facturae/domain/Product\";\nimport { ProductListScreenData } from \"../domain/ProductListScreenData\";\n\nexport class VueProductListScreenData implements ProductListScreenData{\n products: Product[];\n product: Product;\n products_headers: Object;\n selectedItems: Array;\n loadingItems: boolean;\n footerItemsPerPageText: string;\n footerItemsPerPageOptions: Object;\n showSelect: boolean;\n textNoResults: string;\n textLoading: string;\n itemKey: string;\n hideHeaderCheckbox: boolean;\n mobile: boolean;\n totalItems: number;\n tableHeight: string;\n limit: number;\n snackbar: Object;\n search: string;\n loadingAddProduct: boolean;\n showAddProductDialog: boolean;\n dirty: string[];\n loadingProducts: {};\n deletePopup: boolean;\n loadingDeleteProduct: boolean;\n tax_type:string;\n loadingUploadProducts: boolean;\n uploadProductsJobId: number;\n uploadProductsJobState: String;\n dialogUploadProducts: boolean;\n file: any;\n\n constructor(){\n this.products = []\n this.product = null\n this.products_headers = [\n {\n text: \"Código\",\n sortable: true,\n value: \"code\",\n width:300,\n },\n {\n text: \"Descripción\",\n sortable: true,\n value: \"description\",\n width:400,\n },\n {\n text: \"Precio unitario\",\n sortable: false,\n value: \"price\",\n width:175,\n },\n {\n text: \"IVA/IGIC\",\n sortable: false,\n value: \"taxes\",\n width:100,\n },\n {\n text: \"Tipo 0%\",\n sortable: false,\n value: \"special_taxable_event\",\n width:100,\n },\n {\n text: \"Retención\",\n sortable: false,\n value: \"taxes_withheld\",\n width:100,\n },\n {\n text: \"Precio final\",\n sortable: false,\n value: \"final_price\",\n width:175,\n },\n {\n text: '',\n align: 'end',\n sortable: false,\n value: 'actions',\n width:1,\n },\n ],\n this.selectedItems = [];\n this.loadingItems = false;\n this.footerItemsPerPageText = \"Registros por página:\";\n this.footerItemsPerPageOptions = [5, 10, 50, 100];\n this.showSelect = false;\n this.textNoResults = \"No se han encontrado registros\";\n this.textLoading = \"Cargando...\";\n this.itemKey = \"id\";\n this.hideHeaderCheckbox = false;\n this.mobile = false;\n this.totalItems = 0;\n this.tableHeight = '59vh';\n this.limit = 10;\n this.snackbar = {\n isVisible: false,\n text: '',\n color: '',\n timeout: 3000,\n }\n this.showAddProductDialog = false;\n this.loadingAddProduct = false;\n this.dirty = []\n this.loadingProducts = {}\n this.deletePopup = false\n this.loadingDeleteProduct = false\n this.tax_type = 'iva/igic'\n this.loadingUploadProducts = false;\n this.uploadProductsJobId = 0\n this.uploadProductsJobState = 'done'\n this.dialogUploadProducts = false;\n this.file = null;\n }\n\n success_message(message: string){\n this.snackbar['text'] = message\n this.snackbar['color'] = 'success'\n this.snackbar['isVisible'] = true\n }\n\n error_message(message: string){\n this.snackbar['text'] = message\n this.snackbar['color'] = 'error'\n this.snackbar['isVisible'] = true\n }\n\n setLoading(loading:boolean){\n this.loadingItems = loading\n }\n\n setProducts(products: Product[]){\n this.products = products\n if (products.length == 0){\n this.showSelect = false\n } else {\n this.showSelect = true\n }\n }\n\n setProduct(product: Product): void {\n this.product = product\n }\n\n setTotalItems(totalItems: number){\n this.totalItems = totalItems\n }\n\n changeLimit(value) {\n this.limit = value;\n this.calculateTableHeight();\n }\n\n calculateTableHeight() {\n let initNumItemsPerPage = Math.min(this.limit, 10);\n if (this.totalItems == 0) {\n this.tableHeight = '20vh';\n }\n else {\n let tempTableHeight = 48 * (Math.min(this.totalItems, initNumItemsPerPage) + 1);\n this.tableHeight = (tempTableHeight).toString() + 'px'\n }\n }\n \n setAddProductDialogVisibility(visible: boolean) : void {\n this.showAddProductDialog = visible\n }\n\n setLoadingAddProduct(loading: boolean) : void {\n this.loadingAddProduct = loading\n }\n\n setDirty(product_id:string): void {\n this.dirty.push(product_id)\n }\n\n removeDirty(product_id: string): void {\n this.dirty = this.dirty.filter((id) => id != product_id)\n }\n\n isDirty(product_id: string): boolean {\n return this.dirty.includes(product_id)\n }\n\n changeLoadingProduct(id: string, value: boolean): void {\n let cp = Object.assign({}, this.loadingProducts)\n cp[id] = value\n this.loadingProducts = cp\n }\n\n toggleDeletePopup(show: boolean): void {\n this.deletePopup = show\n }\n\n setLoadingDeleteProduct(loading: boolean): void {\n this.loadingDeleteProduct = loading\n }\n setLoadingUploadProducts(loading: boolean): void {\n this.loadingUploadProducts = loading\n }\n\n setUploadProductsJobId(job_id): void {\n this.uploadProductsJobId = job_id;\n }\n setUploadProductsJobState(state): void {\n this.uploadProductsJobState = state;\n }\n}","import { Product } from '../domain/Product'\nimport { ProductListScreenData } from '../domain/ProductListScreenData'\nimport { ProductRepository } from '../domain/ProductRepository'\nimport { Tax } from '../domain/Invoiceable'\nimport { FileRepository } from '@/modules/shared/domain/FileRepository'\nimport { JobRepository } from '@/modules/jobs/domain/JobRepository'\n\nexport class ProductListComponent {\n\n product_repo: ProductRepository\n file_repo: FileRepository\n jobs_repo:JobRepository\n screen_data: ProductListScreenData\n\n constructor(product_repo, jobs_repo, file_repo, screen_data) {\n this.product_repo = product_repo\n this.screen_data = screen_data\n this.file_repo = file_repo\n this.jobs_repo = jobs_repo\n }\n\n async updateProductList(company_id: Number, filters:any) {\n this.screen_data.setLoading(true)\n let res = await this.product_repo.getProductList(parseInt(company_id.toString()), filters)\n this.screen_data.setProducts(res)\n this.screen_data.setTotalItems(res.length)\n this.screen_data.setLoading(false)\n this.screen_data.dirty = []\n this.screen_data.selectedItems = []\n }\n\n updateTableLimit(value) {\n this.screen_data.changeLimit(value)\n }\n\n updateTaxes(product_to_update) {\n let product = product_to_update\n product.taxes[0] = new Tax(product.selected_tax, product.price, product.selected_tax*product.price)\n if (product.selected_retention == 'na') {\n product.taxes_withheld = []\n } else {\n let rate = parseFloat(product.selected_retention)\n product.taxes_withheld = [new Tax(rate, product.price, product.price*rate)]\n }\n let reason = ''\n if (product.selected_tax == 0.0 && product.selected_tax_event){\n if (product.selected_tax_event == 'ISP'){\n reason = 'Inversión del sujeto pasivo en virtud del art 84.Uno de la Ley 37/1992, del IVA'\n product.special_taxable_event = {code:'01', reason:reason}\n }\n else if (product.selected_tax_event == 'NS'){\n reason = 'Operación no sujeta a IVA en virtud del art. 7 de la Ley 37/1992, del IVA'\n product.special_taxable_event = {code:'02', reason:reason}\n }\n else if (product.selected_tax_event == 'EX'){\n reason = 'Operación exenta en virtud del art. 20 de la Ley 37/1992, del IVA'\n product.special_taxable_event = {code:'01', reason:reason}\n }\n else if(product.selected_tax_event == 'INTRA.'){\n reason = 'Entrega intracomunitaria exenta en virtud del art. 25 de la Ley 37/1992, del IVA'\n product.special_taxable_event = {code:'01', reason:reason}\n }\n else if(product.selected_tax_event == 'EXPORT.'){\n reason = 'Operación exenta por exportación en virtud del art. 21 de la Ley 37/1992, del IVA'\n product.special_taxable_event = {code:'01', reason:reason}\n }\n else{\n product.special_taxable_event = null\n }\n }\n }\n\n async save(product_to_save: Product): Promise {\n this.screen_data.setLoadingAddProduct(true)\n this.screen_data.changeLoadingProduct(product_to_save.id, true)\n let res = await this.product_repo.save(product_to_save)\n this.screen_data.setLoadingAddProduct(false)\n this.screen_data.changeLoadingProduct(product_to_save.id, false)\n if (res && res['status'] == 'success') {\n this.screen_data.success_message('Producto guardado correctamente')\n this.screen_data.removeDirty(product_to_save.id)\n let product = this.product_repo.create_empty_product(this.screen_data.product.company_id)\n this.screen_data.setProduct(product)\n return true\n } else {\n if (res['message'] == 'Product code already exists') {\n this.screen_data.error_message('El código de producto ya existe')\n }\n else if (res['message'] == 'Product code cannot be empty') {\n this.screen_data.error_message('El código de producto no puede estar vacío')\n }\n else if (res['message'] == 'Product description cannot be empty') {\n this.screen_data.error_message('La descripcion del producto no puede estar vacía')\n }\n else {\n this.screen_data.error_message('Error al guardar el producto')\n }\n return false\n }\n }\n\n async delete(products: Product[]) {\n this.screen_data.setLoadingDeleteProduct(true)\n let res = await this.product_repo.delete(products)\n this.screen_data.setLoadingDeleteProduct(false)\n if (res && res['status'] =='success') {\n this.screen_data.success_message('Productos eliminados correctamente')\n this.screen_data.product = this.product_repo.create_empty_product(this.screen_data.product.company_id)\n } else {\n this.screen_data.error_message('Error al eliminar los productos')\n }\n }\n\n async uploadProductsDone(company_id, filters){\n let job = await this.jobs_repo.find_by_id(this.screen_data.uploadProductsJobId) \n this.screen_data.setUploadProductsJobState(job.state);\n if (this.screen_data.uploadProductsJobState == 'done') { \n this.updateProductList(company_id, filters)\n } \n this.screen_data.setLoadingUploadProducts(false); \n }\n\n async uploadProductsExcel(company_id, file) {\n this.screen_data.setLoadingUploadProducts(true)\n let file_path = await this.file_repo.uploadFile(file)\n let job_id = await this.product_repo.upload_products_file(company_id, file_path, file.name)\n this.screen_data.dialogUploadProducts = false\n this.screen_data.setUploadProductsJobId(job_id);\n this.screen_data.setUploadProductsJobState('running');\n\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!./ProductList.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!./ProductList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ProductList.vue?vue&type=template&id=151f47bc&scoped=true&\"\nimport script from \"./ProductList.vue?vue&type=script&lang=js&\"\nexport * from \"./ProductList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ProductList.vue?vue&type=style&index=0&id=151f47bc&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 \"151f47bc\",\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 { VAutocomplete } from 'vuetify/lib/components/VAutocomplete';\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 { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VFileInput } from 'vuetify/lib/components/VFileInput';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VImg } from 'vuetify/lib/components/VImg';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSnackbar } from 'vuetify/lib/components/VSnackbar';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VAutocomplete,VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VContainer,VDataTable,VDialog,VDivider,VFileInput,VIcon,VImg,VProgressCircular,VRow,VSelect,VSnackbar,VSpacer,VTextField,VTooltip})\n","import { CommandDispatcher } from \"@/modules/shared/domain/CommandDispatcher\";\nimport { QueryDispatcher } from \"@/modules/shared/domain/QueryDispatcher\";\nimport { query_dispatcher_get, sync_command_dispatcher, async_command_dispatcher } from \"@/api/client\";\nimport { ProductRepository } from \"../domain/ProductRepository\";\nimport { Product } from \"../domain/Product\";\nimport { v4 as uuidv4 } from 'uuid';\nimport { Tax } from \"../domain/Invoiceable\";\n\nfunction objectToDict(obj: any): Record {\n const dict: Record = {};\n\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n const value = obj[key];\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n // Recursively convert nested object\n dict[key] = objectToDict(value);\n } else {\n dict[key] = value;\n }\n }\n }\n\n return dict;\n}\n\nexport class ApiProductRepository implements ProductRepository {\n\n command_dispatcher: CommandDispatcher\n async_command_dispatcher: CommandDispatcher\n query_dispatcher: QueryDispatcher\n constructor() {\n this.command_dispatcher = sync_command_dispatcher\n this.async_command_dispatcher = async_command_dispatcher\n this.query_dispatcher = query_dispatcher_get\n }\n\n api_to_domain(product) {\n\n let p = new Product(\n product.id,\n product.code,\n product.description,\n product.price,\n product.company_id,\n product.taxes.map(tax => new Tax(tax.rate, tax.base, tax.amount, tax.recargo_rate, tax.recargo_amount)),\n product.deleted, \n product.taxes_withheld.map(tax => new Tax(tax.rate, tax.base, tax.amount)),\n product.special_taxable_event\n );\n p.selected_tax = product.taxes[0].rate;\n p.selected_retention = 'na'\n if (product.taxes_withheld.length) {\n p.selected_retention = product.taxes_withheld[0].rate;\n }\n\n p.selected_tax_event = 'N/A'\n if (p.special_taxable_event){\n let code = p.special_taxable_event['code']\n if (code == '01'){\n if (p.special_taxable_event['reason'].includes('sujeto pasivo')){\n p.selected_tax_event = 'ISP'\n }\n else if(p.special_taxable_event['reason'].includes('intracomunitaria')){\n p.selected_tax_event = 'INTRA.'\n }\n else if(p.special_taxable_event['reason'].includes('exportaci')){\n p.selected_tax_event = 'EXPORT.'\n }\n else if(p.special_taxable_event['reason'].includes('exent')){\n p.selected_tax_event = 'EX'\n }\n }\n else if (code == '02'){\n p.selected_tax_event = 'NS'\n }\n }\n\n return p;\n }\n domain_to_api(product: Product) {\n return JSON.parse(JSON.stringify(objectToDict(product)));\n }\n\n async getProductList(company_id:Number, filters:Object): Promise {\n let args = { \n company_id: company_id,\n filters: []\n };\n\n (Object.entries(filters) as [string, any][]).forEach(([key, value]) => {\n if(value.value) {\n args.filters.push({key: key, value: value.value})\n }\n })\n let productData = await this.query_dispatcher.dispatch('get.product.list', args)\n let productList: Product[] = []\n for (let inv in productData) {\n productList.push(this.api_to_domain(productData[inv]))\n }\n return productList\n }\n\n async save(product: Product) {\n let product_data = this.domain_to_api(product)\n let res = await this.command_dispatcher.dispatch('save.product', { product: product_data })\n return res['output']\n }\n\n create_empty_product(company_id) {\n return new Product(uuidv4(), '', '', 0.0, parseInt(company_id.toString()), [new Tax(0.21, 0, 0)], false)\n }\n\n async delete(products: Product[]) {\n let args = { \n products: products.map(product => this.domain_to_api(product))\n }\n let res = await this.command_dispatcher.dispatch('delete.products', args)\n return res['output']\n }\n\n async upload_products_file(company_id, file_path, filename) {\n let args = {\n company_id: company_id,\n file_path: file_path,\n og_file_name: filename\n }\n let res = await this.async_command_dispatcher.dispatch('import.products.from.excel', args)\n return res.job_id\n }\n}"],"sourceRoot":""}