@masterteam/task-schedule
v0.0.31
Published
Backend-aware task-schedule package that renders **`@masterteam/gantt`** (`mt-gantt`). It is a thin wrapper: `@masterteam/gantt` owns all Gantt behavior (rendering, scheduling, WBS, baselines, critical path, resource view, columns, RTL/LTR, export, tas
Readme
@masterteam/task-schedule
Backend-aware task-schedule package that renders @masterteam/gantt
(mt-gantt). It is a thin wrapper: @masterteam/gantt owns all Gantt behavior
(rendering, scheduling, WBS, baselines, critical path, resource view, columns,
RTL/LTR, export, taskbar editing, row drag/drop, context menu); this package owns
backend fetch/mutation mapping, the schedule modes, the custom add/edit dialog,
the import drawer, and persisting edits.
Syncfusion Gantt has been fully removed. See
docs/task-schedule/masterteam-gantt-migration-architecture.mdanddocs/task-schedule/schedule-persistence-contract.md.
Public API
TaskSchedulecomponent (mt-task-schedule)TaskScheduleHeadercomponent (mt-task-schedule-header)TaskScheduleImportDialogcomponent (mt-task-schedule-import-dialog)TaskScheduleFetchService/TaskScheduleFetchDataAdapterTaskScheduleActionService/TaskScheduleActionDataAdapterTaskScheduleRequestErrorpreserves backenderrors.code/detailsTaskScheduleReadRequest,TaskScheduleProcessSubmitRequest, and their canonical module/operation/field typescreateTaskScheduleGanttConfig,taskScheduleNodeToActionRow,taskScheduleEditIntentFromRequest(gantt adapter helpers)TaskScheduleModelType,TaskScheduleContext,TASK_SCHEDULE_DEFAULT_PDF_FONT
Inputs
context: object with requiredlevelIdandlevelDataId.modelType:'default' | 'edit' | 'baseline' | 'criticalPath' | 'resources' | 'unscheduled' | 'phaseGate' | 'custom'(aliases accepted)langCode:'en' | 'ar'— flips gantt direction + labelsdateFormat(defaultdd/MM/yyyy),height(default760px)pdfFonts:{ regular?; arabic?; size? }— Arabic font embedded for direct Arabic PDF export (falls back toTASK_SCHEDULE_DEFAULT_PDF_FONT)allowImport,allowSetBaseline,hasTasks,baselinePending, MPP caps
Outputs
toolbarAction,actionBegin,actionCompleted,baselineSet,actionError,loaded,loadErrorscheduleEvent— the@masterteam/gantttyped event firehose (GanttEvent)taskChanged— cancelableGanttTaskChangeEvent(delete is vetoed + persisted)
Custom add/edit popup
Editing goes through the existing TaskScheduleDialog (ClientForm), not the
gantt built-in dialog. The wrapper listens to @masterteam/gantt's cancelable
editRequest event, vetoes the built-in dialog, and opens TaskScheduleDialog
with the correct mode/parentGuid (add-child uses the anchor guid; add-above/
below use the anchor's parent guid). Import stays the TaskScheduleImportDialog
drawer.
Fetch adapter (TaskScheduleFetchService)
load(modelType, context)importTasks(context, file)exportTasks(context)loadBaselineSnapshot(context, version?)
All mixed modes, including phase-gate mode, read through
POST /api/levels/{levelId}/{levelDataId}/schedule/read. The adapter maps
catalog.properties[].normalizedKey to the corresponding storage key in
record.values, including the backend calculation metadata
(plannedProgress, source/coverage values, and the three editability flags).
Action adapter (TaskScheduleActionService)
updateTask(context, taskId, payload)deleteTask(context, taskId, taskType?)updateBulkTasks(context, payload)updateParent(context, taskId, parentId)updateOrder(context, payload, taskType?)updateProgress(context, taskId, payload)applyImportedTasks(context, payload)setBaseline(context, payload?)
Usage
import { Component, signal } from '@angular/core';
import { TaskSchedule, TaskScheduleModelType } from '@masterteam/task-schedule';
@Component({
standalone: true,
imports: [TaskSchedule],
selector: 'app-task-schedule-host',
template: `
<mt-task-schedule
[context]="{
levelId: 12,
levelDataId: 18,
modelType: modelType(),
langCode: 'en'
}"
/>
`,
})
export class TaskScheduleHostComponent {
readonly modelType = signal<TaskScheduleModelType>('default');
}Backend routes used (unchanged by the migration):
- Schedule reads:
POST /api/levels/{levelId}/{levelDataId}/schedule/read - Baseline snapshot:
GET /api/levels/{levelId}/{levelDataId}/schedule/baselines/latest - Custom view columns:
GET /api/schedulemanager/{levelId}/schedule/{customViewId} - Mutations:
POST /api/process-submit(single-item create/update/delete/progress),PUT .../schedule/bulk-update(Gantt move/resize/reparent/dependency gestures),PUT .../schedule/reorder - Baseline snapshots:
POST .../schedule/baselines - Import/export:
GET/POST .../schedule/mpp
Backend-owned fields (isSummary, duration, planned progress, and baseline
fields) are removed from normal writes. Summary progress and dates are guarded
by isProgressEditable, arePlannedDatesEditable, and
areActualDatesEditable. The wrapper preserves backend summary values in the
Gantt and reloads the unified read snapshot after schedule mutations so the
central calculation pass remains authoritative. See the persistence contract
doc for the full table.
Peer dependency
@masterteam/gantt (workspace). No Syncfusion dependency remains.
