\r\n \r\n \r\n \r\n \r\n {{\r\n CustomerRecipient.clienteDestinatarioId == 0\r\n ? $t(\"AppCustomer.CustomerRecipients.editRecipients\")\r\n : $t(\"AppCustomer.CustomerRecipients.editRecipients\")\r\n }}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ validationContext.errors[0] }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ validationContext.errors[0] }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ validationContext.errors[0] }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n option.value\"\r\n :state=\"getValidationState(validationContext)\"\r\n />\r\n \r\n {{ validationContext.errors[0] }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ $t('Lists.Edit') }}\r\n \r\n \r\n \r\n \r\n \r\n \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!./RecipientEdit.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!./RecipientEdit.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RecipientEdit.vue?vue&type=template&id=3460b7da&\"\nimport script from \"./RecipientEdit.vue?vue&type=script&lang=js&\"\nexport * from \"./RecipientEdit.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports","import axios from '@axios'\r\nimport common from '@/libs/common'\r\nimport defaultService from './_default.service'\r\n\r\nexport default function customerService() {\r\n const defaultMethods = defaultService('Clientes')\r\n const { throwError, throwSuccess } = common()\r\n const API_URL = `${process.env.VUE_APP_ADUACORE_API_URL}/api`\r\n\r\n /* Standard prefix names:\r\n Post: create, Get: fetch,\r\n Put: update, Patch: partialUpdate,\r\n Delete: delete\r\n */\r\n\r\n // General ----------------------------------------\r\n const fetchCustomers = (data, callback) => {\r\n axios\r\n .get(`${API_URL}/Clientes`, { params: data })\r\n .then(response => {\r\n callback(response.data)\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const createCustomer = data => new Promise((resolve, reject) => {\r\n axios\r\n .post(`${API_URL}/Clientes`, data)\r\n .then(response => {\r\n throwSuccess(response)\r\n resolve()\r\n })\r\n .catch(error => {\r\n reject(error)\r\n throwError(error)\r\n })\r\n })\r\n const fetchCustomer = ({ idCustomer }, callback) => {\r\n axios\r\n .get(`${API_URL}/Clientes/${idCustomer}`)\r\n .then(response => {\r\n callback(response.data)\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const updateCustomer = data => new Promise((resolve, reject) => {\r\n axios\r\n .put(`${API_URL}/Clientes/${data.clienteId}`, data)\r\n .then(response => {\r\n resolve()\r\n throwSuccess(response)\r\n })\r\n .catch(error => {\r\n reject()\r\n throwError(error)\r\n })\r\n })\r\n const deleteCustomer = data => new Promise((resolve, reject) => {\r\n axios\r\n .delete(`${API_URL}/Clientes/${data.idCustomer}`)\r\n .then(response => {\r\n resolve()\r\n throwSuccess(response)\r\n })\r\n .catch(error => {\r\n reject(error)\r\n throwError(error)\r\n })\r\n })\r\n // Related Customer -------------------------------\r\n const fetchRelatedCustomers = (idCustomer, callback) => {\r\n axios\r\n .get(`${API_URL}/Clientes/${idCustomer}/ClienteRelacionado`)\r\n .then(response => {\r\n callback(response.data)\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const createRelatedCustomer = (data, callback) => {\r\n axios\r\n .post(`${API_URL}/Clientes/${data.clienteId}/ClienteRelacionado`, data)\r\n .then(response => {\r\n throwSuccess(response)\r\n callback()\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const fetchRelatedCustomer = ({ idCustomer, idRelatedCustomer }, callback) => {\r\n axios\r\n .get(`${API_URL}/Clientes/${idCustomer}/ClienteRelacionado/${idRelatedCustomer}`)\r\n .then(response => {\r\n callback(response.data)\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const updateRelatedCustomer = (data, callback) => {\r\n axios\r\n .put(`${API_URL}/Clientes/${data.clienteId}/ClienteRelacionado/${data.clienteRelacionadoId}`, data)\r\n .then(response => {\r\n callback(response.data)\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n const deleteRelatedCustomer = ({ idCustomer, idRelatedCustomer }, callback) => {\r\n axios\r\n .delete(`${API_URL}/Clientes/${idCustomer}/ClienteRelacionado/${idRelatedCustomer}`)\r\n .then(response => {\r\n throwSuccess(response)\r\n callback()\r\n })\r\n .catch(error => throwError(error))\r\n }\r\n // Receiver Customer\r\n const createCustomerRecipients = data => new Promise((resolve, reject) => {\r\n axios\r\n .post(`${API_URL}/Clientes/DestinatarioExpedienteDigital`, data)\r\n .then(response => {\r\n throwSuccess(response)\r\n resolve(response)\r\n })\r\n .catch(error => {\r\n reject(error)\r\n throwError(error)\r\n })\r\n })\r\n const updateCustomerRecipient = data => new Promise((resolve, reject) => {\r\n axios\r\n .put(`${API_URL}/Clientes/DestinatarioExpedienteDigital/${data.ClienteDestinatarioExpedienteDigitalId}`, data)\r\n .then(response => {\r\n throwSuccess(response)\r\n resolve(response)\r\n })\r\n .catch(error => {\r\n reject(error)\r\n throwError(error)\r\n })\r\n })\r\n const fetchCustomerRecipient = (id, callback) => {\r\n axios\r\n .get(`${API_URL}/Clientes/DestinatarioExpedienteDigital/${id}`)\r\n .then(response => {\r\n callback(response)\r\n })\r\n .catch(error => {\r\n throwError(error)\r\n })\r\n }\r\n // const createCustomerRecipients = (data, callback) => defaultMethods.create('DestinatarioExpedienteDigital', {}, true, data, callback)\r\n const fetchCustomerRecipients = (data, callback) => defaultMethods.fetch('DestinatarioExpedienteDigital', {}, data, callback)\r\n const deleteCustomerRecipients = (id, callback) => defaultMethods.remove('DestinatarioExpedienteDigital/%{id}', { id }, true, callback)\r\n // const deleteCustomerRecipients = id => new Promise((resolve, reject) => {\r\n // axios\r\n // .delete(`${API_URL}/Clientes/DestinatarioExpedienteDigital/${id}`)\r\n // .then(response => {\r\n // throwSuccess(response)\r\n // resolve(response)\r\n // })\r\n // .catch(error => {\r\n // reject(error)\r\n // throwError(error)\r\n // })\r\n // })\r\n\r\n return {\r\n fetchCustomers,\r\n createCustomer,\r\n fetchCustomer,\r\n updateCustomer,\r\n deleteCustomer,\r\n fetchRelatedCustomers,\r\n createRelatedCustomer,\r\n fetchRelatedCustomer,\r\n updateRelatedCustomer,\r\n deleteRelatedCustomer,\r\n fetchCustomerRecipients,\r\n fetchCustomerRecipient,\r\n createCustomerRecipients,\r\n deleteCustomerRecipients,\r\n updateCustomerRecipient,\r\n }\r\n}\r\n"],"sourceRoot":""}