@platform-modules/foreign-ministry 1.3.365 → 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.
|
@@ -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);
|
package/package.json
CHANGED
|
@@ -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';
|
|
@@ -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
|
}
|