{{ $t('created_at') }}:
diff --git a/src/controllers/BreadcrumbController.js b/src/controllers/BreadcrumbController.js
new file mode 100644
index 0000000..c5d7c7e
--- /dev/null
+++ b/src/controllers/BreadcrumbController.js
@@ -0,0 +1,19 @@
+/** Breadcrumb */
+const breadcrumbItem = (name, icon, route = {name:'index'}) => ({ name, icon, route })
+
+const breadcrumbMeta = (route) => {
+ let breadcrumbs = [];
+
+ route.matched.forEach(match => {
+ if(match.name && match.meta?.title) {
+ breadcrumbs.push(breadcrumbItem(match.meta.title, match.meta.icon, {name: match.name}));
+ }
+ });
+
+ return breadcrumbs;
+}
+
+export {
+ breadcrumbItem,
+ breadcrumbMeta,
+}
\ No newline at end of file
diff --git a/src/controllers/ModalController.js b/src/controllers/ModalController.js
deleted file mode 100644
index 501c060..0000000
--- a/src/controllers/ModalController.js
+++ /dev/null
@@ -1,92 +0,0 @@
-import { ref } from 'vue';
-
-/**
- * Controlador simple de las bandejas
- */
-class ModalController
-{
- // Modals
- confirmModal = ref(false);
- destroyModal = ref(false);
- editModal = ref(false);
- noteModal = ref(false);
- manyNotesModal = ref(false);
- showModal = ref(false);
- importModal = ref(false);
-
- // Models
- modelModal = ref({});
-
- constructor() {}
-
- /**
- * Controla el cambio entre show y edit
- */
- switchShowEditModal = () => {
- this.showModal.value = !this.showModal.value
- this.editModal.value = !this.editModal.value
- };
-
- /**
- * Controla el switch de eliminar
- */
- switchShowModal = (model) => {
- this._setModel(model);
- this.showModal.value = !this.showModal.value
- };
-
- /**
- * Controla el switch de importar
- */
- switchImportModal = () => {
- this.importModal.value = !this.importModal.value
- };
-
- /**
- * Controla el switch de eliminar
- */
- switchEditModal = (model) => {
- this._setModel(model);
- this.editModal.value = !this.editModal.value
- };
-
- /**
- * Controla el switch de eliminar
- */
- switchDestroyModal = (model) => {
- this._setModel(model);
- this.destroyModal.value = !this.destroyModal.value
- };
-
- /**
- * Controla el switch de nota
- */
- switchNoteModal = () => {
- this.noteModal.value = !this.noteModal.value
- };
-
- /**
- * Controla el switch de notas aplicadas a muchos
- */
- switchManyNotesModal = () => {
- this.manyNotesModal.value = !this.manyNotesModal.value
- };
-
- /**
- * Controla el switch de nota
- */
- switchConfirmModal = () => {
- this.confirmModal.value = !this.confirmModal.value
- };
-
- /**
- * Guarda el modelo
- */
- _setModel = (model) => {
- if(model) {
- this.modelModal.value = model;
- }
- }
-}
-
-export default ModalController;
\ No newline at end of file
diff --git a/src/pages/Admin/Activities/Index.vue b/src/pages/Admin/Activities/Index.vue
index 1670f7a..d0556a4 100644
--- a/src/pages/Admin/Activities/Index.vue
+++ b/src/pages/Admin/Activities/Index.vue
@@ -5,8 +5,6 @@ import { hasPermission } from '@Plugins/RolePermission';
import { useSearcher } from '@Services/Api';
import { apiTo, transl } from './Module';
-import ModalController from '@Controllers/ModalController.js';
-
import IconButton from '@Holos/Button/Icon.vue'
import PrimaryButton from '@Holos/Button/Primary.vue';
import Input from '@Holos/Form/Input.vue';
@@ -19,13 +17,7 @@ import ShowView from './Modals/Event.vue';
const vroute = useRoute();
const router = useRouter();
-/** Controladores */
-const Modal = new ModalController();
-
/** Propiedades */
-const showModal = ref(Modal.showModal);
-const modelModal = ref(Modal.modelModal);
-
const models = ref([]);
const filters = reactive({
@@ -35,6 +27,9 @@ const filters = reactive({
user: ''
});
+/** Referencias */
+const showModal = ref(null);
+
/** Métodos */
const searcher = useSearcher({
url: apiTo('index'),
@@ -133,7 +128,7 @@ onMounted(() => {
- {{ $t('details') }} -
-{{ model.event }}
-{{ model.description }}
-- {{ $t('changes') }}: +
+ {{ $t('details') }}
-{{ model.data }}
+ {{ model.event }}
+{{ model.description }}
++ {{ $t('changes') }}: +
+{{ model.data }}
+ {{ getDateTime(model.created_at) }}
{{ getDateTime(model.created_at) }}
{{ permissionType.name}}
-{{ permissionType.name}}
++ {{ $t('details') }} +
++ {{ $t('name') }}: + {{ model.full_name }} +
++ {{ $t('phone') }}: + + {{ model.phone ?? '-' }} + +
++ {{ $t('email.title') }}: + + {{ model.email }} + +
++ {{ $t('created_at') }}: + {{ getDateTime(model.created_at) }} +
++ {{ $t('updated_at') }}: + {{ getDateTime(model.updated_at) }} +
- {{ $t('details') }} -
-- {{ $t('name') }}: - {{ model.full_name }} -
-- {{ $t('phone') }}: - - {{ model.phone ?? '-' }} - -
-- {{ $t('email.title') }}: - - {{ model.email }} - -
-- {{ $t('created_at') }}: - {{ getDateTime(model.created_at) }} -
-- {{ $t('updated_at') }}: - {{ getDateTime(model.updated_at) }} -