@masterteam/task-schedule 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -14,16 +14,17 @@ Syncfusion Gantt based task-schedule package with external model switching.
14
14
  - `TaskScheduleContext`
15
15
  - `TASK_SCHEDULE_DEFAULT_PDF_FONT`
16
16
 
17
- ## Inputs
18
-
19
- - `modelType`: `'default' | 'edit' | 'baseline' | 'criticalPath' | 'critical-path' | 'resources' | 'unscheduled' | 'phaseGate' | 'phase-gate' | 'custom'`
20
- - `context`: object with required `levelId` and `levelDataId` for runtime tree loading, plus optional `customViewId`, etc.
21
- - `dateFormat`: default `dd/MM/yyyy`
22
- - `height`: default `760px`
23
- - `langCode`: `'en' | 'ar' | null` (optional; auto-resolves from context/localStorage/document)
24
- - `pdfFontData`: optional base64 TTF string for PDF export font
25
- - `pdfRtlFontData`: optional base64 TTF string used in RTL/Arabic PDF export
26
- - `pdfFontSize`: optional PDF font size (default `11`)
17
+ ## Inputs
18
+
19
+ - `context`: object with required `levelId` and `levelDataId` for fetch-based schedule reads
20
+
21
+ Main context fields:
22
+
23
+ - `modelType`: `'default' | 'edit' | 'baseline' | 'criticalPath' | 'critical-path' | 'resources' | 'unscheduled' | 'phaseGate' | 'custom'`
24
+ - `langCode`: `'en' | 'ar' | null`
25
+ - `dateFormat`: default `dd/MM/yyyy`
26
+ - `height`: default `760px`
27
+ - `pdfFonts`: optional `{ regular?: string; arabic?: string; size?: number }`
27
28
 
28
29
  ## Outputs
29
30
 
