From 81d12abb7d4518c2750740bcb3be017cd908ac27 Mon Sep 17 00:00:00 2001 From: Henry Jordan Date: Wed, 2 Dec 2020 21:28:16 +0000 Subject: [PATCH] PMCORE-2505 --- resources/assets/js/home/Home.vue | 9 +- resources/assets/js/home/MyDocuments.vue | 44 ++++ resources/assets/js/mocks/menu.json | 263 ++++++++++--------- workflow/engine/methods/cases/viena_init.php | 9 +- 4 files changed, 190 insertions(+), 135 deletions(-) create mode 100644 resources/assets/js/home/MyDocuments.vue diff --git a/resources/assets/js/home/Home.vue b/resources/assets/js/home/Home.vue index 13422a20e..2b59b6eec 100644 --- a/resources/assets/js/home/Home.vue +++ b/resources/assets/js/home/Home.vue @@ -28,13 +28,14 @@ + + diff --git a/resources/assets/js/mocks/menu.json b/resources/assets/js/mocks/menu.json index 4321fcf78..c262bdb21 100644 --- a/resources/assets/js/mocks/menu.json +++ b/resources/assets/js/mocks/menu.json @@ -1,130 +1,137 @@ [ - { - "header": true, - "title": "Home", - "hiddenOnCollapse": true - }, - { - "href": "/", - "title": "My Cases", - "icon": "fas fa-sliders-h" - }, - { - "href": "/advanced-search", - "title": "Advanced Search", - "icon": "fas fa-search" - }, - { - "header": true, - "title": "Tasks", - "hiddenOnCollapse": true - }, - { - "href": "/todo", - "title": "Todo", - "icon": "far fa-check-circle", - "badge": { - "text": "23", - "class": "badge-custom" - } - }, - { - "href": "/draft", - "title": "Draft", - "icon": "far fa-edit", - "badge": { - "text": "1", - "class": "badge-custom" - } - }, - { - "href": "/paused", - "title": "Paused", - "icon": "far fa-pause-circle", - "badge": { - "text": "7", - "class": "badge-custom" - } - }, - { - "href": "/unassigned", - "title": "Unassigned", - "icon": "fas fa-crosshairs", - "badge": { - "text": "99+", - "class": "badge-custom" - } - }, - { - "header": true, - "title": "Supervisor Tasks", - "hiddenOnCollapse": true - }, - { - "href": "/batch-routing", - "title": "Batch Routing", - "icon": "fas fa-bars", - "disabled": true - }, - { - "href": "/task-Reassignments", - "title": "Task Reassignments", - "icon": "fas fa-arrows-alt" - }, - { - "href": "/page", - "title": "Dropdown Page", - "icon": "fa fa-list-ul", - "child": [ - { - "href": "/page/sub-page-1", - "title": "Sub Page 01", - "icon": "fa fa-file-alt" - }, - { - "href": "/page/sub-page-2", - "title": "Sub Page 02", - "icon": "fa fa-file-alt" - } - ] - }, - { - "title": "Multiple Level", - "icon": "fa fa-list-alt", - "child": [ - { - "title": "page" - }, - { - "title": "Level 2 ", - "child": [ - { - "title": "page" - }, - { - "title": "Page" - } - ] - }, - { - "title": "Page" - }, - { - "title": "Another Level 2", - "child": [ - { - "title": "Level 3", - "child": [ - { - "title": "Page" - }, - { - "title": "Page" - } - ] - } - ] - } - ] + { + "header": true, + "title": "Home", + "hiddenOnCollapse": true + }, + { + "href": "/", + "title": "My Cases", + "icon": "fas fa-sliders-h" + }, + { + "href": "/advanced-search", + "title": "Advanced Search", + "icon": "fas fa-search" + }, + { + "header": true, + "title": "Tasks", + "hiddenOnCollapse": true + }, + { + "href": "/todo", + "title": "Todo", + "icon": "far fa-check-circle", + "badge": { + "text": "23", + "class": "badge-custom" } - ] \ No newline at end of file + }, + { + "href": "/draft", + "title": "Draft", + "icon": "far fa-edit", + "badge": { + "text": "1", + "class": "badge-custom" + } + }, + { + "href": "/paused", + "title": "Paused", + "icon": "far fa-pause-circle", + "badge": { + "text": "7", + "class": "badge-custom" + } + }, + { + "href": "/unassigned", + "title": "Unassigned", + "icon": "fas fa-crosshairs", + "badge": { + "text": "99+", + "class": "badge-custom" + } + }, + { + "header": true, + "title": "Supervisor Tasks", + "hiddenOnCollapse": true + }, + { + "href": "/batch-routing", + "title": "Batch Routing", + "icon": "fas fa-bars", + "disabled": true + }, + { + "href": "/my-documents", + "title": "My Documents", + "page": "my-documents", + "icon": "fas fa-bars", + "disabled": false + }, + { + "href": "/task-Reassignments", + "title": "Task Reassignments", + "icon": "fas fa-arrows-alt" + }, + { + "href": "/page", + "title": "Dropdown Page", + "icon": "fa fa-list-ul", + "child": [ + { + "href": "/page/sub-page-1", + "title": "Sub Page 01", + "icon": "fa fa-file-alt" + }, + { + "href": "/page/sub-page-2", + "title": "Sub Page 02", + "icon": "fa fa-file-alt" + } + ] + }, + { + "title": "Multiple Level", + "icon": "fa fa-list-alt", + "child": [ + { + "title": "page" + }, + { + "title": "Level 2 ", + "child": [ + { + "title": "page" + }, + { + "title": "Page" + } + ] + }, + { + "title": "Page" + }, + { + "title": "Another Level 2", + "child": [ + { + "title": "Level 3", + "child": [ + { + "title": "Page" + }, + { + "title": "Page" + } + ] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/workflow/engine/methods/cases/viena_init.php b/workflow/engine/methods/cases/viena_init.php index 152f661c0..cc9e43bdf 100644 --- a/workflow/engine/methods/cases/viena_init.php +++ b/workflow/engine/methods/cases/viena_init.php @@ -2,6 +2,7 @@ use Eusebiu\JavaScript\Facades\ScriptVariables; use Illuminate\Support\Facades\View; +use ProcessMaker\Core\System; $conf = new Configurations(); @@ -147,8 +148,12 @@ if (HIGHLIGHT_HOME_FOLDER_ENABLE) { // echo View::make('welcome'); $userCanAccess = 1; global $translation; -// print 'var TRANSLATIONS = ' . G::json_encode($translation) . ';'; -// echo view('Templates::Home.home', compact("userCanAccess")); + +$pmDynaform = new PmDynaform(); +ScriptVariables::add('SYS_CREDENTIALS', $pmDynaform->getCredentials()); +ScriptVariables::add('SYS_SERVER', System::getHttpServerHostnameRequestsFrontEnd()); +ScriptVariables::add('SYS_WORKSPACE', config("system.workspace")); +ScriptVariables::add('SYS_URI', SYS_URI); ScriptVariables::add('SYS_LANG', SYS_LANG); ScriptVariables::add('TRANSLATIONS', $translation); echo View::make('Views::home.home', compact("userCanAccess"))->render();