{"version":3,"sources":["webpack:///./src/mixins/viewPageMixin.js","webpack:///./src/mixins/basePageMixin.js","webpack:///./src/mixins/common.js","webpack:///./src/pages/clientes/clienteView/ClienteView.vue?db99","webpack:///./src/pages/clientes/clienteView/ClienteViewData.js","webpack:///src/pages/clientes/clienteView/ClienteView.vue","webpack:///./src/pages/clientes/clienteView/ClienteView.vue?c336","webpack:///./src/pages/clientes/clienteView/ClienteView.vue"],"names":["viewPageMixin","mixins","basePageMixin","data","item","dataset","metadata","moreInfoRows","details","methods","initStore","copyRouteParamsToPageStore","beforeRouteLeaveBase","to","from","next","beforeRouteLeaveCommon","pageStorePath","dispatchStore","buildMoreInfo","getRowLabelFromMetadata","rowName","label","getColumn","metadataRow","$options","filters","capitalize","defaultProperties","visible","clickable","password","icon","this","$vuetify","icons","values","Array","isArray","moreInfoArray","row","formattedRow","name","push","moreInfoObj","group","title","rows","initDetails","addDetail","subtitle","disabled","index","type","order","length","badge","badgeColor","totals","addDetailHeader","setMoreInfoRowValue","prop","value","_","find","itemNotFound","message","ItemNotFoundError","routeParams","routeQuery","loadingData","rememberState","rememberScroll","showingDialogs","pageLoaded","bottomNavBarButtons","dbReady","created","cloneDeep","$route","params","query","extra","decodeBase64","computed","routeFromBrowserHistory","meta","fromBrowserHistory","userPermissions","get","permissions","initDB","$offline","db","$loading","showManual","connect","initSchema","init","hide","closeDB","close","pageStoreName","routeParam","storeHasProperty","setStoreProperty","property","$store","set","getStoreProperty","actionName","payload","dispatch","hasViewPerm","perm","hasInsertPerm","hasEditPerm","hasDeletePerm","hasPerm","initNavigationBottom","addNavigationBottomButton","that","showingDialog","dialog","$set","render","_vm","_h","$createElement","_c","_self","attrs","toolbarOptions","on","clickToolbarOption","formattedItem","moreInfo","$event","clickSummaryRow","clickDetail","cliente","id","edit","clickEdit","_e","staticRenderFns","selectDetails","Vue","idcliente","esTecnico","esComercial","esVigilante","apiCalls","apiFilter","APIFilter","addExact","method","filter","wrapper","apiFilterCRM","apiFilterPresupuesto","addGT","PRESUPUESTOCLI","clasificacionEstados","anulado","$online","fichero","ApiCallSelectCount","TABLA","idtabla","$api","batchCall","selectCliente","call","resp","result","calcRiesgoDisponible","geolocalizar","idclienteDireccion","latitud","longitud","idcliente_direccion","beforeRouteLeave","addPresupuesto","addEstudioFinanciero","map","CLIENTE","usuarioIdtecnico","usuarioIdcomercial","usuarioIdvigilante","appComerciales","options","persistent","actions","text","flat","handler","loadPage","direcciones","comerciales","otros","comentarios","loadItem","Data","error","redirectRoute","loadDetailTotals","detailSistemas","detailPresupuestos","detailContactos","detailFicheros","detailFacturas","detailClienteCuenta","detailRepresentante","detailDirecciones","detailEstudioFinanciero","detailOperacionCRM","option","window","captureGeolocation","geolocation","res","riesgoDisponible","currency","component"],"mappings":"gSAKaA,EAAgB,CAC3BC,OAAQ,CAACC,QACTC,KAF2B,WAGzB,MAAO,CAWLC,KAAM,CACJC,QAAS,GACTC,SAAU,IAEZC,aAAc,GACdC,QAAS,KAGbC,QAAS,CACDC,UADC,WACY,wKACX,EAAKC,6BADM,8CAGbC,qBAJC,SAIqBC,EAAIC,EAAMC,GAAM,2JACrCC,eAAuB,EAAMH,EAAIC,EAAMC,GADF,oBAEpC,EAAKE,cAF+B,gCAGhC,EAAKC,cAAc,cAHa,OAKxCH,IALwC,8CAQ5CI,cAZO,SAYQb,GAAU,WACjBc,EAA0B,SAACC,EAASf,GACxC,IAAIgB,EAAQ,GACZ,GAAIhB,GAA0C,oBAAvBA,EAASiB,UAA0B,CACxD,IAAMC,EAAclB,EAASiB,UAAUF,GACnCG,IACFF,EAAQE,EAAYF,OAGxB,OAAOA,GAAS,EAAKG,SAASC,QAAQC,WAAWN,IAE7CO,EAAoB,CACxBC,SAAS,EACTC,WAAW,EACXC,UAAU,EACVC,KAAMC,KAAKC,SAASC,MAAMC,OAAOrB,MAEnC,GAAIsB,MAAMC,QAAQL,KAAK1B,cAAe,CACpC,IADoC,EAC9BgC,EAAgB,GADc,iBAElBN,KAAK1B,cAFa,IAE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G,uCACAsC,QACA6D,8BACA4B,mCAGA,2BACA,sBACA/H,iCACAsC,QACAoE,wCAGA,gCACA,sBACA1G,sDACAsC,QACAoE,wCAGA,iCACA,sBACA1G,mDACAsC,QACAoE,wCAGA,8BACA,sBACA1G,oDACAsC,QACAoE,wCAGA,4BACA,sBACA1G,iDACAsC,QACAoE,wCAGA,sCACA,sBACA1G,6DACAsC,QACAoE,wCAGA,+BACA,sBACA1G,kDACAsC,QACAoE,wCAGA,+BACA,sBACA1G,kDACAsC,QACAoE,wCAGA,2BACA,sBACA1G,8BACAsC,QACAoE,yCAMAd,mBAjQA,SAiQAmF,GAAA,wJACA,yBACAC,qFACA,kCACA,iBACA,oCACA,mBACAhL,iDACAsC,QACAoE,qCAGA,2CACA,mBACA1G,4DACAsC,QACAoE,qCAhBA,8CAqBA6B,aAtRA,WAsRA,gLACA0C,kBADA,UACAC,EADA,OAEA,2DAFA,iCAGA,0EACAA,MADA,aACAA,MADA,oDAEA,iCAFA,OAHA,UAGAC,EAHA,QAMAA,EANA,kCAOAlB,eACA,EACA,mCACAiB,MACAA,OAXA,yBAaA,aAbA,+CAiBAlF,gBAvSA,SAuSAlG,GAAA,mKACAA,OADA,OAEA,mBAFA,OAiBA,sBAjBA,2BAGAA,sCAHA,wBAIA,6CAJA,kBAMA,8FANA,uBAQA,kBARA,oBAUA,sDACA,4EAXA,wBAaA,sDACA,4EAdA,wDAkBA,mBAlBA,UAmBAmK,kDAnBA,oBAkBAmB,EAlBA,KAkBAC,SAlBA,gBAqBA,kDACA,uDAtBA,gEAyBAhF,UAhUA,WAiUA,sBACArG,8BACAsC,QACAoE,4CC9bmX,I,YCO/W4E,EAAY,eACd,EACAnG,EACAoB,GACA,EACA,KACA,KACA,MAIa,aAAA+E,E","file":"js/chunk-275c223a.69785062.js","sourcesContent":["import { basePageMixin } from '@/mixins/basePageMixin'\r\nimport { beforeRouteLeaveCommon } from './common'\r\nimport { ItemNotFoundError } from '@/utils/consts'\r\nimport _ from '@/utils/lodash'\r\n\r\nexport const viewPageMixin = {\r\n mixins: [basePageMixin],\r\n data () {\r\n return {\r\n // moreInfoRows puede ser:\r\n // 1º un array strings con nombres de campos\r\n // ['idcliente', 'nombre']\r\n // 2º un array de objetos (campos)\r\n // [{ name: 'idcliente' }, { name: 'nombre' }]\r\n // 3º un objeto con grupos y cada grupo con un título y un array de strings u objetos (campos)\r\n // {\r\n // cliente: { title: 'Cliente', rows: ['idcliente', 'nombre'] },\r\n // sistema: { title: 'Sistema', rows: [ { name: 'idsistema' }, 'descripcion'] },\r\n // },\r\n item: {\r\n dataset: [],\r\n metadata: {},\r\n },\r\n moreInfoRows: [],\r\n details: [],\r\n }\r\n },\r\n methods: {\r\n async initStore () {\r\n await this.copyRouteParamsToPageStore()\r\n },\r\n async beforeRouteLeaveBase (to, from, next) {\r\n if (!beforeRouteLeaveCommon(this, to, from, next)) {\r\n if (this.pageStorePath) {\r\n await this.dispatchStore('resetStore')\r\n }\r\n next()\r\n }\r\n },\r\n buildMoreInfo (metadata) {\r\n const getRowLabelFromMetadata = (rowName, metadata) => {\r\n let label = ''\r\n if (metadata && typeof metadata.getColumn === 'function') {\r\n const metadataRow = metadata.getColumn(rowName)\r\n if (metadataRow) {\r\n label = metadataRow.label\r\n }\r\n }\r\n return label || this.$options.filters.capitalize(rowName)\r\n }\r\n const defaultProperties = {\r\n visible: true,\r\n clickable: false,\r\n password: false,\r\n icon: this.$vuetify.icons.values.next\r\n }\r\n if (Array.isArray(this.moreInfoRows)) {\r\n const moreInfoArray = []\r\n for (const row of this.moreInfoRows) {\r\n let formattedRow = {}\r\n if (typeof(row) === 'string') {\r\n formattedRow = { name: row, label: getRowLabelFromMetadata(row, metadata) }\r\n } else {\r\n formattedRow = row\r\n if (!formattedRow.label) {\r\n formattedRow.label = getRowLabelFromMetadata(formattedRow.name, metadata)\r\n }\r\n }\r\n moreInfoArray.push({ ...defaultProperties, ...formattedRow })\r\n }\r\n return moreInfoArray\r\n } else {\r\n const moreInfoObj = {}\r\n for (const group in this.moreInfoRows) {\r\n moreInfoObj[group] = {}\r\n moreInfoObj[group].title = this.moreInfoRows[group].title\r\n moreInfoObj[group].rows = []\r\n for (const row of this.moreInfoRows[group].rows) {\r\n let formattedRow = {}\r\n if (typeof(row) === 'string') {\r\n formattedRow = { name: row, label: getRowLabelFromMetadata(row, metadata) }\r\n } else {\r\n formattedRow = row\r\n if (!formattedRow.label) {\r\n formattedRow.label = getRowLabelFromMetadata(formattedRow.name, metadata)\r\n }\r\n }\r\n moreInfoObj[group].rows.push({ ...defaultProperties, ...formattedRow })\r\n }\r\n }\r\n return moreInfoObj\r\n }\r\n },\r\n initDetails () {\r\n this.details = []\r\n },\r\n addDetail (name, title, subtitle, icon, disabled = false, data = {}) {\r\n const index = this.details.push({\r\n type: 'detail',\r\n name,\r\n title,\r\n subtitle,\r\n icon,\r\n order: this.details.length + 1,\r\n badge: '',\r\n badgeColor: '',\r\n totals: '',\r\n data,\r\n disabled,\r\n })\r\n return this.details[index - 1]\r\n },\r\n addDetailHeader (title) {\r\n const index = this.details.push({\r\n type: 'header',\r\n title,\r\n order: this.details.length + 1,\r\n })\r\n return this.details[index - 1]\r\n },\r\n setMoreInfoRowValue (name, prop, value, group = '') {\r\n // ¿esta agrupado?\r\n if (group) {\r\n _.find(this.moreInfoRows[group].rows, { name })[prop] = value\r\n } else {\r\n _.find(this.moreInfoRows, { name })[prop] = value\r\n }\r\n },\r\n itemNotFound (message) {\r\n throw new ItemNotFoundError(message)\r\n },\r\n }\r\n}\r\n","import { decodeBase64 } from '@/utils/router'\r\nimport { get } from 'vuex-pathify'\r\nimport _ from '@/utils/lodash'\r\nimport { beforeRouteLeaveCommon } from './common'\r\nimport { hasViewPerm, hasInsertPerm, hasEditPerm, hasDeletePerm, hasPerm, permissions } from '@/utils/permissions'\r\nimport { initSchema, connect } from '@/offline/database'\r\n\r\nexport const basePageMixin = {\r\n data () {\r\n return {\r\n title: '',\r\n routeParams: null,\r\n routeQuery: null,\r\n loadingData: false,\r\n rememberState: false,\r\n rememberScroll: false,\r\n showingDialogs: {},\r\n pageLoaded: false,\r\n bottomNavBarButtons: [],\r\n dbReady: false,\r\n }\r\n },\r\n created () {\r\n this.routeParams = _.cloneDeep(this.$route.params)\r\n this.routeQuery = _.cloneDeep(this.$route.query)\r\n if (this.routeQuery.extra) {\r\n this.routeQuery.extra = decodeBase64(this.routeQuery.extra)\r\n }\r\n },\r\n computed: {\r\n routeFromBrowserHistory () {\r\n // no mostrar alerts en el \"back\" del navegador\r\n return this.$route.meta.fromBrowserHistory\r\n },\r\n userPermissions: get('usuario/permisos'),\r\n permissions () {\r\n return permissions\r\n },\r\n },\r\n methods: {\r\n async initDB () {\r\n if (!this.$offline.db) {\r\n this.$loading.showManual('Inicializando base de datos...')\r\n try {\r\n await this.$offline.init(await connect(initSchema()))\r\n } finally {\r\n this.dbReady = true\r\n this.$loading.hide()\r\n }\r\n } else {\r\n this.dbReady = true\r\n }\r\n },\r\n async closeDB () {\r\n if (this.$offline.db) {\r\n await this.$offline.db.close()\r\n this.$offline.db = null\r\n this.dbReady = false\r\n }\r\n },\r\n async copyRouteParamsToPageStore () {\r\n if (this.pageStoreName) {\r\n for (const routeParam in this.routeParams) {\r\n if (this.storeHasProperty(routeParam)) {\r\n await this.setStoreProperty(routeParam, this.routeParams[routeParam])\r\n }\r\n }\r\n }\r\n },\r\n async initStore () {\r\n // routeParams -> ¿existe en el store de la página? -> copiar valor\r\n // usado para: nextRoute, readonly\r\n await this.copyRouteParamsToPageStore()\r\n },\r\n storeHasProperty (property) {\r\n return property in this.$store.get(`${this.pageStoreName}`)\r\n },\r\n async setStoreProperty (property, value) {\r\n await this.$store.set(`${this.pageStoreName}/${property}`, value)\r\n },\r\n async getStoreProperty (property) {\r\n return await this.$store.get(`${this.pageStoreName}/${property}`)\r\n },\r\n async dispatchStore (actionName, payload) {\r\n return await this.$store.dispatch(`${this.pageStoreName}/${actionName}`, payload)\r\n },\r\n hasViewPerm (perm) {\r\n return hasViewPerm(this.userPermissions, perm)\r\n },\r\n hasInsertPerm (perm) {\r\n return hasInsertPerm(this.userPermissions, perm)\r\n },\r\n hasEditPerm (perm) {\r\n return hasEditPerm(this.userPermissions, perm)\r\n },\r\n hasDeletePerm (perm) {\r\n return hasDeletePerm(this.userPermissions, perm)\r\n },\r\n hasPerm (perm) {\r\n return hasPerm(this.userPermissions, perm)\r\n },\r\n beforeRouteLeaveBase (to, from, next) {\r\n if (!beforeRouteLeaveCommon(this, to, from, next)) {\r\n next()\r\n }\r\n },\r\n initNavigationBottom () {\r\n this.bottomNavBarButtons = []\r\n },\r\n addNavigationBottomButton (title, name, icon, visible = true, badge = null, badgeColor = 'green') {\r\n const index = this.bottomNavBarButtons.push({\r\n title,\r\n name,\r\n icon,\r\n order: this.bottomNavBarButtons.length + 1,\r\n visible,\r\n badge,\r\n badgeColor,\r\n })\r\n return this.bottomNavBarButtons[index - 1]\r\n },\r\n }\r\n}\r\n","export const beforeRouteLeaveCommon = (that, to, from, next) => {\r\n if (that.loadingData) {\r\n next(false)\r\n return true\r\n } else {\r\n let showingDialog = false\r\n for (const dialog in that.showingDialogs) {\r\n if (that.showingDialogs[dialog]) {\r\n that.$set(that.showingDialogs, dialog, false)\r\n showingDialog = true\r\n next(false)\r\n break\r\n }\r\n }\r\n return showingDialog\r\n }\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b10-base',[_c('b10-toolbar',{attrs:{\"title\":_vm.title,\"options\":_vm.toolbarOptions},on:{\"click-option\":_vm.clickToolbarOption}}),_c('b10-page-content',[_c('b10-view-summary',{attrs:{\"item\":_vm.formattedItem,\"showing\":_vm.showingDialogs.moreInfo,\"loading-data\":_vm.loadingData,\"show-alerts\":!_vm.routeFromBrowserHistory},on:{\"update:showing\":function($event){return _vm.$set(_vm.showingDialogs, \"moreInfo\", $event)},\"click-row\":_vm.clickSummaryRow}}),_c('b10-view-details',{attrs:{\"details\":_vm.details},on:{\"click-detail\":_vm.clickDetail}}),(_vm.hasEditPerm(_vm.permissions.cliente.id))?_c('b10-fab-button',{attrs:{\"icon\":_vm.$vuetify.icons.values.edit},on:{\"click\":_vm.clickEdit}}):_vm._e()],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { APIFilter } from '@/utils/api'\r\nimport { TABLA, PRESUPUESTOCLI } from '@/utils/consts'\r\n\r\nexport default {\r\n async selectDetails (Vue, idcliente, esTecnico, esComercial, esVigilante) {\r\n let apiCalls = []\r\n const apiFilter = new APIFilter()\r\n .addExact('idcliente', idcliente)\r\n .addExact('estado', 1)\r\n apiCalls.push({ name: 'selectSistemaCount', method: 'sistema.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectFacturacliCount', method: 'facturacli.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectClienteCuentaCount', method: 'clienteCuenta.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectRepresentanteCount', method: 'representante.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectClienteDireccionCount', method: 'clienteDireccion.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectPersonasContactoCount', method: 'clienteTelefono.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n apiCalls.push({ name: 'selectEstudioFinancieroCount', method: 'estudioFinanciero.select', params: { filter: apiFilter, wrapper: 'count' } })\r\n const apiFilterCRM = new APIFilter()\r\n .addExact('idcliente', idcliente)\r\n apiCalls.push({ name: 'selectOperacioncrmCount', method: 'operacioncrm.select', params: { filter: apiFilterCRM, wrapper: 'count' } })\r\n const apiFilterPresupuesto = new APIFilter()\r\n apiFilterPresupuesto\r\n .addExact('idcliente', idcliente)\r\n .addGT('idclasificacion_estado', PRESUPUESTOCLI.clasificacionEstados.anulado)\r\n apiCalls.push({ name: 'selectPresupuestoCount', method: 'presupuestocli.select', params: { filter: apiFilterPresupuesto, wrapper: 'count' } })\r\n apiCalls.push(Vue.$online.fichero.ApiCallSelectCount(idcliente, TABLA.cliente.idtabla, esTecnico, esComercial, esVigilante))\r\n return await Vue.$api.batchCall(apiCalls)\r\n },\r\n async selectCliente (Vue, idcliente) {\r\n const apiFilter = new APIFilter()\r\n apiFilter\r\n .addExact('idcliente', idcliente)\r\n .addGT('estado', 0)\r\n const resp = await Vue.$api.call('cliente.select', { filter: apiFilter })\r\n return [resp.data.result.dataset[0], resp.data.result.metadata]\r\n },\r\n async calcRiesgoDisponible (Vue, idcliente) {\r\n const resp = await Vue.$api.call('cliente.calcRiesgoDisponible', { idcliente })\r\n return resp.data.result\r\n },\r\n async geolocalizar (Vue, idclienteDireccion, latitud, longitud) {\r\n const resp = await Vue.$api.call(\r\n 'clienteDireccion.update', {\r\n values: {\r\n idcliente_direccion: idclienteDireccion,\r\n latitud,\r\n longitud,\r\n },\r\n })\r\n return resp.data.result\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\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClienteView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClienteView.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ClienteView.vue?vue&type=template&id=b49a167a&\"\nimport script from \"./ClienteView.vue?vue&type=script&lang=js&\"\nexport * from \"./ClienteView.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"],"sourceRoot":""}