@platform-modules/foreign-ministry 1.1.61 → 1.1.63
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/FinancialApprovalsModel.d.ts +1 -0
- package/dist/models/FinancialApprovalsModel.js +4 -0
- package/dist/models/GeneralServiceApprovalsModel.d.ts +4 -1
- package/dist/models/GeneralServiceApprovalsModel.js +9 -0
- package/dist/models/StationeryRequestsModel.d.ts +5 -1
- package/dist/models/StationeryRequestsModel.js +13 -0
- package/package.json +1 -1
- package/src/models/FinancialApprovalsModel.ts +4 -0
- package/src/models/GeneralServiceApprovalsModel.ts +10 -1
- package/src/models/StationeryRequestsModel.ts +13 -1
|
@@ -19,6 +19,7 @@ export declare class FinancialApprovals extends BaseModel {
|
|
|
19
19
|
section_id: number | null;
|
|
20
20
|
approved_by: number | null;
|
|
21
21
|
delegate_user_id: number | null;
|
|
22
|
+
is_allowed: boolean | null;
|
|
22
23
|
financialRequest?: FinancialRequests;
|
|
23
24
|
constructor(financial_request_id: number, level: number, approver_role_id: number, approval_status: FinancialApprovalStatus, department_id: number | null, section_id: number | null, approved_by: number | null, delegate_user_id: number | null);
|
|
24
25
|
}
|
|
@@ -79,6 +79,10 @@ __decorate([
|
|
|
79
79
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
80
80
|
__metadata("design:type", Object)
|
|
81
81
|
], FinancialApprovals.prototype, "delegate_user_id", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], FinancialApprovals.prototype, "is_allowed", void 0);
|
|
82
86
|
__decorate([
|
|
83
87
|
(0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.approvals),
|
|
84
88
|
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
|
@@ -4,7 +4,8 @@ export declare enum GeneralServiceApprovalStatus {
|
|
|
4
4
|
APPROVED = "Approved",
|
|
5
5
|
REJECTED = "Rejected",
|
|
6
6
|
SKIPPED = "Skipped",
|
|
7
|
-
IN_PROGRESS = "In Progress"
|
|
7
|
+
IN_PROGRESS = "In Progress",
|
|
8
|
+
ASSIGNED = "Assigned"
|
|
8
9
|
}
|
|
9
10
|
export declare class GeneralServiceApprovals extends BaseModel {
|
|
10
11
|
request_id: number;
|
|
@@ -23,5 +24,7 @@ export declare class GeneralServiceApprovals extends BaseModel {
|
|
|
23
24
|
transfer_from_user_id: number | null;
|
|
24
25
|
transfer_to_user_id: number | null;
|
|
25
26
|
delegate_user_id: number | null;
|
|
27
|
+
action_type: string | null;
|
|
28
|
+
is_allowed: boolean | null;
|
|
26
29
|
constructor(request_id: number, level: number, approver_role_id: number, approval_status: GeneralServiceApprovalStatus, department_id: number | null, section_id: number | null, approved_by: number | null, service_id?: number | null, sub_service_id?: number | null);
|
|
27
30
|
}
|
|
@@ -19,6 +19,7 @@ var GeneralServiceApprovalStatus;
|
|
|
19
19
|
GeneralServiceApprovalStatus["REJECTED"] = "Rejected";
|
|
20
20
|
GeneralServiceApprovalStatus["SKIPPED"] = "Skipped";
|
|
21
21
|
GeneralServiceApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
22
|
+
GeneralServiceApprovalStatus["ASSIGNED"] = "Assigned";
|
|
22
23
|
})(GeneralServiceApprovalStatus || (exports.GeneralServiceApprovalStatus = GeneralServiceApprovalStatus = {}));
|
|
23
24
|
let GeneralServiceApprovals = class GeneralServiceApprovals extends BaseModel_1.BaseModel {
|
|
24
25
|
// @Column({ type: 'timestamp', nullable: true })
|
|
@@ -107,6 +108,14 @@ __decorate([
|
|
|
107
108
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
108
109
|
__metadata("design:type", Object)
|
|
109
110
|
], GeneralServiceApprovals.prototype, "delegate_user_id", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], GeneralServiceApprovals.prototype, "action_type", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], GeneralServiceApprovals.prototype, "is_allowed", void 0);
|
|
110
119
|
exports.GeneralServiceApprovals = GeneralServiceApprovals = __decorate([
|
|
111
120
|
(0, typeorm_1.Entity)({ name: 'general_service_approvals' }),
|
|
112
121
|
__metadata("design:paramtypes", [Number, Number, Number, String, Object, Object, Object, Object, Object])
|
|
@@ -4,7 +4,8 @@ export declare enum StationeryRequestStatus {
|
|
|
4
4
|
ASSIGNED = "Assigned",
|
|
5
5
|
IN_PROGRESS = "In Progress",
|
|
6
6
|
APPROVED = "Approved",
|
|
7
|
-
REJECTED = "Rejected"
|
|
7
|
+
REJECTED = "Rejected",
|
|
8
|
+
COMPLETED = "Completed"
|
|
8
9
|
}
|
|
9
10
|
export declare class StationeryRequests extends BaseModel {
|
|
10
11
|
req_user_department_id: number | null;
|
|
@@ -20,4 +21,7 @@ export declare class StationeryRequests extends BaseModel {
|
|
|
20
21
|
comments: string | null;
|
|
21
22
|
status: StationeryRequestStatus;
|
|
22
23
|
workflow_execution_id: string | null;
|
|
24
|
+
stock_available: boolean | null;
|
|
25
|
+
po_number: string | null;
|
|
26
|
+
stock_available_date: Date | null;
|
|
23
27
|
}
|
|
@@ -19,6 +19,7 @@ var StationeryRequestStatus;
|
|
|
19
19
|
StationeryRequestStatus["IN_PROGRESS"] = "In Progress";
|
|
20
20
|
StationeryRequestStatus["APPROVED"] = "Approved";
|
|
21
21
|
StationeryRequestStatus["REJECTED"] = "Rejected";
|
|
22
|
+
StationeryRequestStatus["COMPLETED"] = "Completed";
|
|
22
23
|
})(StationeryRequestStatus || (exports.StationeryRequestStatus = StationeryRequestStatus = {}));
|
|
23
24
|
let StationeryRequests = class StationeryRequests extends BaseModel_1.BaseModel {
|
|
24
25
|
};
|
|
@@ -75,6 +76,18 @@ __decorate([
|
|
|
75
76
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
76
77
|
__metadata("design:type", Object)
|
|
77
78
|
], StationeryRequests.prototype, "workflow_execution_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], StationeryRequests.prototype, "stock_available", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], StationeryRequests.prototype, "po_number", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], StationeryRequests.prototype, "stock_available_date", void 0);
|
|
78
91
|
exports.StationeryRequests = StationeryRequests = __decorate([
|
|
79
92
|
(0, typeorm_1.Entity)({ name: 'stationery_requests' })
|
|
80
93
|
], StationeryRequests);
|
package/package.json
CHANGED
|
@@ -45,6 +45,10 @@ export class FinancialApprovals extends BaseModel {
|
|
|
45
45
|
@Column({ type: 'int', nullable: true })
|
|
46
46
|
delegate_user_id: number | null;
|
|
47
47
|
|
|
48
|
+
// is_allowed flag: true if logged-in user is the request creator, false otherwise (for chat permissions)
|
|
49
|
+
@Column({ type: 'boolean', nullable: true })
|
|
50
|
+
is_allowed: boolean | null;
|
|
51
|
+
|
|
48
52
|
@ManyToOne(() => FinancialRequests, fr => fr.approvals)
|
|
49
53
|
@JoinColumn({ name: 'financial_request_id' })
|
|
50
54
|
financialRequest?: FinancialRequests;
|
|
@@ -6,7 +6,8 @@ export enum GeneralServiceApprovalStatus {
|
|
|
6
6
|
APPROVED = "Approved",
|
|
7
7
|
REJECTED = "Rejected",
|
|
8
8
|
SKIPPED = "Skipped",
|
|
9
|
-
IN_PROGRESS = "In Progress"
|
|
9
|
+
IN_PROGRESS = "In Progress",
|
|
10
|
+
ASSIGNED = "Assigned"
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@Entity({ name: 'general_service_approvals' })
|
|
@@ -60,6 +61,14 @@ export class GeneralServiceApprovals extends BaseModel {
|
|
|
60
61
|
@Column({ type: 'int', nullable: true })
|
|
61
62
|
delegate_user_id: number | null; // Group who transferred from
|
|
62
63
|
|
|
64
|
+
// Stationery-specific: Action type to indicate what action is needed (for FE button handling)
|
|
65
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
66
|
+
action_type: string | null; // Values: 'approve' (L1), 'store' (Stores Office), 'finance' (Finance), 'finance_purchase', 'complete'
|
|
67
|
+
|
|
68
|
+
// is_allowed flag: true if logged-in user is the request creator, false otherwise (for chat permissions)
|
|
69
|
+
@Column({ type: 'boolean', nullable: true })
|
|
70
|
+
is_allowed: boolean | null;
|
|
71
|
+
|
|
63
72
|
// @Column({ type: 'timestamp', nullable: true })
|
|
64
73
|
// sla_start_time: Date | null; // SLA tracking start time for this assignment
|
|
65
74
|
|
|
@@ -6,9 +6,11 @@ export enum StationeryRequestStatus {
|
|
|
6
6
|
ASSIGNED = "Assigned",
|
|
7
7
|
IN_PROGRESS = "In Progress",
|
|
8
8
|
APPROVED = "Approved",
|
|
9
|
-
REJECTED = "Rejected"
|
|
9
|
+
REJECTED = "Rejected",
|
|
10
|
+
COMPLETED = "Completed"
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
|
|
12
14
|
@Entity({ name: 'stationery_requests' })
|
|
13
15
|
export class StationeryRequests extends BaseModel {
|
|
14
16
|
@Column({ type: 'int', nullable: true })
|
|
@@ -49,5 +51,15 @@ export class StationeryRequests extends BaseModel {
|
|
|
49
51
|
|
|
50
52
|
@Column({ type: 'varchar', nullable: true })
|
|
51
53
|
workflow_execution_id: string | null;
|
|
54
|
+
|
|
55
|
+
// Business logic fields
|
|
56
|
+
@Column({ type: 'boolean', default: false, nullable: true })
|
|
57
|
+
stock_available: boolean | null; // Whether stock is available in Stores Office
|
|
58
|
+
|
|
59
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
60
|
+
po_number: string | null; // Purchase Order number from Finance
|
|
61
|
+
|
|
62
|
+
@Column({ type: 'date', nullable: true })
|
|
63
|
+
stock_available_date: Date | null; // When stock becomes available
|
|
52
64
|
}
|
|
53
65
|
|