From 934c9d8e0a880badcc8542a507aad90482be0ad8 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Tue, 21 Jan 2025 14:49:39 -0400 Subject: [PATCH 01/18] saving progress ready for PR --- .../Http/Controllers/TaskController.php | 4 +- .../js/tasks/components/DashboardViewer.vue | 35 +++++--- .../components/ProcessesDashboardsMenu.vue | 86 ++++++++++++------- resources/js/tasks/router.js | 4 +- resources/views/tasks/index.blade.php | 1 + 5 files changed, 88 insertions(+), 42 deletions(-) diff --git a/ProcessMaker/Http/Controllers/TaskController.php b/ProcessMaker/Http/Controllers/TaskController.php index 415bece910..6206f28fca 100755 --- a/ProcessMaker/Http/Controllers/TaskController.php +++ b/ProcessMaker/Http/Controllers/TaskController.php @@ -62,7 +62,9 @@ public function index() $userConfiguration = (new UserConfigurationController())->index()['ui_configuration'] ?? []; - return view('tasks.index', compact('title', 'userFilter', 'defaultColumns', 'taskDraftsEnabled', 'userConfiguration', 'showOldTaskScreen')); + $currentUser = Auth::user(); + + return view('tasks.index', compact('title', 'userFilter', 'defaultColumns', 'taskDraftsEnabled', 'userConfiguration', 'showOldTaskScreen', 'currentUser')); } public function edit(ProcessRequestToken $task, string $preview = '') diff --git a/resources/js/tasks/components/DashboardViewer.vue b/resources/js/tasks/components/DashboardViewer.vue index aa5fd80457..81d8859d8f 100644 --- a/resources/js/tasks/components/DashboardViewer.vue +++ b/resources/js/tasks/components/DashboardViewer.vue @@ -1,19 +1,32 @@ \ No newline at end of file + }; + diff --git a/resources/js/tasks/components/ProcessesDashboardsMenu.vue b/resources/js/tasks/components/ProcessesDashboardsMenu.vue index 6fd5dd39f7..776fba52cd 100644 --- a/resources/js/tasks/components/ProcessesDashboardsMenu.vue +++ b/resources/js/tasks/components/ProcessesDashboardsMenu.vue @@ -22,20 +22,18 @@
-
-
- -
+
+
@@ -50,15 +48,14 @@ export default { pmql: `user_id=${window.ProcessMaker.user.id}`, processesList: [], labelIcon: "Default Icon", - dashboards: [ - { id: 1, name: "Dashboard 1" }, - { id: 2, name: "Dashboard 2" }, - { id: 3, name: "Dashboard 3" }, - ], + dashboards: [], + screen: null, + formData: null, }; }, mounted() { this.loadProcesses(); + this.loadDashboards(); }, methods: { openProcessDashboard(id, type) { @@ -76,21 +73,29 @@ export default { } }); } else { - router - .push({ - name: "dashboard", - params: { dashboardId: id.toString() }, - }) - .catch((err) => { - if (err.name !== "NavigationDuplicated") { - throw err; - } - }); + this.getDashboardViewScreen(id.toString()); } this.$emit("processDashboardSelected", { id, type }); this.$emit("menuItemSelected"); }, + callDashboardViewScreen(id, screen, formData) { + const router = this.$router || this.$root.$router; + router + .push({ + name: "dashboard", + params: { + dashboardId: id.toString(), + screen: screen, + formData: formData, + }, + }) + .catch((err) => { + if (err.name !== "NavigationDuplicated") { + throw err; + } + }); + }, loadProcesses() { const url = this.buildURL(); @@ -98,6 +103,13 @@ export default { this.processesList = this.processesList.concat(response.data.data); }); }, + loadDashboards() { + const url = this.buildURLDashboards(); + + ProcessMaker.apiClient.get(url).then((response) => { + this.dashboards = this.dashboards.concat(response.data); + }); + }, /** * Build URL for Process Cards */ @@ -109,6 +121,13 @@ export default { &order_by=name&order_direction=asc &include=user,categories,category`; }, + buildURLDashboards() { + return `/dynamic-ui/custom-dashboards`; + }, + buildURLDashboardsScreen(id) { + //return `/dynamic-ui/custom-dashboards/${token}`; + return `/dynamic-ui/custom-dashboards/screen/${id}`; + }, getIconProcess(process) { let icon = "Default Icon"; const unparseProperties = process?.launchpad?.properties || null; @@ -118,6 +137,15 @@ export default { return `/img/launchpad-images/icons/${icon}.svg`; }, + getDashboardViewScreen(id) { + const url = this.buildURLDashboardsScreen(id); + + ProcessMaker.apiClient.get(url).then((response) => { + this.screen = response.data.screen; + this.formData = response.data.formData; + this.callDashboardViewScreen(id, this.screen, this.formData); + }); + }, }, }; diff --git a/resources/js/tasks/router.js b/resources/js/tasks/router.js index 375852d6d1..7740705672 100644 --- a/resources/js/tasks/router.js +++ b/resources/js/tasks/router.js @@ -24,7 +24,9 @@ const router = new VueRouter({ name: "dashboard", component: DashboardViewer, props: route => ({ - dashboardId: route.params.dashboardId || null + dashboardId: route.params.dashboardId || null, + screen: route.params.screen || null, + formData: route.params.formData || null }) } ] diff --git a/resources/views/tasks/index.blade.php b/resources/views/tasks/index.blade.php index 08b4050ead..457f96b708 100644 --- a/resources/views/tasks/index.blade.php +++ b/resources/views/tasks/index.blade.php @@ -159,6 +159,7 @@ window.ProcessMaker.userConfiguration = @json($userConfiguration ?? []); window.sessionStorage.setItem('elementDestinationURL', window.location.href); window.ProcessMaker.showOldTaskScreen = @json($showOldTaskScreen); + window.Processmaker.user = @json($currentUser); From ca07f1a998ce0003b4d39e6e4227bf2a807cc7b3 Mon Sep 17 00:00:00 2001 From: CarliPinell Date: Wed, 29 Jan 2025 16:40:07 -0400 Subject: [PATCH 17/18] fixing spacing conflicts --- .../fonts/pm-font/processmaker-font.less | 46 ---------- .../pm-font/processmaker-font.module.less | 46 ---------- .../fonts/pm-font/processmaker-font.scss | 90 ------------------- resources/fonts/pm-font/symbol.html | 2 - .../shared/LaunchpadSettingsModal.vue | 8 +- 5 files changed, 4 insertions(+), 188 deletions(-) diff --git a/resources/fonts/pm-font/processmaker-font.less b/resources/fonts/pm-font/processmaker-font.less index 88f0035eb3..0592fd0072 100644 --- a/resources/fonts/pm-font/processmaker-font.less +++ b/resources/fonts/pm-font/processmaker-font.less @@ -14,51 +14,6 @@ -moz-osx-font-smoothing: grayscale; } -<<<<<<< HEAD -.fp-bpmn-action-by-email:before { content: "\ea01"; } -.fp-bpmn-data-connector:before { content: "\ea02"; } -.fp-bpmn-data-object:before { content: "\ea03"; } -.fp-bpmn-data-store:before { content: "\ea04"; } -.fp-bpmn-docusign:before { content: "\ea05"; } -.fp-bpmn-end-event:before { content: "\ea06"; } -.fp-bpmn-flowgenie:before { content: "\ea07"; } -.fp-bpmn-gateway:before { content: "\ea08"; } -.fp-bpmn-generic-gateway:before { content: "\ea09"; } -.fp-bpmn-idp:before { content: "\ea0a"; } -.fp-bpmn-intermediate-event:before { content: "\ea0b"; } -.fp-bpmn-pool:before { content: "\ea0c"; } -.fp-bpmn-send-email:before { content: "\ea0d"; } -.fp-bpmn-start-event:before { content: "\ea0e"; } -.fp-bpmn-task:before { content: "\ea0f"; } -.fp-bpmn-text-annotation:before { content: "\ea10"; } -.fp-brush-icon:before { content: "\ea11"; } -.fp-close:before { content: "\ea12"; } -.fp-cloud-download-outline:before { content: "\ea13"; } -.fp-copy:before { content: "\ea14"; } -.fp-desktop:before { content: "\ea15"; } -.fp-eye:before { content: "\ea16"; } -.fp-fields-icon:before { content: "\ea17"; } -.fp-flowgenie-outline:before { content: "\ea18"; } -.fp-folder-outline:before { content: "\ea19"; } -.fp-fullscreen:before { content: "\ea1a"; } -.fp-github:before { content: "\ea1b"; } -.fp-inbox:before { content: "\ea1c"; } -.fp-layout-icon:before { content: "\ea1d"; } -.fp-map:before { content: "\ea1e"; } -.fp-mobile:before { content: "\ea1f"; } -.fp-pdf:before { content: "\ea20"; } -.fp-play-outline:before { content: "\ea21"; } -.fp-plus:before { content: "\ea22"; } -.fp-screen-outline:before { content: "\ea23"; } -.fp-script-outline:before { content: "\ea24"; } -.fp-slack-notification:before { content: "\ea25"; } -.fp-slack:before { content: "\ea26"; } -.fp-slideshow:before { content: "\ea27"; } -.fp-table:before { content: "\ea28"; } -.fp-tachometer-alt-average:before { content: "\ea29"; } -.fp-trash:before { content: "\ea2a"; } -.fp-unlink:before { content: "\ea2b"; } -======= .fp-arrow-left:before { content: "\ea01"; } .fp-box-arrow-up-right:before { content: "\ea02"; } .fp-bpmn-action-by-email:before { content: "\ea03"; } @@ -103,4 +58,3 @@ .fp-tachometer-alt-average:before { content: "\ea2a"; } .fp-trash:before { content: "\ea2b"; } .fp-unlink:before { content: "\ea2c"; } ->>>>>>> c6e851f82761b266d51e0ea3beb6f1c10630038d diff --git a/resources/fonts/pm-font/processmaker-font.module.less b/resources/fonts/pm-font/processmaker-font.module.less index e8d2e46aa7..2e0e2c1b21 100644 --- a/resources/fonts/pm-font/processmaker-font.module.less +++ b/resources/fonts/pm-font/processmaker-font.module.less @@ -15,51 +15,6 @@ } :global { -<<<<<<< HEAD -.fp-bpmn-action-by-email:before { content: "\ea01"; } -.fp-bpmn-data-connector:before { content: "\ea02"; } -.fp-bpmn-data-object:before { content: "\ea03"; } -.fp-bpmn-data-store:before { content: "\ea04"; } -.fp-bpmn-docusign:before { content: "\ea05"; } -.fp-bpmn-end-event:before { content: "\ea06"; } -.fp-bpmn-flowgenie:before { content: "\ea07"; } -.fp-bpmn-gateway:before { content: "\ea08"; } -.fp-bpmn-generic-gateway:before { content: "\ea09"; } -.fp-bpmn-idp:before { content: "\ea0a"; } -.fp-bpmn-intermediate-event:before { content: "\ea0b"; } -.fp-bpmn-pool:before { content: "\ea0c"; } -.fp-bpmn-send-email:before { content: "\ea0d"; } -.fp-bpmn-start-event:before { content: "\ea0e"; } -.fp-bpmn-task:before { content: "\ea0f"; } -.fp-bpmn-text-annotation:before { content: "\ea10"; } -.fp-brush-icon:before { content: "\ea11"; } -.fp-close:before { content: "\ea12"; } -.fp-cloud-download-outline:before { content: "\ea13"; } -.fp-copy:before { content: "\ea14"; } -.fp-desktop:before { content: "\ea15"; } -.fp-eye:before { content: "\ea16"; } -.fp-fields-icon:before { content: "\ea17"; } -.fp-flowgenie-outline:before { content: "\ea18"; } -.fp-folder-outline:before { content: "\ea19"; } -.fp-fullscreen:before { content: "\ea1a"; } -.fp-github:before { content: "\ea1b"; } -.fp-inbox:before { content: "\ea1c"; } -.fp-layout-icon:before { content: "\ea1d"; } -.fp-map:before { content: "\ea1e"; } -.fp-mobile:before { content: "\ea1f"; } -.fp-pdf:before { content: "\ea20"; } -.fp-play-outline:before { content: "\ea21"; } -.fp-plus:before { content: "\ea22"; } -.fp-screen-outline:before { content: "\ea23"; } -.fp-script-outline:before { content: "\ea24"; } -.fp-slack-notification:before { content: "\ea25"; } -.fp-slack:before { content: "\ea26"; } -.fp-slideshow:before { content: "\ea27"; } -.fp-table:before { content: "\ea28"; } -.fp-tachometer-alt-average:before { content: "\ea29"; } -.fp-trash:before { content: "\ea2a"; } -.fp-unlink:before { content: "\ea2b"; } -======= .fp-arrow-left:before { content: "\ea01"; } .fp-box-arrow-up-right:before { content: "\ea02"; } .fp-bpmn-action-by-email:before { content: "\ea03"; } @@ -104,6 +59,5 @@ .fp-tachometer-alt-average:before { content: "\ea2a"; } .fp-trash:before { content: "\ea2b"; } .fp-unlink:before { content: "\ea2c"; } ->>>>>>> c6e851f82761b266d51e0ea3beb6f1c10630038d } \ No newline at end of file diff --git a/resources/fonts/pm-font/processmaker-font.scss b/resources/fonts/pm-font/processmaker-font.scss index 486854a03e..3f797793ee 100644 --- a/resources/fonts/pm-font/processmaker-font.scss +++ b/resources/fonts/pm-font/processmaker-font.scss @@ -14,95 +14,6 @@ -moz-osx-font-smoothing: grayscale; } -<<<<<<< HEAD -.fp-bpmn-action-by-email:before { content: "\ea01"; } -.fp-bpmn-data-connector:before { content: "\ea02"; } -.fp-bpmn-data-object:before { content: "\ea03"; } -.fp-bpmn-data-store:before { content: "\ea04"; } -.fp-bpmn-docusign:before { content: "\ea05"; } -.fp-bpmn-end-event:before { content: "\ea06"; } -.fp-bpmn-flowgenie:before { content: "\ea07"; } -.fp-bpmn-gateway:before { content: "\ea08"; } -.fp-bpmn-generic-gateway:before { content: "\ea09"; } -.fp-bpmn-idp:before { content: "\ea0a"; } -.fp-bpmn-intermediate-event:before { content: "\ea0b"; } -.fp-bpmn-pool:before { content: "\ea0c"; } -.fp-bpmn-send-email:before { content: "\ea0d"; } -.fp-bpmn-start-event:before { content: "\ea0e"; } -.fp-bpmn-task:before { content: "\ea0f"; } -.fp-bpmn-text-annotation:before { content: "\ea10"; } -.fp-brush-icon:before { content: "\ea11"; } -.fp-close:before { content: "\ea12"; } -.fp-cloud-download-outline:before { content: "\ea13"; } -.fp-copy:before { content: "\ea14"; } -.fp-desktop:before { content: "\ea15"; } -.fp-eye:before { content: "\ea16"; } -.fp-fields-icon:before { content: "\ea17"; } -.fp-flowgenie-outline:before { content: "\ea18"; } -.fp-folder-outline:before { content: "\ea19"; } -.fp-fullscreen:before { content: "\ea1a"; } -.fp-github:before { content: "\ea1b"; } -.fp-inbox:before { content: "\ea1c"; } -.fp-layout-icon:before { content: "\ea1d"; } -.fp-map:before { content: "\ea1e"; } -.fp-mobile:before { content: "\ea1f"; } -.fp-pdf:before { content: "\ea20"; } -.fp-play-outline:before { content: "\ea21"; } -.fp-plus:before { content: "\ea22"; } -.fp-screen-outline:before { content: "\ea23"; } -.fp-script-outline:before { content: "\ea24"; } -.fp-slack-notification:before { content: "\ea25"; } -.fp-slack:before { content: "\ea26"; } -.fp-slideshow:before { content: "\ea27"; } -.fp-table:before { content: "\ea28"; } -.fp-tachometer-alt-average:before { content: "\ea29"; } -.fp-trash:before { content: "\ea2a"; } -.fp-unlink:before { content: "\ea2b"; } - -$fp-bpmn-action-by-email: "\ea01"; -$fp-bpmn-data-connector: "\ea02"; -$fp-bpmn-data-object: "\ea03"; -$fp-bpmn-data-store: "\ea04"; -$fp-bpmn-docusign: "\ea05"; -$fp-bpmn-end-event: "\ea06"; -$fp-bpmn-flowgenie: "\ea07"; -$fp-bpmn-gateway: "\ea08"; -$fp-bpmn-generic-gateway: "\ea09"; -$fp-bpmn-idp: "\ea0a"; -$fp-bpmn-intermediate-event: "\ea0b"; -$fp-bpmn-pool: "\ea0c"; -$fp-bpmn-send-email: "\ea0d"; -$fp-bpmn-start-event: "\ea0e"; -$fp-bpmn-task: "\ea0f"; -$fp-bpmn-text-annotation: "\ea10"; -$fp-brush-icon: "\ea11"; -$fp-close: "\ea12"; -$fp-cloud-download-outline: "\ea13"; -$fp-copy: "\ea14"; -$fp-desktop: "\ea15"; -$fp-eye: "\ea16"; -$fp-fields-icon: "\ea17"; -$fp-flowgenie-outline: "\ea18"; -$fp-folder-outline: "\ea19"; -$fp-fullscreen: "\ea1a"; -$fp-github: "\ea1b"; -$fp-inbox: "\ea1c"; -$fp-layout-icon: "\ea1d"; -$fp-map: "\ea1e"; -$fp-mobile: "\ea1f"; -$fp-pdf: "\ea20"; -$fp-play-outline: "\ea21"; -$fp-plus: "\ea22"; -$fp-screen-outline: "\ea23"; -$fp-script-outline: "\ea24"; -$fp-slack-notification: "\ea25"; -$fp-slack: "\ea26"; -$fp-slideshow: "\ea27"; -$fp-table: "\ea28"; -$fp-tachometer-alt-average: "\ea29"; -$fp-trash: "\ea2a"; -$fp-unlink: "\ea2b"; -======= .fp-arrow-left:before { content: "\ea01"; } .fp-box-arrow-up-right:before { content: "\ea02"; } .fp-bpmn-action-by-email:before { content: "\ea03"; } @@ -192,5 +103,4 @@ $fp-table: "\ea29"; $fp-tachometer-alt-average: "\ea2a"; $fp-trash: "\ea2b"; $fp-unlink: "\ea2c"; ->>>>>>> c6e851f82761b266d51e0ea3beb6f1c10630038d diff --git a/resources/fonts/pm-font/symbol.html b/resources/fonts/pm-font/symbol.html index bafff0e1c2..b2b79c3b63 100644 --- a/resources/fonts/pm-font/symbol.html +++ b/resources/fonts/pm-font/symbol.html @@ -120,14 +120,12 @@

ProcessMaker Icons4.12.2

fp-arrow-left

-
  • fp-box-arrow-up-right

  • -