From 99f1b5fbe4f2abd2af39c55bd8f70539e004542d Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Tue, 17 Dec 2024 16:22:38 -0400 Subject: [PATCH 1/9] Adding new component ProcessesDashboardsMenu.vue --- .../components/ParticipantHomeScreen.vue | 9 ++- .../components/ProcessesDashboardsMenu.vue | 78 +++++++++++++++++++ 2 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 resources/js/tasks/components/ProcessesDashboardsMenu.vue diff --git a/resources/js/tasks/components/ParticipantHomeScreen.vue b/resources/js/tasks/components/ParticipantHomeScreen.vue index cc12f71978..b39973bdeb 100644 --- a/resources/js/tasks/components/ParticipantHomeScreen.vue +++ b/resources/js/tasks/components/ParticipantHomeScreen.vue @@ -15,7 +15,7 @@ > {{ $t("Inbox") }} -

New Menu Processes Here

+
@@ -27,7 +27,7 @@
-
+
@@ -215,12 +215,14 @@ import ListMixin from "./ListMixin"; import TasksMixin from "../mixins/TasksMixin"; import TasksList from "./TasksList.vue"; +import ProcessesDashboardsMenu from "./ProcessesDashboardsMenu.vue"; export default { name: "ParticipantHomeScreen", mixins: [TasksMixin, ListMixin], components: { TasksList, + ProcessesDashboardsMenu, }, props: { taskDraftsEnabled: { @@ -517,12 +519,13 @@ export default { display: block; width: 92%; margin-left: 15px; + text-align: left; @media (max-width: 639px) { display: none; } } -.processes-info { +.home-screen-inbox { width: 100%; margin-right: 0px; overflow-x: hidden; diff --git a/resources/js/tasks/components/ProcessesDashboardsMenu.vue b/resources/js/tasks/components/ProcessesDashboardsMenu.vue new file mode 100644 index 0000000000..4f495925e0 --- /dev/null +++ b/resources/js/tasks/components/ProcessesDashboardsMenu.vue @@ -0,0 +1,78 @@ + + + + + From bc2ce9941432b046223d4ee63279ab6a9970dbbe Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Tue, 17 Dec 2024 18:26:48 -0400 Subject: [PATCH 2/9] saving progress 2 --- .../components/ParticipantHomeScreen.vue | 350 +++++++++--------- .../js/tasks/components/ProcesoBrowser.vue | 19 + .../components/ProcessesDashboardsMenu.vue | 27 +- resources/js/tasks/router.js | 24 ++ webpack.mix.js | 1 + 5 files changed, 245 insertions(+), 176 deletions(-) create mode 100644 resources/js/tasks/components/ProcesoBrowser.vue create mode 100644 resources/js/tasks/router.js diff --git a/resources/js/tasks/components/ParticipantHomeScreen.vue b/resources/js/tasks/components/ParticipantHomeScreen.vue index b39973bdeb..9d0d97ad8f 100644 --- a/resources/js/tasks/components/ParticipantHomeScreen.vue +++ b/resources/js/tasks/components/ParticipantHomeScreen.vue @@ -15,7 +15,9 @@ > {{ $t("Inbox") }} - +
@@ -28,185 +30,193 @@
-
-
-
- - {{ inOverdueMessage }} - + +
+
+
+
+ + {{ inOverdueMessage }} + +
-
-
-
- - -
-
-
- +
-
+
+

router-view Dashboard 1

+
@@ -216,6 +226,7 @@ import ListMixin from "./ListMixin"; import TasksMixin from "../mixins/TasksMixin"; import TasksList from "./TasksList.vue"; import ProcessesDashboardsMenu from "./ProcessesDashboardsMenu.vue"; +import router from "../router"; export default { name: "ParticipantHomeScreen", @@ -224,6 +235,7 @@ export default { TasksList, ProcessesDashboardsMenu, }, + router, props: { taskDraftsEnabled: { type: Boolean, @@ -255,6 +267,7 @@ export default { showMenu: false, urlConfiguration: "users/configuration", localUserConfiguration: {}, + selectedProcess: "inbox", }; }, mounted() { @@ -265,6 +278,11 @@ export default { } }); }, + methods: { + processDashboardSelected(item) { + this.selectedProcess = item; + }, + }, }; diff --git a/resources/js/tasks/components/ProcesoBrowser.vue b/resources/js/tasks/components/ProcesoBrowser.vue new file mode 100644 index 0000000000..44fb7ed296 --- /dev/null +++ b/resources/js/tasks/components/ProcesoBrowser.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/resources/js/tasks/components/ProcessesDashboardsMenu.vue b/resources/js/tasks/components/ProcessesDashboardsMenu.vue index 4f495925e0..2a57bddf1f 100644 --- a/resources/js/tasks/components/ProcessesDashboardsMenu.vue +++ b/resources/js/tasks/components/ProcessesDashboardsMenu.vue @@ -3,10 +3,16 @@
@@ -27,19 +33,19 @@ export default { }, methods: { - openParticipantProcess(item) { - this.$emit('processParticipantSelected', item); + openProcessDashboard(item) { + if (item === 'process1') { + const router = this.$router || this.$root.$router; + router.push({ + path: '/', + query: { parametro: '1' } + }); + } + this.$emit('processDashboardSelected', item); }, - processTask(action) { - this.$emit('process-task', { - taskId: this.selectedTask.id, - action: action - }); - } } } - + diff --git a/resources/js/tasks/router.js b/resources/js/tasks/router.js new file mode 100644 index 0000000000..a3f0763807 --- /dev/null +++ b/resources/js/tasks/router.js @@ -0,0 +1,24 @@ +import Vue from "vue"; +import VueRouter from "vue-router"; +import ProcesoBrowser from "./components/ProcesoBrowser"; + +Vue.use(VueRouter); + +const router = new VueRouter({ + mode: "history", + base: "/tasks", + routes: [ + { + name: "proceso-browser", + path: "/", + component: ProcesoBrowser, + props(route) { + return { + procesoId: route.query.parametro || null + }; + } + } + ] +}); + +export default router; \ No newline at end of file diff --git a/webpack.mix.js b/webpack.mix.js index ef6c05502a..96d065d9c7 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -131,6 +131,7 @@ mix .js("resources/js/tasks/index.js", "public/js/tasks/index.js") .js("resources/js/tasks/mobile.js", "public/js/tasks/mobile.js") .js("resources/js/tasks/show.js", "public/js/tasks/show.js") + .js("resources/js/tasks/router.js", "public/js/tasks/router.js") .js("resources/js/notifications/index.js", "public/js/notifications/index.js") .js('resources/js/inbox-rules/index.js', 'public/js/inbox-rules') From 88c162ddb0520b96bfb6b3e9b7bebfb73b4a64fd Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Tue, 17 Dec 2024 18:49:12 -0400 Subject: [PATCH 3/9] Saving progress 3 --- .../components/ProcessesDashboardsMenu.vue | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/resources/js/tasks/components/ProcessesDashboardsMenu.vue b/resources/js/tasks/components/ProcessesDashboardsMenu.vue index 2a57bddf1f..b05c83c740 100644 --- a/resources/js/tasks/components/ProcessesDashboardsMenu.vue +++ b/resources/js/tasks/components/ProcessesDashboardsMenu.vue @@ -1,18 +1,30 @@ @@ -36,10 +48,16 @@ export default { openProcessDashboard(item) { if (item === 'process1') { const router = this.$router || this.$root.$router; - router.push({ - path: '/', - query: { parametro: '1' } - }); + if (router.currentRoute.query.parametro !== '1') { + router.push({ + path: '/', + query: { parametro: '1' } + }).catch(err => { + if (err.name !== 'NavigationDuplicated') { + throw err; + } + }); + } } this.$emit('processDashboardSelected', item); }, From c569423de285d5adbac9a51026e67f64ed5ecba3 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Tue, 17 Dec 2024 18:58:36 -0400 Subject: [PATCH 4/9] Saving progress 4 --- .../components/ProcessesDashboardsMenu.vue | 119 +++++++++++------- 1 file changed, 73 insertions(+), 46 deletions(-) diff --git a/resources/js/tasks/components/ProcessesDashboardsMenu.vue b/resources/js/tasks/components/ProcessesDashboardsMenu.vue index b05c83c740..0fce0a2a26 100644 --- a/resources/js/tasks/components/ProcessesDashboardsMenu.vue +++ b/resources/js/tasks/components/ProcessesDashboardsMenu.vue @@ -1,29 +1,34 @@