@@ -55,13 +56,16 @@ import {
55
56
  standalone: true,
56
57
  imports: [TaskSchedule],
57
58
  selector: 'app-task-schedule-host',
58
- template: `
59
- <mt-task-schedule
60
- [modelType]="modelType()"
61
- [context]="{ levelId: 12, levelDataId: 18 }"
62
- [langCode]="'en'"
63
- />
64
- `,
59
+ template: `
60
+ <mt-task-schedule
61
+ [context]="{
62
+ levelId: 12,
63
+ modelType: modelType(),
64
+ levelDataId: 18,
65
+ langCode: 'en'
66
+ }"
67
+ />
68
+ `,
65
69
  providers: [
66
70
  {
67
71
  provide: TASK_SCHEDULE_DATA_ADAPTER,
@@ -74,17 +78,19 @@ export class TaskScheduleHostComponent {
74
78
  }
75
79
  ```
76
80
 
77
- The component uses `TaskScheduleBackendAdapter` by default.
78
-
81
+ The component uses `TaskScheduleBackendAdapter` by default.
82
+
79
83
  Backend routes used:
80
84
 
81
- - Runtime tree (default/edit/baseline/critical/custom): `GET /api/levels/{levelId}/{levelDataId}/schedule/tree`
82
- - Runtime phase gate tree: `GET /api/levels/{levelId}/{levelDataId}/schedule/tree?renderMode=PhaseGate`
85
+ - Mixed schedule reads (default/edit/critical/custom): `POST /api/levels/{levelId}/{levelDataId}/schedule/query`
86
+ - Runtime baseline snapshot view: `GET /api/levels/{levelId}/{levelDataId}/schedule/baselines/latest`
83
87
  - Runtime unscheduled: `GET /api/levels/{levelId}/{levelDataId}/schedule/unscheduled`
84
88
  - Runtime resource mode: `GET /api/levels/{levelId}/{levelDataId}/schedule/by-resource`
85
89
  - Custom view config: `GET /api/schedulemanager/{levelId}/schedule/{customViewId}`
86
90
  - Team members (edit/resources mode): `GET /api/levels/{levelId}/TeamMember`
87
91
 
92
+ Phase-gate runtime reads are handled separately in the app-client phase-gate flow and are not part of this package migration.
93
+
88
94
  Runtime mutations (when `levelDataId` exists):
89
95
 
90
96
  - `POST /api/levels/{levelId}/{levelDataId}/schedule`
@@ -96,16 +102,19 @@ Runtime mutations (when `levelDataId` exists):
96
102
  - `POST /api/levels/{levelId}/{levelDataId}/schedule/baselines` (set baseline)
97
103
  - `GET /api/levels/{levelId}/{levelDataId}/schedule/mpp` (export)
98
104
 
99
- Legacy `/api/tasks/...` routes are kept as fallback when `levelDataId` is not provided or when `context.endpoints` overrides are supplied.
100
- Import modal keeps legacy preview/apply defaults (`POST /api/tasks/mmp/import`, then apply endpoint), unless `endpoints.importTasks` / `endpoints.applyImportedTasks` are overridden.
105
+ Plain schedule reads no longer use legacy `/api/tasks/...` read routes.
106
+ Import modal keeps its current MPP preview/apply flow unless `endpoints.importTasks` / `endpoints.applyImportedTasks` are overridden.
101
107
 
102
108
  Context options for backend routing:
103
109
 
104
110
  - `apiBaseUrl`: optional base URL prefix
105
- - `schemaId`: optional legacy API schema id (used only for legacy fallback routes)
111
+ - `modelType`: selected schedule mode
112
+ - `langCode`: optional language override
113
+ - `dateFormat`: optional gantt date format
114
+ - `height`: optional gantt height
106
115
  - `customViewId`: used in `custom` mode to load schedule-manager view columns
107
116
  - `resources`: optional static resource list override
108
- - `endpoints`: optional endpoint template overrides (`scheduleTree`, `scheduleViewById`, `teamMembers`, `createTask`, etc.)
117
+ - `endpoints`: optional endpoint template overrides (`scheduleTreePhaseGate`, `scheduleViewById`, `teamMembers`, `createTask`, etc.)
109
118
  - `endpoints.importTasks` / `endpoints.applyImportedTasks`: optional overrides for runtime/legacy MPP import flow
110
119
  - `endpoints.setBaseline`: optional override for baseline endpoint (runtime default: `/api/levels/{levelId}/{levelDataId}/schedule/baselines`)
111
120
  - `endpoints.exportTasks`: optional override for export endpoint (runtime default: `/api/levels/{levelId}/{levelDataId}/schedule/mpp`)
@@ -120,22 +129,23 @@ Use `mt-task-schedule-import-modal` to import `.mpp`/`.xer` files and apply task
120
129
  The modal is Tailwind-based and uses `@masterteam/components` (`mt-button`, `mt-entity-preview`).
121
130
  Imported rows support inline editing before apply (task name, planned/actual dates, assignee, progress) with per-row selection.
122
131
 
123
- ## Shell Component
124
-
125
- Use `mt-task-schedule-shell` as the package-level host that combines:
132
+ ## Shell Component
133
+
134
+ Use `mt-task-schedule-shell` as the package-level host that combines:
126
135
 
127
136
  - mode switcher
128
137
  - Set Baseline action (adapter `setBaseline`)
129
138
  - Import modal orchestration
130
139
  - Export tasks action (adapter `exportTasks`)
131
140
 
132
- Shell parity control inputs:
133
-
134
- - `allowEditMode`
135
- - `allowImport`
136
- - `allowSetBaseline`
137
- - `hasTasks`
138
- - `baselinePending`
141
+ Shell parity control fields also live on `context`:
142
+
143
+ - `modeOptions`
144
+ - `allowEditMode`
145
+ - `allowImport`
146
+ - `allowSetBaseline`
147
+ - `hasTasks`
148
+ - `baselinePending`
139
149
 
140
150
  Use one adapter service per selector/source if needed. The component does not use NGXS.
141
151