Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1461c22
saving progress
CarliPinell Nov 22, 2024
e52e94a
Ready for PR
CarliPinell Dec 11, 2024
63ae6c7
Merge branch 'release-2024-fall' of github.com:ProcessMaker/processma…
CarliPinell Dec 11, 2024
5c25ad7
Ready for PR based on epic/20297
CarliPinell Dec 16, 2024
4a8e7bf
Adding new component ParticipantHomeScren.vue
CarliPinell Dec 16, 2024
a126adc
Merge pull request #7818 from ProcessMaker/feature/FOUR-20298
nolanpro Dec 16, 2024
365842a
Applying Code Styles, removing unused comments and fixing test unit
CarliPinell Dec 16, 2024
aa4edca
Merge pull request #7829 from ProcessMaker/feature/FOUR-20299
boliviacoca Dec 17, 2024
99f1b5f
Adding new component ProcessesDashboardsMenu.vue
CarliPinell Dec 17, 2024
bc2ce99
saving progress 2
CarliPinell Dec 17, 2024
88c162d
Saving progress 3
CarliPinell Dec 17, 2024
c569423
Saving progress 4
CarliPinell Dec 17, 2024
7119606
saving progress 6 router-view working good
CarliPinell Dec 18, 2024
bf7c690
Saving progress 7
CarliPinell Dec 18, 2024
25488d3
saving progress 8 ready for PR
CarliPinell Dec 18, 2024
6b9cdf7
saving progress 1 dynamic processes working fine
CarliPinell Dec 18, 2024
40b66ed
Saving progress 2
CarliPinell Dec 19, 2024
83d3693
Adding dynamic processes list and refactoring router-view calling for…
CarliPinell Dec 19, 2024
233026a
modifying router.js to call tasks/process/{id} and tasks/dashboard/{id}
CarliPinell Dec 19, 2024
cb22d9a
Saving progress Left Pane working, Process rendered ok in new Container
CarliPinell Dec 20, 2024
b5ef068
improvements on loadProcess method
CarliPinell Jan 6, 2025
421e022
Ready for PR
CarliPinell Jan 7, 2025
316fde4
solving conflicts
CarliPinell Jan 7, 2025
098641b
Merge branch 'epic/FOUR-20297-b' of github.com:ProcessMaker/processma…
CarliPinell Jan 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class UserConfigurationController extends Controller
'tasks' => [
'isMenuCollapse' => true,
],
'tasks_inbox' => [
'isMenuCollapse' => false,
],
];

public function index()
Expand Down Expand Up @@ -54,6 +57,7 @@ public function store(Request $request)
'ui_configuration.cases' => 'required|array',
'ui_configuration.requests' => 'required|array',
'ui_configuration.tasks' => 'required|array',
'ui_configuration.tasks_inbox' => 'required|array',
]);
$uiConfiguration = json_encode($request->input('ui_configuration'));

Expand Down
16 changes: 12 additions & 4 deletions ProcessMaker/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ public function index(Request $request)
if (Auth::check()) {
// Redirect to home dynamic only if the package was enable
if (hasPackage('package-dynamic-ui')) {
$user = \Auth::user();
$homePage = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::getHomePage($user);
$user = Auth::user();

return redirect($homePage);
// Check if there is at least one custom dashboard per user
$customDashboardExists = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::where('type', 'DASHBOARD')
->where('assignable_id', $user->id)
->count() > 0;

if ($customDashboardExists) {
$homePage = \ProcessMaker\Package\PackageDynamicUI\Models\DynamicUI::getHomePage($user);

return redirect($homePage);
}
}

// Redirect to the default view
return redirect('/requests');
return redirect('/tasks');
}
}

Expand Down
4 changes: 3 additions & 1 deletion ProcessMaker/Http/Controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public function index()

$taskDraftsEnabled = TaskDraft::draftsEnabled();

return view('tasks.index', compact('title', 'userFilter', 'defaultColumns', 'taskDraftsEnabled'));
$userConfiguration = (new UserConfigurationController())->index()['ui_configuration'] ?? [];

return view('tasks.index', compact('title', 'userFilter', 'defaultColumns', 'taskDraftsEnabled', 'userConfiguration'));
}

