@platform-modules/civil-aviation-authority 2.3.273 → 2.3.277
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/.env +7 -1
- package/dist/data-source.js +124 -0
- package/dist/i18n/workflow-chat-i18n.d.ts +40 -0
- package/dist/i18n/workflow-chat-i18n.js +140 -0
- package/dist/i18n/workflow-chat-i18n.json +78 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/models/CancellationChatModel.d.ts +2 -0
- package/dist/models/CancellationChatModel.js +8 -0
- package/dist/models/CancellationWorkflowModel.d.ts +2 -0
- package/dist/models/CancellationWorkflowModel.js +8 -0
- package/dist/models/CityMasterModel.d.ts +1 -0
- package/dist/models/CityMasterModel.js +4 -0
- package/dist/models/DepartmentsModel.d.ts +1 -0
- package/dist/models/DepartmentsModel.js +4 -0
- package/dist/models/GroupNamesModel.d.ts +1 -0
- package/dist/models/GroupNamesModel.js +4 -0
- package/dist/models/LocationModel.d.ts +1 -0
- package/dist/models/LocationModel.js +4 -0
- package/dist/models/SectionModel.d.ts +1 -0
- package/dist/models/SectionModel.js +4 -0
- package/package.json +3 -3
- package/sql/add_cancellation_workflow_chat_arabic_columns.sql +10 -0
- package/src/data-source.ts +125 -0
- package/src/i18n/workflow-chat-i18n.json +78 -0
- package/src/i18n/workflow-chat-i18n.ts +169 -0
- package/src/index.ts +11 -1
- package/src/models/CancellationChatModel.ts +6 -0
- package/src/models/CancellationWorkflowModel.ts +6 -0
- package/src/models/CityMasterModel.ts +3 -0
- package/src/models/DepartmentsModel.ts +3 -0
- package/src/models/GroupNamesModel.ts +3 -0
- package/src/models/LocationModel.ts +3 -0
- package/src/models/SectionModel.ts +3 -0
- package/tsconfig.json +1 -0
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -255,6 +255,68 @@ const SlaMyRequestsViewModel_1 = require("./models/SlaMyRequestsViewModel");
|
|
|
255
255
|
const SlaApprovalsViewModel_1 = require("./models/SlaApprovalsViewModel");
|
|
256
256
|
const ServiceSlaApprovalModel_1 = require("./models/ServiceSlaApprovalModel");
|
|
257
257
|
const SlaConfigModel_1 = require("./models/SlaConfigModel");
|
|
258
|
+
const CSRMBusinessImpactRatingMasterModel_1 = require("./models/CSRMBusinessImpactRatingMasterModel");
|
|
259
|
+
const CSRMLikelihoodMasterModel_1 = require("./models/CSRMLikelihoodMasterModel");
|
|
260
|
+
const LocationModel_1 = require("./models/LocationModel");
|
|
261
|
+
const NationalityMasterModel_1 = require("./models/NationalityMasterModel");
|
|
262
|
+
const PerformanceGoalMasterModel_1 = require("./models/PerformanceGoalMasterModel");
|
|
263
|
+
const FinancialGradeModel_1 = require("./models/FinancialGradeModel");
|
|
264
|
+
const CAIRatingMasterModel_1 = require("./models/CAIRatingMasterModel");
|
|
265
|
+
const PerformanceCyclePeriodModel_1 = require("./models/PerformanceCyclePeriodModel");
|
|
266
|
+
const AppealAgainstAdministrativeDecisionRequestModel_1 = require("./models/AppealAgainstAdministrativeDecisionRequestModel");
|
|
267
|
+
const ComplaintLostPropertyReportApprovalModel_1 = require("./models/ComplaintLostPropertyReportApprovalModel");
|
|
268
|
+
const ComplaintLostPropertyReportAttachmentModel_1 = require("./models/ComplaintLostPropertyReportAttachmentModel");
|
|
269
|
+
const ComplaintLostPropertyReportChatModel_1 = require("./models/ComplaintLostPropertyReportChatModel");
|
|
270
|
+
const ComplaintLostPropertyReportRequestModel_1 = require("./models/ComplaintLostPropertyReportRequestModel");
|
|
271
|
+
const ComplaintLostPropertyReportWorkflowModel_1 = require("./models/ComplaintLostPropertyReportWorkflowModel");
|
|
272
|
+
const ContractServiceRequestModel_1 = require("./models/ContractServiceRequestModel");
|
|
273
|
+
const CountryMasterModel_1 = require("./models/CountryMasterModel");
|
|
274
|
+
const CyberSecurityAuditRequestModel_1 = require("./models/CyberSecurityAuditRequestModel");
|
|
275
|
+
const CyberSecurityRiskManagementRequestModel_1 = require("./models/CyberSecurityRiskManagementRequestModel");
|
|
276
|
+
const CyberSecurityRiskManagementRiskModel_1 = require("./models/CyberSecurityRiskManagementRiskModel");
|
|
277
|
+
const EmployeeSecurityDriveMasterModel_1 = require("./models/EmployeeSecurityDriveMasterModel");
|
|
278
|
+
const EmployeeSecurityDriveModel_1 = require("./models/EmployeeSecurityDriveModel");
|
|
279
|
+
const EmployeeSecurityDriveOwnerModel_1 = require("./models/EmployeeSecurityDriveOwnerModel");
|
|
280
|
+
const EmployeeSecurityFileAccessModel_1 = require("./models/EmployeeSecurityFileAccessModel");
|
|
281
|
+
const EmployeeSecurityFileAuditLogModel_1 = require("./models/EmployeeSecurityFileAuditLogModel");
|
|
282
|
+
const EmployeeSecurityFileModel_1 = require("./models/EmployeeSecurityFileModel");
|
|
283
|
+
const EmployeeSecurityFileTypeModel_1 = require("./models/EmployeeSecurityFileTypeModel");
|
|
284
|
+
const EmployeeSecurityFileVersionModel_1 = require("./models/EmployeeSecurityFileVersionModel");
|
|
285
|
+
const EmployeeSecurityFolderModel_1 = require("./models/EmployeeSecurityFolderModel");
|
|
286
|
+
const HousingContractCancelApprovalModel_1 = require("./models/HousingContractCancelApprovalModel");
|
|
287
|
+
const HousingContractCancelAttachmentModel_1 = require("./models/HousingContractCancelAttachmentModel");
|
|
288
|
+
const HousingContractCancelChatModel_1 = require("./models/HousingContractCancelChatModel");
|
|
289
|
+
const HousingContractCancelRequestModel_1 = require("./models/HousingContractCancelRequestModel");
|
|
290
|
+
const HousingContractCancelWorkflowModel_1 = require("./models/HousingContractCancelWorkflowModel");
|
|
291
|
+
const HousingContractRenewalApprovalModel_1 = require("./models/HousingContractRenewalApprovalModel");
|
|
292
|
+
const HousingContractRenewalAttachmentModel_1 = require("./models/HousingContractRenewalAttachmentModel");
|
|
293
|
+
const HousingContractRenewalChatModel_1 = require("./models/HousingContractRenewalChatModel");
|
|
294
|
+
const HousingContractRenewalRequestModel_1 = require("./models/HousingContractRenewalRequestModel");
|
|
295
|
+
const HousingContractRenewalWorkflowModel_1 = require("./models/HousingContractRenewalWorkflowModel");
|
|
296
|
+
const HumanResourceAnnualPlanningRequestModel_1 = require("./models/HumanResourceAnnualPlanningRequestModel");
|
|
297
|
+
const HumanResourceAnnualPlanningTaskModel_1 = require("./models/HumanResourceAnnualPlanningTaskModel");
|
|
298
|
+
const InformationSecurityApprovalModel_1 = require("./models/InformationSecurityApprovalModel");
|
|
299
|
+
const InformationSecurityAttachmentModel_1 = require("./models/InformationSecurityAttachmentModel");
|
|
300
|
+
const InformationSecurityChatModel_1 = require("./models/InformationSecurityChatModel");
|
|
301
|
+
const InformationSecurityWorkflowModel_1 = require("./models/InformationSecurityWorkflowModel");
|
|
302
|
+
const JobTransferRequestModel_1 = require("./models/JobTransferRequestModel");
|
|
303
|
+
const LegalContractReviewApprovalModel_1 = require("./models/LegalContractReviewApprovalModel");
|
|
304
|
+
const LegalContractReviewAttachmentModel_1 = require("./models/LegalContractReviewAttachmentModel");
|
|
305
|
+
const LegalContractReviewChatModel_1 = require("./models/LegalContractReviewChatModel");
|
|
306
|
+
const LegalContractReviewRequestModel_1 = require("./models/LegalContractReviewRequestModel");
|
|
307
|
+
const LegalContractReviewWorkflowModel_1 = require("./models/LegalContractReviewWorkflowModel");
|
|
308
|
+
// import { MissionTravelPassportExpiryNotificationConfig } from './models/MissionTravelPassportExpiryNotificationConfigModel';
|
|
309
|
+
const NewResourceRequestModel_1 = require("./models/NewResourceRequestModel");
|
|
310
|
+
const PerformanceManagementRequestGoalModel_1 = require("./models/PerformanceManagementRequestGoalModel");
|
|
311
|
+
const PerformanceManagementRequestModel_1 = require("./models/PerformanceManagementRequestModel");
|
|
312
|
+
const RequestForProjectApprovalModel_1 = require("./models/RequestForProjectApprovalModel");
|
|
313
|
+
const RequestForVaptRequestModel_1 = require("./models/RequestForVaptRequestModel");
|
|
314
|
+
const ServicesNotificationConfigModel_1 = require("./models/ServicesNotificationConfigModel");
|
|
315
|
+
const ServiceTransferRequestModel_1 = require("./models/ServiceTransferRequestModel");
|
|
316
|
+
const ShiftAllowanceRequestModel_1 = require("./models/ShiftAllowanceRequestModel");
|
|
317
|
+
const TemporaryAssignmentRequestModel_1 = require("./models/TemporaryAssignmentRequestModel");
|
|
318
|
+
const TrainingRoomNotificationConfigModel_1 = require("./models/TrainingRoomNotificationConfigModel");
|
|
319
|
+
const UserSkillModel_1 = require("./models/UserSkillModel");
|
|
258
320
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
259
321
|
type: 'postgres',
|
|
260
322
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -514,5 +576,67 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
514
576
|
SlaApprovalsViewModel_1.SlaApprovalsView,
|
|
515
577
|
ServiceSlaApprovalModel_1.ServiceSlaApproval,
|
|
516
578
|
SlaConfigModel_1.SlaConfig,
|
|
579
|
+
CSRMBusinessImpactRatingMasterModel_1.CSRMBusinessImpactRatingMaster,
|
|
580
|
+
CSRMLikelihoodMasterModel_1.CSRMLikelihoodMaster,
|
|
581
|
+
LocationModel_1.Location,
|
|
582
|
+
NationalityMasterModel_1.NationalityMaster,
|
|
583
|
+
PerformanceGoalMasterModel_1.PerformanceGoalMaster,
|
|
584
|
+
FinancialGradeModel_1.FinancialGrade,
|
|
585
|
+
CAIRatingMasterModel_1.CAIRatingMaster,
|
|
586
|
+
PerformanceCyclePeriodModel_1.PerformanceCyclePeriod,
|
|
587
|
+
AppealAgainstAdministrativeDecisionRequestModel_1.AppealAgainstAdministrativeDecisionRequest,
|
|
588
|
+
ComplaintLostPropertyReportApprovalModel_1.ComplaintLostPropertyReportApproval,
|
|
589
|
+
ComplaintLostPropertyReportAttachmentModel_1.ComplaintLostPropertyReportAttachment,
|
|
590
|
+
ComplaintLostPropertyReportChatModel_1.ComplaintLostPropertyReportChat,
|
|
591
|
+
ComplaintLostPropertyReportRequestModel_1.ComplaintLostPropertyReportRequest,
|
|
592
|
+
ComplaintLostPropertyReportWorkflowModel_1.ComplaintLostPropertyReportWorkflow,
|
|
593
|
+
ContractServiceRequestModel_1.ContractServiceRequest,
|
|
594
|
+
CountryMasterModel_1.CountryMaster,
|
|
595
|
+
CyberSecurityAuditRequestModel_1.CyberSecurityAuditRequest,
|
|
596
|
+
CyberSecurityRiskManagementRequestModel_1.CyberSecurityRiskManagementRequest,
|
|
597
|
+
CyberSecurityRiskManagementRiskModel_1.CyberSecurityRiskManagementRisk,
|
|
598
|
+
EmployeeSecurityDriveMasterModel_1.EmployeeSecurityDriveMaster,
|
|
599
|
+
EmployeeSecurityDriveModel_1.EmployeeSecurityDrive,
|
|
600
|
+
EmployeeSecurityDriveOwnerModel_1.EmployeeSecurityDriveOwner,
|
|
601
|
+
EmployeeSecurityFileAccessModel_1.EmployeeSecurityFileAccess,
|
|
602
|
+
EmployeeSecurityFileAuditLogModel_1.EmployeeSecurityFileAuditLog,
|
|
603
|
+
EmployeeSecurityFileModel_1.EmployeeSecurityFile,
|
|
604
|
+
EmployeeSecurityFileTypeModel_1.EmployeeSecurityFileType,
|
|
605
|
+
EmployeeSecurityFileVersionModel_1.EmployeeSecurityFileVersion,
|
|
606
|
+
EmployeeSecurityFolderModel_1.EmployeeSecurityFolder,
|
|
607
|
+
HousingContractCancelApprovalModel_1.HousingContractCancelApproval,
|
|
608
|
+
HousingContractCancelAttachmentModel_1.HousingContractCancelAttachment,
|
|
609
|
+
HousingContractCancelChatModel_1.HousingContractCancelChat,
|
|
610
|
+
HousingContractCancelRequestModel_1.HousingContractCancelRequest,
|
|
611
|
+
HousingContractCancelWorkflowModel_1.HousingContractCancelWorkflow,
|
|
612
|
+
HousingContractRenewalApprovalModel_1.HousingContractRenewalApproval,
|
|
613
|
+
HousingContractRenewalAttachmentModel_1.HousingContractRenewalAttachment,
|
|
614
|
+
HousingContractRenewalChatModel_1.HousingContractRenewalChat,
|
|
615
|
+
HousingContractRenewalRequestModel_1.HousingContractRenewalRequest,
|
|
616
|
+
HousingContractRenewalWorkflowModel_1.HousingContractRenewalWorkflow,
|
|
617
|
+
HumanResourceAnnualPlanningRequestModel_1.HumanResourceAnnualPlanningRequest,
|
|
618
|
+
HumanResourceAnnualPlanningTaskModel_1.HumanResourceAnnualPlanningTask,
|
|
619
|
+
InformationSecurityApprovalModel_1.InformationSecurityApprovalDetails,
|
|
620
|
+
InformationSecurityAttachmentModel_1.InformationSecurityRequestAttachment,
|
|
621
|
+
InformationSecurityChatModel_1.InformationSecurityRequestChat,
|
|
622
|
+
InformationSecurityWorkflowModel_1.InformationSecurityWorkFlow,
|
|
623
|
+
JobTransferRequestModel_1.JobTransferRequest,
|
|
624
|
+
LegalContractReviewApprovalModel_1.LegalContractReviewApproval,
|
|
625
|
+
LegalContractReviewAttachmentModel_1.LegalContractReviewRequestAttachment,
|
|
626
|
+
LegalContractReviewChatModel_1.LegalContractReviewRequestChat,
|
|
627
|
+
LegalContractReviewRequestModel_1.LegalContractReviewRequest,
|
|
628
|
+
LegalContractReviewWorkflowModel_1.LegalContractReviewWorkFlow,
|
|
629
|
+
// MissionTravelPassportExpiryNotificationConfig,
|
|
630
|
+
NewResourceRequestModel_1.NewResourceRequest,
|
|
631
|
+
PerformanceManagementRequestGoalModel_1.PerformanceManagementRequestGoal,
|
|
632
|
+
PerformanceManagementRequestModel_1.PerformanceManagementRequest,
|
|
633
|
+
RequestForProjectApprovalModel_1.RequestForProjectApproval,
|
|
634
|
+
RequestForVaptRequestModel_1.RequestForVaptRequest,
|
|
635
|
+
ServicesNotificationConfigModel_1.ServicesNotificationConfigs,
|
|
636
|
+
ServiceTransferRequestModel_1.ServiceTransferRequest,
|
|
637
|
+
ShiftAllowanceRequestModel_1.ShiftAllowanceRequest,
|
|
638
|
+
TemporaryAssignmentRequestModel_1.TemporaryAssignmentRequest,
|
|
639
|
+
TrainingRoomNotificationConfigModel_1.TrainingRoomNotificationConfig,
|
|
640
|
+
UserSkillModel_1.UserSkill
|
|
517
641
|
],
|
|
518
642
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type BilingualText = {
|
|
2
|
+
en: string;
|
|
3
|
+
ar: string;
|
|
4
|
+
};
|
|
5
|
+
type WorkflowChatI18nCatalog = {
|
|
6
|
+
workflowTemplates: Record<string, BilingualText>;
|
|
7
|
+
chatTemplates: Record<string, BilingualText>;
|
|
8
|
+
workflowStatusLabels: Record<string, string>;
|
|
9
|
+
chatStatusLabels: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
/** Read-only view of the shared workflow/chat translation catalog. */
|
|
12
|
+
export declare function getWorkflowChatI18nCatalog(): WorkflowChatI18nCatalog;
|
|
13
|
+
export declare function buildBilingualFromTemplate(templateCatalog: Record<string, BilingualText>, key: string, params?: Record<string, string>): BilingualText;
|
|
14
|
+
export declare function workflowTemplate(key: string, params?: Record<string, string>): BilingualText;
|
|
15
|
+
export declare function chatTemplate(key: string, params?: Record<string, string>): BilingualText;
|
|
16
|
+
export declare function resolveWorkflowStatusAr(status: string | null | undefined): string | null;
|
|
17
|
+
export declare function resolveChatStatusAr(status: string | null | undefined): string | null;
|
|
18
|
+
export declare function pickLocalizedName(englishName?: string | null, arabicName?: string | null, fallback?: string): string;
|
|
19
|
+
export declare function buildApprovalWorkflowContent(params: {
|
|
20
|
+
status: 'Approved' | 'Rejected' | 'Pending' | string;
|
|
21
|
+
roleName?: string | null;
|
|
22
|
+
roleArabicName?: string | null;
|
|
23
|
+
comment?: string | null;
|
|
24
|
+
}): BilingualText;
|
|
25
|
+
export declare function buildHumanApprovalWorkflowContent(params: {
|
|
26
|
+
isFirst: boolean;
|
|
27
|
+
roleName?: string | null;
|
|
28
|
+
roleArabicName?: string | null;
|
|
29
|
+
deptSectionEn?: string | null;
|
|
30
|
+
deptSectionAr?: string | null;
|
|
31
|
+
}): BilingualText;
|
|
32
|
+
export declare function buildApprovalChatMessage(params: {
|
|
33
|
+
status: 'Approved' | 'Rejected' | string;
|
|
34
|
+
roleName?: string | null;
|
|
35
|
+
roleArabicName?: string | null;
|
|
36
|
+
comment?: string | null;
|
|
37
|
+
}): BilingualText;
|
|
38
|
+
export declare function enrichCancellationWorkflowLog(log: Record<string, unknown>): Record<string, unknown>;
|
|
39
|
+
export declare function enrichCancellationChatMessage(chat: Record<string, unknown>): Record<string, unknown>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getWorkflowChatI18nCatalog = getWorkflowChatI18nCatalog;
|
|
7
|
+
exports.buildBilingualFromTemplate = buildBilingualFromTemplate;
|
|
8
|
+
exports.workflowTemplate = workflowTemplate;
|
|
9
|
+
exports.chatTemplate = chatTemplate;
|
|
10
|
+
exports.resolveWorkflowStatusAr = resolveWorkflowStatusAr;
|
|
11
|
+
exports.resolveChatStatusAr = resolveChatStatusAr;
|
|
12
|
+
exports.pickLocalizedName = pickLocalizedName;
|
|
13
|
+
exports.buildApprovalWorkflowContent = buildApprovalWorkflowContent;
|
|
14
|
+
exports.buildHumanApprovalWorkflowContent = buildHumanApprovalWorkflowContent;
|
|
15
|
+
exports.buildApprovalChatMessage = buildApprovalChatMessage;
|
|
16
|
+
exports.enrichCancellationWorkflowLog = enrichCancellationWorkflowLog;
|
|
17
|
+
exports.enrichCancellationChatMessage = enrichCancellationChatMessage;
|
|
18
|
+
const workflow_chat_i18n_json_1 = __importDefault(require("./workflow-chat-i18n.json"));
|
|
19
|
+
const WORKFLOW_TEMPLATES = workflow_chat_i18n_json_1.default.workflowTemplates;
|
|
20
|
+
const CHAT_TEMPLATES = workflow_chat_i18n_json_1.default.chatTemplates;
|
|
21
|
+
const WORKFLOW_STATUS_LABELS = workflow_chat_i18n_json_1.default.workflowStatusLabels;
|
|
22
|
+
const CHAT_STATUS_LABELS = workflow_chat_i18n_json_1.default.chatStatusLabels;
|
|
23
|
+
/** Read-only view of the shared workflow/chat translation catalog. */
|
|
24
|
+
function getWorkflowChatI18nCatalog() {
|
|
25
|
+
return workflow_chat_i18n_json_1.default;
|
|
26
|
+
}
|
|
27
|
+
function interpolate(template, params = {}) {
|
|
28
|
+
return template.replace(/\{\{(\w+)\}\}/g, (_, key) => params[key] ?? '');
|
|
29
|
+
}
|
|
30
|
+
function buildBilingualFromTemplate(templateCatalog, key, params = {}) {
|
|
31
|
+
const tpl = templateCatalog[key];
|
|
32
|
+
if (!tpl) {
|
|
33
|
+
return { en: key, ar: key };
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
en: interpolate(tpl.en, params),
|
|
37
|
+
ar: interpolate(tpl.ar, params),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function workflowTemplate(key, params = {}) {
|
|
41
|
+
return buildBilingualFromTemplate(WORKFLOW_TEMPLATES, key, params);
|
|
42
|
+
}
|
|
43
|
+
function chatTemplate(key, params = {}) {
|
|
44
|
+
return buildBilingualFromTemplate(CHAT_TEMPLATES, key, params);
|
|
45
|
+
}
|
|
46
|
+
function resolveWorkflowStatusAr(status) {
|
|
47
|
+
if (status == null || status === '')
|
|
48
|
+
return null;
|
|
49
|
+
return WORKFLOW_STATUS_LABELS[status] ?? status;
|
|
50
|
+
}
|
|
51
|
+
function resolveChatStatusAr(status) {
|
|
52
|
+
if (status == null || status === '')
|
|
53
|
+
return null;
|
|
54
|
+
return CHAT_STATUS_LABELS[status] ?? status;
|
|
55
|
+
}
|
|
56
|
+
function pickLocalizedName(englishName, arabicName, fallback = '') {
|
|
57
|
+
const ar = arabicName?.trim();
|
|
58
|
+
if (ar)
|
|
59
|
+
return ar;
|
|
60
|
+
const en = englishName?.trim();
|
|
61
|
+
if (en)
|
|
62
|
+
return en;
|
|
63
|
+
return fallback;
|
|
64
|
+
}
|
|
65
|
+
function buildApprovalWorkflowContent(params) {
|
|
66
|
+
const nameEn = params.roleName?.trim() || '';
|
|
67
|
+
const nameAr = pickLocalizedName(params.roleName, params.roleArabicName, nameEn || 'Unknown');
|
|
68
|
+
let base;
|
|
69
|
+
if (params.status === 'Approved') {
|
|
70
|
+
base = nameEn
|
|
71
|
+
? workflowTemplate('request_approved_by', { name: nameEn })
|
|
72
|
+
: workflowTemplate('request_approved');
|
|
73
|
+
if (nameEn) {
|
|
74
|
+
base.ar = workflowTemplate('request_approved_by', { name: nameAr }).ar;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (params.status === 'Rejected') {
|
|
78
|
+
base = nameEn
|
|
79
|
+
? workflowTemplate('request_rejected_by', { name: nameEn })
|
|
80
|
+
: workflowTemplate('request_rejected');
|
|
81
|
+
if (nameEn) {
|
|
82
|
+
base.ar = workflowTemplate('request_rejected_by', { name: nameAr }).ar;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
base = nameEn
|
|
87
|
+
? workflowTemplate('request_approval_pending_from', { name: nameEn })
|
|
88
|
+
: workflowTemplate('request_approval_pending');
|
|
89
|
+
if (nameEn) {
|
|
90
|
+
base.ar = workflowTemplate('request_approval_pending_from', { name: nameAr }).ar;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const comment = params.comment?.trim();
|
|
94
|
+
if (!comment)
|
|
95
|
+
return base;
|
|
96
|
+
return {
|
|
97
|
+
en: `${base.en}: ${comment}`,
|
|
98
|
+
ar: `${base.ar}: ${comment}`,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function buildHumanApprovalWorkflowContent(params) {
|
|
102
|
+
const nameEn = params.roleName?.trim() || params.deptSectionEn?.trim() || '';
|
|
103
|
+
const nameAr = params.roleName
|
|
104
|
+
? pickLocalizedName(params.roleName, params.roleArabicName, nameEn)
|
|
105
|
+
: params.deptSectionAr?.trim() || params.deptSectionEn?.trim() || nameEn;
|
|
106
|
+
if (nameEn) {
|
|
107
|
+
const key = params.isFirst ? 'request_approval_in_progress_from' : 'request_approval_pending_from';
|
|
108
|
+
return {
|
|
109
|
+
en: workflowTemplate(key, { name: nameEn }).en,
|
|
110
|
+
ar: workflowTemplate(key, { name: nameAr || nameEn }).ar,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return params.isFirst
|
|
114
|
+
? workflowTemplate('request_approval_in_progress')
|
|
115
|
+
: workflowTemplate('request_approval_pending');
|
|
116
|
+
}
|
|
117
|
+
function buildApprovalChatMessage(params) {
|
|
118
|
+
const roleEn = params.roleName?.trim() || 'Unknown Role';
|
|
119
|
+
const roleAr = pickLocalizedName(params.roleName, params.roleArabicName, roleEn);
|
|
120
|
+
const commentSuffix = params.comment?.trim() ? ` - ${params.comment.trim()}` : '';
|
|
121
|
+
const key = params.status === 'Approved' ? 'request_approved_by_role' : 'request_rejected_by_role';
|
|
122
|
+
return {
|
|
123
|
+
en: chatTemplate(key, { roleName: roleEn, comment: commentSuffix }).en,
|
|
124
|
+
ar: chatTemplate(key, { roleName: roleAr, comment: commentSuffix }).ar,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function enrichCancellationWorkflowLog(log) {
|
|
128
|
+
const status = log.status != null ? String(log.status) : null;
|
|
129
|
+
return {
|
|
130
|
+
...log,
|
|
131
|
+
status_ar: log.status_ar ?? resolveWorkflowStatusAr(status),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function enrichCancellationChatMessage(chat) {
|
|
135
|
+
const status = chat.status != null ? String(chat.status) : null;
|
|
136
|
+
return {
|
|
137
|
+
...chat,
|
|
138
|
+
status_ar: chat.status_ar ?? resolveChatStatusAr(status),
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowTemplates": {
|
|
3
|
+
"request_submitted": {
|
|
4
|
+
"en": "Request Submitted",
|
|
5
|
+
"ar": "تم تقديم الطلب"
|
|
6
|
+
},
|
|
7
|
+
"notification_sent_pending": {
|
|
8
|
+
"en": "Notification sent Pending",
|
|
9
|
+
"ar": "في انتظار إرسال الإشعار"
|
|
10
|
+
},
|
|
11
|
+
"notification_sent_successfully": {
|
|
12
|
+
"en": "Notification sent successfully",
|
|
13
|
+
"ar": "تم إرسال الإشعار بنجاح"
|
|
14
|
+
},
|
|
15
|
+
"request_approval_in_progress": {
|
|
16
|
+
"en": "Request Approval In Progress",
|
|
17
|
+
"ar": "الموافقة على الطلب قيد التنفيذ"
|
|
18
|
+
},
|
|
19
|
+
"request_approval_pending": {
|
|
20
|
+
"en": "Request Approval Pending",
|
|
21
|
+
"ar": "في انتظار الموافقة على الطلب"
|
|
22
|
+
},
|
|
23
|
+
"request_approval_in_progress_from": {
|
|
24
|
+
"en": "Request Approval In Progress from {{name}}",
|
|
25
|
+
"ar": "الموافقة على الطلب قيد التنفيذ من {{name}}"
|
|
26
|
+
},
|
|
27
|
+
"request_approval_pending_from": {
|
|
28
|
+
"en": "Request Approval Pending from {{name}}",
|
|
29
|
+
"ar": "في انتظار موافقة {{name}}"
|
|
30
|
+
},
|
|
31
|
+
"request_approved_by": {
|
|
32
|
+
"en": "Request Approved by {{name}}",
|
|
33
|
+
"ar": "تمت الموافقة على الطلب من قبل {{name}}"
|
|
34
|
+
},
|
|
35
|
+
"request_rejected_by": {
|
|
36
|
+
"en": "Request Rejected by {{name}}",
|
|
37
|
+
"ar": "تم رفض الطلب من قبل {{name}}"
|
|
38
|
+
},
|
|
39
|
+
"request_approved": {
|
|
40
|
+
"en": "Request Approved",
|
|
41
|
+
"ar": "تمت الموافقة على الطلب"
|
|
42
|
+
},
|
|
43
|
+
"request_rejected": {
|
|
44
|
+
"en": "Request Rejected",
|
|
45
|
+
"ar": "تم رفض الطلب"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"chatTemplates": {
|
|
49
|
+
"cancellation_submitted_by": {
|
|
50
|
+
"en": "Cancellation request submitted by {{userName}} ({{employeeId}})",
|
|
51
|
+
"ar": "تم تقديم طلب الإلغاء بواسطة {{userName}} ({{employeeId}})"
|
|
52
|
+
},
|
|
53
|
+
"request_received": {
|
|
54
|
+
"en": "Request Received",
|
|
55
|
+
"ar": "تم استلام الطلب"
|
|
56
|
+
},
|
|
57
|
+
"request_approved_by_role": {
|
|
58
|
+
"en": "Request Approved by: {{roleName}}{{comment}}",
|
|
59
|
+
"ar": "تمت الموافقة على الطلب من قبل: {{roleName}}{{comment}}"
|
|
60
|
+
},
|
|
61
|
+
"request_rejected_by_role": {
|
|
62
|
+
"en": "Request Rejected by: {{roleName}}{{comment}}",
|
|
63
|
+
"ar": "تم رفض الطلب من قبل: {{roleName}}{{comment}}"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"workflowStatusLabels": {
|
|
67
|
+
"Completed": "مكتمل",
|
|
68
|
+
"Pending": "قيد الانتظار",
|
|
69
|
+
"Not Yet Started": "لم يبدأ بعد"
|
|
70
|
+
},
|
|
71
|
+
"chatStatusLabels": {
|
|
72
|
+
"Submitted": "تم التقديم",
|
|
73
|
+
"Received": "تم الاستلام",
|
|
74
|
+
"Approved": "موافق عليه",
|
|
75
|
+
"Rejected": "مرفوض",
|
|
76
|
+
"Pending": "قيد الانتظار"
|
|
77
|
+
}
|
|
78
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ export * from './models/ITHelpDeskModel';
|
|
|
5
5
|
export * from './models/ServiceTypeModel';
|
|
6
6
|
export * from './models/CAAServices';
|
|
7
7
|
export * from './models/CAASubServices';
|
|
8
|
+
export * from './models/CSRMBusinessImpactRatingMasterModel';
|
|
9
|
+
export * from './models/CSRMLikelihoodMasterModel';
|
|
10
|
+
export * from './models/LocationModel';
|
|
11
|
+
export * from './models/NationalityMasterModel';
|
|
12
|
+
export * from './models/PerformanceGoalMasterModel';
|
|
13
|
+
export * from './models/FinancialGradeModel';
|
|
14
|
+
export * from './models/CAIRatingMasterModel';
|
|
15
|
+
export * from './models/PerformanceCyclePeriodModel';
|
|
8
16
|
export * from './models/ItApprovalsModel';
|
|
9
17
|
export * from './models/ItWorkflowModel';
|
|
10
18
|
export * from './models/WorkflowDefinitions';
|
|
@@ -407,3 +415,4 @@ export * from './models/SlaApprovalsViewModel';
|
|
|
407
415
|
export * from './models/ServiceSlaApprovalModel';
|
|
408
416
|
export * from './sla/sla-table-sync.service';
|
|
409
417
|
export * from './sla/sla-approval-mirror';
|
|
418
|
+
export * from './i18n/workflow-chat-i18n';
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,14 @@ __exportStar(require("./models/ITHelpDeskModel"), exports);
|
|
|
26
26
|
__exportStar(require("./models/ServiceTypeModel"), exports);
|
|
27
27
|
__exportStar(require("./models/CAAServices"), exports);
|
|
28
28
|
__exportStar(require("./models/CAASubServices"), exports);
|
|
29
|
+
__exportStar(require("./models/CSRMBusinessImpactRatingMasterModel"), exports);
|
|
30
|
+
__exportStar(require("./models/CSRMLikelihoodMasterModel"), exports);
|
|
31
|
+
__exportStar(require("./models/LocationModel"), exports);
|
|
32
|
+
__exportStar(require("./models/NationalityMasterModel"), exports);
|
|
33
|
+
__exportStar(require("./models/PerformanceGoalMasterModel"), exports);
|
|
34
|
+
__exportStar(require("./models/FinancialGradeModel"), exports);
|
|
35
|
+
__exportStar(require("./models/CAIRatingMasterModel"), exports);
|
|
36
|
+
__exportStar(require("./models/PerformanceCyclePeriodModel"), exports);
|
|
29
37
|
// export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
30
38
|
// export * from './models/Workflows'; // REMOVED - table no longer used
|
|
31
39
|
__exportStar(require("./models/ItApprovalsModel"), exports);
|
|
@@ -596,3 +604,4 @@ __exportStar(require("./models/SlaApprovalsViewModel"), exports);
|
|
|
596
604
|
__exportStar(require("./models/ServiceSlaApprovalModel"), exports);
|
|
597
605
|
__exportStar(require("./sla/sla-table-sync.service"), exports);
|
|
598
606
|
__exportStar(require("./sla/sla-approval-mirror"), exports);
|
|
607
|
+
__exportStar(require("./i18n/workflow-chat-i18n"), exports);
|
|
@@ -13,6 +13,8 @@ export declare class CancellationRequestChat extends BaseModel {
|
|
|
13
13
|
user_id: number;
|
|
14
14
|
role_id: number | null;
|
|
15
15
|
message: string;
|
|
16
|
+
message_ar: string | null;
|
|
16
17
|
messageType: CancellationMessageType;
|
|
17
18
|
status: string | null;
|
|
19
|
+
status_ar: string | null;
|
|
18
20
|
}
|
|
@@ -47,6 +47,10 @@ __decorate([
|
|
|
47
47
|
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
49
|
], CancellationRequestChat.prototype, "message", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], CancellationRequestChat.prototype, "message_ar", void 0);
|
|
50
54
|
__decorate([
|
|
51
55
|
(0, typeorm_1.Column)({
|
|
52
56
|
type: "enum",
|
|
@@ -60,6 +64,10 @@ __decorate([
|
|
|
60
64
|
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
61
65
|
__metadata("design:type", Object)
|
|
62
66
|
], CancellationRequestChat.prototype, "status", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], CancellationRequestChat.prototype, "status_ar", void 0);
|
|
63
71
|
exports.CancellationRequestChat = CancellationRequestChat = __decorate([
|
|
64
72
|
(0, typeorm_1.Entity)({ name: "cancellation_chats" })
|
|
65
73
|
], CancellationRequestChat);
|
|
@@ -9,7 +9,9 @@ export declare class CancellationWorkFlow extends BaseModel {
|
|
|
9
9
|
service_id: number | null;
|
|
10
10
|
sub_service_id: number | null;
|
|
11
11
|
content: string;
|
|
12
|
+
content_ar: string | null;
|
|
12
13
|
status: CancellationWorkFlowStatus;
|
|
14
|
+
status_ar: string | null;
|
|
13
15
|
user_id: number | null;
|
|
14
16
|
role_id: number | null;
|
|
15
17
|
department_id: number | null;
|
|
@@ -37,10 +37,18 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], CancellationWorkFlow.prototype, "content", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], CancellationWorkFlow.prototype, "content_ar", void 0);
|
|
40
44
|
__decorate([
|
|
41
45
|
(0, typeorm_1.Column)({ type: "enum", enum: CancellationWorkFlowStatus, default: CancellationWorkFlowStatus.NOT_YET_STARTED, nullable: false }),
|
|
42
46
|
__metadata("design:type", String)
|
|
43
47
|
], CancellationWorkFlow.prototype, "status", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], CancellationWorkFlow.prototype, "status_ar", void 0);
|
|
44
52
|
__decorate([
|
|
45
53
|
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
46
54
|
__metadata("design:type", Object)
|
|
@@ -2,6 +2,7 @@ import { BaseModel } from './BaseModel';
|
|
|
2
2
|
export declare class CityMaster extends BaseModel {
|
|
3
3
|
country_id: number | null;
|
|
4
4
|
city_name: string;
|
|
5
|
+
city_arabic_name: string | null;
|
|
5
6
|
city_code: string | null;
|
|
6
7
|
description: string | null;
|
|
7
8
|
constructor(city_name: string);
|
|
@@ -27,6 +27,10 @@ __decorate([
|
|
|
27
27
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
29
|
], CityMaster.prototype, "city_name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], CityMaster.prototype, "city_arabic_name", void 0);
|
|
30
34
|
__decorate([
|
|
31
35
|
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
32
36
|
__metadata("design:type", Object)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare class Departments extends BaseModel {
|
|
3
3
|
department_name: string;
|
|
4
|
+
department_arabic_name: string | null;
|
|
4
5
|
department_code: string;
|
|
5
6
|
department_description: string;
|
|
6
7
|
constructor(department_name: string, department_code: string, department_description: string);
|
|
@@ -25,6 +25,10 @@ __decorate([
|
|
|
25
25
|
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], Departments.prototype, "department_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], Departments.prototype, "department_arabic_name", void 0);
|
|
28
32
|
__decorate([
|
|
29
33
|
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
|
|
30
34
|
__metadata("design:type", String)
|
|
@@ -24,6 +24,10 @@ __decorate([
|
|
|
24
24
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], GroupNames.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], GroupNames.prototype, "group_arabic_name", void 0);
|
|
27
31
|
__decorate([
|
|
28
32
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
33
|
__metadata("design:type", String)
|
|
@@ -28,6 +28,10 @@ __decorate([
|
|
|
28
28
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
29
29
|
__metadata("design:type", String)
|
|
30
30
|
], Location.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], Location.prototype, "location_arabic_name", void 0);
|
|
31
35
|
__decorate([
|
|
32
36
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
33
37
|
__metadata("design:type", String)
|
|
@@ -26,6 +26,10 @@ __decorate([
|
|
|
26
26
|
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], Sections.prototype, "section_name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], Sections.prototype, "section_arabic_name", void 0);
|
|
29
33
|
__decorate([
|
|
30
34
|
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
|
|
31
35
|
__metadata("design:type", String)
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platform-modules/civil-aviation-authority",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.277",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
|
-
|
|
7
|
-
"build": "tsc",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc && node -e \"require('fs').mkdirSync('dist/i18n',{recursive:true}); require('fs').copyFileSync('src/i18n/workflow-chat-i18n.json','dist/i18n/workflow-chat-i18n.json')\"",
|
|
8
8
|
"dev": "ts-node src/scripts.ts",
|
|
9
9
|
"sync:sla-sql": "node scripts/sync-sla-reports-sql.js"
|
|
10
10
|
},
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- Pilot: Arabic columns for cancellation workflow and chat tables (CAA).
|
|
2
|
+
-- Run once per environment before deploying updated services.
|
|
3
|
+
|
|
4
|
+
ALTER TABLE IF EXISTS cancellation_workflows
|
|
5
|
+
ADD COLUMN IF NOT EXISTS content_ar VARCHAR(500) NULL,
|
|
6
|
+
ADD COLUMN IF NOT EXISTS status_ar VARCHAR(100) NULL;
|
|
7
|
+
|
|
8
|
+
ALTER TABLE IF EXISTS cancellation_chats
|
|
9
|
+
ADD COLUMN IF NOT EXISTS message_ar TEXT NULL,
|
|
10
|
+
ADD COLUMN IF NOT EXISTS status_ar VARCHAR(100) NULL;
|
package/src/data-source.ts
CHANGED
|
@@ -253,6 +253,69 @@ import { SlaMyRequestsView } from './models/SlaMyRequestsViewModel';
|
|
|
253
253
|
import { SlaApprovalsView } from './models/SlaApprovalsViewModel';
|
|
254
254
|
import { ServiceSlaApproval } from './models/ServiceSlaApprovalModel';
|
|
255
255
|
import { SlaConfig } from './models/SlaConfigModel';
|
|
256
|
+
import { CSRMBusinessImpactRatingMaster } from './models/CSRMBusinessImpactRatingMasterModel';
|
|
257
|
+
import { CSRMLikelihoodMaster } from './models/CSRMLikelihoodMasterModel';
|
|
258
|
+
import { Location } from './models/LocationModel';
|
|
259
|
+
import { NationalityMaster } from './models/NationalityMasterModel';
|
|
260
|
+
import { PerformanceGoalMaster } from './models/PerformanceGoalMasterModel';
|
|
261
|
+
import { FinancialGrade } from './models/FinancialGradeModel';
|
|
262
|
+
import { CAIRatingMaster } from './models/CAIRatingMasterModel';
|
|
263
|
+
import { PerformanceCyclePeriod } from './models/PerformanceCyclePeriodModel';
|
|
264
|
+
import { AppealAgainstAdministrativeDecisionRequest } from './models/AppealAgainstAdministrativeDecisionRequestModel';
|
|
265
|
+
import { ComplaintLostPropertyReportApproval } from './models/ComplaintLostPropertyReportApprovalModel';
|
|
266
|
+
import { ComplaintLostPropertyReportAttachment } from './models/ComplaintLostPropertyReportAttachmentModel';
|
|
267
|
+
import { ComplaintLostPropertyReportChat } from './models/ComplaintLostPropertyReportChatModel';
|
|
268
|
+
import { ComplaintLostPropertyReportRequest } from './models/ComplaintLostPropertyReportRequestModel';
|
|
269
|
+
import { ComplaintLostPropertyReportWorkflow } from './models/ComplaintLostPropertyReportWorkflowModel';
|
|
270
|
+
import { ContractServiceRequest } from './models/ContractServiceRequestModel';
|
|
271
|
+
import { CountryMaster } from './models/CountryMasterModel';
|
|
272
|
+
import { CyberSecurityAuditRequest } from './models/CyberSecurityAuditRequestModel';
|
|
273
|
+
import { CyberSecurityRiskManagementRequest } from './models/CyberSecurityRiskManagementRequestModel';
|
|
274
|
+
import { CyberSecurityRiskManagementRisk } from './models/CyberSecurityRiskManagementRiskModel';
|
|
275
|
+
import { EmployeeSecurityDriveMaster } from './models/EmployeeSecurityDriveMasterModel';
|
|
276
|
+
import { EmployeeSecurityDrive } from './models/EmployeeSecurityDriveModel';
|
|
277
|
+
import { EmployeeSecurityDriveOwner } from './models/EmployeeSecurityDriveOwnerModel';
|
|
278
|
+
import { EmployeeSecurityFileAccess } from './models/EmployeeSecurityFileAccessModel';
|
|
279
|
+
import { EmployeeSecurityFileAuditLog } from './models/EmployeeSecurityFileAuditLogModel';
|
|
280
|
+
import { EmployeeSecurityFile } from './models/EmployeeSecurityFileModel';
|
|
281
|
+
import { EmployeeSecurityFileType } from './models/EmployeeSecurityFileTypeModel';
|
|
282
|
+
import { EmployeeSecurityFileVersion } from './models/EmployeeSecurityFileVersionModel';
|
|
283
|
+
import { EmployeeSecurityFolder } from './models/EmployeeSecurityFolderModel';
|
|
284
|
+
import { HousingContractCancelApproval } from './models/HousingContractCancelApprovalModel';
|
|
285
|
+
import { HousingContractCancelAttachment } from './models/HousingContractCancelAttachmentModel';
|
|
286
|
+
import { HousingContractCancelChat } from './models/HousingContractCancelChatModel';
|
|
287
|
+
import { HousingContractCancelRequest } from './models/HousingContractCancelRequestModel';
|
|
288
|
+
import { HousingContractCancelWorkflow } from './models/HousingContractCancelWorkflowModel';
|
|
289
|
+
import { HousingContractRenewalApproval } from './models/HousingContractRenewalApprovalModel';
|
|
290
|
+
import { HousingContractRenewalAttachment } from './models/HousingContractRenewalAttachmentModel';
|
|
291
|
+
import { HousingContractRenewalChat } from './models/HousingContractRenewalChatModel';
|
|
292
|
+
import { HousingContractRenewalRequest } from './models/HousingContractRenewalRequestModel';
|
|
293
|
+
import { HousingContractRenewalWorkflow } from './models/HousingContractRenewalWorkflowModel';
|
|
294
|
+
import { HumanResourceAnnualPlanningRequest } from './models/HumanResourceAnnualPlanningRequestModel';
|
|
295
|
+
import { HumanResourceAnnualPlanningTask } from './models/HumanResourceAnnualPlanningTaskModel';
|
|
296
|
+
import { InformationSecurityApprovalDetails } from './models/InformationSecurityApprovalModel';
|
|
297
|
+
import { InformationSecurityRequestAttachment } from './models/InformationSecurityAttachmentModel';
|
|
298
|
+
import { InformationSecurityRequestChat } from './models/InformationSecurityChatModel';
|
|
299
|
+
import { InformationSecurityWorkFlow } from './models/InformationSecurityWorkflowModel';
|
|
300
|
+
import { JobTransferRequest } from './models/JobTransferRequestModel';
|
|
301
|
+
import { LegalContractReviewApproval } from './models/LegalContractReviewApprovalModel';
|
|
302
|
+
import { LegalContractReviewRequestAttachment } from './models/LegalContractReviewAttachmentModel';
|
|
303
|
+
import { LegalContractReviewRequestChat } from './models/LegalContractReviewChatModel';
|
|
304
|
+
import { LegalContractReviewRequest } from './models/LegalContractReviewRequestModel';
|
|
305
|
+
import { LegalContractReviewWorkFlow } from './models/LegalContractReviewWorkflowModel';
|
|
306
|
+
// import { MissionTravelPassportExpiryNotificationConfig } from './models/MissionTravelPassportExpiryNotificationConfigModel';
|
|
307
|
+
import { NewResourceRequest } from './models/NewResourceRequestModel';
|
|
308
|
+
import { PerformanceManagementRequestGoal } from './models/PerformanceManagementRequestGoalModel';
|
|
309
|
+
import { PerformanceManagementRequest } from './models/PerformanceManagementRequestModel';
|
|
310
|
+
import { RequestForProjectApproval } from './models/RequestForProjectApprovalModel';
|
|
311
|
+
import { RequestForVaptRequest } from './models/RequestForVaptRequestModel';
|
|
312
|
+
import { ServicesNotificationConfigs } from './models/ServicesNotificationConfigModel';
|
|
313
|
+
import { ServiceTransferRequest } from './models/ServiceTransferRequestModel';
|
|
314
|
+
import { ShiftAllowanceRequest } from './models/ShiftAllowanceRequestModel';
|
|
315
|
+
import { TemporaryAssignmentRequest } from './models/TemporaryAssignmentRequestModel';
|
|
316
|
+
import { TrainingRoomNotificationConfig } from './models/TrainingRoomNotificationConfigModel';
|
|
317
|
+
import { UserSkill } from './models/UserSkillModel';
|
|
318
|
+
|
|
256
319
|
|
|
257
320
|
export const AppDataSource = new DataSource({
|
|
258
321
|
type: 'postgres',
|
|
@@ -513,5 +576,67 @@ export const AppDataSource = new DataSource({
|
|
|
513
576
|
SlaApprovalsView,
|
|
514
577
|
ServiceSlaApproval,
|
|
515
578
|
SlaConfig,
|
|
579
|
+
CSRMBusinessImpactRatingMaster,
|
|
580
|
+
CSRMLikelihoodMaster,
|
|
581
|
+
Location,
|
|
582
|
+
NationalityMaster,
|
|
583
|
+
PerformanceGoalMaster,
|
|
584
|
+
FinancialGrade,
|
|
585
|
+
CAIRatingMaster,
|
|
586
|
+
PerformanceCyclePeriod,
|
|
587
|
+
AppealAgainstAdministrativeDecisionRequest,
|
|
588
|
+
ComplaintLostPropertyReportApproval,
|
|
589
|
+
ComplaintLostPropertyReportAttachment,
|
|
590
|
+
ComplaintLostPropertyReportChat,
|
|
591
|
+
ComplaintLostPropertyReportRequest,
|
|
592
|
+
ComplaintLostPropertyReportWorkflow,
|
|
593
|
+
ContractServiceRequest,
|
|
594
|
+
CountryMaster,
|
|
595
|
+
CyberSecurityAuditRequest,
|
|
596
|
+
CyberSecurityRiskManagementRequest,
|
|
597
|
+
CyberSecurityRiskManagementRisk,
|
|
598
|
+
EmployeeSecurityDriveMaster,
|
|
599
|
+
EmployeeSecurityDrive,
|
|
600
|
+
EmployeeSecurityDriveOwner,
|
|
601
|
+
EmployeeSecurityFileAccess,
|
|
602
|
+
EmployeeSecurityFileAuditLog,
|
|
603
|
+
EmployeeSecurityFile,
|
|
604
|
+
EmployeeSecurityFileType,
|
|
605
|
+
EmployeeSecurityFileVersion,
|
|
606
|
+
EmployeeSecurityFolder,
|
|
607
|
+
HousingContractCancelApproval,
|
|
608
|
+
HousingContractCancelAttachment,
|
|
609
|
+
HousingContractCancelChat,
|
|
610
|
+
HousingContractCancelRequest,
|
|
611
|
+
HousingContractCancelWorkflow,
|
|
612
|
+
HousingContractRenewalApproval,
|
|
613
|
+
HousingContractRenewalAttachment,
|
|
614
|
+
HousingContractRenewalChat,
|
|
615
|
+
HousingContractRenewalRequest,
|
|
616
|
+
HousingContractRenewalWorkflow,
|
|
617
|
+
HumanResourceAnnualPlanningRequest,
|
|
618
|
+
HumanResourceAnnualPlanningTask,
|
|
619
|
+
InformationSecurityApprovalDetails,
|
|
620
|
+
InformationSecurityRequestAttachment,
|
|
621
|
+
InformationSecurityRequestChat,
|
|
622
|
+
InformationSecurityWorkFlow,
|
|
623
|
+
JobTransferRequest,
|
|
624
|
+
LegalContractReviewApproval,
|
|
625
|
+
LegalContractReviewRequestAttachment,
|
|
626
|
+
LegalContractReviewRequestChat,
|
|
627
|
+
LegalContractReviewRequest,
|
|
628
|
+
LegalContractReviewWorkFlow,
|
|
629
|
+
// MissionTravelPassportExpiryNotificationConfig,
|
|
630
|
+
NewResourceRequest,
|
|
631
|
+
PerformanceManagementRequestGoal,
|
|
632
|
+
PerformanceManagementRequest,
|
|
633
|
+
RequestForProjectApproval,
|
|
634
|
+
RequestForVaptRequest,
|
|
635
|
+
ServicesNotificationConfigs,
|
|
636
|
+
ServiceTransferRequest,
|
|
637
|
+
ShiftAllowanceRequest,
|
|
638
|
+
TemporaryAssignmentRequest,
|
|
639
|
+
TrainingRoomNotificationConfig,
|
|
640
|
+
UserSkill
|
|
516
641
|
],
|
|
517
642
|
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"workflowTemplates": {
|
|
3
|
+
"request_submitted": {
|
|
4
|
+
"en": "Request Submitted",
|
|
5
|
+
"ar": "تم تقديم الطلب"
|
|
6
|
+
},
|
|
7
|
+
"notification_sent_pending": {
|
|
8
|
+
"en": "Notification sent Pending",
|
|
9
|
+
"ar": "في انتظار إرسال الإشعار"
|
|
10
|
+
},
|
|
11
|
+
"notification_sent_successfully": {
|
|
12
|
+
"en": "Notification sent successfully",
|
|
13
|
+
"ar": "تم إرسال الإشعار بنجاح"
|
|
14
|
+
},
|
|
15
|
+
"request_approval_in_progress": {
|
|
16
|
+
"en": "Request Approval In Progress",
|
|
17
|
+
"ar": "الموافقة على الطلب قيد التنفيذ"
|
|
18
|
+
},
|
|
19
|
+
"request_approval_pending": {
|
|
20
|
+
"en": "Request Approval Pending",
|
|
21
|
+
"ar": "في انتظار الموافقة على الطلب"
|
|
22
|
+
},
|
|
23
|
+
"request_approval_in_progress_from": {
|
|
24
|
+
"en": "Request Approval In Progress from {{name}}",
|
|
25
|
+
"ar": "الموافقة على الطلب قيد التنفيذ من {{name}}"
|
|
26
|
+
},
|
|
27
|
+
"request_approval_pending_from": {
|
|
28
|
+
"en": "Request Approval Pending from {{name}}",
|
|
29
|
+
"ar": "في انتظار موافقة {{name}}"
|
|
30
|
+
},
|
|
31
|
+
"request_approved_by": {
|
|
32
|
+
"en": "Request Approved by {{name}}",
|
|
33
|
+
"ar": "تمت الموافقة على الطلب من قبل {{name}}"
|
|
34
|
+
},
|
|
35
|
+
"request_rejected_by": {
|
|
36
|
+
"en": "Request Rejected by {{name}}",
|
|
37
|
+
"ar": "تم رفض الطلب من قبل {{name}}"
|
|
38
|
+
},
|
|
39
|
+
"request_approved": {
|
|
40
|
+
"en": "Request Approved",
|
|
41
|
+
"ar": "تمت الموافقة على الطلب"
|
|
42
|
+
},
|
|
43
|
+
"request_rejected": {
|
|
44
|
+
"en": "Request Rejected",
|
|
45
|
+
"ar": "تم رفض الطلب"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"chatTemplates": {
|
|
49
|
+
"cancellation_submitted_by": {
|
|
50
|
+
"en": "Cancellation request submitted by {{userName}} ({{employeeId}})",
|
|
51
|
+
"ar": "تم تقديم طلب الإلغاء بواسطة {{userName}} ({{employeeId}})"
|
|
52
|
+
},
|
|
53
|
+
"request_received": {
|
|
54
|
+
"en": "Request Received",
|
|
55
|
+
"ar": "تم استلام الطلب"
|
|
56
|
+
},
|
|
57
|
+
"request_approved_by_role": {
|
|
58
|
+
"en": "Request Approved by: {{roleName}}{{comment}}",
|
|
59
|
+
"ar": "تمت الموافقة على الطلب من قبل: {{roleName}}{{comment}}"
|
|
60
|
+
},
|
|
61
|
+
"request_rejected_by_role": {
|
|
62
|
+
"en": "Request Rejected by: {{roleName}}{{comment}}",
|
|
63
|
+
"ar": "تم رفض الطلب من قبل: {{roleName}}{{comment}}"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"workflowStatusLabels": {
|
|
67
|
+
"Completed": "مكتمل",
|
|
68
|
+
"Pending": "قيد الانتظار",
|
|
69
|
+
"Not Yet Started": "لم يبدأ بعد"
|
|
70
|
+
},
|
|
71
|
+
"chatStatusLabels": {
|
|
72
|
+
"Submitted": "تم التقديم",
|
|
73
|
+
"Received": "تم الاستلام",
|
|
74
|
+
"Approved": "موافق عليه",
|
|
75
|
+
"Rejected": "مرفوض",
|
|
76
|
+
"Pending": "قيد الانتظار"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import catalog from './workflow-chat-i18n.json';
|
|
2
|
+
|
|
3
|
+
export type BilingualText = { en: string; ar: string };
|
|
4
|
+
|
|
5
|
+
type WorkflowChatI18nCatalog = {
|
|
6
|
+
workflowTemplates: Record<string, BilingualText>;
|
|
7
|
+
chatTemplates: Record<string, BilingualText>;
|
|
8
|
+
workflowStatusLabels: Record<string, string>;
|
|
9
|
+
chatStatusLabels: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const WORKFLOW_TEMPLATES = catalog.workflowTemplates as Record<string, BilingualText>;
|
|
13
|
+
const CHAT_TEMPLATES = catalog.chatTemplates as Record<string, BilingualText>;
|
|
14
|
+
const WORKFLOW_STATUS_LABELS = catalog.workflowStatusLabels as Record<string, string>;
|
|
15
|
+
const CHAT_STATUS_LABELS = catalog.chatStatusLabels as Record<string, string>;
|
|
16
|
+
|
|
17
|
+
/** Read-only view of the shared workflow/chat translation catalog. */
|
|
18
|
+
export function getWorkflowChatI18nCatalog(): WorkflowChatI18nCatalog {
|
|
19
|
+
return catalog as WorkflowChatI18nCatalog;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function interpolate(template: string, params: Record<string, string> = {}): string {
|
|
23
|
+
return template.replace(/\{\{(\w+)\}\}/g, (_, key: string) => params[key] ?? '');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function buildBilingualFromTemplate(
|
|
27
|
+
templateCatalog: Record<string, BilingualText>,
|
|
28
|
+
key: string,
|
|
29
|
+
params: Record<string, string> = {}
|
|
30
|
+
): BilingualText {
|
|
31
|
+
const tpl = templateCatalog[key];
|
|
32
|
+
if (!tpl) {
|
|
33
|
+
return { en: key, ar: key };
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
en: interpolate(tpl.en, params),
|
|
37
|
+
ar: interpolate(tpl.ar, params),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function workflowTemplate(key: string, params: Record<string, string> = {}): BilingualText {
|
|
42
|
+
return buildBilingualFromTemplate(WORKFLOW_TEMPLATES, key, params);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function chatTemplate(key: string, params: Record<string, string> = {}): BilingualText {
|
|
46
|
+
return buildBilingualFromTemplate(CHAT_TEMPLATES, key, params);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function resolveWorkflowStatusAr(status: string | null | undefined): string | null {
|
|
50
|
+
if (status == null || status === '') return null;
|
|
51
|
+
return WORKFLOW_STATUS_LABELS[status] ?? status;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function resolveChatStatusAr(status: string | null | undefined): string | null {
|
|
55
|
+
if (status == null || status === '') return null;
|
|
56
|
+
return CHAT_STATUS_LABELS[status] ?? status;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function pickLocalizedName(
|
|
60
|
+
englishName?: string | null,
|
|
61
|
+
arabicName?: string | null,
|
|
62
|
+
fallback = ''
|
|
63
|
+
): string {
|
|
64
|
+
const ar = arabicName?.trim();
|
|
65
|
+
if (ar) return ar;
|
|
66
|
+
const en = englishName?.trim();
|
|
67
|
+
if (en) return en;
|
|
68
|
+
return fallback;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function buildApprovalWorkflowContent(params: {
|
|
72
|
+
status: 'Approved' | 'Rejected' | 'Pending' | string;
|
|
73
|
+
roleName?: string | null;
|
|
74
|
+
roleArabicName?: string | null;
|
|
75
|
+
comment?: string | null;
|
|
76
|
+
}): BilingualText {
|
|
77
|
+
const nameEn = params.roleName?.trim() || '';
|
|
78
|
+
const nameAr = pickLocalizedName(params.roleName, params.roleArabicName, nameEn || 'Unknown');
|
|
79
|
+
|
|
80
|
+
let base: BilingualText;
|
|
81
|
+
if (params.status === 'Approved') {
|
|
82
|
+
base = nameEn
|
|
83
|
+
? workflowTemplate('request_approved_by', { name: nameEn })
|
|
84
|
+
: workflowTemplate('request_approved');
|
|
85
|
+
if (nameEn) {
|
|
86
|
+
base.ar = workflowTemplate('request_approved_by', { name: nameAr }).ar;
|
|
87
|
+
}
|
|
88
|
+
} else if (params.status === 'Rejected') {
|
|
89
|
+
base = nameEn
|
|
90
|
+
? workflowTemplate('request_rejected_by', { name: nameEn })
|
|
91
|
+
: workflowTemplate('request_rejected');
|
|
92
|
+
if (nameEn) {
|
|
93
|
+
base.ar = workflowTemplate('request_rejected_by', { name: nameAr }).ar;
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
base = nameEn
|
|
97
|
+
? workflowTemplate('request_approval_pending_from', { name: nameEn })
|
|
98
|
+
: workflowTemplate('request_approval_pending');
|
|
99
|
+
if (nameEn) {
|
|
100
|
+
base.ar = workflowTemplate('request_approval_pending_from', { name: nameAr }).ar;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const comment = params.comment?.trim();
|
|
105
|
+
if (!comment) return base;
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
en: `${base.en}: ${comment}`,
|
|
109
|
+
ar: `${base.ar}: ${comment}`,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function buildHumanApprovalWorkflowContent(params: {
|
|
114
|
+
isFirst: boolean;
|
|
115
|
+
roleName?: string | null;
|
|
116
|
+
roleArabicName?: string | null;
|
|
117
|
+
deptSectionEn?: string | null;
|
|
118
|
+
deptSectionAr?: string | null;
|
|
119
|
+
}): BilingualText {
|
|
120
|
+
const nameEn = params.roleName?.trim() || params.deptSectionEn?.trim() || '';
|
|
121
|
+
const nameAr = params.roleName
|
|
122
|
+
? pickLocalizedName(params.roleName, params.roleArabicName, nameEn)
|
|
123
|
+
: params.deptSectionAr?.trim() || params.deptSectionEn?.trim() || nameEn;
|
|
124
|
+
|
|
125
|
+
if (nameEn) {
|
|
126
|
+
const key = params.isFirst ? 'request_approval_in_progress_from' : 'request_approval_pending_from';
|
|
127
|
+
return {
|
|
128
|
+
en: workflowTemplate(key, { name: nameEn }).en,
|
|
129
|
+
ar: workflowTemplate(key, { name: nameAr || nameEn }).ar,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return params.isFirst
|
|
134
|
+
? workflowTemplate('request_approval_in_progress')
|
|
135
|
+
: workflowTemplate('request_approval_pending');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function buildApprovalChatMessage(params: {
|
|
139
|
+
status: 'Approved' | 'Rejected' | string;
|
|
140
|
+
roleName?: string | null;
|
|
141
|
+
roleArabicName?: string | null;
|
|
142
|
+
comment?: string | null;
|
|
143
|
+
}): BilingualText {
|
|
144
|
+
const roleEn = params.roleName?.trim() || 'Unknown Role';
|
|
145
|
+
const roleAr = pickLocalizedName(params.roleName, params.roleArabicName, roleEn);
|
|
146
|
+
const commentSuffix = params.comment?.trim() ? ` - ${params.comment.trim()}` : '';
|
|
147
|
+
const key = params.status === 'Approved' ? 'request_approved_by_role' : 'request_rejected_by_role';
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
en: chatTemplate(key, { roleName: roleEn, comment: commentSuffix }).en,
|
|
151
|
+
ar: chatTemplate(key, { roleName: roleAr, comment: commentSuffix }).ar,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function enrichCancellationWorkflowLog(log: Record<string, unknown>): Record<string, unknown> {
|
|
156
|
+
const status = log.status != null ? String(log.status) : null;
|
|
157
|
+
return {
|
|
158
|
+
...log,
|
|
159
|
+
status_ar: log.status_ar ?? resolveWorkflowStatusAr(status),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function enrichCancellationChatMessage(chat: Record<string, unknown>): Record<string, unknown> {
|
|
164
|
+
const status = chat.status != null ? String(chat.status) : null;
|
|
165
|
+
return {
|
|
166
|
+
...chat,
|
|
167
|
+
status_ar: chat.status_ar ?? resolveChatStatusAr(status),
|
|
168
|
+
};
|
|
169
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,15 @@ export * from './models/ITHelpDeskModel';
|
|
|
9
9
|
export * from './models/ServiceTypeModel';
|
|
10
10
|
export * from './models/CAAServices';
|
|
11
11
|
export * from './models/CAASubServices';
|
|
12
|
+
|
|
13
|
+
export * from './models/CSRMBusinessImpactRatingMasterModel';
|
|
14
|
+
export * from './models/CSRMLikelihoodMasterModel';
|
|
15
|
+
export * from './models/LocationModel';
|
|
16
|
+
export * from './models/NationalityMasterModel';
|
|
17
|
+
export * from './models/PerformanceGoalMasterModel';
|
|
18
|
+
export * from './models/FinancialGradeModel';
|
|
19
|
+
export * from './models/CAIRatingMasterModel';
|
|
20
|
+
export * from './models/PerformanceCyclePeriodModel';
|
|
12
21
|
// export * from './models/ITApprovalSettings'; // REMOVED - table no longer used
|
|
13
22
|
// export * from './models/Workflows'; // REMOVED - table no longer used
|
|
14
23
|
export * from './models/ItApprovalsModel';
|
|
@@ -494,4 +503,5 @@ export * from './models/SlaMyRequestsViewModel';
|
|
|
494
503
|
export * from './models/SlaApprovalsViewModel';
|
|
495
504
|
export * from './models/ServiceSlaApprovalModel';
|
|
496
505
|
export * from './sla/sla-table-sync.service';
|
|
497
|
-
export * from './sla/sla-approval-mirror';
|
|
506
|
+
export * from './sla/sla-approval-mirror';
|
|
507
|
+
export * from './i18n/workflow-chat-i18n';
|
|
@@ -29,6 +29,9 @@ export class CancellationRequestChat extends BaseModel {
|
|
|
29
29
|
@Column({ type: "text", nullable: false })
|
|
30
30
|
message: string;
|
|
31
31
|
|
|
32
|
+
@Column({ type: "text", nullable: true })
|
|
33
|
+
message_ar: string | null;
|
|
34
|
+
|
|
32
35
|
@Column({
|
|
33
36
|
type: "enum",
|
|
34
37
|
enum: CancellationMessageType,
|
|
@@ -39,4 +42,7 @@ export class CancellationRequestChat extends BaseModel {
|
|
|
39
42
|
|
|
40
43
|
@Column({ type: "text", nullable: true })
|
|
41
44
|
status: string | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
47
|
+
status_ar: string | null;
|
|
42
48
|
}
|
|
@@ -21,9 +21,15 @@ export class CancellationWorkFlow extends BaseModel {
|
|
|
21
21
|
@Column({ type: "varchar", length: 500, nullable: false })
|
|
22
22
|
content: string;
|
|
23
23
|
|
|
24
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
25
|
+
content_ar: string | null;
|
|
26
|
+
|
|
24
27
|
@Column({ type: "enum", enum: CancellationWorkFlowStatus, default: CancellationWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
28
|
status: CancellationWorkFlowStatus;
|
|
26
29
|
|
|
30
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
31
|
+
status_ar: string | null;
|
|
32
|
+
|
|
27
33
|
@Column({ type: "integer", nullable: true })
|
|
28
34
|
user_id: number | null;
|
|
29
35
|
|
|
@@ -9,6 +9,9 @@ export class CityMaster extends BaseModel {
|
|
|
9
9
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
10
10
|
city_name: string;
|
|
11
11
|
|
|
12
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
13
|
+
city_arabic_name: string | null;
|
|
14
|
+
|
|
12
15
|
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
13
16
|
city_code: string | null;
|
|
14
17
|
|
|
@@ -7,6 +7,9 @@ export class Departments extends BaseModel {
|
|
|
7
7
|
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
8
|
department_name: string;
|
|
9
9
|
|
|
10
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
11
|
+
department_arabic_name: string | null;
|
|
12
|
+
|
|
10
13
|
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
14
|
department_code: string;
|
|
12
15
|
|
|
@@ -14,6 +14,9 @@ export class Location {
|
|
|
14
14
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
15
15
|
name: string;
|
|
16
16
|
|
|
17
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
18
|
+
location_arabic_name: string | null;
|
|
19
|
+
|
|
17
20
|
@Column({ type: 'text', nullable: true })
|
|
18
21
|
description: string;
|
|
19
22
|
|
|
@@ -7,6 +7,9 @@ export class Sections extends BaseModel {
|
|
|
7
7
|
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
8
8
|
section_name: string;
|
|
9
9
|
|
|
10
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
11
|
+
section_arabic_name: string | null;
|
|
12
|
+
|
|
10
13
|
@Column({ type: 'varchar', length: 64, nullable: false})
|
|
11
14
|
section_code: string;
|
|
12
15
|
|