\r\n \r\n \r\n Cliente {{ $options.filters.lowercase(CLIENTE.descripcionEstado[CLIENTE.idestados[estadoCliente]]) }}\r\n \r\n \r\n Sistema {{ SISTEMA.descripcionEstado[SISTEMA.idestados[estadoSistema]] }}\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!./SistemaExtraSubtitle.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!./SistemaExtraSubtitle.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SistemaExtraSubtitle.vue?vue&type=template&id=5875a917&\"\nimport script from \"./SistemaExtraSubtitle.vue?vue&type=script&lang=js&\"\nexport * from \"./SistemaExtraSubtitle.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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VChip } from 'vuetify/lib/components/VChip';\ninstallComponents(component, {VChip})\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)}}},[_c('template',{slot:\"extraSubtitle\"},[_c('extra-subtitle',{attrs:{\"estado-cliente\":_vm.formattedItem.estadoCliente,\"estado-sistema\":_vm.formattedItem.estadoSistema}})],1)],2),(!_vm.networkOnline)?_c('v-banner',{attrs:{\"color\":\"warning\",\"icon\":_vm.$vuetify.icons.values.warning}},[_vm._v(\" No tienes conexión a internet, algunas opciones están desabilitadas. \")]):_vm._e(),_c('b10-view-details',{attrs:{\"details\":_vm.details},on:{\"click-detail\":_vm.clickDetail}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { TABLA } from '@/utils/consts'\r\n\r\nexport default {\r\n async _addSubqueriesSistema (Vue, rows) {\r\n for (let row of rows) {\r\n row.direccion = await Vue.$offline.clienteDireccion.formatearDireccion(row.cliente_direccion)\r\n }\r\n return rows\r\n },\r\n async selectSistema (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n const rows = await Vue.$offline.db\r\n .select()\r\n .from(tables.sistema)\r\n .innerJoin(\r\n tables.cliente,\r\n tables.sistema.idcliente.eq(tables.cliente.idcliente)\r\n )\r\n .innerJoin(\r\n tables.tsistema,\r\n tables.sistema.idtsistema.eq(tables.tsistema.idtsistema)\r\n )\r\n .innerJoin(\r\n tables.forma_pago,\r\n tables.sistema.idforma_pago.eq(tables.forma_pago.idforma_pago)\r\n )\r\n .leftOuterJoin(\r\n tables.cliente_direccion,\r\n tables.sistema.idcliente_direccion_sist.eq(tables.cliente_direccion.idcliente_direccion)\r\n )\r\n .leftOuterJoin(\r\n tables.zona,\r\n tables.cliente_direccion.idzona_tecnico.eq(tables.zona.idzona)\r\n )\r\n .where(tables.sistema.idsistema.eq(idsistema))\r\n .exec()\r\n return (await this._addSubqueriesSistema(Vue, rows))[0]\r\n },\r\n async selectSistemaTelefonoCount (Vue, idsistema) {\r\n return await Vue.$offline.sistemaTelefono.selectContactosDelSistema(idsistema)\r\n },\r\n async selectSistemaTviacomunicacion (Vue, idsistema) {\r\n return await Vue.$offline.sistemaTelefono.selectContactosDelSistema(idsistema)\r\n },\r\n async selectRevisionesCount (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n return await Vue.$offline.db\r\n .select(\r\n tables.tactuacion.descripcion,\r\n tables.periodo_revision.descripcion,\r\n Vue.$offline.db.fn.count(tables.sistema_mant.idsistema_mant).as('count'),\r\n )\r\n .from(tables.sistema_mant)\r\n .innerJoin(\r\n tables.tactuacion,\r\n tables.sistema_mant.idtactuacion.eq(tables.tactuacion.idtactuacion)\r\n )\r\n .innerJoin(\r\n tables.periodo_revision,\r\n tables.sistema_mant.idperiodo_revision.eq(tables.periodo_revision.idperiodo_revision)\r\n )\r\n .groupBy(\r\n tables.tactuacion.descripcion,\r\n tables.periodo_revision.descripcion,\r\n )\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.sistema_mant.idsistema.eq(idsistema),\r\n tables.sistema_mant.estado.gt(0),\r\n tables.sistema_mant.activar.eq(true),\r\n )\r\n )\r\n .exec()\r\n },\r\n async selectMaterialSistemaCount(Vue, idsistema){\r\n const tables = Vue.$offline.db.tables\r\n return (await Vue.$offline.db\r\n .select(\r\n Vue.$offline.db.fn.sum(\r\n tables.material_sistema.unidades\r\n ).as('count')\r\n )\r\n .from(tables.material_sistema)\r\n .innerJoin(\r\n tables.subsis,\r\n tables.material_sistema.idsubsis.eq(tables.subsis.idsubsis)\r\n )\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.material_sistema.estado.gt(0),\r\n tables.material_sistema.fdesinstalacion.isNull(),\r\n tables.subsis.idsistema.eq(idsistema),\r\n tables.subsis.estado.gt(0),\r\n )\r\n )\r\n .exec())[0]\r\n },\r\n async selectSubsisCount (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n return (await Vue.$offline.db\r\n .select(Vue.$offline.db.fn.count(tables.subsis.idsubsis).as('count'))\r\n .from(tables.subsis)\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.subsis.idsistema.eq(idsistema),\r\n tables.subsis.estado.gt(0),\r\n )\r\n )\r\n .exec())[0]\r\n },\r\n async selectFicherosCount (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n return (await Vue.$offline.db\r\n .select(Vue.$offline.db.fn.count(tables.fichero.idfichero).as('count'))\r\n .from(tables.fichero)\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.fichero.idtabla.eq(TABLA.sistema.idtabla),\r\n tables.fichero.id.eq(idsistema),\r\n )\r\n )\r\n .exec())[0]\r\n },\r\n async geolocalizar (Vue, idclienteDireccion, latitud, longitud) {\r\n await Vue.$offline.clienteDireccion.updateSync({\r\n idcliente_direccion: idclienteDireccion,\r\n latitud,\r\n longitud,\r\n })\r\n },\r\n async selectSistemaCuotaCount (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n // esto lo hace parteTrabajo también\r\n const idConceptoCuotaDeMantenimiento = await Vue.$offline.conceptoCuotaTservicio.idConceptoCuotaDeMantenimiento()\r\n return (await Vue.$offline.db\r\n .select(Vue.$offline.db.fn.count(tables.sistema_cuota.idsistema_cuota).as('count'))\r\n .from(tables.sistema_cuota)\r\n .innerJoin(\r\n tables.concepto_cuota,\r\n tables.sistema_cuota.idconcepto_cuota.eq(tables.concepto_cuota.idconcepto_cuota)\r\n )\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.sistema_cuota.estado.gt(0),\r\n tables.sistema_cuota.idconcepto_cuota.in(idConceptoCuotaDeMantenimiento),\r\n tables.sistema_cuota.idsistema.eq(idsistema)\r\n )\r\n )\r\n .exec())[0]\r\n },\r\n async selectDatoSistemaCount (Vue, idsistema) {\r\n const tables = Vue.$offline.db.tables\r\n return (await Vue.$offline.db\r\n .select(Vue.$offline.db.fn.count(tables.dato_sistema.iddato_sistema).as('count'))\r\n .from(tables.dato_sistema)\r\n .where(\r\n Vue.$offline.db.op.and(\r\n tables.dato_sistema.idsistema.eq(idsistema),\r\n tables.dato_sistema.estado.gt(0),\r\n )\r\n )\r\n .exec())[0]\r\n },\r\n}\r\n","