@platform-modules/foreign-ministry 1.1.64 → 1.1.65
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 +11 -3
- package/dist/data-source.js +11 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +14 -2
- package/dist/models/FinancialGradeModel.d.ts +4 -3
- package/dist/models/FinancialGradeModel.js +12 -7
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +6 -0
- package/dist/models/HelpContentMappedCategoriesModel.js +34 -0
- package/dist/models/HelpContentMappedTagsModel.d.ts +6 -0
- package/dist/models/HelpContentMappedTagsModel.js +34 -0
- package/dist/models/HelpContentTagsModel.d.ts +5 -0
- package/dist/models/HelpContentTagsModel.js +29 -0
- package/dist/models/LeaveBalanceModel.d.ts +8 -0
- package/dist/models/LeaveBalanceModel.js +44 -0
- package/dist/models/LeaveConfigGradesModel.d.ts +19 -0
- package/dist/models/LeaveConfigGradesModel.js +100 -0
- package/dist/models/LeaveConfigModel.d.ts +20 -0
- package/dist/models/LeaveConfigModel.js +90 -0
- package/dist/models/LeaveTransactionModel.d.ts +20 -0
- package/dist/models/LeaveTransactionModel.js +71 -0
- package/dist/models/LeaveTypesModel.d.ts +7 -1
- package/dist/models/LeaveTypesModel.js +20 -5
- package/dist/models/M&CMasterModel.d.ts +9 -0
- package/dist/models/M&CMasterModel.js +49 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/package.json +1 -1
- package/src/data-source.ts +13 -1
- package/src/index.ts +8 -2
- package/src/models/FinancialGradeModel.ts +13 -8
- package/src/models/LeaveBalanceModel.ts +26 -0
- package/src/models/LeaveConfigGradesModel.ts +72 -0
- package/src/models/LeaveConfigModel.ts +64 -0
- package/src/models/LeaveTransactionModel.ts +58 -0
- package/src/models/LeaveTypesModel.ts +27 -11
- package/src/models/M&CMasterModel.ts +37 -0
- package/dist/models/StationeryMaterialMasterModel.d.ts +0 -11
- package/dist/models/StationeryMaterialMasterModel.js +0 -56
- package/dist/models/StationeryRequestsModel.d.ts +0 -27
- package/dist/models/StationeryRequestsModel.js +0 -93
- package/src/models/StationeryMaterialMasterModel.ts +0 -35
- package/src/models/StationeryRequestsModel.ts +0 -65
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum genderType {
|
|
3
|
+
Male = "Male",
|
|
4
|
+
Female = "Female",
|
|
5
|
+
All = "All"
|
|
6
|
+
}
|
|
2
7
|
export declare class LeaveTypes extends BaseModel {
|
|
3
8
|
name: string;
|
|
4
9
|
name_in_arabic: string;
|
|
5
10
|
omani_only?: boolean;
|
|
6
11
|
non_omani_muslim?: boolean;
|
|
7
12
|
non_omani_non_muslim?: boolean;
|
|
8
|
-
|
|
13
|
+
gender: genderType;
|
|
14
|
+
constructor(name: string, name_in_arabic: string, omani_only: boolean, non_omani_muslim: boolean, non_omani_non_muslim: boolean, gender: genderType);
|
|
9
15
|
}
|
|
@@ -9,26 +9,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LeaveTypes = void 0;
|
|
12
|
+
exports.LeaveTypes = exports.genderType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var genderType;
|
|
16
|
+
(function (genderType) {
|
|
17
|
+
genderType["Male"] = "Male";
|
|
18
|
+
genderType["Female"] = "Female";
|
|
19
|
+
genderType["All"] = "All";
|
|
20
|
+
})(genderType || (exports.genderType = genderType = {}));
|
|
15
21
|
let LeaveTypes = class LeaveTypes extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, name_in_arabic) {
|
|
22
|
+
constructor(name, name_in_arabic, omani_only, non_omani_muslim, non_omani_non_muslim, gender) {
|
|
17
23
|
super();
|
|
18
24
|
this.omani_only = false;
|
|
19
25
|
this.non_omani_muslim = false;
|
|
20
26
|
this.non_omani_non_muslim = false;
|
|
27
|
+
this.gender = genderType.All;
|
|
21
28
|
this.name = name;
|
|
22
29
|
this.name_in_arabic = name_in_arabic;
|
|
30
|
+
this.omani_only = omani_only;
|
|
31
|
+
this.non_omani_muslim = non_omani_muslim;
|
|
32
|
+
this.non_omani_non_muslim = non_omani_non_muslim;
|
|
33
|
+
this.gender = gender;
|
|
23
34
|
}
|
|
24
35
|
};
|
|
25
36
|
exports.LeaveTypes = LeaveTypes;
|
|
26
37
|
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
28
39
|
__metadata("design:type", String)
|
|
29
40
|
], LeaveTypes.prototype, "name", void 0);
|
|
30
41
|
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
32
43
|
__metadata("design:type", String)
|
|
33
44
|
], LeaveTypes.prototype, "name_in_arabic", void 0);
|
|
34
45
|
__decorate([
|
|
@@ -43,7 +54,11 @@ __decorate([
|
|
|
43
54
|
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
44
55
|
__metadata("design:type", Boolean)
|
|
45
56
|
], LeaveTypes.prototype, "non_omani_non_muslim", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true, default: genderType.All }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], LeaveTypes.prototype, "gender", void 0);
|
|
46
61
|
exports.LeaveTypes = LeaveTypes = __decorate([
|
|
47
62
|
(0, typeorm_1.Entity)({ name: 'leave_types' }),
|
|
48
|
-
__metadata("design:paramtypes", [String, String])
|
|
63
|
+
__metadata("design:paramtypes", [String, String, Boolean, Boolean, Boolean, String])
|
|
49
64
|
], LeaveTypes);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class MandCMaster extends BaseModel {
|
|
3
|
+
name: string;
|
|
4
|
+
name_in_arabic: string;
|
|
5
|
+
region: string;
|
|
6
|
+
country: string;
|
|
7
|
+
location: string;
|
|
8
|
+
constructor(name: string, name_in_arabic: string, region: string, country: string, location: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.MandCMaster = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let MandCMaster = class MandCMaster extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, name_in_arabic, region, country, location) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.name_in_arabic = name_in_arabic;
|
|
20
|
+
this.region = region;
|
|
21
|
+
this.country = country;
|
|
22
|
+
this.location = location;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.MandCMaster = MandCMaster;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], MandCMaster.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], MandCMaster.prototype, "name_in_arabic", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], MandCMaster.prototype, "region", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], MandCMaster.prototype, "country", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], MandCMaster.prototype, "location", void 0);
|
|
46
|
+
exports.MandCMaster = MandCMaster = __decorate([
|
|
47
|
+
(0, typeorm_1.Entity)({ name: 'M&C_names' }),
|
|
48
|
+
__metadata("design:paramtypes", [String, String, String, String, String])
|
|
49
|
+
], MandCMaster);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.QuestionTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let QuestionTags = class QuestionTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, question_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name,
|
|
19
|
+
this.question_Id = question_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.QuestionTags = QuestionTags;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], QuestionTags.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], QuestionTags.prototype, "question_Id", void 0);
|
|
31
|
+
exports.QuestionTags = QuestionTags = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'question_tags' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Number])
|
|
34
|
+
], QuestionTags);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -106,6 +106,13 @@ import { Group } from './models/GroupModel';
|
|
|
106
106
|
import { WorkSchedule } from './models/WorkScheduleModel';
|
|
107
107
|
import { Jobs } from './models/JobsModel';
|
|
108
108
|
import { TelephoneDirectory } from './models/TelephoneDirectoryModel'
|
|
109
|
+
import { MandCMaster } from './models/M&CMasterModel'
|
|
110
|
+
import { LeaveBalance } from './models/LeaveBalanceModel'
|
|
111
|
+
import { LeaveConfiguration } from './models/LeaveConfigModel'
|
|
112
|
+
import { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel'
|
|
113
|
+
import { LeaveTransaction } from './models/LeaveTransactionModel'
|
|
114
|
+
|
|
115
|
+
|
|
109
116
|
export const AppDataSource = new DataSource({
|
|
110
117
|
type: 'postgres',
|
|
111
118
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -211,6 +218,11 @@ export const AppDataSource = new DataSource({
|
|
|
211
218
|
Group,
|
|
212
219
|
WorkSchedule,
|
|
213
220
|
Jobs,
|
|
214
|
-
TelephoneDirectory
|
|
221
|
+
TelephoneDirectory,
|
|
222
|
+
MandCMaster,
|
|
223
|
+
LeaveBalance,
|
|
224
|
+
LeaveConfiguration,
|
|
225
|
+
LeaveConfigurationGrades,
|
|
226
|
+
LeaveTransaction
|
|
215
227
|
],
|
|
216
228
|
});
|
package/src/index.ts
CHANGED
|
@@ -101,5 +101,11 @@ export * from './models/GroupModel';
|
|
|
101
101
|
export * from './models/WorkScheduleModel';
|
|
102
102
|
export * from './models/JobsModel';
|
|
103
103
|
export * from './models/TelephoneDirectoryModel';
|
|
104
|
-
export * from './models/
|
|
105
|
-
export * from './models/
|
|
104
|
+
export * from './models/M&CMasterModel';
|
|
105
|
+
export * from './models/LeaveBalanceModel';
|
|
106
|
+
export * from './models/LeaveConfigModel';
|
|
107
|
+
export { LeaveConfiguration, enumFrequency } from './models/LeaveConfigModel';
|
|
108
|
+
export * from './models/LeaveConfigGradesModel';
|
|
109
|
+
export { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel';
|
|
110
|
+
export * from './models/LeaveTransactionModel';
|
|
111
|
+
export { LeaveTransaction, LeaveTransactionStatus } from './models/LeaveTransactionModel';
|
|
@@ -4,23 +4,28 @@ import { BaseModel } from './BaseModel';
|
|
|
4
4
|
@Entity({ name: 'financial_grade' })
|
|
5
5
|
export class FinancialGrade extends BaseModel {
|
|
6
6
|
|
|
7
|
-
@Column({ nullable: false })
|
|
7
|
+
@Column({ type: 'varchar', nullable: false })
|
|
8
8
|
diplomatic_title: string;
|
|
9
9
|
|
|
10
|
-
@Column({ nullable:
|
|
11
|
-
|
|
10
|
+
@Column({ type: 'varchar', nullable: true })
|
|
11
|
+
arabic_title: string;
|
|
12
12
|
|
|
13
|
-
@Column({ type: "
|
|
14
|
-
|
|
13
|
+
@Column({ type: "integer", nullable: false })
|
|
14
|
+
financial_grade: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "integer", nullable: false })
|
|
17
|
+
leave_count: number;
|
|
15
18
|
|
|
16
19
|
constructor(
|
|
17
20
|
diplomatic_title: string,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
arabic_title: string,
|
|
22
|
+
financial_grade: number,
|
|
23
|
+
leave_count: number
|
|
20
24
|
) {
|
|
21
25
|
super();
|
|
22
26
|
this.diplomatic_title = diplomatic_title;
|
|
27
|
+
this.arabic_title = arabic_title;
|
|
23
28
|
this.financial_grade = financial_grade;
|
|
24
|
-
this.
|
|
29
|
+
this.leave_count = leave_count;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'leave_balance' })
|
|
5
|
+
export class LeaveBalance extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ nullable: true })
|
|
8
|
+
user_id: string;
|
|
9
|
+
|
|
10
|
+
@Column({ nullable: true })
|
|
11
|
+
leave_type_id: string;
|
|
12
|
+
|
|
13
|
+
@Column({ nullable: true })
|
|
14
|
+
balance: number;
|
|
15
|
+
|
|
16
|
+
@Column({ nullable: true })
|
|
17
|
+
total_balance: number;
|
|
18
|
+
|
|
19
|
+
constructor(user_id: string, leave_type_id: string, balance: number, total_balance: number) {
|
|
20
|
+
super();
|
|
21
|
+
this.user_id = user_id;
|
|
22
|
+
this.leave_type_id = leave_type_id;
|
|
23
|
+
this.balance = balance;
|
|
24
|
+
this.total_balance = total_balance;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
//This model is used to store the relationship between Leave Configuration and Financial Grades with monthly leave counts
|
|
5
|
+
@Entity({ name: 'leave_config_grades' })
|
|
6
|
+
export class LeaveConfigurationGrades extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'int', nullable: true })
|
|
9
|
+
leave_config_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'int', nullable: false })
|
|
12
|
+
grade: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'int', nullable: true })
|
|
15
|
+
jan: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'int', nullable: true })
|
|
18
|
+
feb: number;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
mar: number;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
apr: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
may: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: true })
|
|
30
|
+
jun: number;
|
|
31
|
+
|
|
32
|
+
@Column({ type: 'int', nullable: true })
|
|
33
|
+
jul: number;
|
|
34
|
+
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
aug: number;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
sep: number;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
oct: number;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
nov: number;
|
|
46
|
+
|
|
47
|
+
@Column({ type: 'int', nullable: true })
|
|
48
|
+
dec: number;
|
|
49
|
+
|
|
50
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
51
|
+
total_count: number;
|
|
52
|
+
|
|
53
|
+
constructor(leave_config_id: number, grade: number, jan: number, feb: number, mar: number, apr: number, may: number, jun: number, jul: number, aug: number, sep: number, oct: number, nov: number, dec: number, total_count: number) {
|
|
54
|
+
super();
|
|
55
|
+
this.leave_config_id = leave_config_id;
|
|
56
|
+
this.grade = grade;
|
|
57
|
+
this.jan = jan;
|
|
58
|
+
this.feb = feb;
|
|
59
|
+
this.mar = mar;
|
|
60
|
+
this.apr = apr;
|
|
61
|
+
this.may = may;
|
|
62
|
+
this.jun = jun;
|
|
63
|
+
this.jul = jul;
|
|
64
|
+
this.aug = aug;
|
|
65
|
+
this.sep = sep;
|
|
66
|
+
this.oct = oct;
|
|
67
|
+
this.nov = nov;
|
|
68
|
+
this.dec = dec;
|
|
69
|
+
this.total_count = total_count;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum enumFrequency {
|
|
5
|
+
Monthly = 'Monthly',
|
|
6
|
+
Yearly = 'Yearly',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//This model is used to store the Financial Grade declaration on the Admin Side
|
|
10
|
+
@Entity({ name: 'leave_configuration' })
|
|
11
|
+
export class LeaveConfiguration extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', nullable: true })
|
|
14
|
+
category: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
MandC_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
leave_type_id: number;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', nullable: true })
|
|
23
|
+
frequency: enumFrequency;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', nullable: true })
|
|
26
|
+
region: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', nullable: true })
|
|
29
|
+
country: string;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', nullable: true })
|
|
32
|
+
location: string;
|
|
33
|
+
|
|
34
|
+
@Column({ nullable: true, default: false })
|
|
35
|
+
is_carryforward: boolean;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'int', nullable: true, default: 0 })
|
|
38
|
+
carryforward_limit: number;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'date', nullable: true })
|
|
41
|
+
from_date: Date;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'date', nullable: true })
|
|
44
|
+
to_date: Date;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'varchar', nullable: true })
|
|
47
|
+
reason: string;
|
|
48
|
+
|
|
49
|
+
constructor(category: string, MandC_id: number, leave_type_id: number, frequency: enumFrequency, region: string, country: string, location: string, is_carryforward: boolean, carryforward_limit: number, from_date: Date, to_date: Date, reason: string) {
|
|
50
|
+
super();
|
|
51
|
+
this.category = category;
|
|
52
|
+
this.MandC_id = MandC_id;
|
|
53
|
+
this.leave_type_id = leave_type_id;
|
|
54
|
+
this.frequency = frequency;
|
|
55
|
+
this.region = region;
|
|
56
|
+
this.country = country;
|
|
57
|
+
this.location = location;
|
|
58
|
+
this.is_carryforward = is_carryforward;
|
|
59
|
+
this.carryforward_limit = carryforward_limit;
|
|
60
|
+
this.from_date = from_date;
|
|
61
|
+
this.to_date = to_date;
|
|
62
|
+
this.reason = reason;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum LeaveTransactionStatus {
|
|
5
|
+
GRANTED = 'GRANTED',
|
|
6
|
+
TAKEN = 'TAKEN',
|
|
7
|
+
ADJUSTMENT = 'ADJUSTMENT',
|
|
8
|
+
CARRY_FORWARD = 'CARRY_FORWARD',
|
|
9
|
+
ENCASHMENT = 'ENCASHMENT',
|
|
10
|
+
AVAILED = 'AVAILED',
|
|
11
|
+
ELAPSED = 'ELAPSED'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//This model is used to store leave transactions for users
|
|
15
|
+
@Entity({ name: 'leave_transactions' })
|
|
16
|
+
export class LeaveTransaction extends BaseModel {
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: false })
|
|
19
|
+
user_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: false })
|
|
22
|
+
leave_type_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
25
|
+
leave_count: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'date', nullable: true })
|
|
28
|
+
from_date: Date;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'date', nullable: true })
|
|
31
|
+
to_date: Date;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', nullable: true })
|
|
34
|
+
year: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'varchar', nullable: false })
|
|
37
|
+
status: LeaveTransactionStatus;
|
|
38
|
+
|
|
39
|
+
constructor(
|
|
40
|
+
user_id: number,
|
|
41
|
+
leave_type_id: number,
|
|
42
|
+
leave_count: number,
|
|
43
|
+
from_date: Date,
|
|
44
|
+
to_date: Date,
|
|
45
|
+
year: number,
|
|
46
|
+
status: LeaveTransactionStatus
|
|
47
|
+
) {
|
|
48
|
+
super();
|
|
49
|
+
this.user_id = user_id;
|
|
50
|
+
this.leave_type_id = leave_type_id;
|
|
51
|
+
this.leave_count = leave_count;
|
|
52
|
+
this.from_date = from_date;
|
|
53
|
+
this.to_date = to_date;
|
|
54
|
+
this.year = year;
|
|
55
|
+
this.status = status;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
3
|
|
|
4
|
+
export enum genderType {
|
|
5
|
+
Male = 'Male',
|
|
6
|
+
Female = 'Female',
|
|
7
|
+
All = 'All',
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
@Entity({ name: 'leave_types' })
|
|
5
11
|
export class LeaveTypes extends BaseModel {
|
|
6
12
|
|
|
7
|
-
@Column({ nullable: true })
|
|
13
|
+
@Column({type: 'varchar', nullable: true })
|
|
8
14
|
name: string;
|
|
9
15
|
|
|
10
|
-
@Column({ nullable: true })
|
|
16
|
+
@Column({type: 'varchar', nullable: true })
|
|
11
17
|
name_in_arabic: string;
|
|
12
18
|
|
|
13
|
-
@Column({ nullable: true, default: false })
|
|
14
|
-
omani_only?: boolean = false;
|
|
19
|
+
@Column({ nullable: true, default: false })
|
|
20
|
+
omani_only?: boolean = false;
|
|
15
21
|
|
|
16
|
-
@Column({ nullable: true, default: false })
|
|
17
|
-
non_omani_muslim?: boolean = false;
|
|
22
|
+
@Column({ nullable: true, default: false })
|
|
23
|
+
non_omani_muslim?: boolean = false;
|
|
18
24
|
|
|
19
|
-
@Column({ nullable: true, default: false })
|
|
20
|
-
non_omani_non_muslim?: boolean = false;
|
|
25
|
+
@Column({ nullable: true, default: false })
|
|
26
|
+
non_omani_non_muslim?: boolean = false;
|
|
21
27
|
|
|
28
|
+
@Column({ nullable: true, default: genderType.All })
|
|
29
|
+
gender: genderType = genderType.All;
|
|
22
30
|
|
|
23
|
-
constructor(
|
|
31
|
+
constructor(
|
|
24
32
|
name: string,
|
|
25
33
|
name_in_arabic: string,
|
|
34
|
+
omani_only: boolean,
|
|
35
|
+
non_omani_muslim: boolean,
|
|
36
|
+
non_omani_non_muslim: boolean,
|
|
37
|
+
gender: genderType
|
|
26
38
|
) {
|
|
27
|
-
super();
|
|
39
|
+
super();
|
|
28
40
|
this.name = name
|
|
29
|
-
this.name_in_arabic = name_in_arabic
|
|
41
|
+
this.name_in_arabic = name_in_arabic
|
|
42
|
+
this.omani_only = omani_only
|
|
43
|
+
this.non_omani_muslim = non_omani_muslim
|
|
44
|
+
this.non_omani_non_muslim = non_omani_non_muslim
|
|
45
|
+
this.gender = gender
|
|
30
46
|
}
|
|
31
47
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'M&C_names' })
|
|
5
|
+
export class MandCMaster extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({type: 'varchar', nullable: true })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({type: 'varchar', nullable: true })
|
|
11
|
+
name_in_arabic: string;
|
|
12
|
+
|
|
13
|
+
@Column({type: 'varchar', nullable: true })
|
|
14
|
+
region:string;
|
|
15
|
+
|
|
16
|
+
@Column({type: 'varchar', nullable: true })
|
|
17
|
+
country:string;
|
|
18
|
+
|
|
19
|
+
@Column({type: 'varchar', nullable: true })
|
|
20
|
+
location:string;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
name: string,
|
|
25
|
+
name_in_arabic: string,
|
|
26
|
+
region: string,
|
|
27
|
+
country: string,
|
|
28
|
+
location: string
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.name = name
|
|
32
|
+
this.name_in_arabic = name_in_arabic
|
|
33
|
+
this.region = region
|
|
34
|
+
this.country = country
|
|
35
|
+
this.location = location
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class StationeryMaterialMaster extends BaseModel {
|
|
3
|
-
material_type: string;
|
|
4
|
-
material_name: string;
|
|
5
|
-
material_code: string | null;
|
|
6
|
-
description: string | null;
|
|
7
|
-
unit_of_measure: string | null;
|
|
8
|
-
is_active: boolean;
|
|
9
|
-
display_order: number;
|
|
10
|
-
constructor(material_type: string, material_name: string);
|
|
11
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
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.StationeryMaterialMaster = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let StationeryMaterialMaster = class StationeryMaterialMaster extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(material_type, material_name) {
|
|
17
|
-
super();
|
|
18
|
-
this.material_type = material_type;
|
|
19
|
-
this.material_name = material_name;
|
|
20
|
-
this.is_active = true;
|
|
21
|
-
this.display_order = 0;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.StationeryMaterialMaster = StationeryMaterialMaster;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], StationeryMaterialMaster.prototype, "material_type", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], StationeryMaterialMaster.prototype, "material_name", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
35
|
-
__metadata("design:type", Object)
|
|
36
|
-
], StationeryMaterialMaster.prototype, "material_code", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
39
|
-
__metadata("design:type", Object)
|
|
40
|
-
], StationeryMaterialMaster.prototype, "description", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], StationeryMaterialMaster.prototype, "unit_of_measure", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
47
|
-
__metadata("design:type", Boolean)
|
|
48
|
-
], StationeryMaterialMaster.prototype, "is_active", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
51
|
-
__metadata("design:type", Number)
|
|
52
|
-
], StationeryMaterialMaster.prototype, "display_order", void 0);
|
|
53
|
-
exports.StationeryMaterialMaster = StationeryMaterialMaster = __decorate([
|
|
54
|
-
(0, typeorm_1.Entity)({ name: 'stationery_material_master' }),
|
|
55
|
-
__metadata("design:paramtypes", [String, String])
|
|
56
|
-
], StationeryMaterialMaster);
|