From 2ad4f49dac925c15627bf3b28c0c42b47adbde69 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 May 2026 15:58:19 +0000 Subject: [PATCH] instantanea inicial --- .../plugins/resumen-workflow/resumen.htm | 123 ++++++++++++++++++ .../plugins/resumen-workflow/resumen.js | 46 +++++++ .../plugins/resumen-workflow/resumen.json | 14 ++ 3 files changed, 183 insertions(+) create mode 100644 extensions/plugins/resumen-workflow/resumen.htm create mode 100644 extensions/plugins/resumen-workflow/resumen.js create mode 100644 extensions/plugins/resumen-workflow/resumen.json diff --git a/extensions/plugins/resumen-workflow/resumen.htm b/extensions/plugins/resumen-workflow/resumen.htm new file mode 100644 index 0000000..41866c5 --- /dev/null +++ b/extensions/plugins/resumen-workflow/resumen.htm @@ -0,0 +1,123 @@ +{% load i18n %} + + + + +
+
+

Resúmen estadístico del patrimonio nacional

+
+

Patrimonio Material - Bienes Muebles:

+
+
+
+

Patrimonio Material - Bienes Inmuebles:

+
+
+
+

Patrimonio Inmaterial:

+
+
+
+

Sitios arqueológicos:

+
+
+
+

Organizaciones y Personas:

+
+
+
+

Adjuntos digitales:

+
+
+
+

Actividades:

+
+
+ +
+

Historial de resúmenes estadísticos

+
+

Bienes Muebles

+

Bienes Inmuebles

+

Inmaterial

+

Sitios arqueológicos

+

Organizaciones y personas

+

Adjuntos digitales

+

Actividades

+

Fecha de guardado

+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/extensions/plugins/resumen-workflow/resumen.js b/extensions/plugins/resumen-workflow/resumen.js new file mode 100644 index 0000000..c75f18c --- /dev/null +++ b/extensions/plugins/resumen-workflow/resumen.js @@ -0,0 +1,46 @@ +define([ + 'knockout', + 'arches', + 'js-cookie', + 'templates/views/components/plugins/resumen.htm' +], function(ko, arches, Cookies, ResumenTemplate) { + + const ResumenViewModel = function() { + const self = this; + this.loading = ko.observable(true); + this.records = ko.observable(); + + this.getStatus = async function() { + const response = await window.fetch("../resumen/"); + const data = await response.json(); + self.bMueblesCount = data.b_muebles_count; + self.bInmueblesCount = data.b_inmuebles_count; + self.inmaterialCount = data.inmaterial_count; + self.sitiosArqCount = data.sitios_arq_count; + self.actoresCount = data.actores_count; + self.digitalesCount = data.digitales_count; + self.actividadesCount = data.actividades_count; + self.records(data.records); + self.loading(false); + }; + + this.saveStatus = async function() { + const response = await fetch("../resumen/", { + method: 'POST', + credentials: 'include', + headers: { + "X-CSRFToken": Cookies.get('csrftoken') + } + }); + const data = await response.json(); + self.records(data.records); + }; + + this.getStatus(); + }; + + return ko.components.register('resumen', { + viewModel: ResumenViewModel, + template: ResumenTemplate + }); +}); \ No newline at end of file diff --git a/extensions/plugins/resumen-workflow/resumen.json b/extensions/plugins/resumen-workflow/resumen.json new file mode 100644 index 0000000..9cbbbec --- /dev/null +++ b/extensions/plugins/resumen-workflow/resumen.json @@ -0,0 +1,14 @@ +{ + "pluginid": "ba58b43b-5bd0-40f0-8876-78858a22cc77", + "name": "Resumen", + "icon": "fa fa-pie-chart", + "component": "views/components/plugins/resumen", + "componentname": "resumen", + "config": { + "show": true, + "is_workflow": false, + "description": "Resúmen estadístico de los registros patrimoniales" + }, + "slug": "resumen", + "sortorder": 1 +} \ No newline at end of file