public function edit(ProcessRequestToken $task, string $preview = '')
Expand Down
4 changes: 3 additions & 1 deletion resources/js/processes-catalogue/components/Process.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<ProcessInfo
v-if="!verifyScreen"
:process="selectedProcess"
:ellipsis-permission="ellipsisPermission"
@goBackCategory="goBackCategory"
/>
<ProcessScreen
v-if="verifyScreen"
:process="selectedProcess"
:ellipsis-permission="ellipsisPermission"
@goBackCategory="goBackCategory"
/>
</div>
Expand All @@ -44,7 +46,7 @@ import ProcessDescription from "./optionsMenu/ProcessDescription.vue";
import ProcessCounter from "./optionsMenu/ProcessCounter.vue";

export default {
props: ["process", "processId"],
props: ["process", "processId", "ellipsisPermission"],
components: {
ProcessInfo, ProcessScreen, MiniPieChart, Bookmark, ProcessDescription, ProcessCounter
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div id="processData">
<process-header-start
:process="process"
:ellipsis-permission="ellipsisPermission"
@goBack="goBack()"
@onProcessNavigate="onProcessNavigate"
v-if="!mobileApp"
Expand Down Expand Up @@ -92,7 +93,7 @@ export default {
ProcessHeaderStart,
},
mixins: [ProcessesMixin, ellipsisMenuMixin, processNavigationMixin],
props: ["process", "currentUserId"],
props: ["process", "currentUserId", "ellipsisPermission"],
computed: {
createdFromWizardTemplate() {
return !!this.process?.properties?.wizardTemplateUuid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
variant="none"
@navigate="ellipsisNavigate"
:isDocumenterInstalled="$root.isDocumenterInstalled"
:permission="$root.permission" />
:permission="$root.permission || ellipsisPermission" />
</span>
<buttons-start :process="process" :startEvent="singleStartEvent" :processEvents="processEvents" />
</div>
Expand Down Expand Up @@ -62,6 +62,10 @@ export default {
enableCollapse: {
type: Boolean,
default: true
},
ellipsisPermission: {
type: Array,
default: () => []
}
},
data() {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/processes-catalogue/components/ProcessInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
v-show="hideLaunchpad"
:process="process"
:current-user-id="currentUserId"
:ellipsis-permission="ellipsisPermission"
@goBackCategory="$emit('goBackCategory')"
/>
<process-tab
Expand Down Expand Up @@ -44,7 +45,7 @@ export default {
ProcessTab,
ProcessesCarousel,
},
props: ["process", "currentUserId", "currentUser"],
props: ["process", "currentUserId", "currentUser", "ellipsisPermission"],
data() {
return {
listCategories: [],
Expand All @@ -70,7 +71,6 @@ export default {
this.$root.$on("carouselImageSelected", (pos) => {
this.firstImage = pos + 1;
});

},
computed: {
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div id="process-screen">
<process-header-start
:process="process"
:ellipsis-permission="ellipsisPermission"
@goBack="goBack()"
@onProcessNavigate="onProcessNavigate"
v-if="!mobileApp"
Expand Down Expand Up @@ -69,7 +70,7 @@ export default {
ProcessHeaderStart,
},
mixins: [ellipsisMenuMixin, processNavigationMixin, ProcessesMixin],
props: ["process", "currentUserId"],
props: ["process", "currentUserId", "ellipsisPermission"],
data() {
return {
screen: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const ProcessHeader = {
"view-documentation",
"edit-documentation",
];
this.showEllipsis = this.$root.permission.some( (permission) => permissionsNeeded.includes(permission));
const permissions = (this.$root && this.$root.permission) ? this.$root.permission : this.ellipsisPermission || [];
this.showEllipsis = permissions.some((permission) => permissionsNeeded.includes(permission));
},
/**
* Return a process cards from process info
Expand Down
19 changes: 19 additions & 0 deletions resources/js/tasks/components/DashboardViewer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div>
<h2>Dashboard Viewer</h2>
<p v-if="dashboardId">Dashboard ID: {{ dashboardId }}</p>
<p v-else>No selected dashboard</p>
</div>
</template>

<script>
export default {
name: 'DashboardViewer',
props: {
dashboardId: {
type: [String, null],
default: null
}
}
}
</script>
Loading