@platform-modules/foreign-ministry 1.0.92 → 1.0.93
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 +0 -6
- package/dist/data-source.js +35 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/models/AllowanceRequestsModel.d.ts +13 -0
- package/dist/models/AllowanceRequestsModel.js +64 -0
- package/dist/models/AllowanceTypesModel.d.ts +8 -0
- package/dist/models/AllowanceTypesModel.js +43 -0
- package/dist/models/BankAccountChangeRequestsModel.d.ts +12 -0
- package/dist/models/BankAccountChangeRequestsModel.js +62 -0
- package/dist/models/FinancialApprovalsModel.d.ts +22 -0
- package/dist/models/FinancialApprovalsModel.js +84 -0
- package/dist/models/FinancialAttachmentsModel.d.ts +10 -0
- package/dist/models/FinancialAttachmentsModel.js +50 -0
- package/dist/models/FinancialChatsModel.d.ts +9 -0
- package/dist/models/FinancialChatsModel.js +45 -0
- package/dist/models/FinancialRequestsModel.d.ts +51 -0
- package/dist/models/FinancialRequestsModel.js +158 -0
- package/dist/models/FinancialSettingsModel.d.ts +11 -0
- package/dist/models/FinancialSettingsModel.js +59 -0
- package/dist/models/FinancialWorkFlowModel.d.ts +18 -0
- package/dist/models/FinancialWorkFlowModel.js +67 -0
- package/dist/models/LeaveApprovalsModel.d.ts +3 -1
- package/dist/models/LeaveApprovalsModel.js +13 -3
- package/dist/models/LeaveRequestModel.d.ts +4 -1
- package/dist/models/LeaveRequestModel.js +17 -2
- package/dist/models/NotificationModel.d.ts +18 -0
- package/dist/models/NotificationModel.js +79 -0
- package/dist/models/PayslipRequestsModel.d.ts +10 -0
- package/dist/models/PayslipRequestsModel.js +50 -0
- package/dist/models/ReimbursementRequestsModel.d.ts +16 -0
- package/dist/models/ReimbursementRequestsModel.js +78 -0
- package/dist/models/RequestTypeMasterModel.d.ts +13 -0
- package/dist/models/RequestTypeMasterModel.js +59 -0
- package/dist/models/SalaryCertificateRequestsModel.d.ts +9 -0
- package/dist/models/SalaryCertificateRequestsModel.js +45 -0
- package/dist/models/WorkflowDefinitions.d.ts +16 -0
- package/dist/models/WorkflowDefinitions.js +86 -0
- package/dist/models/WorkflowHierarchy.d.ts +16 -0
- package/dist/models/WorkflowHierarchy.js +81 -0
- package/dist/models/WorkflowTask.d.ts +7 -0
- package/dist/models/WorkflowTask.js +39 -0
- package/dist/models/WorkflowTaskNames.d.ts +8 -0
- package/dist/models/WorkflowTaskNames.js +44 -0
- package/dist/models/userRolesModel.d.ts +2 -1
- package/dist/models/userRolesModel.js +7 -2
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
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.ReimbursementRequests = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
|
|
16
|
+
let ReimbursementRequests = class ReimbursementRequests extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(financial_request_id, amount, quantity, total_amount, approved_amount, payment_mode, payment_date, expense_description) {
|
|
18
|
+
super();
|
|
19
|
+
this.financial_request_id = financial_request_id;
|
|
20
|
+
this.amount = amount;
|
|
21
|
+
this.quantity = quantity;
|
|
22
|
+
this.total_amount = total_amount;
|
|
23
|
+
this.approved_amount = approved_amount;
|
|
24
|
+
this.payment_mode = payment_mode;
|
|
25
|
+
this.payment_date = payment_date;
|
|
26
|
+
this.expense_description = expense_description;
|
|
27
|
+
this.payment_processed = false;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.ReimbursementRequests = ReimbursementRequests;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'int', unique: true }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], ReimbursementRequests.prototype, "financial_request_id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ReimbursementRequests.prototype, "expense_description", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], ReimbursementRequests.prototype, "price", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], ReimbursementRequests.prototype, "quantity", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], ReimbursementRequests.prototype, "amount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], ReimbursementRequests.prototype, "total_amount", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], ReimbursementRequests.prototype, "approved_amount", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], ReimbursementRequests.prototype, "payment_processed", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], ReimbursementRequests.prototype, "payment_mode", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
69
|
+
__metadata("design:type", Date)
|
|
70
|
+
], ReimbursementRequests.prototype, "payment_date", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.OneToOne)('FinancialRequests', 'reimbursementRequest'),
|
|
73
|
+
__metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
|
|
74
|
+
], ReimbursementRequests.prototype, "financialRequest", void 0);
|
|
75
|
+
exports.ReimbursementRequests = ReimbursementRequests = __decorate([
|
|
76
|
+
(0, typeorm_1.Entity)({ name: 'reimbursement_requests' }),
|
|
77
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, String, Date, String])
|
|
78
|
+
], ReimbursementRequests);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
3
|
+
export declare class RequestTypeMaster extends BaseModel {
|
|
4
|
+
request_name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
specific_table_name: string;
|
|
7
|
+
is_active: boolean;
|
|
8
|
+
icon: string;
|
|
9
|
+
max_sla_days: number;
|
|
10
|
+
display_order: number;
|
|
11
|
+
financialRequests?: FinancialRequests[];
|
|
12
|
+
constructor(request_name: string);
|
|
13
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.RequestTypeMaster = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let RequestTypeMaster = class RequestTypeMaster extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(request_name) {
|
|
17
|
+
super();
|
|
18
|
+
this.request_name = request_name;
|
|
19
|
+
this.is_active = true;
|
|
20
|
+
this.display_order = 0;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.RequestTypeMaster = RequestTypeMaster;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], RequestTypeMaster.prototype, "request_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], RequestTypeMaster.prototype, "description", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], RequestTypeMaster.prototype, "specific_table_name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], RequestTypeMaster.prototype, "is_active", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], RequestTypeMaster.prototype, "icon", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], RequestTypeMaster.prototype, "max_sla_days", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], RequestTypeMaster.prototype, "display_order", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.OneToMany)('FinancialRequests', 'requestType'),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], RequestTypeMaster.prototype, "financialRequests", void 0);
|
|
56
|
+
exports.RequestTypeMaster = RequestTypeMaster = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)({ name: 'request_type_master' }),
|
|
58
|
+
__metadata("design:paramtypes", [String])
|
|
59
|
+
], RequestTypeMaster);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
3
|
+
export declare class SalaryCertificateRequests extends BaseModel {
|
|
4
|
+
financial_request_id: number;
|
|
5
|
+
certificate_purpose: string;
|
|
6
|
+
certificate_url: string;
|
|
7
|
+
financialRequest?: FinancialRequests;
|
|
8
|
+
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.SalaryCertificateRequests = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
|
|
16
|
+
let SalaryCertificateRequests = class SalaryCertificateRequests extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(financial_request_id, certificate_purpose, certificate_url) {
|
|
18
|
+
super();
|
|
19
|
+
this.financial_request_id = financial_request_id;
|
|
20
|
+
this.certificate_purpose = certificate_purpose;
|
|
21
|
+
this.certificate_url = certificate_url;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.SalaryCertificateRequests = SalaryCertificateRequests;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', unique: true }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], SalaryCertificateRequests.prototype, "financial_request_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], SalaryCertificateRequests.prototype, "certificate_purpose", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], SalaryCertificateRequests.prototype, "certificate_url", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.OneToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.salaryCertificateRequest),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
|
40
|
+
__metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
|
|
41
|
+
], SalaryCertificateRequests.prototype, "financialRequest", void 0);
|
|
42
|
+
exports.SalaryCertificateRequests = SalaryCertificateRequests = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: 'salary_certificate_requests' }),
|
|
44
|
+
__metadata("design:paramtypes", [Number, String, String])
|
|
45
|
+
], SalaryCertificateRequests);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FMServices } from './FMServices';
|
|
3
|
+
import { FMSubServices } from './FMSubservices';
|
|
4
|
+
export declare class WorkflowDefinitions extends BaseModel {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
version: number;
|
|
8
|
+
is_active: boolean;
|
|
9
|
+
service_type: 'internal' | 'external' | 'none';
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
service: FMServices;
|
|
12
|
+
sub_service_id: number | null;
|
|
13
|
+
sub_service: FMSubServices;
|
|
14
|
+
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');
|
|
16
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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.WorkflowDefinitions = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const FMServices_1 = require("./FMServices");
|
|
16
|
+
const FMSubservices_1 = require("./FMSubservices");
|
|
17
|
+
let WorkflowDefinitions = class WorkflowDefinitions extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor(name, description, version, is_active, service_id, sub_service_id, status, service_type) {
|
|
19
|
+
super();
|
|
20
|
+
this.name = name;
|
|
21
|
+
this.description = description || '';
|
|
22
|
+
this.version = version || 1;
|
|
23
|
+
this.is_active = is_active !== undefined ? is_active : true;
|
|
24
|
+
this.service_id = service_id || null;
|
|
25
|
+
this.sub_service_id = sub_service_id || null;
|
|
26
|
+
this.status = status || 'draft';
|
|
27
|
+
this.service_type = service_type || 'none';
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.WorkflowDefinitions = WorkflowDefinitions;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], WorkflowDefinitions.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], WorkflowDefinitions.prototype, "description", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer', default: 1 }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], WorkflowDefinitions.prototype, "version", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], WorkflowDefinitions.prototype, "is_active", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
type: 'varchar',
|
|
50
|
+
length: 20,
|
|
51
|
+
nullable: true,
|
|
52
|
+
enum: ['internal', 'external', 'none']
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], WorkflowDefinitions.prototype, "service_type", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], WorkflowDefinitions.prototype, "service_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ManyToOne)(() => FMServices_1.FMServices),
|
|
62
|
+
(0, typeorm_1.JoinColumn)({ name: 'service_id' }),
|
|
63
|
+
__metadata("design:type", FMServices_1.FMServices)
|
|
64
|
+
], WorkflowDefinitions.prototype, "service", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], WorkflowDefinitions.prototype, "sub_service_id", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => FMSubservices_1.FMSubServices),
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: 'sub_service_id' }),
|
|
72
|
+
__metadata("design:type", FMSubservices_1.FMSubServices)
|
|
73
|
+
], WorkflowDefinitions.prototype, "sub_service", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: 'varchar',
|
|
77
|
+
length: 20,
|
|
78
|
+
default: 'draft',
|
|
79
|
+
enum: ['draft', 'published']
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], WorkflowDefinitions.prototype, "status", void 0);
|
|
83
|
+
exports.WorkflowDefinitions = WorkflowDefinitions = __decorate([
|
|
84
|
+
(0, typeorm_1.Entity)({ name: 'workflow_definitions' }),
|
|
85
|
+
__metadata("design:paramtypes", [String, String, Number, Boolean, Object, Object, String, String])
|
|
86
|
+
], WorkflowDefinitions);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { WorkflowDefinitions } from './WorkflowDefinitions';
|
|
3
|
+
export declare class WorkflowHierarchy extends BaseModel {
|
|
4
|
+
workflow_definition_id: number;
|
|
5
|
+
department_id: number;
|
|
6
|
+
section_id: number;
|
|
7
|
+
approval_role_id: number;
|
|
8
|
+
approval_user_id: number;
|
|
9
|
+
taskname: string | null;
|
|
10
|
+
status: string | null;
|
|
11
|
+
task: any | null;
|
|
12
|
+
step_order: number;
|
|
13
|
+
is_required: boolean;
|
|
14
|
+
workflow_definition: WorkflowDefinitions;
|
|
15
|
+
constructor(workflow_definition_id: number, department_id: number, section_id: number, approval_role_id: number, approval_user_id: number, step_order: number, is_required?: boolean, taskname?: string, status?: string, task?: any);
|
|
16
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.WorkflowHierarchy = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const WorkflowDefinitions_1 = require("./WorkflowDefinitions");
|
|
16
|
+
let WorkflowHierarchy = class WorkflowHierarchy extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(workflow_definition_id, department_id, section_id, approval_role_id, approval_user_id, step_order, is_required, taskname, status, task) {
|
|
18
|
+
super();
|
|
19
|
+
this.workflow_definition_id = workflow_definition_id;
|
|
20
|
+
this.department_id = department_id;
|
|
21
|
+
this.section_id = section_id;
|
|
22
|
+
this.approval_role_id = approval_role_id;
|
|
23
|
+
this.approval_user_id = approval_user_id;
|
|
24
|
+
this.step_order = step_order;
|
|
25
|
+
this.is_required = is_required !== undefined ? is_required : true;
|
|
26
|
+
this.taskname = taskname || null;
|
|
27
|
+
this.status = status || null;
|
|
28
|
+
this.task = task || null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.WorkflowHierarchy = WorkflowHierarchy;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], WorkflowHierarchy.prototype, "workflow_definition_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], WorkflowHierarchy.prototype, "department_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], WorkflowHierarchy.prototype, "section_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], WorkflowHierarchy.prototype, "approval_role_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], WorkflowHierarchy.prototype, "approval_user_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], WorkflowHierarchy.prototype, "taskname", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], WorkflowHierarchy.prototype, "status", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], WorkflowHierarchy.prototype, "task", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], WorkflowHierarchy.prototype, "step_order", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
70
|
+
__metadata("design:type", Boolean)
|
|
71
|
+
], WorkflowHierarchy.prototype, "is_required", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(() => WorkflowDefinitions_1.WorkflowDefinitions, { onDelete: 'CASCADE' }),
|
|
74
|
+
(0, typeorm_1.JoinColumn)({ name: 'workflow_definition_id' }),
|
|
75
|
+
__metadata("design:type", WorkflowDefinitions_1.WorkflowDefinitions)
|
|
76
|
+
], WorkflowHierarchy.prototype, "workflow_definition", void 0);
|
|
77
|
+
exports.WorkflowHierarchy = WorkflowHierarchy = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)({ name: 'workflow_hierarchy' }),
|
|
79
|
+
(0, typeorm_1.Unique)(['workflow_definition_id', 'step_order']),
|
|
80
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Boolean, String, String, Object])
|
|
81
|
+
], WorkflowHierarchy);
|
|
@@ -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.WorkflowTask = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, task_id, task_type) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.task_id = task_id || 0;
|
|
20
|
+
this.task_type = task_type || '';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.WorkflowTask = WorkflowTask;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], WorkflowTask.prototype, "task_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], WorkflowTask.prototype, "name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], WorkflowTask.prototype, "task_type", void 0);
|
|
36
|
+
exports.WorkflowTask = WorkflowTask = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
|
|
38
|
+
__metadata("design:paramtypes", [String, Number, String])
|
|
39
|
+
], WorkflowTask);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class WorkflowTaskNames extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
task_id: number;
|
|
5
|
+
description: string;
|
|
6
|
+
task_type: string;
|
|
7
|
+
constructor(name: string, task_id: number, description: string, task_type: string);
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.WorkflowTaskNames = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, task_id, description, task_type) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.task_id = task_id;
|
|
20
|
+
this.description = description;
|
|
21
|
+
this.task_type = task_type;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.WorkflowTaskNames = WorkflowTaskNames;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], WorkflowTaskNames.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], WorkflowTaskNames.prototype, "task_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], WorkflowTaskNames.prototype, "description", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], WorkflowTaskNames.prototype, "task_type", void 0);
|
|
41
|
+
exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
|
|
43
|
+
__metadata("design:paramtypes", [String, Number, String, String])
|
|
44
|
+
], WorkflowTaskNames);
|
|
@@ -14,5 +14,6 @@ export declare class UserRole extends BaseModel {
|
|
|
14
14
|
user_id: number;
|
|
15
15
|
department_id: number;
|
|
16
16
|
section_id: number;
|
|
17
|
-
|
|
17
|
+
is_active: boolean;
|
|
18
|
+
constructor(role_id: number, user_id: number, department_id: number, section_id: number, is_active?: boolean);
|
|
18
19
|
}
|
|
@@ -23,12 +23,13 @@ exports.UserRole = void 0;
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const BaseModel_1 = require("./BaseModel");
|
|
25
25
|
let UserRole = class UserRole extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(role_id, user_id, department_id, section_id) {
|
|
26
|
+
constructor(role_id, user_id, department_id, section_id, is_active = false) {
|
|
27
27
|
super();
|
|
28
28
|
this.role_id = role_id;
|
|
29
29
|
this.user_id = user_id;
|
|
30
30
|
this.department_id = department_id;
|
|
31
31
|
this.section_id = section_id;
|
|
32
|
+
this.is_active = is_active;
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
exports.UserRole = UserRole;
|
|
@@ -48,7 +49,11 @@ __decorate([
|
|
|
48
49
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
49
50
|
__metadata("design:type", Number)
|
|
50
51
|
], UserRole.prototype, "section_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], UserRole.prototype, "is_active", void 0);
|
|
51
56
|
exports.UserRole = UserRole = __decorate([
|
|
52
57
|
(0, typeorm_1.Entity)({ name: 'user_role' }),
|
|
53
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number])
|
|
58
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Boolean])
|
|
54
59
|
], UserRole);
|