@acorex/modules 21.0.0-next.89 → 21.0.0-next.90
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/fesm2022/acorex-modules-common.mjs +9 -9
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs → acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs} +364 -237
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs.map +1 -0
- package/fesm2022/{acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs → acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs.map → acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs} +3 -3
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs.map → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs → acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs.map → acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs → acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs.map → acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs → acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs.map → acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs → acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs.map → acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs.map → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs → acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs.map → acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs.map} +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +1 -1
- package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs} +94 -41
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs.map +1 -0
- package/fesm2022/{acorex-modules-dashboard-management-index-gjCiELmH.mjs → acorex-modules-dashboard-management-index-rp9dgARq.mjs} +2 -2
- package/fesm2022/{acorex-modules-dashboard-management-index-gjCiELmH.mjs.map → acorex-modules-dashboard-management-index-rp9dgARq.mjs.map} +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs} +3 -3
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs.map → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +268 -351
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs} +42 -21
- package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs → acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs.map → acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs.map → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs.map → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs.map} +1 -1
- package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
- package/fesm2022/acorex-modules-platform-dev-tools.mjs +2 -2
- package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
- package/fesm2022/acorex-modules-project-management.mjs +707 -424
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-report-management.mjs +1 -1
- package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs +115 -0
- package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs.map +1 -0
- package/fesm2022/{acorex-modules-task-management-task-board.page-DTWxd_vG.mjs → acorex-modules-task-management-task-board.page-BMTjJlry.mjs} +3 -3
- package/fesm2022/{acorex-modules-task-management-task-board.page-DTWxd_vG.mjs.map → acorex-modules-task-management-task-board.page-BMTjJlry.mjs.map} +1 -1
- package/fesm2022/acorex-modules-task-management.mjs +433 -460
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs → acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs} +2 -2
- package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs.map +1 -0
- package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs} +2 -2
- package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs.map → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs.map} +1 -1
- package/fesm2022/acorex-modules-timesheet-management.mjs +8 -8
- package/fesm2022/acorex-modules-timesheet-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs +70 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs +70 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs +195 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management.mjs +139 -16
- package/fesm2022/acorex-modules-workplacesafety-management.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-modules-dashboard-management.d.ts +30 -11
- package/types/acorex-modules-document-management.d.ts +21 -5
- package/types/acorex-modules-human-capital-management.d.ts +4 -0
- package/types/acorex-modules-project-management.d.ts +46 -23
- package/types/acorex-modules-task-management.d.ts +80 -11
- package/types/acorex-modules-timesheet-management.d.ts +2 -2
- package/types/acorex-modules-workplacesafety-management.d.ts +7 -2
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs.map +0 -1
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs.map +0 -1
- package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs.map +0 -1
|
@@ -23,7 +23,7 @@ class AXMReportHoursByProjectQuery {
|
|
|
23
23
|
const first = items[0];
|
|
24
24
|
return {
|
|
25
25
|
projectId: key === '__none__' ? undefined : key,
|
|
26
|
-
projectName: first?.project?.
|
|
26
|
+
projectName: first?.project?.title,
|
|
27
27
|
totalSeconds: sumBy(items, (row) => row.durationSeconds ?? 0),
|
|
28
28
|
};
|
|
29
29
|
});
|
|
@@ -69,4 +69,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
69
69
|
}] });
|
|
70
70
|
|
|
71
71
|
export { AXMReportHoursByProjectQuery };
|
|
72
|
-
//# sourceMappingURL=acorex-modules-timesheet-management-report-hours-by-project.query-
|
|
72
|
+
//# sourceMappingURL=acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs.map
|
package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs","sources":["../../../../libs/modules/timesheet-management/src/lib/features/reporting/queries/report-hours-by-project.query.ts"],"sourcesContent":["import type { AXDataSourceFilterOption } from '@acorex/cdk/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPQuery } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { groupBy, sumBy } from 'lodash-es';\nimport { RootConfig } from '../../../contracts';\nimport type { AXMTimesheetManagementTimeEntryEntityModel } from '../../../entities/time-entry/time-entry.types';\n\n//#region ---- Types ----\n\nexport interface AXMReportHoursByProjectQueryInput {\n employeeId?: string;\n startDate: string;\n endDate: string;\n}\n\nexport interface AXMReportHoursByProjectRow {\n projectId?: string;\n projectName?: string;\n totalSeconds: number;\n}\n\nexport interface AXMReportHoursByProjectQueryResult {\n success: boolean;\n rows?: AXMReportHoursByProjectRow[];\n totalSeconds?: number;\n error?: string;\n}\n\n//#endregion\n\n/**\n * Aggregates logged hours by project for a date range.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMReportHoursByProjectQuery\n implements AXPQuery<AXMReportHoursByProjectQueryInput, AXMReportHoursByProjectQueryResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ---- Query Execution ----\n\n async fetch(input: AXMReportHoursByProjectQueryInput): Promise<AXMReportHoursByProjectQueryResult> {\n try {\n const entries = await this.loadEntries(input);\n const grouped = groupBy(entries, (row) => row.projectId ?? '__none__');\n\n const rows = Object.entries(grouped).map(([key, items]) => {\n const first = items[0];\n return {\n projectId: key === '__none__' ? undefined : key,\n projectName: first?.project?.title,\n totalSeconds: sumBy(items, (row) => row.durationSeconds ?? 0),\n };\n });\n\n return {\n success: true,\n rows,\n totalSeconds: sumBy(entries, (row) => row.durationSeconds ?? 0),\n };\n } catch (error) {\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to load hours by project report.',\n };\n }\n }\n\n //#endregion\n\n //#region ---- Private helpers ----\n\n private async loadEntries(input: AXMReportHoursByProjectQueryInput): Promise<AXMTimesheetManagementTimeEntryEntityModel[]> {\n const entryAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.timeEntry.name)\n .data<string, AXMTimesheetManagementTimeEntryEntityModel>();\n\n const filters: AXDataSourceFilterOption[] = [\n { field: 'entryDate', operator: { type: 'gte' }, value: input.startDate },\n { field: 'entryDate', operator: { type: 'lte' }, value: input.endDate },\n ];\n\n if (input.employeeId) {\n filters.unshift({ field: 'employeeId', operator: { type: 'equal' }, value: input.employeeId });\n }\n\n const result = await entryAccessor.query({\n skip: 0,\n take: 5000,\n filter: { logic: 'and', filters },\n });\n\n return result.items;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AA6BA;AAEA;;AAEG;MAEU,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,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ommand {
|
|
|
82
82
|
employeeId,
|
|
83
83
|
projectId: jiraIssue.projectId,
|
|
84
84
|
project: jiraIssue.project
|
|
85
|
-
? { id: jiraIssue.project.id,
|
|
85
|
+
? { id: jiraIssue.project.id, title: jiraIssue.project.name }
|
|
86
86
|
: undefined,
|
|
87
87
|
};
|
|
88
88
|
}
|
|
@@ -95,4 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
95
95
|
}] });
|
|
96
96
|
|
|
97
97
|
export { ResolveWorkItemFromJiraIssueCommand };
|
|
98
|
-
//# sourceMappingURL=acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-
|
|
98
|
+
//# sourceMappingURL=acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-
|
|
1
|
+
{"version":3,"file":"acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs","sources":["../../../../libs/modules/timesheet-management/src/lib/features/work-item/commands/resolve-work-item-from-jira-issue.command.ts"],"sourcesContent":["import { RootConfig as JiraRootConfig } from '@acorex/modules/jira-management';\nimport type { AXMJiraManagementJiraIssueEntityModel } from '@acorex/modules/jira-management';\nimport { createMultiLanguageString } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { first } from 'lodash-es';\nimport { RootConfig } from '../../../contracts';\nimport type {\n AXMTimesheetManagementWorkItemEntityModel,\n AXMTimesheetWorkItemSnapshot,\n} from '../../../entities/work-item/work-item.types';\n\n//#region ---- Types ----\n\nexport interface ResolveWorkItemFromJiraIssueInput {\n jiraIssueId: string;\n employeeId?: string;\n}\n\nexport interface ResolveWorkItemFromJiraIssueResult {\n workItemId: string;\n created: boolean;\n}\n\n//#endregion\n\n/**\n * Resolves a Jira issue into a timesheet work item, upserting by Jira issue reference.\n */\n@Injectable({ providedIn: 'root' })\nexport class ResolveWorkItemFromJiraIssueCommand\n implements AXPCommand<ResolveWorkItemFromJiraIssueInput, ResolveWorkItemFromJiraIssueResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(\n input: ResolveWorkItemFromJiraIssueInput,\n ): Promise<AXPExecuteCommandResult<ResolveWorkItemFromJiraIssueResult>> {\n try {\n const jiraIssueAccessor = this.entityService\n .withEntity(JiraRootConfig.module.name, JiraRootConfig.entities.jiraIssue.name)\n .data<string, AXMJiraManagementJiraIssueEntityModel>();\n\n const jiraIssue = await jiraIssueAccessor.byKey(input.jiraIssueId);\n if (!jiraIssue) {\n return { success: false, message: { text: 'Jira issue not found.' } };\n }\n\n const workItemAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workItem.name)\n .data<string, AXMTimesheetManagementWorkItemEntityModel>();\n\n const existingResult = await workItemAccessor.query({\n skip: 0,\n take: 1,\n filter: {\n field: 'sourceRef.jiraIssueId',\n operator: { type: 'equal' },\n value: jiraIssue.jiraIssueId,\n },\n });\n const existing = first(existingResult.items);\n const snapshot = this.buildSnapshot(jiraIssue);\n const payload = this.buildWorkItemPayload(jiraIssue, snapshot, input.employeeId);\n\n if (existing) {\n await workItemAccessor.update(existing.id, payload);\n return { success: true, data: { workItemId: existing.id, created: false } };\n }\n\n const workItemId = await workItemAccessor.create(payload);\n return { success: true, data: { workItemId: String(workItemId), created: true } };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to resolve work item from Jira issue.';\n console.error('[ResolveWorkItemFromJiraIssueCommand] Error:', error);\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Private helpers ----\n\n private buildSnapshot(jiraIssue: AXMJiraManagementJiraIssueEntityModel): AXMTimesheetWorkItemSnapshot {\n return {\n title: jiraIssue.summary,\n subtitle: jiraIssue.issueType?.name,\n projectKey: jiraIssue.project?.key,\n statusName: jiraIssue.workflowStatus?.name,\n capturedAt: new Date().toISOString(),\n };\n }\n\n private buildWorkItemPayload(\n jiraIssue: AXMJiraManagementJiraIssueEntityModel,\n snapshot: AXMTimesheetWorkItemSnapshot,\n employeeId?: string,\n ): Omit<AXMTimesheetManagementWorkItemEntityModel, 'id'> {\n return {\n code: jiraIssue.jiraIssueKey,\n title: createMultiLanguageString(jiraIssue.summary, jiraIssue.summary),\n sourceType: 'Jira',\n sourceRef: {\n system: 'jira',\n jiraInstanceId: jiraIssue.jiraInstanceId,\n jiraIssueId: jiraIssue.jiraIssueId,\n jiraIssueKey: jiraIssue.jiraIssueKey,\n },\n snapshot,\n isBillableDefault: true,\n isActive: true,\n employeeId,\n projectId: jiraIssue.projectId,\n project: jiraIssue.project\n ? { id: jiraIssue.project.id, title: jiraIssue.project.name }\n : undefined,\n };\n }\n\n //#endregion\n}\n"],"names":["JiraRootConfig","RootConfig"],"mappings":";;;;;;;;AA0BA;AAEA;;AAEG;MAEU,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AA2F1D,IAAA;;;IArFC,MAAM,OAAO,CACX,KAAwC,EAAA;AAExC,QAAA,IAAI;AACF,YAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC5B,iBAAA,UAAU,CAACA,UAAc,CAAC,MAAM,CAAC,IAAI,EAAEA,UAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI;AAC7E,iBAAA,IAAI,EAAiD;YAExD,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;YAClE,IAAI,CAAC,SAAS,EAAE;AACd,gBAAA,OAAO,EAAE,OAAO,E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E,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI;AAC3D,kBAAE,SAAS;SACd;IACH;8GA7FW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -347,7 +347,7 @@ async function factoryWorkItem() {
|
|
|
347
347
|
valueField: 'id',
|
|
348
348
|
expose: [
|
|
349
349
|
{ source: 'id', target: 'project.id' },
|
|
350
|
-
{ source: '
|
|
350
|
+
{ source: 'title', target: 'project.title' },
|
|
351
351
|
],
|
|
352
352
|
},
|
|
353
353
|
},
|
|
@@ -359,7 +359,7 @@ async function factoryWorkItem() {
|
|
|
359
359
|
{ name: 'title' },
|
|
360
360
|
{ name: 'sourceType' },
|
|
361
361
|
{ name: 'employeeId', options: { dataPath: 'employee.person.fullName' } },
|
|
362
|
-
{ name: 'projectId', options: { dataPath: 'project.
|
|
362
|
+
{ name: 'projectId', options: { dataPath: 'project.title' } },
|
|
363
363
|
{ name: 'isBillableDefault' },
|
|
364
364
|
{ name: 'isActive' },
|
|
365
365
|
],
|
|
@@ -820,7 +820,7 @@ async function factoryTimeEntry() {
|
|
|
820
820
|
valueField: 'id',
|
|
821
821
|
expose: [
|
|
822
822
|
{ source: 'id', target: 'project.id' },
|
|
823
|
-
{ source: '
|
|
823
|
+
{ source: 'title', target: 'project.title' },
|
|
824
824
|
],
|
|
825
825
|
},
|
|
826
826
|
},
|
|
@@ -911,7 +911,7 @@ async function factoryTimeEntry() {
|
|
|
911
911
|
{ name: 'employeeId', options: { dataPath: 'employee.person.fullName' } },
|
|
912
912
|
{ name: 'periodId', options: { dataPath: 'period.startDate' } },
|
|
913
913
|
{ name: 'workItemId', options: { dataPath: 'workItem.code' } },
|
|
914
|
-
{ name: 'projectId', options: { dataPath: 'project.
|
|
914
|
+
{ name: 'projectId', options: { dataPath: 'project.title' } },
|
|
915
915
|
{ name: 'entryDate' },
|
|
916
916
|
{ name: 'durationSeconds' },
|
|
917
917
|
{ name: 'isBillable' },
|
|
@@ -2070,7 +2070,7 @@ class AXMTimesheetManagementModule {
|
|
|
2070
2070
|
provideCommandSetups([
|
|
2071
2071
|
{
|
|
2072
2072
|
key: AXMTimesheetManagementCommandKeys.WorkItemResolveFromJira,
|
|
2073
|
-
command: () => import('./acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-
|
|
2073
|
+
command: () => import('./acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs').then((c) => c.ResolveWorkItemFromJiraIssueCommand),
|
|
2074
2074
|
},
|
|
2075
2075
|
{
|
|
2076
2076
|
key: AXMTimesheetManagementCommandKeys.TimeEntryCreate,
|
|
@@ -2124,7 +2124,7 @@ class AXMTimesheetManagementModule {
|
|
|
2124
2124
|
},
|
|
2125
2125
|
{
|
|
2126
2126
|
key: 'TimesheetManagement:ReportHoursByProject',
|
|
2127
|
-
loader: () => import('./acorex-modules-timesheet-management-report-hours-by-project.query-
|
|
2127
|
+
loader: () => import('./acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs').then((c) => c.AXMReportHoursByProjectQuery),
|
|
2128
2128
|
},
|
|
2129
2129
|
{
|
|
2130
2130
|
key: 'TimesheetManagement:ReportHoursByWorkItem',
|
|
@@ -2202,7 +2202,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2202
2202
|
provideCommandSetups([
|
|
2203
2203
|
{
|
|
2204
2204
|
key: AXMTimesheetManagementCommandKeys.WorkItemResolveFromJira,
|
|
2205
|
-
command: () => import('./acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-
|
|
2205
|
+
command: () => import('./acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs').then((c) => c.ResolveWorkItemFromJiraIssueCommand),
|
|
2206
2206
|
},
|
|
2207
2207
|
{
|
|
2208
2208
|
key: AXMTimesheetManagementCommandKeys.TimeEntryCreate,
|
|
@@ -2256,7 +2256,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2256
2256
|
},
|
|
2257
2257
|
{
|
|
2258
2258
|
key: 'TimesheetManagement:ReportHoursByProject',
|
|
2259
|
-
loader: () => import('./acorex-modules-timesheet-management-report-hours-by-project.query-
|
|
2259
|
+
loader: () => import('./acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs').then((c) => c.AXMReportHoursByProjectQuery),
|
|
2260
2260
|
},
|
|
2261
2261
|
{
|
|
2262
2262
|
key: 'TimesheetManagement:ReportHoursByWorkItem',
|