@platform-modules/foreign-ministry 1.3.362 → 1.3.364
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/models/EmployeeOfMonthSupportNominationRequestModel.d.ts +2 -1
- package/dist/models/EmployeeOfMonthSupportNominationRequestModel.js +3 -3
- package/dist/models/GatePassRequestsModel.js +2 -2
- package/dist/models/GatePassVisitorsModel.js +2 -2
- package/package.json +1 -1
- package/sql/employee_of_month_support_nomination_nominated_support_user_id.sql +12 -0
- package/sql/gate_pass_from_to_datetime.sql +8 -0
- package/src/models/EmployeeOfMonthSupportNominationRequestModel.ts +3 -2
- package/src/models/GatePassRequestsModel.ts +2 -2
- package/src/models/GatePassVisitorsModel.ts +2 -2
|
@@ -19,7 +19,8 @@ export declare class EmployeeOfMonthSupportNominationRequests extends BaseModel
|
|
|
19
19
|
service_id: number | null;
|
|
20
20
|
sub_service_id: number | null;
|
|
21
21
|
user_id: number;
|
|
22
|
-
|
|
22
|
+
/** Nominated support employee (users.id). */
|
|
23
|
+
nominated_support_user_id: number;
|
|
23
24
|
last_annual_assessment: string;
|
|
24
25
|
rating_scores: EomSupportNominationRatingScores;
|
|
25
26
|
status: string;
|
|
@@ -42,9 +42,9 @@ __decorate([
|
|
|
42
42
|
__metadata("design:type", Number)
|
|
43
43
|
], EmployeeOfMonthSupportNominationRequests.prototype, "user_id", void 0);
|
|
44
44
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: '
|
|
46
|
-
__metadata("design:type",
|
|
47
|
-
], EmployeeOfMonthSupportNominationRequests.prototype, "
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], EmployeeOfMonthSupportNominationRequests.prototype, "nominated_support_user_id", void 0);
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
50
50
|
__metadata("design:type", String)
|
|
@@ -127,11 +127,11 @@ __decorate([
|
|
|
127
127
|
__metadata("design:type", Object)
|
|
128
128
|
], GatePassRequests.prototype, "purpose_of_entry", void 0);
|
|
129
129
|
__decorate([
|
|
130
|
-
(0, typeorm_1.Column)({ type: '
|
|
130
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
131
131
|
__metadata("design:type", Object)
|
|
132
132
|
], GatePassRequests.prototype, "from_date", void 0);
|
|
133
133
|
__decorate([
|
|
134
|
-
(0, typeorm_1.Column)({ type: '
|
|
134
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
135
135
|
__metadata("design:type", Object)
|
|
136
136
|
], GatePassRequests.prototype, "to_date", void 0);
|
|
137
137
|
__decorate([
|
|
@@ -119,11 +119,11 @@ __decorate([
|
|
|
119
119
|
__metadata("design:type", Object)
|
|
120
120
|
], GatePassVisitors.prototype, "purpose_of_entry", void 0);
|
|
121
121
|
__decorate([
|
|
122
|
-
(0, typeorm_1.Column)({ type: '
|
|
122
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
123
123
|
__metadata("design:type", Object)
|
|
124
124
|
], GatePassVisitors.prototype, "from_date", void 0);
|
|
125
125
|
__decorate([
|
|
126
|
-
(0, typeorm_1.Column)({ type: '
|
|
126
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
127
127
|
__metadata("design:type", Object)
|
|
128
128
|
], GatePassVisitors.prototype, "to_date", void 0);
|
|
129
129
|
__decorate([
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Replace job_number with nominated_support_user_id (users.id) on support nomination requests.
|
|
2
|
+
ALTER TABLE employee_of_month_support_nomination_requests
|
|
3
|
+
ADD COLUMN IF NOT EXISTS nominated_support_user_id INT;
|
|
4
|
+
|
|
5
|
+
UPDATE employee_of_month_support_nomination_requests
|
|
6
|
+
SET nominated_support_user_id = NULLIF(regexp_replace(COALESCE(job_number, ''), '\D', '', 'g'), '')::INT
|
|
7
|
+
WHERE nominated_support_user_id IS NULL
|
|
8
|
+
AND job_number IS NOT NULL
|
|
9
|
+
AND job_number ~ '^\d+$';
|
|
10
|
+
|
|
11
|
+
ALTER TABLE employee_of_month_support_nomination_requests
|
|
12
|
+
DROP COLUMN IF EXISTS job_number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Store gate pass validity window with date and time (not date-only).
|
|
2
|
+
ALTER TABLE gate_pass_requests
|
|
3
|
+
ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
|
|
4
|
+
ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
|
|
5
|
+
|
|
6
|
+
ALTER TABLE gate_pass_visitors
|
|
7
|
+
ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
|
|
8
|
+
ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
|
|
@@ -36,8 +36,9 @@ export class EmployeeOfMonthSupportNominationRequests extends BaseModel {
|
|
|
36
36
|
@Column({ type: 'int', nullable: false })
|
|
37
37
|
user_id: number;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/** Nominated support employee (users.id). */
|
|
40
|
+
@Column({ type: 'int', nullable: true })
|
|
41
|
+
nominated_support_user_id: number;
|
|
41
42
|
|
|
42
43
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
43
44
|
last_annual_assessment: string;
|
|
@@ -79,10 +79,10 @@ export class GatePassRequests extends BaseModel {
|
|
|
79
79
|
@Column({ type: 'text', nullable: true })
|
|
80
80
|
purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
|
|
81
81
|
|
|
82
|
-
@Column({ type: '
|
|
82
|
+
@Column({ type: 'timestamptz', nullable: true })
|
|
83
83
|
from_date: Date | null; // من (From)
|
|
84
84
|
|
|
85
|
-
@Column({ type: '
|
|
85
|
+
@Column({ type: 'timestamptz', nullable: true })
|
|
86
86
|
to_date: Date | null; // الى (To)
|
|
87
87
|
|
|
88
88
|
@Column({ type: 'enum', enum: GatePassType, nullable: true })
|
|
@@ -72,10 +72,10 @@ export class GatePassVisitors extends BaseModel {
|
|
|
72
72
|
@Column({ type: 'text', nullable: true })
|
|
73
73
|
purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
|
|
74
74
|
|
|
75
|
-
@Column({ type: '
|
|
75
|
+
@Column({ type: 'timestamptz', nullable: true })
|
|
76
76
|
from_date: Date | null; // من (From)
|
|
77
77
|
|
|
78
|
-
@Column({ type: '
|
|
78
|
+
@Column({ type: 'timestamptz', nullable: true })
|
|
79
79
|
to_date: Date | null; // الى (To)
|
|
80
80
|
|
|
81
81
|
// Store as varchar to avoid DB enum coupling (values: "Short-term" / "Long-term")
|