@platform-modules/foreign-ministry 1.3.364 → 1.3.366
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/dist/data-source.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/IconsModel.d.ts +7 -0
- package/dist/models/IconsModel.js +39 -0
- package/dist/models/WorkflowDefinitions.d.ts +3 -1
- package/dist/models/WorkflowDefinitions.js +7 -2
- package/dist/models/importantLinksModel.d.ts +1 -0
- package/dist/models/importantLinksModel.js +5 -0
- package/package.json +1 -1
- package/sql/add_important_links_icon_id.sql +17 -0
- package/sql/add_leave_requests_exam_dates.sql +16 -0
- package/sql/add_workflow_definitions_leave_type_id.sql +6 -0
- package/sql/create_icons.sql +21 -0
- package/src/data-source.ts +3 -1
- package/src/index.ts +1 -0
- package/src/models/IconsModel.ts +21 -0
- package/src/models/WorkflowDefinitions.ts +7 -1
- package/src/models/importantLinksModel.ts +4 -0
package/dist/data-source.js
CHANGED
|
@@ -283,6 +283,7 @@ const ProjectTaskCommentsModel_1 = require("./models/ProjectTaskCommentsModel");
|
|
|
283
283
|
const DocumentationFolderModel_1 = require("./models/DocumentationFolderModel");
|
|
284
284
|
const DocumentationFileModel_1 = require("./models/DocumentationFileModel");
|
|
285
285
|
const UniversalLanguageMasterModel_1 = require("./models/UniversalLanguageMasterModel");
|
|
286
|
+
const IconsModel_1 = require("./models/IconsModel");
|
|
286
287
|
const MeetingAppointmentReminderLogModel_1 = require("./models/MeetingAppointmentReminderLogModel");
|
|
287
288
|
const EvaluationEligibilitySettingModel_1 = require("./models/EvaluationEligibilitySettingModel");
|
|
288
289
|
const EvaluationFormModel_1 = require("./models/EvaluationFormModel");
|
|
@@ -672,5 +673,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
672
673
|
ServiceSlaApprovalModel_1.ServiceSlaApproval,
|
|
673
674
|
SlaConfigModel_1.SlaConfig,
|
|
674
675
|
ChatbotQnsAnsMappingModel_1.ChatbotQnsAnsMapping,
|
|
676
|
+
IconsModel_1.Icons,
|
|
675
677
|
],
|
|
676
678
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -218,6 +218,7 @@ export * from './models/CountryMasterModel';
|
|
|
218
218
|
export * from './models/CityMasterModel';
|
|
219
219
|
export * from './models/NationalityMasterModel';
|
|
220
220
|
export * from './models/UniversalLanguageMasterModel';
|
|
221
|
+
export * from './models/IconsModel';
|
|
221
222
|
export * from './models/OfficeMasterModel';
|
|
222
223
|
export * from './models/UpdateAttendanceAttachmentModel';
|
|
223
224
|
export * from './models/RoutingGroupUsersModel';
|
package/dist/index.js
CHANGED
|
@@ -255,6 +255,7 @@ __exportStar(require("./models/CountryMasterModel"), exports);
|
|
|
255
255
|
__exportStar(require("./models/CityMasterModel"), exports);
|
|
256
256
|
__exportStar(require("./models/NationalityMasterModel"), exports);
|
|
257
257
|
__exportStar(require("./models/UniversalLanguageMasterModel"), exports);
|
|
258
|
+
__exportStar(require("./models/IconsModel"), exports);
|
|
258
259
|
__exportStar(require("./models/OfficeMasterModel"), exports);
|
|
259
260
|
__exportStar(require("./models/UpdateAttendanceAttachmentModel"), exports);
|
|
260
261
|
__exportStar(require("./models/RoutingGroupUsersModel"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Icons = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Icons = class Icons extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(icon_name, url) {
|
|
17
|
+
super();
|
|
18
|
+
this.icon_name = icon_name;
|
|
19
|
+
this.url = url;
|
|
20
|
+
this.icon_name_arabic = null;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.Icons = Icons;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Icons.prototype, "icon_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], Icons.prototype, "icon_name_arabic", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 2000, nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Icons.prototype, "url", void 0);
|
|
36
|
+
exports.Icons = Icons = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: "icons" }),
|
|
38
|
+
__metadata("design:paramtypes", [String, String])
|
|
39
|
+
], Icons);
|
|
@@ -10,7 +10,9 @@ export declare class WorkflowDefinitions extends BaseModel {
|
|
|
10
10
|
service_id: number | null;
|
|
11
11
|
service: FMServices;
|
|
12
12
|
sub_service_id: number | null;
|
|
13
|
+
/** Optional leave type scope (HR leave workflows per leave type). */
|
|
14
|
+
leave_type_id: number | null;
|
|
13
15
|
sub_service: FMSubServices;
|
|
14
16
|
status: 'draft' | 'published';
|
|
15
|
-
constructor(name: string, description?: string, version?: number, is_active?: boolean, service_id?: number | null, sub_service_id?: number | null, status?: 'draft' | 'published', service_type?: 'internal' | 'external' | 'none');
|
|
17
|
+
constructor(name: string, description?: string, version?: number, is_active?: boolean, service_id?: number | null, sub_service_id?: number | null, status?: 'draft' | 'published', service_type?: 'internal' | 'external' | 'none', leave_type_id?: number | null);
|
|
16
18
|
}
|
|
@@ -15,7 +15,7 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
const FMServices_1 = require("./FMServices");
|
|
16
16
|
const FMSubservices_1 = require("./FMSubservices");
|
|
17
17
|
let WorkflowDefinitions = class WorkflowDefinitions extends BaseModel_1.BaseModel {
|
|
18
|
-
constructor(name, description, version, is_active, service_id, sub_service_id, status, service_type) {
|
|
18
|
+
constructor(name, description, version, is_active, service_id, sub_service_id, status, service_type, leave_type_id) {
|
|
19
19
|
super();
|
|
20
20
|
this.name = name;
|
|
21
21
|
this.description = description || '';
|
|
@@ -25,6 +25,7 @@ let WorkflowDefinitions = class WorkflowDefinitions extends BaseModel_1.BaseMode
|
|
|
25
25
|
this.sub_service_id = sub_service_id || null;
|
|
26
26
|
this.status = status || 'draft';
|
|
27
27
|
this.service_type = service_type || 'none';
|
|
28
|
+
this.leave_type_id = leave_type_id ?? null;
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
exports.WorkflowDefinitions = WorkflowDefinitions;
|
|
@@ -66,6 +67,10 @@ __decorate([
|
|
|
66
67
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
67
68
|
__metadata("design:type", Object)
|
|
68
69
|
], WorkflowDefinitions.prototype, "sub_service_id", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], WorkflowDefinitions.prototype, "leave_type_id", void 0);
|
|
69
74
|
__decorate([
|
|
70
75
|
(0, typeorm_1.ManyToOne)(() => FMSubservices_1.FMSubServices),
|
|
71
76
|
(0, typeorm_1.JoinColumn)({ name: 'sub_service_id' }),
|
|
@@ -82,5 +87,5 @@ __decorate([
|
|
|
82
87
|
], WorkflowDefinitions.prototype, "status", void 0);
|
|
83
88
|
exports.WorkflowDefinitions = WorkflowDefinitions = __decorate([
|
|
84
89
|
(0, typeorm_1.Entity)({ name: 'workflow_definitions' }),
|
|
85
|
-
__metadata("design:paramtypes", [String, String, Number, Boolean, Object, Object, String, String])
|
|
90
|
+
__metadata("design:paramtypes", [String, String, Number, Boolean, Object, Object, String, String, Object])
|
|
86
91
|
], WorkflowDefinitions);
|
|
@@ -17,6 +17,7 @@ let ImportantLinks = class ImportantLinks extends BaseModel_1.BaseModel {
|
|
|
17
17
|
super();
|
|
18
18
|
this.title = title;
|
|
19
19
|
this.url = url;
|
|
20
|
+
this.icon_id = null;
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
exports.ImportantLinks = ImportantLinks;
|
|
@@ -28,6 +29,10 @@ __decorate([
|
|
|
28
29
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
31
|
], ImportantLinks.prototype, "url", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ImportantLinks.prototype, "icon_id", void 0);
|
|
31
36
|
exports.ImportantLinks = ImportantLinks = __decorate([
|
|
32
37
|
(0, typeorm_1.Entity)({ name: 'important_links' }),
|
|
33
38
|
__metadata("design:paramtypes", [String, String])
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Add icon_id column to important_links table (FM).
|
|
2
|
+
-- Run once per environment before deploying updated services.
|
|
3
|
+
|
|
4
|
+
ALTER TABLE IF EXISTS important_links
|
|
5
|
+
ADD COLUMN IF NOT EXISTS icon_id INTEGER NULL;
|
|
6
|
+
|
|
7
|
+
CREATE INDEX IF NOT EXISTS idx_important_links_icon_id
|
|
8
|
+
ON important_links (icon_id)
|
|
9
|
+
WHERE is_deleted = FALSE;
|
|
10
|
+
|
|
11
|
+
DO $$ BEGIN
|
|
12
|
+
ALTER TABLE important_links
|
|
13
|
+
ADD CONSTRAINT fk_important_links_icon_id
|
|
14
|
+
FOREIGN KEY (icon_id) REFERENCES icons (id);
|
|
15
|
+
EXCEPTION
|
|
16
|
+
WHEN duplicate_object THEN NULL;
|
|
17
|
+
END $$;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Add examination leave date columns to leave_requests (FM).
|
|
2
|
+
-- Run once per environment before deploying updated HR/Conductor services.
|
|
3
|
+
|
|
4
|
+
ALTER TABLE IF EXISTS leave_requests
|
|
5
|
+
ADD COLUMN IF NOT EXISTS exam_start_date DATE NULL;
|
|
6
|
+
|
|
7
|
+
ALTER TABLE IF EXISTS leave_requests
|
|
8
|
+
ADD COLUMN IF NOT EXISTS exam_end_date DATE NULL;
|
|
9
|
+
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_leave_requests_exam_start_date
|
|
11
|
+
ON leave_requests (exam_start_date)
|
|
12
|
+
WHERE is_deleted = FALSE;
|
|
13
|
+
|
|
14
|
+
CREATE INDEX IF NOT EXISTS idx_leave_requests_exam_end_date
|
|
15
|
+
ON leave_requests (exam_end_date)
|
|
16
|
+
WHERE is_deleted = FALSE;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Optional leave type scope for workflow_definitions (HR leave workflows per leave type)
|
|
2
|
+
ALTER TABLE workflow_definitions
|
|
3
|
+
ADD COLUMN IF NOT EXISTS leave_type_id INTEGER NULL;
|
|
4
|
+
|
|
5
|
+
COMMENT ON COLUMN workflow_definitions.leave_type_id IS
|
|
6
|
+
'Optional leave type ID; when set, workflow versioning/deactivation is scoped with service_id and sub_service_id';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- Icons master table (User Service)
|
|
2
|
+
-- PostgreSQL
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS icons (
|
|
5
|
+
id SERIAL PRIMARY KEY,
|
|
6
|
+
icon_name VARCHAR(255) NOT NULL,
|
|
7
|
+
icon_name_arabic VARCHAR(255) NULL,
|
|
8
|
+
url VARCHAR(2000) NOT NULL,
|
|
9
|
+
created_by VARCHAR NULL,
|
|
10
|
+
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
11
|
+
updated_by VARCHAR NULL,
|
|
12
|
+
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
13
|
+
is_deleted BOOLEAN DEFAULT FALSE
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
CREATE INDEX IF NOT EXISTS idx_icons_icon_name
|
|
17
|
+
ON icons (LOWER(icon_name))
|
|
18
|
+
WHERE is_deleted = FALSE;
|
|
19
|
+
|
|
20
|
+
CREATE INDEX IF NOT EXISTS idx_icons_is_deleted
|
|
21
|
+
ON icons (is_deleted);
|
package/src/data-source.ts
CHANGED
|
@@ -288,7 +288,8 @@ import { ProjectActivity } from './models/ProjectActivityModel';
|
|
|
288
288
|
import { ProjectTaskComments } from './models/ProjectTaskCommentsModel';
|
|
289
289
|
import { DocumentationFolder } from './models/DocumentationFolderModel';
|
|
290
290
|
import { DocumentationFile } from './models/DocumentationFileModel';
|
|
291
|
-
import { UniversalLanguageMaster } from './models/UniversalLanguageMasterModel';
|
|
291
|
+
import { UniversalLanguageMaster } from './models/UniversalLanguageMasterModel';
|
|
292
|
+
import { Icons } from './models/IconsModel';
|
|
292
293
|
import { MeetingAppointmentReminderLog } from './models/MeetingAppointmentReminderLogModel';
|
|
293
294
|
import {
|
|
294
295
|
EvaluationEligibilitySetting,
|
|
@@ -684,5 +685,6 @@ export const AppDataSource = new DataSource({
|
|
|
684
685
|
ServiceSlaApproval,
|
|
685
686
|
SlaConfig,
|
|
686
687
|
ChatbotQnsAnsMapping,
|
|
688
|
+
Icons,
|
|
687
689
|
],
|
|
688
690
|
});
|
package/src/index.ts
CHANGED
|
@@ -218,6 +218,7 @@ export * from './models/CountryMasterModel';
|
|
|
218
218
|
export * from './models/CityMasterModel';
|
|
219
219
|
export * from './models/NationalityMasterModel';
|
|
220
220
|
export * from './models/UniversalLanguageMasterModel';
|
|
221
|
+
export * from './models/IconsModel';
|
|
221
222
|
export * from './models/OfficeMasterModel';
|
|
222
223
|
export * from './models/UpdateAttendanceAttachmentModel';
|
|
223
224
|
export * from './models/RoutingGroupUsersModel';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "icons" })
|
|
5
|
+
export class Icons extends BaseModel {
|
|
6
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
7
|
+
icon_name: string;
|
|
8
|
+
|
|
9
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
10
|
+
icon_name_arabic: string | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: "varchar", length: 2000, nullable: false })
|
|
13
|
+
url: string;
|
|
14
|
+
|
|
15
|
+
constructor(icon_name: string, url: string) {
|
|
16
|
+
super();
|
|
17
|
+
this.icon_name = icon_name;
|
|
18
|
+
this.url = url;
|
|
19
|
+
this.icon_name_arabic = null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -36,6 +36,10 @@ export class WorkflowDefinitions extends BaseModel {
|
|
|
36
36
|
@Column({ type: 'bigint', nullable: true })
|
|
37
37
|
sub_service_id: number | null;
|
|
38
38
|
|
|
39
|
+
/** Optional leave type scope (HR leave workflows per leave type). */
|
|
40
|
+
@Column({ type: 'int', nullable: true })
|
|
41
|
+
leave_type_id: number | null;
|
|
42
|
+
|
|
39
43
|
@ManyToOne(() => FMSubServices)
|
|
40
44
|
@JoinColumn({ name: 'sub_service_id' })
|
|
41
45
|
sub_service: FMSubServices;
|
|
@@ -56,7 +60,8 @@ export class WorkflowDefinitions extends BaseModel {
|
|
|
56
60
|
service_id?: number | null,
|
|
57
61
|
sub_service_id?: number | null,
|
|
58
62
|
status?: 'draft' | 'published',
|
|
59
|
-
service_type?: 'internal' | 'external' | 'none'
|
|
63
|
+
service_type?: 'internal' | 'external' | 'none',
|
|
64
|
+
leave_type_id?: number | null
|
|
60
65
|
) {
|
|
61
66
|
super();
|
|
62
67
|
this.name = name;
|
|
@@ -67,5 +72,6 @@ export class WorkflowDefinitions extends BaseModel {
|
|
|
67
72
|
this.sub_service_id = sub_service_id || null;
|
|
68
73
|
this.status = status || 'draft';
|
|
69
74
|
this.service_type = service_type || 'none';
|
|
75
|
+
this.leave_type_id = leave_type_id ?? null;
|
|
70
76
|
}
|
|
71
77
|
}
|
|
@@ -10,6 +10,9 @@ export class ImportantLinks extends BaseModel {
|
|
|
10
10
|
@Column({ type: 'varchar', nullable: false })
|
|
11
11
|
url: string;
|
|
12
12
|
|
|
13
|
+
@Column({ type: 'integer', nullable: true })
|
|
14
|
+
icon_id: number | null;
|
|
15
|
+
|
|
13
16
|
constructor(
|
|
14
17
|
title: string,
|
|
15
18
|
url: string
|
|
@@ -17,6 +20,7 @@ export class ImportantLinks extends BaseModel {
|
|
|
17
20
|
super();
|
|
18
21
|
this.title = title;
|
|
19
22
|
this.url = url;
|
|
23
|
+
this.icon_id = null;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|