@acorex/modules 20.0.9 → 20.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/index.d.ts +1 -0
- package/conversation/index.d.ts +4 -1
- package/data-management/README.md +3 -0
- package/data-management/index.d.ts +101 -0
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-BXc_ogZY.mjs → acorex-modules-auth-acorex-modules-auth-DqsEqXec.mjs} +11 -11
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-DqsEqXec.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BS8kyO4q.mjs → acorex-modules-auth-app-chooser.component-D0pKNUts.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BS8kyO4q.mjs.map → acorex-modules-auth-app-chooser.component-D0pKNUts.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-DGE_lE3s.mjs → acorex-modules-auth-login.module-Dky49ylL.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-DGE_lE3s.mjs.map → acorex-modules-auth-login.module-Dky49ylL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-BsgOcazS.mjs → acorex-modules-auth-master.layout-DXfRjCLL.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-BsgOcazS.mjs.map → acorex-modules-auth-master.layout-DXfRjCLL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-BjpLB-GX.mjs → acorex-modules-auth-password.component-BbsQWpEh.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-BjpLB-GX.mjs.map → acorex-modules-auth-password.component-BbsQWpEh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-DwQwyJv_.mjs → acorex-modules-auth-password.component-oH5OFHqQ.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-DwQwyJv_.mjs.map → acorex-modules-auth-password.component-oH5OFHqQ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-j9Ujy-xB.mjs → acorex-modules-auth-routes-DAiaTm4Y.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-j9Ujy-xB.mjs.map → acorex-modules-auth-routes-DAiaTm4Y.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-EN4l_a4V.mjs → acorex-modules-auth-two-factor.module-Coe4NNUW.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-EN4l_a4V.mjs.map → acorex-modules-auth-two-factor.module-Coe4NNUW.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-D9D-vWic.mjs → acorex-modules-auth-user-sessions.component-CtTrstZT.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-user-sessions.component-D9D-vWic.mjs.map → acorex-modules-auth-user-sessions.component-CtTrstZT.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-common.mjs +1 -0
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-content-management.mjs +1 -1
- package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +6 -6
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +2328 -0
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -0
- package/fesm2022/acorex-modules-notification-management.mjs +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-sI0yzJ4s.mjs → acorex-modules-report-management-report-runner-root-page.component-CAxcD_pe.mjs} +16 -16
- package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-CAxcD_pe.mjs.map +1 -0
- package/fesm2022/acorex-modules-report-management.mjs +170 -11
- package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management-task-board.page-Dp7SJ3NA.mjs +876 -0
- package/fesm2022/acorex-modules-workflow-management-task-board.page-Dp7SJ3NA.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management.mjs +8 -1
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/package.json +5 -1
- package/workflow-management/index.d.ts +1 -0
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BXc_ogZY.mjs.map +0 -1
- package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-sI0yzJ4s.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-task-board.page-Dh9nI9dz.mjs +0 -762
- package/fesm2022/acorex-modules-workflow-management-task-board.page-Dh9nI9dz.mjs.map +0 -1
@@ -0,0 +1,876 @@
|
|
1
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
2
|
+
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
3
|
+
import * as i4 from '@acorex/components/button';
|
4
|
+
import { AXButtonComponent, AXButtonModule } from '@acorex/components/button';
|
5
|
+
import { AXCalendarComponent } from '@acorex/components/calendar';
|
6
|
+
import * as i6 from '@acorex/components/decorators';
|
7
|
+
import { AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
|
8
|
+
import { AXDropdownPanelComponent } from '@acorex/components/dropdown';
|
9
|
+
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
10
|
+
import { AXLoadingModule } from '@acorex/components/loading';
|
11
|
+
import * as i3 from '@acorex/components/menu';
|
12
|
+
import { AXMenuModule } from '@acorex/components/menu';
|
13
|
+
import * as i7 from '@acorex/components/popover';
|
14
|
+
import { AXPopoverModule } from '@acorex/components/popover';
|
15
|
+
import { AXCalendarService } from '@acorex/core/date-time';
|
16
|
+
import { AXLocaleService } from '@acorex/core/locale';
|
17
|
+
import * as i5 from '@acorex/core/translation';
|
18
|
+
import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
|
19
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
20
|
+
import { AXPThemeLayoutBlockComponent } from '@acorex/platform/layout/components';
|
21
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
|
22
|
+
import * as i2 from '@angular/common';
|
23
|
+
import { AsyncPipe, CommonModule } from '@angular/common';
|
24
|
+
import * as i0 from '@angular/core';
|
25
|
+
import { computed, inject, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, input, output, effect, untracked, model, signal, viewChildren } from '@angular/core';
|
26
|
+
import * as i1$1 from '@angular/forms';
|
27
|
+
import { FormsModule } from '@angular/forms';
|
28
|
+
import { Router, ActivatedRoute, NavigationEnd, RouterModule } from '@angular/router';
|
29
|
+
import { filter, startWith } from 'rxjs';
|
30
|
+
import { AXFormatPipe } from '@acorex/core/format';
|
31
|
+
import { AXPSettingService } from '@acorex/platform/common';
|
32
|
+
import { AXPPlatformScope } from '@acorex/platform/core';
|
33
|
+
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
34
|
+
import { AXPTaskBoardService } from './acorex-modules-workflow-management.mjs';
|
35
|
+
import { AXSchedulerComponent } from '@acorex/components/scheduler';
|
36
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
37
|
+
import * as i1 from '@acorex/components/data-table';
|
38
|
+
import { AXDataTableModule, AXDataTableComponent } from '@acorex/components/data-table';
|
39
|
+
import { isEqual } from 'lodash-es';
|
40
|
+
import { AXKanbanComponent } from '@acorex/components/kanban';
|
41
|
+
|
42
|
+
const config = {
|
43
|
+
i18n: 'workflow-management',
|
44
|
+
};
|
45
|
+
const RootConfig = {
|
46
|
+
config,
|
47
|
+
module: {
|
48
|
+
module: 'WorkflowManagement',
|
49
|
+
name: 'WorkflowManagement',
|
50
|
+
title: `t('module-name', {scope:"${config.i18n}"})`,
|
51
|
+
icon: 'fa-light fa-clipboard-list-check',
|
52
|
+
},
|
53
|
+
};
|
54
|
+
|
55
|
+
var AXMTaskBoardSettings;
|
56
|
+
(function (AXMTaskBoardSettings) {
|
57
|
+
AXMTaskBoardSettings["CalendarViewMode"] = "taskboard.calendar.viewMode";
|
58
|
+
AXMTaskBoardSettings["CurrentDate"] = "taskboard.calendar.currentDate";
|
59
|
+
AXMTaskBoardSettings["SelectedTaskTypeFilter"] = "taskboard.filter.selectedTaskType";
|
60
|
+
})(AXMTaskBoardSettings || (AXMTaskBoardSettings = {}));
|
61
|
+
|
62
|
+
const AXMTaskBoardViewModel = signalStore({ providedIn: 'root' }, withState(() => ({
|
63
|
+
isLoading: true,
|
64
|
+
currentViewMode: 'month',
|
65
|
+
currentDate: new Date(),
|
66
|
+
selectedTaskTypeName: null,
|
67
|
+
taskTypes: [],
|
68
|
+
selectedTask: null,
|
69
|
+
detailPanel: false,
|
70
|
+
})), withComputed((store) => ({
|
71
|
+
selectedTaskType: computed(() => {
|
72
|
+
const name = store.selectedTaskTypeName();
|
73
|
+
if (!name) {
|
74
|
+
return null;
|
75
|
+
}
|
76
|
+
return store.taskTypes().find((tt) => tt.name === name) || null;
|
77
|
+
}),
|
78
|
+
// (Optional but recommended) Add a computed signal to easily check if a task is selected
|
79
|
+
isTaskSelected: computed(() => store.selectedTask() !== null),
|
80
|
+
isDetailPanelOpen: computed(() => store.detailPanel()),
|
81
|
+
})), withMethods((store, settingService = inject(AXPSettingService), taskBoardService = inject(AXPTaskBoardService)) => {
|
82
|
+
// Create a private method for getting the user-scoped settings to avoid repetition
|
83
|
+
const userScopedSettings = () => settingService.scope(AXPPlatformScope.User);
|
84
|
+
return {
|
85
|
+
async initialize() {
|
86
|
+
patchState(store, { isLoading: true });
|
87
|
+
try {
|
88
|
+
// 1. Load Task Types first
|
89
|
+
const taskTypes = await taskBoardService.getTaskTypes();
|
90
|
+
patchState(store, { taskTypes });
|
91
|
+
// 2. Load Persisted Settings individually
|
92
|
+
const [savedViewMode, savedDateString, savedTaskTypeName] = await Promise.all([
|
93
|
+
userScopedSettings().get(AXMTaskBoardSettings.CalendarViewMode),
|
94
|
+
userScopedSettings().get(AXMTaskBoardSettings.CurrentDate),
|
95
|
+
userScopedSettings().get(AXMTaskBoardSettings.SelectedTaskTypeFilter),
|
96
|
+
]);
|
97
|
+
patchState(store, {
|
98
|
+
currentViewMode: savedViewMode || 'month',
|
99
|
+
currentDate: savedDateString ? new Date(savedDateString) : new Date(),
|
100
|
+
selectedTaskTypeName: savedTaskTypeName || null,
|
101
|
+
isLoading: false,
|
102
|
+
});
|
103
|
+
}
|
104
|
+
catch (error) {
|
105
|
+
console.error('Error initializing TaskBoard ViewModel:', error);
|
106
|
+
patchState(store, {
|
107
|
+
currentViewMode: 'month',
|
108
|
+
currentDate: new Date(),
|
109
|
+
selectedTaskTypeName: null,
|
110
|
+
taskTypes: store.taskTypes(),
|
111
|
+
isLoading: false,
|
112
|
+
});
|
113
|
+
}
|
114
|
+
},
|
115
|
+
setViewMode(mode) {
|
116
|
+
if ((mode === 'kanban' || mode === 'grid' || mode === 'status-grouped-grid' || mode === 'time-grouped-grid') &&
|
117
|
+
store.selectedTaskTypeName() === null) {
|
118
|
+
const taskTypeName = store.taskTypes()[0]?.name;
|
119
|
+
if (taskTypeName) {
|
120
|
+
patchState(store, { selectedTaskTypeName: taskTypeName });
|
121
|
+
userScopedSettings()
|
122
|
+
.set(AXMTaskBoardSettings.SelectedTaskTypeFilter, taskTypeName)
|
123
|
+
.catch((error) => console.error('Error saving selected task type filter:', error));
|
124
|
+
}
|
125
|
+
}
|
126
|
+
patchState(store, { currentViewMode: mode });
|
127
|
+
userScopedSettings()
|
128
|
+
.set(AXMTaskBoardSettings.CalendarViewMode, mode)
|
129
|
+
.catch((error) => console.error('Error saving calendar view mode:', error));
|
130
|
+
},
|
131
|
+
setCurrentDate(date) {
|
132
|
+
patchState(store, { currentDate: new Date(date) });
|
133
|
+
userScopedSettings()
|
134
|
+
.set(AXMTaskBoardSettings.CurrentDate, date.toISOString())
|
135
|
+
.catch((error) => console.error('Error saving current date:', error));
|
136
|
+
},
|
137
|
+
setSelectedTaskTypeProvider(taskType) {
|
138
|
+
const taskTypeName = taskType ? taskType.name : null;
|
139
|
+
patchState(store, { selectedTaskTypeName: taskTypeName });
|
140
|
+
userScopedSettings()
|
141
|
+
.set(AXMTaskBoardSettings.SelectedTaskTypeFilter, taskTypeName)
|
142
|
+
.catch((error) => console.error('Error saving selected task type filter:', error));
|
143
|
+
},
|
144
|
+
/**
|
145
|
+
* Sets the currently selected task. Pass `null` to clear the selection.
|
146
|
+
* @param task The task to select, or null.
|
147
|
+
*/
|
148
|
+
selectTask(task) {
|
149
|
+
patchState(store, { selectedTask: task });
|
150
|
+
},
|
151
|
+
/**
|
152
|
+
* A convenience method to clear the currently selected task.
|
153
|
+
*/
|
154
|
+
clearSelectedTask() {
|
155
|
+
patchState(store, { selectedTask: null });
|
156
|
+
},
|
157
|
+
openDetailPanel() {
|
158
|
+
patchState(store, { detailPanel: true });
|
159
|
+
},
|
160
|
+
closeDetailPanel() {
|
161
|
+
patchState(store, { detailPanel: false });
|
162
|
+
},
|
163
|
+
toggleDetailPanel() {
|
164
|
+
patchState(store, { detailPanel: !store.detailPanel() });
|
165
|
+
},
|
166
|
+
getStatusName(key, provider) {
|
167
|
+
return taskBoardService.getStatusName(key, provider);
|
168
|
+
},
|
169
|
+
};
|
170
|
+
}));
|
171
|
+
|
172
|
+
class AXMTaskBoardDetailPanel {
|
173
|
+
constructor() {
|
174
|
+
this.rootConfig = RootConfig;
|
175
|
+
this.vm = inject(AXMTaskBoardViewModel);
|
176
|
+
this.localeService = inject(AXLocaleService);
|
177
|
+
}
|
178
|
+
capitalizeFirstLetter(text) {
|
179
|
+
return String(text).charAt(0).toUpperCase() + String(text).slice(1);
|
180
|
+
}
|
181
|
+
getStatusName(key, provider) {
|
182
|
+
if (!provider)
|
183
|
+
return null;
|
184
|
+
return this.vm.getStatusName(key, provider);
|
185
|
+
}
|
186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardDetailPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXMTaskBoardDetailPanel, isStandalone: true, selector: "axm-task-board-detail-panel", ngImport: i0, template: "@if (vm.isTaskSelected()) {\n @let nodeInfo = vm.selectedTask();\n <div class=\"__header\">\n <div class=\"__title\">\n <span>{{ nodeInfo?.title }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n </div>\n\n <div class=\"__content\">\n <div class=\"__section\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.title' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">\n @if (nodeInfo?.description) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.description' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">{{ nodeInfo?.description }}</div>\n </div>\n }\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.start-date' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">\n {{\n nodeInfo?.startDate\n | format: 'datetime' : { format: 'short', calendar: localeService.activeProfile().calendar.system }\n | async\n }}\n </div>\n </div>\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.end-date' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">\n {{\n nodeInfo?.endDate\n | format: 'datetime' : { format: 'short', calendar: localeService.activeProfile().calendar.system }\n | async\n }}\n </div>\n </div>\n @let statusName = getStatusName(nodeInfo?.statusKey, nodeInfo?.data?.provider);\n @if (statusName) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.status' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">{{ statusName }}</div>\n </div>\n }\n @if (nodeInfo?.priority) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.priority' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">{{ capitalizeFirstLetter(nodeInfo?.priority ?? '') }}</div>\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n <div class=\"__header\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.no-task-selected' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n </div>\n}\n", styles: ["axm-task-board-detail-panel{display:flex;flex-direction:column;border-radius:.5rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}@media (min-width: 1024px){axm-task-board-detail-panel{min-width:20rem}}axm-task-board-detail-panel>.__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem}axm-task-board-detail-panel>.__header>.__title{display:flex;width:90%;flex-direction:row;align-items:center;gap:.5rem}axm-task-board-detail-panel>.__header>.__title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-weight:600;line-height:1.625}axm-task-board-detail-panel>.__content{display:flex;flex-direction:column}axm-task-board-detail-panel>.__content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}axm-task-board-detail-panel>.__content>.__section{display:flex;flex-direction:column;padding:1rem}axm-task-board-detail-panel>.__content>.__section>.__title{margin-bottom:1rem;font-size:.875rem;line-height:1.25rem;font-weight:700}axm-task-board-detail-panel>.__content>.__section>.__content{display:flex;flex-direction:column;gap:1rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row{display:flex;flex-direction:column;gap:.25rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__title{display:flex;font-size:.875rem;line-height:1.25rem;font-weight:600;opacity:.9}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__content{display:flex;flex-direction:row;align-items:center;gap:.5rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__content span{opacity:.7}\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AXFormatPipe, name: "format" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
188
|
+
}
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardDetailPanel, decorators: [{
|
190
|
+
type: Component,
|
191
|
+
args: [{ selector: 'axm-task-board-detail-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorIconComponent, AXFormatPipe, AsyncPipe, AXTranslatorPipe], template: "@if (vm.isTaskSelected()) {\n @let nodeInfo = vm.selectedTask();\n <div class=\"__header\">\n <div class=\"__title\">\n <span>{{ nodeInfo?.title }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n </div>\n\n <div class=\"__content\">\n <div class=\"__section\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.title' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">\n @if (nodeInfo?.description) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.description' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">{{ nodeInfo?.description }}</div>\n </div>\n }\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.start-date' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">\n {{\n nodeInfo?.startDate\n | format: 'datetime' : { format: 'short', calendar: localeService.activeProfile().calendar.system }\n | async\n }}\n </div>\n </div>\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.end-date' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">\n {{\n nodeInfo?.endDate\n | format: 'datetime' : { format: 'short', calendar: localeService.activeProfile().calendar.system }\n | async\n }}\n </div>\n </div>\n @let statusName = getStatusName(nodeInfo?.statusKey, nodeInfo?.data?.provider);\n @if (statusName) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ 'task-board.detail-panel.status' | translate: { scope: rootConfig.config.i18n } | async }}</span>\n </div>\n <div class=\"__content\">{{ statusName }}</div>\n </div>\n }\n @if (nodeInfo?.priority) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.priority' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <div class=\"__content\">{{ capitalizeFirstLetter(nodeInfo?.priority ?? '') }}</div>\n </div>\n }\n </div>\n </div>\n </div>\n} @else {\n <div class=\"__header\">\n <div class=\"__title\">\n <span>{{\n 'task-board.detail-panel.no-task-selected' | translate: { scope: rootConfig.config.i18n } | async\n }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n </div>\n}\n", styles: ["axm-task-board-detail-panel{display:flex;flex-direction:column;border-radius:.5rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}@media (min-width: 1024px){axm-task-board-detail-panel{min-width:20rem}}axm-task-board-detail-panel>.__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem}axm-task-board-detail-panel>.__header>.__title{display:flex;width:90%;flex-direction:row;align-items:center;gap:.5rem}axm-task-board-detail-panel>.__header>.__title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-weight:600;line-height:1.625}axm-task-board-detail-panel>.__content{display:flex;flex-direction:column}axm-task-board-detail-panel>.__content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}axm-task-board-detail-panel>.__content>.__section{display:flex;flex-direction:column;padding:1rem}axm-task-board-detail-panel>.__content>.__section>.__title{margin-bottom:1rem;font-size:.875rem;line-height:1.25rem;font-weight:700}axm-task-board-detail-panel>.__content>.__section>.__content{display:flex;flex-direction:column;gap:1rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row{display:flex;flex-direction:column;gap:.25rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__title{display:flex;font-size:.875rem;line-height:1.25rem;font-weight:600;opacity:.9}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__content{display:flex;flex-direction:row;align-items:center;gap:.5rem}axm-task-board-detail-panel>.__content>.__section>.__content>.__row>.__content span{opacity:.7}\n"] }]
|
192
|
+
}] });
|
193
|
+
|
194
|
+
class AXMTaskBoardCalendarViewComponent {
|
195
|
+
constructor() {
|
196
|
+
this.calendarService = inject(AXCalendarService);
|
197
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
198
|
+
this.schedulerComponent = viewChild(AXSchedulerComponent);
|
199
|
+
this.startingDate = input(new Date());
|
200
|
+
this.selectedView = input('month');
|
201
|
+
this.dataSource = input.required();
|
202
|
+
this.currentSchedulerView = computed(() => this.selectedView() === 'kanban' || this.selectedView() === 'grid'
|
203
|
+
? 'month'
|
204
|
+
: this.selectedView());
|
205
|
+
this.onTaskClick = output();
|
206
|
+
this.onTaskChanged = output();
|
207
|
+
this.onMonthSlotDblClicked = output();
|
208
|
+
this.onActionClick = output();
|
209
|
+
this.component = output();
|
210
|
+
this.onTaskRightClick = output();
|
211
|
+
this.onRangeChanged = output();
|
212
|
+
}
|
213
|
+
ngAfterViewInit() {
|
214
|
+
if (this.schedulerComponent()) {
|
215
|
+
this.component.emit(this.schedulerComponent());
|
216
|
+
}
|
217
|
+
}
|
218
|
+
onTaskDrop(event) {
|
219
|
+
if (event.isSameSlotDrop)
|
220
|
+
return;
|
221
|
+
let from;
|
222
|
+
let end;
|
223
|
+
const apptStartDate = this.calendarService.create(event.appointment.startDate);
|
224
|
+
const apptEndDate = event.appointment.endDate;
|
225
|
+
const apptDiffTime = Math.abs(apptStartDate.date.getTime() - apptEndDate.getTime());
|
226
|
+
switch (event.slot.view) {
|
227
|
+
case 'month':
|
228
|
+
case 'agenda':
|
229
|
+
from = this.calendarService
|
230
|
+
.create(event.slot.startDate.date)
|
231
|
+
.set('hour', apptStartDate.hour)
|
232
|
+
.set('minute', apptStartDate.minute)
|
233
|
+
.set('second', apptStartDate.second).date;
|
234
|
+
end = new Date(from.getTime() + apptDiffTime);
|
235
|
+
break;
|
236
|
+
default:
|
237
|
+
from = event.slot.startDate.date;
|
238
|
+
end = event.slot.endDate.date;
|
239
|
+
const isAllDay = Math.abs(from.getTime() - end.getTime()) >= 24 * 60 * 60 * 1000 - 1;
|
240
|
+
const wasAllDay = apptDiffTime >= 24 * 60 * 60 * 1000 - 1;
|
241
|
+
if ((wasAllDay && isAllDay) || (!wasAllDay && !isAllDay)) {
|
242
|
+
end = new Date(from.getTime() + apptDiffTime);
|
243
|
+
}
|
244
|
+
break;
|
245
|
+
}
|
246
|
+
this.taskBoardService.updateTaskDateRange(event.appointment, { from, end }).then((task) => {
|
247
|
+
this.onTaskChanged.emit(task);
|
248
|
+
this.schedulerComponent()?.refresh([task]);
|
249
|
+
});
|
250
|
+
}
|
251
|
+
onTaskRightClickHandler(event) {
|
252
|
+
this.onTaskRightClick.emit({ nativeEvent: event.nativeEvent, task: event.appointment });
|
253
|
+
}
|
254
|
+
onSlotDblClicked(event) {
|
255
|
+
if (event.sender.selectedView() === 'month') {
|
256
|
+
this.onMonthSlotDblClicked.emit(event.slot.startDate.date);
|
257
|
+
}
|
258
|
+
}
|
259
|
+
handleRangeChanged(event) {
|
260
|
+
this.onRangeChanged.emit(event);
|
261
|
+
}
|
262
|
+
handleActionClick(event) {
|
263
|
+
this.onActionClick.emit({ nativeEvent: event.nativeEvent, task: event.appointment });
|
264
|
+
}
|
265
|
+
onTaskClickHandler(event) {
|
266
|
+
this.onTaskClick.emit(event.appointment);
|
267
|
+
}
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
269
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.7", type: AXMTaskBoardCalendarViewComponent, isStandalone: true, selector: "axm-task-board-calendar-view", inputs: { startingDate: { classPropertyName: "startingDate", publicName: "startingDate", isSignal: true, isRequired: false, transformFunction: null }, selectedView: { classPropertyName: "selectedView", publicName: "selectedView", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskClick: "onTaskClick", onTaskChanged: "onTaskChanged", onMonthSlotDblClicked: "onMonthSlotDblClicked", onActionClick: "onActionClick", component: "component", onTaskRightClick: "onTaskRightClick", onRangeChanged: "onRangeChanged" }, viewQueries: [{ propertyName: "schedulerComponent", first: true, predicate: AXSchedulerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-scheduler\n [hasHeader]=\"false\"\n [hasActions]=\"true\"\n [dataSource]=\"dataSource()\"\n [startingDate]=\"startingDate()\"\n [selectedView]=\"currentSchedulerView()\"\n (onAppointmentDrop)=\"onTaskDrop($event)\"\n (onActionClick)=\"handleActionClick($event)\"\n (onRangeChanged)=\"handleRangeChanged($event)\"\n (onSlotDblClicked)=\"onSlotDblClicked($event)\"\n (onAppointmentClicked)=\"onTaskClickHandler($event)\"\n (onAppointmentRightClick)=\"onTaskRightClickHandler($event)\"\n></ax-scheduler>\n", styles: ["ax-scheduler{line-height:1.5;background-color:rgba(var(--ax-sys-color-lightest-surface))!important}\n"], dependencies: [{ kind: "component", type: AXSchedulerComponent, selector: "ax-scheduler", inputs: ["calendar", "startingDate", "endDayHour", "startDayHour", "hasHeader", "readonly", "draggable", "hasActions", "dragStartDelay", "allowFullScreen", "multiDayViewDaysCount", "tooltipTemplate", "dataSource", "firstDayOfWeek", "views", "selectedView"], outputs: ["selectedViewChange", "onDataLoaded", "onRangeChanged", "onSlotClicked", "onSlotDblClicked", "onSlotRightClick", "onAppointmentDrop", "onActionClick", "onAppointmentClicked", "onAppointmentDblClicked", "onAppointmentRightClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
270
|
+
}
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardCalendarViewComponent, decorators: [{
|
272
|
+
type: Component,
|
273
|
+
args: [{ selector: 'axm-task-board-calendar-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXSchedulerComponent], template: "<ax-scheduler\n [hasHeader]=\"false\"\n [hasActions]=\"true\"\n [dataSource]=\"dataSource()\"\n [startingDate]=\"startingDate()\"\n [selectedView]=\"currentSchedulerView()\"\n (onAppointmentDrop)=\"onTaskDrop($event)\"\n (onActionClick)=\"handleActionClick($event)\"\n (onRangeChanged)=\"handleRangeChanged($event)\"\n (onSlotDblClicked)=\"onSlotDblClicked($event)\"\n (onAppointmentClicked)=\"onTaskClickHandler($event)\"\n (onAppointmentRightClick)=\"onTaskRightClickHandler($event)\"\n></ax-scheduler>\n", styles: ["ax-scheduler{line-height:1.5;background-color:rgba(var(--ax-sys-color-lightest-surface))!important}\n"] }]
|
274
|
+
}] });
|
275
|
+
|
276
|
+
class AXMTaskBoardGridViewComponent {
|
277
|
+
constructor() {
|
278
|
+
this.localeService = inject(AXLocaleService);
|
279
|
+
this.calendarService = inject(AXCalendarService);
|
280
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
281
|
+
this.tasks = input.required();
|
282
|
+
this.statuses = input.required();
|
283
|
+
this.onTaskClick = output();
|
284
|
+
this.onActionClick = output();
|
285
|
+
this.stableTasks = computed(() => this.tasks(), { equal: isEqual });
|
286
|
+
this.tasksDataSource = computed(() => {
|
287
|
+
return new AXDataSource({
|
288
|
+
load: async (e) => {
|
289
|
+
const items = this.stableTasks().map((task) => ({
|
290
|
+
id: task.id,
|
291
|
+
title: task.title,
|
292
|
+
priority: task.priority,
|
293
|
+
description: task.description,
|
294
|
+
endDate: this.calendarService.format(task.endDate, 'DD/MM/YYYY HH:mm', {
|
295
|
+
locale: this.localeService.activeProfile().calendar.system,
|
296
|
+
}),
|
297
|
+
startDate: this.calendarService.format(task.startDate, 'DD/MM/YYYY HH:mm', {
|
298
|
+
locale: this.localeService.activeProfile().calendar.system,
|
299
|
+
}),
|
300
|
+
statusTitle: this.statuses().find((status) => status.key === task.statusKey)?.title,
|
301
|
+
}));
|
302
|
+
return {
|
303
|
+
items: items.slice(e.skip, e.skip + e.take),
|
304
|
+
total: items.length,
|
305
|
+
};
|
306
|
+
},
|
307
|
+
pageSize: 10,
|
308
|
+
key: 'id',
|
309
|
+
byKey: async (key) => {
|
310
|
+
return this.stableTasks().find((task) => task.id === key);
|
311
|
+
},
|
312
|
+
});
|
313
|
+
});
|
314
|
+
this.#tasksChanged = effect(() => {
|
315
|
+
this.stableTasks();
|
316
|
+
untracked(() => {
|
317
|
+
this.tasksDataSource().refresh();
|
318
|
+
});
|
319
|
+
});
|
320
|
+
}
|
321
|
+
#tasksChanged;
|
322
|
+
handleRowClick(event) {
|
323
|
+
const task = this.stableTasks().find((task) => task.id === event.data.id);
|
324
|
+
if (task) {
|
325
|
+
this.onTaskClick.emit(task);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
onActionClickHandler(e) {
|
329
|
+
const task = this.stableTasks().find((task) => task.id === e.data.id);
|
330
|
+
if (!task)
|
331
|
+
return;
|
332
|
+
this.onActionClick.emit({ nativeEvent: e.nativeEvent, task });
|
333
|
+
}
|
334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardGridViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.7", type: AXMTaskBoardGridViewComponent, isStandalone: true, selector: "axm-task-board-grid-view", inputs: { tasks: { classPropertyName: "tasks", publicName: "tasks", isSignal: true, isRequired: true, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskClick: "onTaskClick", onActionClick: "onActionClick" }, ngImport: i0, template: "<ax-data-table\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
336
|
+
}
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardGridViewComponent, decorators: [{
|
338
|
+
type: Component,
|
339
|
+
args: [{ selector: 'axm-task-board-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule], template: "<ax-data-table\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
|
340
|
+
}] });
|
341
|
+
|
342
|
+
class AXMTaskBoardKanbanViewComponent {
|
343
|
+
constructor() {
|
344
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
345
|
+
this.kanbanComponent = viewChild(AXKanbanComponent);
|
346
|
+
this.tasks = model.required();
|
347
|
+
this.statuses = input.required();
|
348
|
+
this.onTaskClick = output();
|
349
|
+
this.onTaskChanged = output();
|
350
|
+
this.component = output();
|
351
|
+
this.onActionClick = output();
|
352
|
+
this.stableTasks = computed(() => this.tasks(), { equal: isEqual });
|
353
|
+
this.kanbanTasks = computed(() => {
|
354
|
+
return this.stableTasks().map((task) => ({
|
355
|
+
id: task.id,
|
356
|
+
title: task.title,
|
357
|
+
index: task.index,
|
358
|
+
cssClass: task.cssClass,
|
359
|
+
priority: task.priority,
|
360
|
+
statusKey: task.statusKey,
|
361
|
+
description: task.description,
|
362
|
+
}));
|
363
|
+
});
|
364
|
+
}
|
365
|
+
ngAfterViewInit() {
|
366
|
+
if (this.kanbanComponent()) {
|
367
|
+
this.component.emit(this.kanbanComponent());
|
368
|
+
}
|
369
|
+
}
|
370
|
+
onSortChanged(event) {
|
371
|
+
const tasks = this.tasks().map((item) => {
|
372
|
+
const task = event.allItems.find((t) => t.id === item.id);
|
373
|
+
if (task) {
|
374
|
+
return { ...item, index: task.index, statusKey: task.statusKey };
|
375
|
+
}
|
376
|
+
return item;
|
377
|
+
});
|
378
|
+
this.taskBoardService.updateMultipleTasks(tasks).then((tasks) => {
|
379
|
+
this.tasks.set(tasks);
|
380
|
+
});
|
381
|
+
}
|
382
|
+
handleItemClick(event) {
|
383
|
+
const task = this.stableTasks().find((task) => task.id === event.item.id);
|
384
|
+
if (task) {
|
385
|
+
this.onTaskClick.emit(task);
|
386
|
+
}
|
387
|
+
}
|
388
|
+
handleActionClick(event) {
|
389
|
+
const task = this.stableTasks().find((task) => task.id === event.item.id);
|
390
|
+
if (task) {
|
391
|
+
this.onActionClick.emit({ nativeEvent: event.nativeEvent, task: task });
|
392
|
+
}
|
393
|
+
}
|
394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardKanbanViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.7", type: AXMTaskBoardKanbanViewComponent, isStandalone: true, selector: "axm-task-board-kanban-view", inputs: { tasks: { classPropertyName: "tasks", publicName: "tasks", isSignal: true, isRequired: true, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { tasks: "tasksChange", onTaskClick: "onTaskClick", onTaskChanged: "onTaskChanged", component: "component", onActionClick: "onActionClick" }, viewQueries: [{ propertyName: "kanbanComponent", first: true, predicate: AXKanbanComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-kanban\n [hasActions]=\"true\"\n [statuses]=\"statuses()\"\n [dataSource]=\"kanbanTasks()\"\n (onItemClick)=\"handleItemClick($event)\"\n (onSortChanged)=\"onSortChanged($event)\"\n (onActionClick)=\"handleActionClick($event)\"\n></ax-kanban>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "component", type: AXKanbanComponent, selector: "ax-kanban", inputs: ["hasActions", "dragStartDelay", "statuses", "itemTemplate", "dataSource", "keyField", "indexField", "titleField", "cssClassField", "priorityField", "statusKeyField", "descriptionField", "emptyTemplate", "headerTemplate", "footerTemplate", "contentFooterTemplate", "tooltipTemplate"], outputs: ["onSortChanged", "onItemClick", "onActionClick", "onItemDblClick", "onItemRightClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
396
|
+
}
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardKanbanViewComponent, decorators: [{
|
398
|
+
type: Component,
|
399
|
+
args: [{ selector: 'axm-task-board-kanban-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXKanbanComponent], template: "<ax-kanban\n [hasActions]=\"true\"\n [statuses]=\"statuses()\"\n [dataSource]=\"kanbanTasks()\"\n (onItemClick)=\"handleItemClick($event)\"\n (onSortChanged)=\"onSortChanged($event)\"\n (onActionClick)=\"handleActionClick($event)\"\n></ax-kanban>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
|
400
|
+
}] });
|
401
|
+
|
402
|
+
class AXMTaskBoardStatusGroupedGridViewComponent {
|
403
|
+
constructor() {
|
404
|
+
this.localeService = inject(AXLocaleService);
|
405
|
+
this.calendarService = inject(AXCalendarService);
|
406
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
407
|
+
this.tasks = input.required();
|
408
|
+
this.statuses = input.required();
|
409
|
+
this.onTaskChanged = output();
|
410
|
+
this.onActionClick = output();
|
411
|
+
this.groupedTasks = signal([]);
|
412
|
+
this.stableTasks = computed(() => this.tasks(), { equal: isEqual });
|
413
|
+
this.#tasksChanged = effect(() => {
|
414
|
+
const allTasks = this.stableTasks();
|
415
|
+
const allStatuses = this.statuses();
|
416
|
+
if (!allTasks.length || !allStatuses.length) {
|
417
|
+
this.groupedTasks.set([]);
|
418
|
+
return;
|
419
|
+
}
|
420
|
+
const map = allStatuses.map((status) => ({
|
421
|
+
statusInfo: status,
|
422
|
+
tasks: this.createTaskDataSource(allTasks.filter((task) => task.statusKey === status.key)),
|
423
|
+
}));
|
424
|
+
this.groupedTasks.set(map);
|
425
|
+
untracked(() => {
|
426
|
+
this.groupedTasks()?.forEach((group) => {
|
427
|
+
group.tasks.refresh();
|
428
|
+
});
|
429
|
+
});
|
430
|
+
});
|
431
|
+
}
|
432
|
+
#tasksChanged;
|
433
|
+
createTaskDataSource(tasks) {
|
434
|
+
return new AXDataSource({
|
435
|
+
load: async (e) => {
|
436
|
+
const items = tasks.map((task) => ({
|
437
|
+
id: task.id,
|
438
|
+
title: task.title,
|
439
|
+
priority: task.priority,
|
440
|
+
description: task.description,
|
441
|
+
endDate: this.calendarService.format(task.endDate, 'DD/MM/YYYY HH:mm', {
|
442
|
+
locale: this.localeService.activeProfile().calendar.system,
|
443
|
+
}),
|
444
|
+
startDate: this.calendarService.format(task.startDate, 'DD/MM/YYYY HH:mm', {
|
445
|
+
locale: this.localeService.activeProfile().calendar.system,
|
446
|
+
}),
|
447
|
+
statusTitle: this.statuses().find((status) => status.key === task.statusKey)?.title,
|
448
|
+
}));
|
449
|
+
return {
|
450
|
+
items: items.slice(e.skip, e.skip + e.take),
|
451
|
+
total: items.length,
|
452
|
+
};
|
453
|
+
},
|
454
|
+
pageSize: 10,
|
455
|
+
key: 'id',
|
456
|
+
byKey: async (key) => {
|
457
|
+
return tasks.find((task) => task.id === key);
|
458
|
+
},
|
459
|
+
});
|
460
|
+
}
|
461
|
+
onActionClickHandler(e) {
|
462
|
+
const task = this.tasks().find((task) => task.id === e.data.id);
|
463
|
+
if (!task)
|
464
|
+
return;
|
465
|
+
this.onActionClick.emit({ nativeEvent: e.nativeEvent, task });
|
466
|
+
}
|
467
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardStatusGroupedGridViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
468
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXMTaskBoardStatusGroupedGridViewComponent, isStandalone: true, selector: "axm-task-board-status-grouped-grid-view", inputs: { tasks: { classPropertyName: "tasks", publicName: "tasks", isSignal: true, isRequired: true, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskChanged: "onTaskChanged", onActionClick: "onActionClick" }, ngImport: i0, template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[291px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
469
|
+
}
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardStatusGroupedGridViewComponent, decorators: [{
|
471
|
+
type: Component,
|
472
|
+
args: [{ selector: 'axm-task-board-status-grouped-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule], template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[291px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
|
473
|
+
}] });
|
474
|
+
|
475
|
+
class AXMTaskBoardTimeGroupedGridViewComponent {
|
476
|
+
constructor() {
|
477
|
+
this.localeService = inject(AXLocaleService);
|
478
|
+
this.calendarService = inject(AXCalendarService);
|
479
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
480
|
+
this.tables = viewChildren(AXDataTableComponent);
|
481
|
+
this.tasks = input.required();
|
482
|
+
this.statuses = input.required();
|
483
|
+
this.onTaskChanged = output();
|
484
|
+
this.onActionClick = output();
|
485
|
+
this.groupedTasks = signal([]);
|
486
|
+
this.stableTasks = computed(() => this.tasks(), { equal: isEqual });
|
487
|
+
this.#tasksChanged = effect(() => {
|
488
|
+
const allTasks = this.stableTasks();
|
489
|
+
const allStatuses = this.statuses();
|
490
|
+
if (!allTasks.length || !allStatuses.length) {
|
491
|
+
this.groupedTasks.set([]);
|
492
|
+
return;
|
493
|
+
}
|
494
|
+
const map = allStatuses.map((status) => ({
|
495
|
+
statusInfo: status,
|
496
|
+
tasks: this.createTaskDataSource(allTasks.filter((task) => task.statusKey === status.key)),
|
497
|
+
}));
|
498
|
+
this.groupedTasks.set(map);
|
499
|
+
untracked(() => {
|
500
|
+
this.groupedTasks()?.forEach((group) => {
|
501
|
+
group.tasks.refresh();
|
502
|
+
});
|
503
|
+
});
|
504
|
+
});
|
505
|
+
}
|
506
|
+
#tasksChanged;
|
507
|
+
createTaskDataSource(tasks) {
|
508
|
+
return new AXDataSource({
|
509
|
+
load: async (e) => {
|
510
|
+
const items = tasks.map((task) => ({
|
511
|
+
id: task.id,
|
512
|
+
title: task.title,
|
513
|
+
priority: task.priority,
|
514
|
+
description: task.description,
|
515
|
+
endDate: this.calendarService.format(task.endDate, 'DD/MM/YYYY HH:mm', {
|
516
|
+
locale: this.localeService.activeProfile().calendar.system,
|
517
|
+
}),
|
518
|
+
startDate: this.calendarService.format(task.startDate, 'DD/MM/YYYY HH:mm', {
|
519
|
+
locale: this.localeService.activeProfile().calendar.system,
|
520
|
+
}),
|
521
|
+
statusTitle: this.statuses().find((status) => status.key === task.statusKey)?.title,
|
522
|
+
}));
|
523
|
+
return {
|
524
|
+
items: items.slice(e.skip, e.skip + e.take),
|
525
|
+
total: items.length,
|
526
|
+
};
|
527
|
+
},
|
528
|
+
pageSize: 10,
|
529
|
+
key: 'id',
|
530
|
+
byKey: async (key) => {
|
531
|
+
return tasks.find((task) => task.id === key);
|
532
|
+
},
|
533
|
+
});
|
534
|
+
}
|
535
|
+
onActionClickHandler(e) {
|
536
|
+
const task = this.tasks().find((task) => task.id === e.data.id);
|
537
|
+
if (!task)
|
538
|
+
return;
|
539
|
+
this.onActionClick.emit({ nativeEvent: e.nativeEvent, task });
|
540
|
+
}
|
541
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardTimeGroupedGridViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
542
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXMTaskBoardTimeGroupedGridViewComponent, isStandalone: true, selector: "axm-task-board-time-grouped-grid-view", inputs: { tasks: { classPropertyName: "tasks", publicName: "tasks", isSignal: true, isRequired: true, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskChanged: "onTaskChanged", onActionClick: "onActionClick" }, viewQueries: [{ propertyName: "tables", predicate: AXDataTableComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[291px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
543
|
+
}
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardTimeGroupedGridViewComponent, decorators: [{
|
545
|
+
type: Component,
|
546
|
+
args: [{ selector: 'axm-task-board-time-grouped-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule], template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[291px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'100%'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
|
547
|
+
}] });
|
548
|
+
|
549
|
+
class AXMTaskBoardPage extends AXPPageLayoutBaseComponent {
|
550
|
+
constructor() {
|
551
|
+
super(...arguments);
|
552
|
+
this.MULTI_DAYS_COUNT = 7;
|
553
|
+
this.router = inject(Router);
|
554
|
+
this.rootConfig = RootConfig;
|
555
|
+
this.vm = inject(AXMTaskBoardViewModel);
|
556
|
+
this.unsubscribe = inject(AXUnsubscriber);
|
557
|
+
this.activatedRoute = inject(ActivatedRoute);
|
558
|
+
this.localeService = inject(AXLocaleService);
|
559
|
+
this.calendarService = inject(AXCalendarService);
|
560
|
+
this.taskBoardService = inject(AXPTaskBoardService);
|
561
|
+
this.popover = viewChild('popover');
|
562
|
+
this.calendar = viewChild('calendar');
|
563
|
+
this.currentTask = signal(null);
|
564
|
+
this.currentViewMode = signal('calendar');
|
565
|
+
this.schedulerComponent = signal(null);
|
566
|
+
this.viewsItems = signal([
|
567
|
+
{ key: 'day', text: 'daily', icon: 'fa-light fa-calendar-day', title: 'calendar' },
|
568
|
+
{ key: 'week', text: 'weekly', icon: 'fa-light fa-calendar-week' },
|
569
|
+
{ key: 'month', text: 'monthly', icon: 'fa-light fa-calendar-alt' },
|
570
|
+
{ key: 'agenda', text: 'agenda', icon: 'fa-light fa-calendar-range', break: true },
|
571
|
+
{ key: 'grid', text: 'grid', icon: 'fa-light fa-table', title: 'table' },
|
572
|
+
// { key: 'time-grouped-grid', text: 'time-grouped-grid', icon: 'fa-light fa-table' },
|
573
|
+
{ key: 'status-grouped-grid', text: 'status-grouped-grid', icon: 'fa-light fa-table', break: true },
|
574
|
+
{ key: 'kanban', text: 'kanban', icon: 'fa-light fa-chart-kanban' },
|
575
|
+
]);
|
576
|
+
this.calendarType = computed(() => this.localeService.activeProfile().calendar.system);
|
577
|
+
this.todayButtonText = computed(() => {
|
578
|
+
switch (this.vm.currentViewMode()) {
|
579
|
+
case 'day':
|
580
|
+
case 'agenda':
|
581
|
+
case 'kanban':
|
582
|
+
case 'timeline-day':
|
583
|
+
case 'timeline-multi-day':
|
584
|
+
return 'Today';
|
585
|
+
case 'week':
|
586
|
+
return 'Current week';
|
587
|
+
case 'grid':
|
588
|
+
case 'month':
|
589
|
+
case 'timeline-month':
|
590
|
+
case 'time-grouped-grid':
|
591
|
+
case 'status-grouped-grid':
|
592
|
+
return 'Current month';
|
593
|
+
}
|
594
|
+
});
|
595
|
+
this.timeText = computed(() => {
|
596
|
+
if (this.vm.currentViewMode() === 'kanban') {
|
597
|
+
const start = this.calendarService.create(this.vm.currentDate(), this.localeService.activeProfile().calendar.system);
|
598
|
+
const end = start.add('day', this.MULTI_DAYS_COUNT - 1);
|
599
|
+
const startText = start.format('DD MMMM yyyy', { locale: this.localeService.activeProfile().calendar.system });
|
600
|
+
const endText = end.format('DD MMMM yyyy', { locale: this.localeService.activeProfile().calendar.system });
|
601
|
+
return `${startText} - ${endText}`;
|
602
|
+
}
|
603
|
+
if (this.vm.currentViewMode() === 'grid' ||
|
604
|
+
this.vm.currentViewMode() === 'time-grouped-grid' ||
|
605
|
+
this.vm.currentViewMode() === 'status-grouped-grid') {
|
606
|
+
const start = this.calendarService.create(this.vm.currentDate(), this.localeService.activeProfile().calendar.system);
|
607
|
+
const startText = start.format('MMMM yyyy', { locale: this.localeService.activeProfile().calendar.system });
|
608
|
+
return startText;
|
609
|
+
}
|
610
|
+
return this.schedulerComponent()?.currentDateText();
|
611
|
+
});
|
612
|
+
this.calendarDepth = computed(() => {
|
613
|
+
if (this.vm.currentViewMode() === 'kanban') {
|
614
|
+
return 'day';
|
615
|
+
}
|
616
|
+
if (this.vm.currentViewMode() === 'grid' ||
|
617
|
+
this.vm.currentViewMode() === 'time-grouped-grid' ||
|
618
|
+
this.vm.currentViewMode() === 'status-grouped-grid') {
|
619
|
+
return 'month';
|
620
|
+
}
|
621
|
+
return this.schedulerComponent()?.calendarDepth();
|
622
|
+
});
|
623
|
+
this.selectedViewMode = computed(() => this.viewsItems().find((item) => item.key === this.vm.currentViewMode()) || this.viewsItems()[0]);
|
624
|
+
this.filter = computed(() => {
|
625
|
+
const taskTypeProvider = this.vm.selectedTaskType();
|
626
|
+
const types = taskTypeProvider ? [taskTypeProvider.name] : undefined;
|
627
|
+
let from = this.calendarService.create(this.vm.currentDate(), this.localeService.activeProfile().calendar.system);
|
628
|
+
let end;
|
629
|
+
if (this.vm.currentViewMode() === 'kanban') {
|
630
|
+
end = from.add('day', this.MULTI_DAYS_COUNT - 1);
|
631
|
+
}
|
632
|
+
else if (this.vm.currentViewMode() === 'grid' ||
|
633
|
+
this.vm.currentViewMode() === 'time-grouped-grid' ||
|
634
|
+
this.vm.currentViewMode() === 'status-grouped-grid') {
|
635
|
+
from = from.startOf('month');
|
636
|
+
end = from.endOf('month');
|
637
|
+
}
|
638
|
+
else {
|
639
|
+
end = from.endOf('day');
|
640
|
+
}
|
641
|
+
return {
|
642
|
+
...(types && { types }),
|
643
|
+
range: { from: from.date, end: end.date },
|
644
|
+
};
|
645
|
+
});
|
646
|
+
this.resolvedTasks = signal([]);
|
647
|
+
this.eff = effect(async () => {
|
648
|
+
this.resolvedTasks.set(await this.dataSource(this.filter()));
|
649
|
+
});
|
650
|
+
this.contextMenu = viewChild('rootContextMenu');
|
651
|
+
this.dataSource = (filter) => {
|
652
|
+
const taskTypeProvider = this.vm.selectedTaskType();
|
653
|
+
const types = taskTypeProvider ? [taskTypeProvider.name] : undefined;
|
654
|
+
return this.taskBoardService.getTasks({ ...filter, types });
|
655
|
+
};
|
656
|
+
this.statuses = computed(() => {
|
657
|
+
return this.vm.selectedTaskType()?.statuses || [];
|
658
|
+
});
|
659
|
+
this.getCellClass = (date) => {
|
660
|
+
// check from value
|
661
|
+
const rangedDates = [
|
662
|
+
'week',
|
663
|
+
'grid',
|
664
|
+
'kanban',
|
665
|
+
'agenda',
|
666
|
+
'time-grouped-grid',
|
667
|
+
'status-grouped-grid',
|
668
|
+
'timeline-multi-day',
|
669
|
+
];
|
670
|
+
if (!rangedDates.includes(this.vm.currentViewMode())) {
|
671
|
+
return null;
|
672
|
+
}
|
673
|
+
const from = this.calendarService.create(this.vm.currentDate(), this.localeService.activeProfile().calendar.system);
|
674
|
+
const end = from.add('day', this.MULTI_DAYS_COUNT - 1);
|
675
|
+
if (from && date.equal(from, 'day')) {
|
676
|
+
return 'ax-range-start';
|
677
|
+
}
|
678
|
+
if (end && date.equal(end, 'day')) {
|
679
|
+
return 'ax-range-end';
|
680
|
+
}
|
681
|
+
if (from && end && date.compare(from, 'day') > 0 && date.compare(end, 'day') < 0) {
|
682
|
+
return 'ax-range-between';
|
683
|
+
}
|
684
|
+
return null;
|
685
|
+
};
|
686
|
+
}
|
687
|
+
async ngOnInit() {
|
688
|
+
await super.ngOnInit();
|
689
|
+
await this.vm.initialize();
|
690
|
+
this.router.events
|
691
|
+
.pipe(this.unsubscribe.takeUntilDestroy, filter((event) => event instanceof NavigationEnd), startWith(null))
|
692
|
+
.subscribe(async () => {
|
693
|
+
await this.loadFromRoute();
|
694
|
+
});
|
695
|
+
}
|
696
|
+
async getPageTitle() {
|
697
|
+
return await this.translateService.translateAsync('task-board.page-title', { scope: this.rootConfig.config.i18n });
|
698
|
+
}
|
699
|
+
async getPageBreadcrumbs() {
|
700
|
+
return [
|
701
|
+
{
|
702
|
+
title: await this.translateService.translateAsync('root-menu', { scope: this.rootConfig.config.i18n }),
|
703
|
+
},
|
704
|
+
];
|
705
|
+
}
|
706
|
+
schedulerComponentChanged(component) {
|
707
|
+
this.schedulerComponent.set(component);
|
708
|
+
}
|
709
|
+
handleContextMenuOnOpening(event) {
|
710
|
+
for (const item of this.currentTask()?.data?.actions || []) {
|
711
|
+
event.items.push({
|
712
|
+
text: item.title,
|
713
|
+
icon: item.icon,
|
714
|
+
data: {
|
715
|
+
command: item.command,
|
716
|
+
},
|
717
|
+
});
|
718
|
+
}
|
719
|
+
}
|
720
|
+
handleContextMenu(event) {
|
721
|
+
this.currentTask.set(event.task);
|
722
|
+
const x = event.nativeEvent.clientX;
|
723
|
+
const y = event.nativeEvent.clientY;
|
724
|
+
const element = event.nativeEvent.target;
|
725
|
+
this.contextMenu()?.showAt({ x, y }, element);
|
726
|
+
}
|
727
|
+
handleMonthSlotDblClicked(date) {
|
728
|
+
this.vm.setCurrentDate(date);
|
729
|
+
this.vm.setViewMode('day');
|
730
|
+
}
|
731
|
+
handleCalendarViewChange(view) {
|
732
|
+
this.router.navigate([], { queryParams: { view } });
|
733
|
+
this.vm.setViewMode(view);
|
734
|
+
const schedulerComponent = this.schedulerComponent();
|
735
|
+
if (schedulerComponent) {
|
736
|
+
setTimeout(() => {
|
737
|
+
this.vm.setCurrentDate(schedulerComponent.currentDate().date);
|
738
|
+
this.popover()?.close();
|
739
|
+
this.calendar()?.render();
|
740
|
+
});
|
741
|
+
}
|
742
|
+
}
|
743
|
+
handleSelectedTaskTypeChange(taskType) {
|
744
|
+
this.vm.setSelectedTaskTypeProvider(taskType);
|
745
|
+
this.schedulerComponent()?.refresh();
|
746
|
+
}
|
747
|
+
handleSchedulerDateChanged(event) {
|
748
|
+
if (this.vm.isLoading()) {
|
749
|
+
return;
|
750
|
+
}
|
751
|
+
const newDate = event.value;
|
752
|
+
const currentDateInVm = this.vm.currentDate();
|
753
|
+
let dateToSet = newDate || new Date();
|
754
|
+
if (!currentDateInVm || currentDateInVm.getTime() !== dateToSet.getTime()) {
|
755
|
+
if (this.vm.currentViewMode() === 'week') {
|
756
|
+
const day = dateToSet.getDay();
|
757
|
+
const weekStart = this.localeService.activeProfile().calendar.week.startsOn;
|
758
|
+
let daysToSubtract = day - weekStart;
|
759
|
+
if (daysToSubtract < 0) {
|
760
|
+
daysToSubtract += 7;
|
761
|
+
}
|
762
|
+
dateToSet = new Date(dateToSet);
|
763
|
+
dateToSet.setDate(dateToSet.getDate() - daysToSubtract);
|
764
|
+
}
|
765
|
+
this.vm.setCurrentDate(dateToSet);
|
766
|
+
this.popover()?.close();
|
767
|
+
this.calendar()?.render();
|
768
|
+
}
|
769
|
+
}
|
770
|
+
handleContextMenuItemClick(event) {
|
771
|
+
this.taskBoardService.executeCommand(event.item.data?.command, this.currentTask()?.data?.provider ?? '');
|
772
|
+
}
|
773
|
+
changeDate(forward) {
|
774
|
+
const date = this.calendarService.create(this.vm.currentDate(), this.localeService.activeProfile().calendar.system);
|
775
|
+
switch (this.vm.currentViewMode()) {
|
776
|
+
case 'day':
|
777
|
+
case 'timeline-day':
|
778
|
+
this.vm.setCurrentDate(date.add('day', forward ? 1 : -1).date);
|
779
|
+
break;
|
780
|
+
case 'week':
|
781
|
+
this.vm.setCurrentDate(date.add('week', forward ? 1 : -1).date);
|
782
|
+
break;
|
783
|
+
case 'agenda':
|
784
|
+
case 'kanban':
|
785
|
+
case 'timeline-multi-day':
|
786
|
+
this.vm.setCurrentDate(date.add('day', forward ? this.MULTI_DAYS_COUNT - 1 : 1 - this.MULTI_DAYS_COUNT).date);
|
787
|
+
break;
|
788
|
+
case 'grid':
|
789
|
+
case 'month':
|
790
|
+
case 'timeline-month':
|
791
|
+
case 'time-grouped-grid':
|
792
|
+
case 'status-grouped-grid':
|
793
|
+
this.vm.setCurrentDate(date.add('month', forward ? 1 : -1).date);
|
794
|
+
break;
|
795
|
+
}
|
796
|
+
this.popover()?.close();
|
797
|
+
this.calendar()?.render();
|
798
|
+
}
|
799
|
+
handleTodayClick() {
|
800
|
+
this.handleSchedulerDateChanged({ value: new Date(), component: this.schedulerComponent() });
|
801
|
+
}
|
802
|
+
async loadFromRoute() {
|
803
|
+
const snapshot = this.activatedRoute.snapshot;
|
804
|
+
const views = [
|
805
|
+
'day',
|
806
|
+
'week',
|
807
|
+
'grid',
|
808
|
+
'month',
|
809
|
+
'agenda',
|
810
|
+
'kanban',
|
811
|
+
'timeline-day',
|
812
|
+
'timeline-month',
|
813
|
+
'time-grouped-grid',
|
814
|
+
'timeline-multi-day',
|
815
|
+
'status-grouped-grid',
|
816
|
+
];
|
817
|
+
const view = snapshot.queryParamMap.get('view') ?? null;
|
818
|
+
if (view && views.includes(view)) {
|
819
|
+
this.vm.setViewMode(view);
|
820
|
+
}
|
821
|
+
else if (!this.vm.currentViewMode()) {
|
822
|
+
this.vm.setViewMode('day');
|
823
|
+
}
|
824
|
+
}
|
825
|
+
setActiveTask(task) {
|
826
|
+
this.vm.selectTask(task);
|
827
|
+
}
|
828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
829
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXMTaskBoardPage, isStandalone: true, selector: "ng-component", providers: [
|
830
|
+
{
|
831
|
+
provide: AXPPageLayoutBase,
|
832
|
+
useExisting: AXMTaskBoardPage,
|
833
|
+
},
|
834
|
+
], viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, isSignal: true }, { propertyName: "contextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <axp-layout-prefix class=\"sm:ax-flex-row ax-flex-col ax-items-start\">\n <ax-button\n [text]=\"t(vm.selectedTaskType()?.title || 'task-board.all', { scope: rootConfig.config.i18n }) | async\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{vm.selectedTaskType()?.icon || 'fa-tasks'}}\"></ax-icon></ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n @if(vm.currentViewMode()!=='kanban' && vm.currentViewMode()!=='grid' &&\n vm.currentViewMode()!=='status-grouped-grid' && vm.currentViewMode()!=='time-grouped-grid') {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(null)\"\n [text]=\"(t('task-board.all', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light fa-tasks\"></ax-icon></ax-prefix>\n </ax-button-item>\n } @for(item of vm.taskTypes(); track item.name) {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(item)\"\n [text]=\"(t(item.title, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon></ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <div class=\"ax-scheduler-header ax-w-max ax-sm sm:ax-md\">\n <ax-button look=\"blank\" (onClick)=\"changeDate(false)\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-left arrow-icon\"></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"timeText()\" #date></ax-button>\n <ax-button look=\"blank\" (onClick)=\"changeDate(true)\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-right arrow-icon\"></ax-icon>\n </ax-button>\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\" #popover>\n <div class=\"ax-overlay-pane\">\n <ax-calendar\n #calendar\n [type]=\"calendarType()\"\n [depth]=\"calendarDepth()\"\n [cellClass]=\"getCellClass\"\n [ngModel]=\"vm.currentDate()\"\n class=\"ax-single-range-calendar\"\n (onValueChanged)=\"handleSchedulerDateChanged($event)\"\n >\n <ax-footer>\n <ax-button\n look=\"link\"\n color=\"primary\"\n [text]=\"todayButtonText()\"\n (onClick)=\"handleTodayClick()\"\n ></ax-button>\n </ax-footer>\n </ax-calendar>\n </div>\n </ax-popover>\n </div>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) { @if(item.title) {\n <ax-title>{{(t('task-board.'+item.title, { scope: rootConfig.config.i18n }) | async)}}</ax-title>\n }\n <ax-button-item\n [text]=\"(t('task-board.view.' + item.text, { scope: 'workflow-management' }) | async)!\"\n [selected]=\"vm.currentViewMode() === item.key\"\n (onClick)=\"handleCalendarViewChange(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n } }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n @if(layoutService.isLarge()) {\n <!-- Detail Panel Toggle -->\n <ax-button (onClick)=\"vm.toggleDetailPanel()\">\n <ax-icon icon=\"{{ vm.isDetailPanelOpen() ? 'fa-solid fa-square-info' : 'fa-light fa-square-info' }}\"></ax-icon>\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-flex ax-flex-row ax-gap-2\"\n >@switch(vm.currentViewMode()) { @case('kanban') {\n <axm-task-board-kanban-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onTaskClick)=\"setActiveTask($event)\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"axp-kanban-container ax-h-full ax-w-full\"\n ></axm-task-board-kanban-view>\n }@case('grid') {\n <axm-task-board-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n class=\"ax-h-full ax-w-full\"\n (onTaskClick)=\"setActiveTask($event)\"\n (onActionClick)=\"handleContextMenu($event)\"\n ></axm-task-board-grid-view>\n }@case('status-grouped-grid') {\n <axm-task-board-status-grouped-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"ax-flex ax-flex-col ax-gap-2 ax-w-full\"\n ></axm-task-board-status-grouped-grid-view>\n }@case('time-grouped-grid') {\n <axm-task-board-time-grouped-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"ax-flex ax-flex-col ax-gap-2 ax-w-full\"\n ></axm-task-board-time-grouped-grid-view>\n } @default {\n <axm-task-board-calendar-view\n class=\"axp-scheduler-container ax-h-full ax-w-full\"\n [dataSource]=\"dataSource\"\n [startingDate]=\"vm.currentDate()\"\n (onTaskClick)=\"setActiveTask($event)\"\n [selectedView]=\"vm.currentViewMode()\"\n (onActionClick)=\"handleContextMenu($event)\"\n (onTaskRightClick)=\"handleContextMenu($event)\"\n (component)=\"schedulerComponentChanged($event)\"\n (onMonthSlotDblClicked)=\"handleMonthSlotDblClicked($event)\"\n ></axm-task-board-calendar-view>\n } }\n <ax-context-menu\n #rootContextMenu\n [closeOn]=\"'leave'\"\n [orientation]=\"'vertical'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n >\n </ax-context-menu>\n @if (vm.isDetailPanelOpen() && layoutService.isLarge()) {\n <axm-task-board-detail-panel></axm-task-board-detail-panel>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["html[dir=rtl] axp-page-layout axp-page-toolbar axp-layout-prefix .ax-scheduler-header .arrow-icon:before{-moz-transform:scale(-1,1);-webkit-transform:scale(-1,1);-o-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scaleX(-1)}.ax-single-range-calendar .ax-range-start,.ax-single-range-calendar .ax-range-end{color:rgba(var(--ax-sys-color-on-primary-surface))!important;background-color:rgba(var(--ax-sys-color-primary-surface),.85)!important}.ax-single-range-calendar .ax-range-start:hover,.ax-single-range-calendar .ax-range-end:hover{background-color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-single-range-calendar .ax-range-start.ax-state-holiday,.ax-single-range-calendar .ax-range-end.ax-state-holiday{background-color:rgba(var(--ax-sys-color-danger-surface),.85)!important}.ax-single-range-calendar .ax-range-between{color:rgba(var(--ax-sys-color-on-primary-surface))!important;background-color:rgba(var(--ax-sys-color-primary-surface),.65)}.ax-single-range-calendar .ax-range-between.ax-state-holiday{background-color:rgba(var(--ax-sys-color-danger-surface),.65)}.ax-single-range-calendar ax-footer{display:flex;justify-content:center;border-color:rgba(var(--ax-comp-calendar-view-header-border-color));border-top-width:var(--ax-comp-calendar-view-header-border-width, 1px)}axp-page-content:not(:has(axm-task-board-status-grouped-grid-view,axm-task-board-time-grouped-grid-view)){overflow-y:hidden}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type:
|
835
|
+
//
|
836
|
+
AXMenuModule }, { kind: "component", type: i3.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i6.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i6.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type:
|
837
|
+
//
|
838
|
+
AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXMTaskBoardCalendarViewComponent, selector: "axm-task-board-calendar-view", inputs: ["startingDate", "selectedView", "dataSource"], outputs: ["onTaskClick", "onTaskChanged", "onMonthSlotDblClicked", "onActionClick", "component", "onTaskRightClick", "onRangeChanged"] }, { kind: "component", type: AXMTaskBoardKanbanViewComponent, selector: "axm-task-board-kanban-view", inputs: ["tasks", "statuses"], outputs: ["tasksChange", "onTaskClick", "onTaskChanged", "component", "onActionClick"] }, { kind: "component", type: AXMTaskBoardGridViewComponent, selector: "axm-task-board-grid-view", inputs: ["tasks", "statuses"], outputs: ["onTaskClick", "onActionClick"] }, { kind: "component", type: AXMTaskBoardTimeGroupedGridViewComponent, selector: "axm-task-board-time-grouped-grid-view", inputs: ["tasks", "statuses"], outputs: ["onTaskChanged", "onActionClick"] }, { kind: "component", type: AXMTaskBoardStatusGroupedGridViewComponent, selector: "axm-task-board-status-grouped-grid-view", inputs: ["tasks", "statuses"], outputs: ["onTaskChanged", "onActionClick"] }, { kind: "component", type: AXMTaskBoardDetailPanel, selector: "axm-task-board-detail-panel" }, { kind: "component", type: AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i7.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "minValue", "maxValue", "disabledDates", "holidayDates", "type", "cellTemplate", "cellClass", "showNavigation", "count", "id"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "minValueChange", "maxValueChange", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick", "countChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
839
|
+
}
|
840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMTaskBoardPage, decorators: [{
|
841
|
+
type: Component,
|
842
|
+
args: [{ imports: [
|
843
|
+
FormsModule,
|
844
|
+
CommonModule,
|
845
|
+
RouterModule,
|
846
|
+
//
|
847
|
+
AXMenuModule,
|
848
|
+
AXButtonModule,
|
849
|
+
AXDropdownButtonModule,
|
850
|
+
AXTranslationModule,
|
851
|
+
AXDecoratorModule,
|
852
|
+
AXLoadingModule,
|
853
|
+
AXBreadcrumbsModule,
|
854
|
+
AXBadgeModule,
|
855
|
+
//
|
856
|
+
AXPThemeLayoutBlockComponent,
|
857
|
+
AXPPageLayoutComponent,
|
858
|
+
AXMTaskBoardCalendarViewComponent,
|
859
|
+
AXMTaskBoardKanbanViewComponent,
|
860
|
+
AXMTaskBoardGridViewComponent,
|
861
|
+
AXMTaskBoardTimeGroupedGridViewComponent,
|
862
|
+
AXMTaskBoardStatusGroupedGridViewComponent,
|
863
|
+
AXMTaskBoardDetailPanel,
|
864
|
+
AXDropdownPanelComponent,
|
865
|
+
AXPopoverModule,
|
866
|
+
AXCalendarComponent,
|
867
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
868
|
+
{
|
869
|
+
provide: AXPPageLayoutBase,
|
870
|
+
useExisting: AXMTaskBoardPage,
|
871
|
+
},
|
872
|
+
], template: "<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <axp-layout-prefix class=\"sm:ax-flex-row ax-flex-col ax-items-start\">\n <ax-button\n [text]=\"t(vm.selectedTaskType()?.title || 'task-board.all', { scope: rootConfig.config.i18n }) | async\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{vm.selectedTaskType()?.icon || 'fa-tasks'}}\"></ax-icon></ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n @if(vm.currentViewMode()!=='kanban' && vm.currentViewMode()!=='grid' &&\n vm.currentViewMode()!=='status-grouped-grid' && vm.currentViewMode()!=='time-grouped-grid') {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(null)\"\n [text]=\"(t('task-board.all', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light fa-tasks\"></ax-icon></ax-prefix>\n </ax-button-item>\n } @for(item of vm.taskTypes(); track item.name) {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(item)\"\n [text]=\"(t(item.title, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon></ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <div class=\"ax-scheduler-header ax-w-max ax-sm sm:ax-md\">\n <ax-button look=\"blank\" (onClick)=\"changeDate(false)\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-left arrow-icon\"></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"timeText()\" #date></ax-button>\n <ax-button look=\"blank\" (onClick)=\"changeDate(true)\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-right arrow-icon\"></ax-icon>\n </ax-button>\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\" #popover>\n <div class=\"ax-overlay-pane\">\n <ax-calendar\n #calendar\n [type]=\"calendarType()\"\n [depth]=\"calendarDepth()\"\n [cellClass]=\"getCellClass\"\n [ngModel]=\"vm.currentDate()\"\n class=\"ax-single-range-calendar\"\n (onValueChanged)=\"handleSchedulerDateChanged($event)\"\n >\n <ax-footer>\n <ax-button\n look=\"link\"\n color=\"primary\"\n [text]=\"todayButtonText()\"\n (onClick)=\"handleTodayClick()\"\n ></ax-button>\n </ax-footer>\n </ax-calendar>\n </div>\n </ax-popover>\n </div>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) { @if(item.title) {\n <ax-title>{{(t('task-board.'+item.title, { scope: rootConfig.config.i18n }) | async)}}</ax-title>\n }\n <ax-button-item\n [text]=\"(t('task-board.view.' + item.text, { scope: 'workflow-management' }) | async)!\"\n [selected]=\"vm.currentViewMode() === item.key\"\n (onClick)=\"handleCalendarViewChange(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n } }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n @if(layoutService.isLarge()) {\n <!-- Detail Panel Toggle -->\n <ax-button (onClick)=\"vm.toggleDetailPanel()\">\n <ax-icon icon=\"{{ vm.isDetailPanelOpen() ? 'fa-solid fa-square-info' : 'fa-light fa-square-info' }}\"></ax-icon>\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-flex ax-flex-row ax-gap-2\"\n >@switch(vm.currentViewMode()) { @case('kanban') {\n <axm-task-board-kanban-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onTaskClick)=\"setActiveTask($event)\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"axp-kanban-container ax-h-full ax-w-full\"\n ></axm-task-board-kanban-view>\n }@case('grid') {\n <axm-task-board-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n class=\"ax-h-full ax-w-full\"\n (onTaskClick)=\"setActiveTask($event)\"\n (onActionClick)=\"handleContextMenu($event)\"\n ></axm-task-board-grid-view>\n }@case('status-grouped-grid') {\n <axm-task-board-status-grouped-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"ax-flex ax-flex-col ax-gap-2 ax-w-full\"\n ></axm-task-board-status-grouped-grid-view>\n }@case('time-grouped-grid') {\n <axm-task-board-time-grouped-grid-view\n [statuses]=\"statuses()\"\n [tasks]=\"resolvedTasks()\"\n (onActionClick)=\"handleContextMenu($event)\"\n class=\"ax-flex ax-flex-col ax-gap-2 ax-w-full\"\n ></axm-task-board-time-grouped-grid-view>\n } @default {\n <axm-task-board-calendar-view\n class=\"axp-scheduler-container ax-h-full ax-w-full\"\n [dataSource]=\"dataSource\"\n [startingDate]=\"vm.currentDate()\"\n (onTaskClick)=\"setActiveTask($event)\"\n [selectedView]=\"vm.currentViewMode()\"\n (onActionClick)=\"handleContextMenu($event)\"\n (onTaskRightClick)=\"handleContextMenu($event)\"\n (component)=\"schedulerComponentChanged($event)\"\n (onMonthSlotDblClicked)=\"handleMonthSlotDblClicked($event)\"\n ></axm-task-board-calendar-view>\n } }\n <ax-context-menu\n #rootContextMenu\n [closeOn]=\"'leave'\"\n [orientation]=\"'vertical'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n >\n </ax-context-menu>\n @if (vm.isDetailPanelOpen() && layoutService.isLarge()) {\n <axm-task-board-detail-panel></axm-task-board-detail-panel>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["html[dir=rtl] axp-page-layout axp-page-toolbar axp-layout-prefix .ax-scheduler-header .arrow-icon:before{-moz-transform:scale(-1,1);-webkit-transform:scale(-1,1);-o-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scaleX(-1)}.ax-single-range-calendar .ax-range-start,.ax-single-range-calendar .ax-range-end{color:rgba(var(--ax-sys-color-on-primary-surface))!important;background-color:rgba(var(--ax-sys-color-primary-surface),.85)!important}.ax-single-range-calendar .ax-range-start:hover,.ax-single-range-calendar .ax-range-end:hover{background-color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-single-range-calendar .ax-range-start.ax-state-holiday,.ax-single-range-calendar .ax-range-end.ax-state-holiday{background-color:rgba(var(--ax-sys-color-danger-surface),.85)!important}.ax-single-range-calendar .ax-range-between{color:rgba(var(--ax-sys-color-on-primary-surface))!important;background-color:rgba(var(--ax-sys-color-primary-surface),.65)}.ax-single-range-calendar .ax-range-between.ax-state-holiday{background-color:rgba(var(--ax-sys-color-danger-surface),.65)}.ax-single-range-calendar ax-footer{display:flex;justify-content:center;border-color:rgba(var(--ax-comp-calendar-view-header-border-color));border-top-width:var(--ax-comp-calendar-view-header-border-width, 1px)}axp-page-content:not(:has(axm-task-board-status-grouped-grid-view,axm-task-board-time-grouped-grid-view)){overflow-y:hidden}\n"] }]
|
873
|
+
}] });
|
874
|
+
|
875
|
+
export { AXMTaskBoardPage };
|
876
|
+
//# sourceMappingURL=acorex-modules-workflow-management-task-board.page-Dp7SJ3NA.mjs.map
|