@softdin/portal-admin 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -2
- package/dist-lib/chunks/AppLayout-COCPfLWo.js +303 -0
- package/dist-lib/chunks/AuditoriaView-Bcf_kOqI.js +643 -0
- package/dist-lib/chunks/CarnetView-BsdUtYeu.js +450 -0
- package/dist-lib/chunks/CarteleraView-CRnVjt-S.js +996 -0
- package/dist-lib/chunks/CertificadosView-DvHDflcN.js +549 -0
- package/dist-lib/chunks/ChatBandejaView-HqhdSw7G.js +274 -0
- package/dist-lib/chunks/ChatConfiguracionView-BdH5gDdR.js +716 -0
- package/dist-lib/chunks/ChatConocimientoView-nKTAKxFa.js +263 -0
- package/dist-lib/chunks/ChatConversacionView-Do74V09l.js +477 -0
- package/dist-lib/chunks/ChatInformeView-BIiAH9L_.js +280 -0
- package/dist-lib/chunks/ChatRespuestasView-QFXbyg8U.js +183 -0
- package/dist-lib/chunks/EmpleadosView-BtqrO5-8.js +311 -0
- package/dist-lib/chunks/HomologacionView-UCZk4u6R.js +949 -0
- package/dist-lib/chunks/IngresoSsoView-BKkcnrYO.js +98 -0
- package/dist-lib/chunks/SolicitudesView-CYPD2A1s.js +900 -0
- package/dist-lib/chunks/TiposSolicitudView-CrWTVizl.js +168 -0
- package/dist-lib/chunks/ToggleSwitch-BYrIyheq.js +55 -0
- package/dist-lib/chunks/_plugin-vue_export-helper-BOaGB7Aw.js +8 -0
- package/dist-lib/chunks/api-M7D1c3IT.js +97 -0
- package/dist-lib/chunks/apiError-BHGbwz97.js +15 -0
- package/dist-lib/chunks/auth.store-BrGKZg-7.js +220 -0
- package/dist-lib/chunks/chat.service-C7ZQf4w3.js +241 -0
- package/dist-lib/chunks/cliente-interno.store-De39VsEE.js +203 -0
- package/dist-lib/chunks/homologacion-CoeHD7cB.js +131 -0
- package/dist-lib/chunks/portal-empleado-6KQrnsQJ.js +120 -0
- package/dist-lib/chunks/tipos-D93bLfFC.js +22 -0
- package/dist-lib/portal-admin.js +196 -0
- package/dist-lib/style.css +4813 -0
- package/dist-lib/types/App.vue.d.ts +3 -0
- package/dist-lib/types/components/AppLayout.vue.d.ts +3 -0
- package/dist-lib/types/components/CarnetClientesInternos.vue.d.ts +11 -0
- package/dist-lib/types/components/InvitacionPortalModal.vue.d.ts +20 -0
- package/dist-lib/types/components/MenuUsuario.vue.d.ts +3 -0
- package/dist-lib/types/components/VistoBuenoPortalModal.vue.d.ts +23 -0
- package/dist-lib/types/components/auditoria/AuditoriaFila.vue.d.ts +16 -0
- package/dist-lib/types/components/auditoria/AuditoriaFiltros.vue.d.ts +30 -0
- package/dist-lib/types/components/auditoria/AuditoriaPaginador.vue.d.ts +14 -0
- package/dist-lib/types/components/cartelera/PaginaCarteleraImagen.vue.d.ts +14 -0
- package/dist-lib/types/components/cartelera/PublicacionFormModal.vue.d.ts +27 -0
- package/dist-lib/types/components/cartelera/VistaCelularCartelera.vue.d.ts +34 -0
- package/dist-lib/types/components/certificados/AtenderCertificadoModal.vue.d.ts +22 -0
- package/dist-lib/types/components/certificados/RechazarCertificadoModal.vue.d.ts +18 -0
- package/dist-lib/types/components/certificados/ResumenSolicitudCertificado.vue.d.ts +8 -0
- package/dist-lib/types/components/chat/ChatClientesInternos.vue.d.ts +21 -0
- package/dist-lib/types/components/chat/ChatHorarioCampos.vue.d.ts +21 -0
- package/dist-lib/types/components/forms/ExportExcelButton.vue.d.ts +30 -0
- package/dist-lib/types/components/forms/ToggleSwitch.vue.d.ts +17 -0
- package/dist-lib/types/components/homologacion/HomologacionFila.vue.d.ts +30 -0
- package/dist-lib/types/components/homologacion/TipoPermisoFormModal.vue.d.ts +26 -0
- package/dist-lib/types/components/homologacion/TipoSolicitudFormModal.vue.d.ts +27 -0
- package/dist-lib/types/lib/auditoria.d.ts +25 -0
- package/dist-lib/types/lib/cartelera-paginas.d.ts +26 -0
- package/dist-lib/types/lib/cartelera-vigencia.d.ts +3 -0
- package/dist-lib/types/lib/export-excel-csv.d.ts +4 -0
- package/dist-lib/types/lib/export-excel.d.ts +9 -0
- package/dist-lib/types/lib/exportar-listado.d.ts +68 -0
- package/dist-lib/types/lib/homologacion.d.ts +41 -0
- package/dist-lib/types/lib/portal-empleado.d.ts +32 -0
- package/dist-lib/types/modulo.d.ts +31 -0
- package/dist-lib/types/portal-admin/config.d.ts +17 -0
- package/dist-lib/types/portal-admin/rutas.d.ts +17 -0
- package/dist-lib/types/portal-admin/tipos.d.ts +68 -0
- package/dist-lib/types/router/index.d.ts +7 -0
- package/dist-lib/types/services/api.d.ts +29 -0
- package/dist-lib/types/services/auditoria.service.d.ts +63 -0
- package/dist-lib/types/services/auth.service.d.ts +61 -0
- package/dist-lib/types/services/carnet.service.d.ts +56 -0
- package/dist-lib/types/services/cartelera.service.d.ts +69 -0
- package/dist-lib/types/services/chat.service.d.ts +279 -0
- package/dist-lib/types/services/configuracion-cliente-interno.service.d.ts +23 -0
- package/dist-lib/types/services/homologacion.service.d.ts +105 -0
- package/dist-lib/types/services/portal-empleado.service.d.ts +112 -0
- package/dist-lib/types/services/solicitudes-certificado.service.d.ts +59 -0
- package/dist-lib/types/stores/auth.store.d.ts +125 -0
- package/dist-lib/types/stores/cliente-interno.store.d.ts +65 -0
- package/dist-lib/types/utils/apiError.d.ts +4 -0
- package/dist-lib/types/views/AuditoriaView.vue.d.ts +3 -0
- package/dist-lib/types/views/CarnetView.vue.d.ts +3 -0
- package/dist-lib/types/views/CarteleraView.vue.d.ts +3 -0
- package/dist-lib/types/views/CertificadosView.vue.d.ts +3 -0
- package/dist-lib/types/views/EmpleadosView.vue.d.ts +3 -0
- package/dist-lib/types/views/HomologacionView.vue.d.ts +4 -0
- package/dist-lib/types/views/IngresoSsoView.vue.d.ts +3 -0
- package/dist-lib/types/views/LoginView.vue.d.ts +3 -0
- package/dist-lib/types/views/OlvideView.vue.d.ts +3 -0
- package/dist-lib/types/views/RestablecerView.vue.d.ts +3 -0
- package/dist-lib/types/views/SolicitudesView.vue.d.ts +3 -0
- package/dist-lib/types/views/TiposSolicitudView.vue.d.ts +3 -0
- package/dist-lib/types/views/chat/ChatBandejaView.vue.d.ts +3 -0
- package/dist-lib/types/views/chat/ChatConfiguracionView.vue.d.ts +3 -0
- package/dist-lib/types/views/chat/ChatConocimientoView.vue.d.ts +3 -0
- package/dist-lib/types/views/chat/ChatConversacionView.vue.d.ts +11 -0
- package/dist-lib/types/views/chat/ChatInformeView.vue.d.ts +3 -0
- package/dist-lib/types/views/chat/ChatRespuestasView.vue.d.ts +3 -0
- package/package.json +66 -4
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { t as useClienteInternoStore } from "./cliente-interno.store-De39VsEE.js";
|
|
2
|
+
import { t as RUTAS_PORTAL } from "./tipos-D93bLfFC.js";
|
|
3
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
4
|
+
import { i as chatService } from "./chat.service-C7ZQf4w3.js";
|
|
5
|
+
import { t as mensajeError } from "./apiError-BHGbwz97.js";
|
|
6
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, onMounted, openBlock, ref, renderList, toDisplayString, unref, vModelCheckbox, vModelSelect, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
7
|
+
import { RouterLink } from "vue-router";
|
|
8
|
+
//#region src/views/chat/ChatConocimientoView.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var _hoisted_1 = { class: "page-shell" };
|
|
10
|
+
var _hoisted_2 = { class: "page-header" };
|
|
11
|
+
var _hoisted_3 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "panel-error",
|
|
14
|
+
role: "alert"
|
|
15
|
+
};
|
|
16
|
+
var _hoisted_4 = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "panel-muted",
|
|
19
|
+
role: "status"
|
|
20
|
+
};
|
|
21
|
+
var _hoisted_5 = {
|
|
22
|
+
key: 2,
|
|
23
|
+
class: "panel-muted"
|
|
24
|
+
};
|
|
25
|
+
var _hoisted_6 = { class: "panel-title" };
|
|
26
|
+
var _hoisted_7 = { class: "campo" };
|
|
27
|
+
var _hoisted_8 = { class: "campo" };
|
|
28
|
+
var _hoisted_9 = { class: "toolbar" };
|
|
29
|
+
var _hoisted_10 = ["value"];
|
|
30
|
+
var _hoisted_11 = ["value"];
|
|
31
|
+
var _hoisted_12 = ["value"];
|
|
32
|
+
var _hoisted_13 = { class: "label" };
|
|
33
|
+
var _hoisted_14 = { class: "label" };
|
|
34
|
+
var _hoisted_15 = { class: "toolbar" };
|
|
35
|
+
var _hoisted_16 = ["disabled"];
|
|
36
|
+
var _hoisted_17 = ["disabled"];
|
|
37
|
+
var _hoisted_18 = {
|
|
38
|
+
key: 4,
|
|
39
|
+
class: "panel-muted"
|
|
40
|
+
};
|
|
41
|
+
var _hoisted_19 = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "panel-muted"
|
|
44
|
+
};
|
|
45
|
+
var _hoisted_20 = { class: "page-header" };
|
|
46
|
+
var _hoisted_21 = { class: "panel-title" };
|
|
47
|
+
var _hoisted_22 = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "cliente"
|
|
50
|
+
};
|
|
51
|
+
var _hoisted_23 = { class: "panel-muted" };
|
|
52
|
+
var _hoisted_24 = {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "toolbar"
|
|
55
|
+
};
|
|
56
|
+
var _hoisted_25 = ["disabled", "onClick"];
|
|
57
|
+
var _hoisted_26 = ["disabled", "onClick"];
|
|
58
|
+
var _hoisted_27 = { class: "contenido" };
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/views/chat/ChatConocimientoView.vue
|
|
61
|
+
var ChatConocimientoView_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
62
|
+
__name: "ChatConocimientoView",
|
|
63
|
+
setup(__props) {
|
|
64
|
+
const resumen = ref(null);
|
|
65
|
+
const articulos = ref([]);
|
|
66
|
+
const temas = ref([]);
|
|
67
|
+
const cargando = ref(true);
|
|
68
|
+
const ocupado = ref(false);
|
|
69
|
+
const error = ref(null);
|
|
70
|
+
const aviso = ref(null);
|
|
71
|
+
const editando = ref(null);
|
|
72
|
+
const clientesInternos = useClienteInternoStore();
|
|
73
|
+
const clienteInterno = computed(() => clientesInternos.seleccionado);
|
|
74
|
+
const admin = computed(() => resumen.value?.es_admin === true);
|
|
75
|
+
const nombreTema = (id) => temas.value.find((t) => t.id === id)?.nombre ?? "Todos los temas";
|
|
76
|
+
const nombreCliente = (id) => clientesInternos.nombre(id);
|
|
77
|
+
/** El artículo es de un cliente que ya no está en el catálogo: se conserva como opción para no perderlo. */
|
|
78
|
+
const clienteFueraDeLista = computed(() => {
|
|
79
|
+
const id = editando.value?.cliente_interno_id;
|
|
80
|
+
return id != null && !clientesInternos.lista.some((c) => c.id === id);
|
|
81
|
+
});
|
|
82
|
+
async function cargar() {
|
|
83
|
+
cargando.value = true;
|
|
84
|
+
error.value = null;
|
|
85
|
+
try {
|
|
86
|
+
[resumen.value, articulos.value, temas.value] = await Promise.all([
|
|
87
|
+
chatService.resumen(),
|
|
88
|
+
chatService.conocimiento(clienteInterno.value),
|
|
89
|
+
chatService.temas()
|
|
90
|
+
]);
|
|
91
|
+
} catch (e) {
|
|
92
|
+
error.value = mensajeError(e, "No se pudo cargar la base de conocimiento.");
|
|
93
|
+
} finally {
|
|
94
|
+
cargando.value = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function filtrar() {
|
|
98
|
+
error.value = null;
|
|
99
|
+
try {
|
|
100
|
+
articulos.value = await chatService.conocimiento(clienteInterno.value);
|
|
101
|
+
} catch (e) {
|
|
102
|
+
error.value = mensajeError(e, "No se pudo cargar la base de conocimiento.");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function nuevo() {
|
|
106
|
+
editando.value = {
|
|
107
|
+
titulo: "",
|
|
108
|
+
contenido: "",
|
|
109
|
+
tema_id: null,
|
|
110
|
+
cliente_interno_id: clienteInterno.value,
|
|
111
|
+
visible_en_faq: true,
|
|
112
|
+
activo: true
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
async function guardar() {
|
|
116
|
+
if (!editando.value) return;
|
|
117
|
+
ocupado.value = true;
|
|
118
|
+
error.value = null;
|
|
119
|
+
aviso.value = null;
|
|
120
|
+
try {
|
|
121
|
+
await chatService.guardarArticulo(editando.value);
|
|
122
|
+
aviso.value = "Artículo guardado.";
|
|
123
|
+
editando.value = null;
|
|
124
|
+
articulos.value = await chatService.conocimiento(clienteInterno.value);
|
|
125
|
+
} catch (e) {
|
|
126
|
+
error.value = mensajeError(e, "No se pudo guardar el artículo.");
|
|
127
|
+
} finally {
|
|
128
|
+
ocupado.value = false;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
async function borrar(a) {
|
|
132
|
+
if (!window.confirm(`¿Borrar «${a.titulo}»? El asistente dejará de usarlo.`)) return;
|
|
133
|
+
ocupado.value = true;
|
|
134
|
+
error.value = null;
|
|
135
|
+
try {
|
|
136
|
+
await chatService.borrarArticulo(a.id);
|
|
137
|
+
articulos.value = articulos.value.filter((x) => x.id !== a.id);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
error.value = mensajeError(e, "No se pudo borrar el artículo.");
|
|
140
|
+
} finally {
|
|
141
|
+
ocupado.value = false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
watch(clienteInterno, () => void filtrar());
|
|
145
|
+
onMounted(() => void cargar());
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
148
|
+
createVNode(unref(RouterLink), {
|
|
149
|
+
to: { name: unref(RUTAS_PORTAL).chat },
|
|
150
|
+
class: "volver"
|
|
151
|
+
}, {
|
|
152
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode("← Bandeja", -1)])]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["to"]),
|
|
155
|
+
createElementVNode("header", _hoisted_2, [_cache[8] || (_cache[8] = createElementVNode("div", null, [createElementVNode("h1", { class: "page-title" }, "Base de conocimiento"), createElementVNode("p", { class: "page-subtitle" }, " Lo que el asistente de IA sabe de la empresa. Escriba respuestas cortas y concretas: el asistente no inventa lo que no esté aquí ni en los datos del empleado, y si no sabe, pasa la consulta a RRHH. Lo marcado como pregunta frecuente lo ven también los empleados. ")], -1)), admin.value && !editando.value ? (openBlock(), createElementBlock("button", {
|
|
156
|
+
key: 0,
|
|
157
|
+
type: "button",
|
|
158
|
+
class: "btn-primary",
|
|
159
|
+
onClick: nuevo
|
|
160
|
+
}, "Nuevo artículo")) : createCommentVNode("", true)]),
|
|
161
|
+
error.value ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(error.value), 1)) : createCommentVNode("", true),
|
|
162
|
+
aviso.value ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(aviso.value), 1)) : createCommentVNode("", true),
|
|
163
|
+
cargando.value ? (openBlock(), createElementBlock("p", _hoisted_5, "Cargando…")) : createCommentVNode("", true),
|
|
164
|
+
editando.value ? (openBlock(), createElementBlock("form", {
|
|
165
|
+
key: 3,
|
|
166
|
+
class: "panel",
|
|
167
|
+
onSubmit: withModifiers(guardar, ["prevent"])
|
|
168
|
+
}, [
|
|
169
|
+
createElementVNode("p", _hoisted_6, toDisplayString(editando.value.id ? "Editar artículo" : "Nuevo artículo"), 1),
|
|
170
|
+
createElementVNode("label", _hoisted_7, [_cache[9] || (_cache[9] = createElementVNode("span", { class: "label" }, "Pregunta o título", -1)), withDirectives(createElementVNode("input", {
|
|
171
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => editando.value.titulo = $event),
|
|
172
|
+
class: "input",
|
|
173
|
+
maxlength: "200",
|
|
174
|
+
required: "",
|
|
175
|
+
placeholder: "¿Cuándo pagan la nómina?"
|
|
176
|
+
}, null, 512), [[vModelText, editando.value.titulo]])]),
|
|
177
|
+
createElementVNode("label", _hoisted_8, [_cache[10] || (_cache[10] = createElementVNode("span", { class: "label" }, "Respuesta", -1)), withDirectives(createElementVNode("textarea", {
|
|
178
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => editando.value.contenido = $event),
|
|
179
|
+
class: "input",
|
|
180
|
+
rows: "6",
|
|
181
|
+
maxlength: "8000",
|
|
182
|
+
required: "",
|
|
183
|
+
placeholder: "La nómina se paga los días 15 y 30 de cada mes…"
|
|
184
|
+
}, null, 512), [[vModelText, editando.value.contenido]])]),
|
|
185
|
+
createElementVNode("div", _hoisted_9, [
|
|
186
|
+
_cache[15] || (_cache[15] = createElementVNode("label", {
|
|
187
|
+
class: "label",
|
|
188
|
+
for: "art-tema"
|
|
189
|
+
}, "Tema", -1)),
|
|
190
|
+
withDirectives(createElementVNode("select", {
|
|
191
|
+
id: "art-tema",
|
|
192
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => editando.value.tema_id = $event),
|
|
193
|
+
class: "input"
|
|
194
|
+
}, [_cache[11] || (_cache[11] = createElementVNode("option", { value: null }, "Todos los temas", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(temas.value, (t) => {
|
|
195
|
+
return openBlock(), createElementBlock("option", {
|
|
196
|
+
key: t.id,
|
|
197
|
+
value: t.id
|
|
198
|
+
}, toDisplayString(t.nombre), 9, _hoisted_10);
|
|
199
|
+
}), 128))], 512), [[vModelSelect, editando.value.tema_id]]),
|
|
200
|
+
_cache[16] || (_cache[16] = createElementVNode("label", {
|
|
201
|
+
class: "label",
|
|
202
|
+
for: "art-cliente"
|
|
203
|
+
}, "Para", -1)),
|
|
204
|
+
withDirectives(createElementVNode("select", {
|
|
205
|
+
id: "art-cliente",
|
|
206
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => editando.value.cliente_interno_id = $event),
|
|
207
|
+
class: "input"
|
|
208
|
+
}, [
|
|
209
|
+
_cache[12] || (_cache[12] = createElementVNode("option", { value: null }, "Todo el tenant", -1)),
|
|
210
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(clientesInternos).lista, (c) => {
|
|
211
|
+
return openBlock(), createElementBlock("option", {
|
|
212
|
+
key: c.id,
|
|
213
|
+
value: c.id
|
|
214
|
+
}, toDisplayString(c.nombre), 9, _hoisted_11);
|
|
215
|
+
}), 128)),
|
|
216
|
+
clienteFueraDeLista.value ? (openBlock(), createElementBlock("option", {
|
|
217
|
+
key: 0,
|
|
218
|
+
value: editando.value.cliente_interno_id
|
|
219
|
+
}, "Cliente " + toDisplayString(editando.value.cliente_interno_id), 9, _hoisted_12)) : createCommentVNode("", true)
|
|
220
|
+
], 512), [[vModelSelect, editando.value.cliente_interno_id]]),
|
|
221
|
+
createElementVNode("label", _hoisted_13, [withDirectives(createElementVNode("input", {
|
|
222
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => editando.value.visible_en_faq = $event),
|
|
223
|
+
type: "checkbox"
|
|
224
|
+
}, null, 512), [[vModelCheckbox, editando.value.visible_en_faq]]), _cache[13] || (_cache[13] = createTextVNode(" Pregunta frecuente para los empleados", -1))]),
|
|
225
|
+
createElementVNode("label", _hoisted_14, [withDirectives(createElementVNode("input", {
|
|
226
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => editando.value.activo = $event),
|
|
227
|
+
type: "checkbox"
|
|
228
|
+
}, null, 512), [[vModelCheckbox, editando.value.activo]]), _cache[14] || (_cache[14] = createTextVNode(" Activo", -1))])
|
|
229
|
+
]),
|
|
230
|
+
createElementVNode("div", _hoisted_15, [createElementVNode("button", {
|
|
231
|
+
type: "submit",
|
|
232
|
+
class: "btn-primary",
|
|
233
|
+
disabled: ocupado.value
|
|
234
|
+
}, "Guardar", 8, _hoisted_16), createElementVNode("button", {
|
|
235
|
+
type: "button",
|
|
236
|
+
class: "btn-secondary",
|
|
237
|
+
disabled: ocupado.value,
|
|
238
|
+
onClick: _cache[6] || (_cache[6] = ($event) => editando.value = null)
|
|
239
|
+
}, "Cancelar", 8, _hoisted_17)])
|
|
240
|
+
], 32)) : createCommentVNode("", true),
|
|
241
|
+
!cargando.value && clienteInterno.value !== null ? (openBlock(), createElementBlock("p", _hoisted_18, " Se ven los artículos generales y los de " + toDisplayString(nombreCliente(clienteInterno.value)) + ". ", 1)) : createCommentVNode("", true),
|
|
242
|
+
!cargando.value ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [articulos.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_19, "Todavía no hay artículos. Sin ellos, el asistente solo responde con los datos del empleado.")) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(articulos.value, (a) => {
|
|
243
|
+
return openBlock(), createElementBlock("article", {
|
|
244
|
+
key: a.id,
|
|
245
|
+
class: "panel"
|
|
246
|
+
}, [createElementVNode("div", _hoisted_20, [createElementVNode("div", null, [createElementVNode("p", _hoisted_21, [createTextVNode(toDisplayString(a.titulo) + " ", 1), a.cliente_interno_id != null ? (openBlock(), createElementBlock("span", _hoisted_22, "Solo " + toDisplayString(nombreCliente(a.cliente_interno_id)), 1)) : createCommentVNode("", true)]), createElementVNode("p", _hoisted_23, [createTextVNode(toDisplayString(nombreTema(a.tema_id)) + " · " + toDisplayString(a.visible_en_faq ? "Pregunta frecuente" : "Solo para el asistente"), 1), !a.activo ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" · Inactivo")], 64)) : createCommentVNode("", true)])]), admin.value ? (openBlock(), createElementBlock("div", _hoisted_24, [createElementVNode("button", {
|
|
247
|
+
type: "button",
|
|
248
|
+
class: "btn-secondary",
|
|
249
|
+
disabled: ocupado.value,
|
|
250
|
+
onClick: ($event) => editando.value = { ...a }
|
|
251
|
+
}, "Editar", 8, _hoisted_25), createElementVNode("button", {
|
|
252
|
+
type: "button",
|
|
253
|
+
class: "btn-danger",
|
|
254
|
+
disabled: ocupado.value,
|
|
255
|
+
onClick: ($event) => borrar(a)
|
|
256
|
+
}, "Borrar", 8, _hoisted_26)])) : createCommentVNode("", true)]), createElementVNode("p", _hoisted_27, toDisplayString(a.contenido), 1)]);
|
|
257
|
+
}), 128))], 64)) : createCommentVNode("", true)
|
|
258
|
+
]);
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}), [["__scopeId", "data-v-ee9c5f6c"]]);
|
|
262
|
+
//#endregion
|
|
263
|
+
export { ChatConocimientoView_default as default };
|