@platform-modules/foreign-ministry 1.1.66 → 1.1.67

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.
@@ -106,6 +106,11 @@ const LeaveBalanceModel_1 = require("./models/LeaveBalanceModel");
106
106
  const LeaveConfigModel_1 = require("./models/LeaveConfigModel");
107
107
  const LeaveConfigGradesModel_1 = require("./models/LeaveConfigGradesModel");
108
108
  const LeaveTransactionModel_1 = require("./models/LeaveTransactionModel");
109
+ const EarlyCheckoutBalanceModel_1 = require("./models/EarlyCheckoutBalanceModel");
110
+ const EarlyCheckoutConfigModel_1 = require("./models/EarlyCheckoutConfigModel");
111
+ const EarlyCheckoutTransactionModel_1 = require("./models/EarlyCheckoutTransactionModel");
112
+ const StayAfterHoursBalanceModel_1 = require("./models/StayAfterHoursBalanceModel");
113
+ const StayAfterHoursTransactionModel_1 = require("./models/StayAfterHoursTransactionModel");
109
114
  exports.AppDataSource = new typeorm_1.DataSource({
110
115
  type: 'postgres',
111
116
  host: process.env.DB_HOST || 'localhost',
@@ -216,6 +221,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
216
221
  LeaveBalanceModel_1.LeaveBalance,
217
222
  LeaveConfigModel_1.LeaveConfiguration,
218
223
  LeaveConfigGradesModel_1.LeaveConfigurationGrades,
219
- LeaveTransactionModel_1.LeaveTransaction
224
+ LeaveTransactionModel_1.LeaveTransaction,
225
+ EarlyCheckoutBalanceModel_1.EarlyCheckoutBalance,
226
+ EarlyCheckoutConfigModel_1.EarlyCheckoutConfiguration,
227
+ EarlyCheckoutTransactionModel_1.EarlyCheckoutTransaction,
228
+ StayAfterHoursBalanceModel_1.StayAfterHoursBalance,
229
+ StayAfterHoursTransactionModel_1.StayAfterHoursTransaction
220
230
  ],
221
231
  });
package/dist/index.d.ts CHANGED
@@ -109,3 +109,13 @@ export * from './models/LeaveConfigGradesModel';
109
109
  export { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel';
110
110
  export * from './models/LeaveTransactionModel';
111
111
  export { LeaveTransaction, LeaveTransactionStatus } from './models/LeaveTransactionModel';
112
+ export * from './models/EarlyCheckoutBalanceModel';
113
+ export { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel';
114
+ export * from './models/EarlyCheckoutConfigModel';
115
+ export { EarlyCheckoutConfiguration, EarlyCheckoutFrequency } from './models/EarlyCheckoutConfigModel';
116
+ export * from './models/EarlyCheckoutTransactionModel';
117
+ export { EarlyCheckoutTransaction, EarlyCheckoutTransactionStatus } from './models/EarlyCheckoutTransactionModel';
118
+ export * from './models/StayAfterHoursBalanceModel';
119
+ export { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel';
120
+ export * from './models/StayAfterHoursTransactionModel';
121
+ export { StayAfterHoursTransaction, StayAfterHoursTransactionStatus } from './models/StayAfterHoursTransactionModel';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = void 0;
17
+ exports.StayAfterHoursTransactionStatus = exports.StayAfterHoursTransaction = exports.StayAfterHoursBalance = exports.EarlyCheckoutTransactionStatus = exports.EarlyCheckoutTransaction = exports.EarlyCheckoutFrequency = exports.EarlyCheckoutConfiguration = exports.EarlyCheckoutBalance = exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = void 0;
18
18
  __exportStar(require("./models/user"), exports);
19
19
  __exportStar(require("./models/role"), exports);
20
20
  __exportStar(require("./models/user-sessions"), exports);
@@ -131,3 +131,21 @@ __exportStar(require("./models/LeaveTransactionModel"), exports);
131
131
  var LeaveTransactionModel_1 = require("./models/LeaveTransactionModel");
132
132
  Object.defineProperty(exports, "LeaveTransaction", { enumerable: true, get: function () { return LeaveTransactionModel_1.LeaveTransaction; } });
133
133
  Object.defineProperty(exports, "LeaveTransactionStatus", { enumerable: true, get: function () { return LeaveTransactionModel_1.LeaveTransactionStatus; } });
134
+ __exportStar(require("./models/EarlyCheckoutBalanceModel"), exports);
135
+ var EarlyCheckoutBalanceModel_1 = require("./models/EarlyCheckoutBalanceModel");
136
+ Object.defineProperty(exports, "EarlyCheckoutBalance", { enumerable: true, get: function () { return EarlyCheckoutBalanceModel_1.EarlyCheckoutBalance; } });
137
+ __exportStar(require("./models/EarlyCheckoutConfigModel"), exports);
138
+ var EarlyCheckoutConfigModel_1 = require("./models/EarlyCheckoutConfigModel");
139
+ Object.defineProperty(exports, "EarlyCheckoutConfiguration", { enumerable: true, get: function () { return EarlyCheckoutConfigModel_1.EarlyCheckoutConfiguration; } });
140
+ Object.defineProperty(exports, "EarlyCheckoutFrequency", { enumerable: true, get: function () { return EarlyCheckoutConfigModel_1.EarlyCheckoutFrequency; } });
141
+ __exportStar(require("./models/EarlyCheckoutTransactionModel"), exports);
142
+ var EarlyCheckoutTransactionModel_1 = require("./models/EarlyCheckoutTransactionModel");
143
+ Object.defineProperty(exports, "EarlyCheckoutTransaction", { enumerable: true, get: function () { return EarlyCheckoutTransactionModel_1.EarlyCheckoutTransaction; } });
144
+ Object.defineProperty(exports, "EarlyCheckoutTransactionStatus", { enumerable: true, get: function () { return EarlyCheckoutTransactionModel_1.EarlyCheckoutTransactionStatus; } });
145
+ __exportStar(require("./models/StayAfterHoursBalanceModel"), exports);
146
+ var StayAfterHoursBalanceModel_1 = require("./models/StayAfterHoursBalanceModel");
147
+ Object.defineProperty(exports, "StayAfterHoursBalance", { enumerable: true, get: function () { return StayAfterHoursBalanceModel_1.StayAfterHoursBalance; } });
148
+ __exportStar(require("./models/StayAfterHoursTransactionModel"), exports);
149
+ var StayAfterHoursTransactionModel_1 = require("./models/StayAfterHoursTransactionModel");
150
+ Object.defineProperty(exports, "StayAfterHoursTransaction", { enumerable: true, get: function () { return StayAfterHoursTransactionModel_1.StayAfterHoursTransaction; } });
151
+ Object.defineProperty(exports, "StayAfterHoursTransactionStatus", { enumerable: true, get: function () { return StayAfterHoursTransactionModel_1.StayAfterHoursTransactionStatus; } });
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class EarlyCheckoutBalance extends BaseModel {
3
+ user_id: string;
4
+ balance: number;
5
+ total_balance: number;
6
+ constructor(user_id: string, balance: number, total_balance: number);
7
+ }
@@ -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.EarlyCheckoutBalance = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let EarlyCheckoutBalance = class EarlyCheckoutBalance extends BaseModel_1.BaseModel {
16
+ constructor(user_id, balance, total_balance) {
17
+ super();
18
+ this.user_id = user_id;
19
+ this.balance = balance;
20
+ this.total_balance = total_balance;
21
+ }
22
+ };
23
+ exports.EarlyCheckoutBalance = EarlyCheckoutBalance;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ nullable: true }),
26
+ __metadata("design:type", String)
27
+ ], EarlyCheckoutBalance.prototype, "user_id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ nullable: true }),
30
+ __metadata("design:type", Number)
31
+ ], EarlyCheckoutBalance.prototype, "balance", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ nullable: true }),
34
+ __metadata("design:type", Number)
35
+ ], EarlyCheckoutBalance.prototype, "total_balance", void 0);
36
+ exports.EarlyCheckoutBalance = EarlyCheckoutBalance = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'early_checkout_balance' }),
38
+ __metadata("design:paramtypes", [String, Number, Number])
39
+ ], EarlyCheckoutBalance);
@@ -0,0 +1,18 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum EarlyCheckoutFrequency {
3
+ Monthly = "Monthly",
4
+ Yearly = "Yearly"
5
+ }
6
+ export declare class EarlyCheckoutConfiguration extends BaseModel {
7
+ category: string;
8
+ MandC_id: number;
9
+ frequency: EarlyCheckoutFrequency;
10
+ region: string;
11
+ country: string;
12
+ location: string;
13
+ no_of_hours: string;
14
+ from_date: Date;
15
+ to_date: Date;
16
+ reason: string;
17
+ constructor(category: string, MandC_id: number, frequency: EarlyCheckoutFrequency, region: string, country: string, location: string, no_of_hours: string, from_date: Date, to_date: Date, reason: string);
18
+ }
@@ -0,0 +1,80 @@
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.EarlyCheckoutConfiguration = exports.EarlyCheckoutFrequency = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var EarlyCheckoutFrequency;
16
+ (function (EarlyCheckoutFrequency) {
17
+ EarlyCheckoutFrequency["Monthly"] = "Monthly";
18
+ EarlyCheckoutFrequency["Yearly"] = "Yearly";
19
+ })(EarlyCheckoutFrequency || (exports.EarlyCheckoutFrequency = EarlyCheckoutFrequency = {}));
20
+ //This model is used to store the Early Checkout Configuration on the Admin Side
21
+ let EarlyCheckoutConfiguration = class EarlyCheckoutConfiguration extends BaseModel_1.BaseModel {
22
+ constructor(category, MandC_id, frequency, region, country, location, no_of_hours, from_date, to_date, reason) {
23
+ super();
24
+ this.category = category;
25
+ this.MandC_id = MandC_id;
26
+ this.no_of_hours = no_of_hours;
27
+ this.frequency = frequency;
28
+ this.region = region;
29
+ this.country = country;
30
+ this.location = location;
31
+ this.from_date = from_date;
32
+ this.to_date = to_date;
33
+ this.reason = reason;
34
+ }
35
+ };
36
+ exports.EarlyCheckoutConfiguration = EarlyCheckoutConfiguration;
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], EarlyCheckoutConfiguration.prototype, "category", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], EarlyCheckoutConfiguration.prototype, "MandC_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], EarlyCheckoutConfiguration.prototype, "frequency", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], EarlyCheckoutConfiguration.prototype, "region", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], EarlyCheckoutConfiguration.prototype, "country", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], EarlyCheckoutConfiguration.prototype, "location", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], EarlyCheckoutConfiguration.prototype, "no_of_hours", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
67
+ __metadata("design:type", Date)
68
+ ], EarlyCheckoutConfiguration.prototype, "from_date", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
71
+ __metadata("design:type", Date)
72
+ ], EarlyCheckoutConfiguration.prototype, "to_date", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
75
+ __metadata("design:type", String)
76
+ ], EarlyCheckoutConfiguration.prototype, "reason", void 0);
77
+ exports.EarlyCheckoutConfiguration = EarlyCheckoutConfiguration = __decorate([
78
+ (0, typeorm_1.Entity)({ name: 'early_checkout_configuration' }),
79
+ __metadata("design:paramtypes", [String, Number, String, String, String, String, String, Date, Date, String])
80
+ ], EarlyCheckoutConfiguration);
@@ -0,0 +1,19 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum EarlyCheckoutTransactionStatus {
3
+ GRANTED = "GRANTED",
4
+ TAKEN = "TAKEN",
5
+ ADJUSTMENT = "ADJUSTMENT",
6
+ CARRY_FORWARD = "CARRY_FORWARD",
7
+ ENCASHMENT = "ENCASHMENT",
8
+ AVAILED = "AVAILED",
9
+ ELAPSED = "ELAPSED"
10
+ }
11
+ export declare class EarlyCheckoutTransaction extends BaseModel {
12
+ user_id: number;
13
+ hours_count: string;
14
+ from_date: Date;
15
+ to_date: Date;
16
+ year: number;
17
+ status: EarlyCheckoutTransactionStatus;
18
+ constructor(user_id: number, hours_count: string, from_date: Date, to_date: Date, year: number, status: EarlyCheckoutTransactionStatus);
19
+ }
@@ -0,0 +1,66 @@
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.EarlyCheckoutTransaction = exports.EarlyCheckoutTransactionStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var EarlyCheckoutTransactionStatus;
16
+ (function (EarlyCheckoutTransactionStatus) {
17
+ EarlyCheckoutTransactionStatus["GRANTED"] = "GRANTED";
18
+ EarlyCheckoutTransactionStatus["TAKEN"] = "TAKEN";
19
+ EarlyCheckoutTransactionStatus["ADJUSTMENT"] = "ADJUSTMENT";
20
+ EarlyCheckoutTransactionStatus["CARRY_FORWARD"] = "CARRY_FORWARD";
21
+ EarlyCheckoutTransactionStatus["ENCASHMENT"] = "ENCASHMENT";
22
+ EarlyCheckoutTransactionStatus["AVAILED"] = "AVAILED";
23
+ EarlyCheckoutTransactionStatus["ELAPSED"] = "ELAPSED";
24
+ })(EarlyCheckoutTransactionStatus || (exports.EarlyCheckoutTransactionStatus = EarlyCheckoutTransactionStatus = {}));
25
+ //This model is used to store early checkout transactions for users
26
+ let EarlyCheckoutTransaction = class EarlyCheckoutTransaction extends BaseModel_1.BaseModel {
27
+ constructor(user_id, hours_count, from_date, to_date, year, status) {
28
+ super();
29
+ this.user_id = user_id;
30
+ this.hours_count = hours_count;
31
+ this.from_date = from_date;
32
+ this.to_date = to_date;
33
+ this.year = year;
34
+ this.status = status;
35
+ }
36
+ };
37
+ exports.EarlyCheckoutTransaction = EarlyCheckoutTransaction;
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], EarlyCheckoutTransaction.prototype, "user_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], EarlyCheckoutTransaction.prototype, "hours_count", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
48
+ __metadata("design:type", Date)
49
+ ], EarlyCheckoutTransaction.prototype, "from_date", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
52
+ __metadata("design:type", Date)
53
+ ], EarlyCheckoutTransaction.prototype, "to_date", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], EarlyCheckoutTransaction.prototype, "year", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
60
+ __metadata("design:type", String)
61
+ ], EarlyCheckoutTransaction.prototype, "status", void 0);
62
+ exports.EarlyCheckoutTransaction = EarlyCheckoutTransaction = __decorate([
63
+ (0, typeorm_1.Entity)({ name: 'early_checkout_transactions' }),
64
+ __metadata("design:paramtypes", [Number, String, Date,
65
+ Date, Number, String])
66
+ ], EarlyCheckoutTransaction);
@@ -32,11 +32,11 @@ __decorate([
32
32
  __metadata("design:type", String)
33
33
  ], FinancialGrade.prototype, "arabic_title", void 0);
34
34
  __decorate([
35
- (0, typeorm_1.Column)({ type: "integer", nullable: false }),
35
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
36
36
  __metadata("design:type", Number)
37
37
  ], FinancialGrade.prototype, "financial_grade", void 0);
38
38
  __decorate([
39
- (0, typeorm_1.Column)({ type: "integer", nullable: false }),
39
+ (0, typeorm_1.Column)({ type: "integer", nullable: true }),
40
40
  __metadata("design:type", Number)
41
41
  ], FinancialGrade.prototype, "leave_count", void 0);
42
42
  exports.FinancialGrade = FinancialGrade = __decorate([
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class StayAfterHoursBalance extends BaseModel {
3
+ user_id: string;
4
+ balance: number;
5
+ total_balance: number;
6
+ constructor(user_id: string, balance: number, total_balance: number);
7
+ }
@@ -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.StayAfterHoursBalance = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let StayAfterHoursBalance = class StayAfterHoursBalance extends BaseModel_1.BaseModel {
16
+ constructor(user_id, balance, total_balance) {
17
+ super();
18
+ this.user_id = user_id;
19
+ this.balance = balance;
20
+ this.total_balance = total_balance;
21
+ }
22
+ };
23
+ exports.StayAfterHoursBalance = StayAfterHoursBalance;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ nullable: true }),
26
+ __metadata("design:type", String)
27
+ ], StayAfterHoursBalance.prototype, "user_id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ nullable: true }),
30
+ __metadata("design:type", Number)
31
+ ], StayAfterHoursBalance.prototype, "balance", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ nullable: true }),
34
+ __metadata("design:type", Number)
35
+ ], StayAfterHoursBalance.prototype, "total_balance", void 0);
36
+ exports.StayAfterHoursBalance = StayAfterHoursBalance = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'stay_after_hours_balance' }),
38
+ __metadata("design:paramtypes", [String, Number, Number])
39
+ ], StayAfterHoursBalance);
@@ -0,0 +1,19 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum StayAfterHoursTransactionStatus {
3
+ GRANTED = "GRANTED",
4
+ TAKEN = "TAKEN",
5
+ ADJUSTMENT = "ADJUSTMENT",
6
+ CARRY_FORWARD = "CARRY_FORWARD",
7
+ ENCASHMENT = "ENCASHMENT",
8
+ AVAILED = "AVAILED",
9
+ ELAPSED = "ELAPSED"
10
+ }
11
+ export declare class StayAfterHoursTransaction extends BaseModel {
12
+ user_id: number;
13
+ hours_count: string;
14
+ from_date: Date;
15
+ to_date: Date;
16
+ year: number;
17
+ status: StayAfterHoursTransactionStatus;
18
+ constructor(user_id: number, hours_count: string, from_date: Date, to_date: Date, year: number, status: StayAfterHoursTransactionStatus);
19
+ }
@@ -0,0 +1,66 @@
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.StayAfterHoursTransaction = exports.StayAfterHoursTransactionStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var StayAfterHoursTransactionStatus;
16
+ (function (StayAfterHoursTransactionStatus) {
17
+ StayAfterHoursTransactionStatus["GRANTED"] = "GRANTED";
18
+ StayAfterHoursTransactionStatus["TAKEN"] = "TAKEN";
19
+ StayAfterHoursTransactionStatus["ADJUSTMENT"] = "ADJUSTMENT";
20
+ StayAfterHoursTransactionStatus["CARRY_FORWARD"] = "CARRY_FORWARD";
21
+ StayAfterHoursTransactionStatus["ENCASHMENT"] = "ENCASHMENT";
22
+ StayAfterHoursTransactionStatus["AVAILED"] = "AVAILED";
23
+ StayAfterHoursTransactionStatus["ELAPSED"] = "ELAPSED";
24
+ })(StayAfterHoursTransactionStatus || (exports.StayAfterHoursTransactionStatus = StayAfterHoursTransactionStatus = {}));
25
+ //This model is used to store early checkout transactions for users
26
+ let StayAfterHoursTransaction = class StayAfterHoursTransaction extends BaseModel_1.BaseModel {
27
+ constructor(user_id, hours_count, from_date, to_date, year, status) {
28
+ super();
29
+ this.user_id = user_id;
30
+ this.hours_count = hours_count;
31
+ this.from_date = from_date;
32
+ this.to_date = to_date;
33
+ this.year = year;
34
+ this.status = status;
35
+ }
36
+ };
37
+ exports.StayAfterHoursTransaction = StayAfterHoursTransaction;
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], StayAfterHoursTransaction.prototype, "user_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], StayAfterHoursTransaction.prototype, "hours_count", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
48
+ __metadata("design:type", Date)
49
+ ], StayAfterHoursTransaction.prototype, "from_date", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
52
+ __metadata("design:type", Date)
53
+ ], StayAfterHoursTransaction.prototype, "to_date", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], StayAfterHoursTransaction.prototype, "year", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
60
+ __metadata("design:type", String)
61
+ ], StayAfterHoursTransaction.prototype, "status", void 0);
62
+ exports.StayAfterHoursTransaction = StayAfterHoursTransaction = __decorate([
63
+ (0, typeorm_1.Entity)({ name: 'stay_after_hours_transactions' }),
64
+ __metadata("design:paramtypes", [Number, String, Date,
65
+ Date, Number, String])
66
+ ], StayAfterHoursTransaction);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -111,6 +111,11 @@ import { LeaveBalance } from './models/LeaveBalanceModel'
111
111
  import { LeaveConfiguration } from './models/LeaveConfigModel'
112
112
  import { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel'
113
113
  import { LeaveTransaction } from './models/LeaveTransactionModel'
114
+ import { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel'
115
+ import { EarlyCheckoutConfiguration } from './models/EarlyCheckoutConfigModel'
116
+ import { EarlyCheckoutTransaction } from './models/EarlyCheckoutTransactionModel'
117
+ import { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel'
118
+ import { StayAfterHoursTransaction } from './models/StayAfterHoursTransactionModel'
114
119
 
115
120
 
116
121
  export const AppDataSource = new DataSource({
@@ -223,6 +228,11 @@ export const AppDataSource = new DataSource({
223
228
  LeaveBalance,
224
229
  LeaveConfiguration,
225
230
  LeaveConfigurationGrades,
226
- LeaveTransaction
231
+ LeaveTransaction,
232
+ EarlyCheckoutBalance,
233
+ EarlyCheckoutConfiguration,
234
+ EarlyCheckoutTransaction,
235
+ StayAfterHoursBalance,
236
+ StayAfterHoursTransaction
227
237
  ],
228
238
  });
package/src/index.ts CHANGED
@@ -109,3 +109,13 @@ export * from './models/LeaveConfigGradesModel';
109
109
  export { LeaveConfigurationGrades } from './models/LeaveConfigGradesModel';
110
110
  export * from './models/LeaveTransactionModel';
111
111
  export { LeaveTransaction, LeaveTransactionStatus } from './models/LeaveTransactionModel';
112
+ export * from './models/EarlyCheckoutBalanceModel';
113
+ export { EarlyCheckoutBalance } from './models/EarlyCheckoutBalanceModel';
114
+ export * from './models/EarlyCheckoutConfigModel';
115
+ export { EarlyCheckoutConfiguration, EarlyCheckoutFrequency } from './models/EarlyCheckoutConfigModel';
116
+ export * from './models/EarlyCheckoutTransactionModel';
117
+ export { EarlyCheckoutTransaction, EarlyCheckoutTransactionStatus } from './models/EarlyCheckoutTransactionModel';
118
+ export * from './models/StayAfterHoursBalanceModel';
119
+ export { StayAfterHoursBalance } from './models/StayAfterHoursBalanceModel';
120
+ export * from './models/StayAfterHoursTransactionModel';
121
+ export { StayAfterHoursTransaction, StayAfterHoursTransactionStatus } from './models/StayAfterHoursTransactionModel';
@@ -0,0 +1,22 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'early_checkout_balance' })
5
+ export class EarlyCheckoutBalance extends BaseModel {
6
+
7
+ @Column({ nullable: true })
8
+ user_id: string;
9
+
10
+ @Column({ nullable: true })
11
+ balance: number;
12
+
13
+ @Column({ nullable: true })
14
+ total_balance: number;
15
+
16
+ constructor(user_id: string, balance: number, total_balance: number) {
17
+ super();
18
+ this.user_id = user_id;
19
+ this.balance = balance;
20
+ this.total_balance = total_balance;
21
+ }
22
+ }
@@ -0,0 +1,57 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum EarlyCheckoutFrequency {
5
+ Monthly = 'Monthly',
6
+ Yearly = 'Yearly',
7
+ }
8
+
9
+ //This model is used to store the Early Checkout Configuration on the Admin Side
10
+ @Entity({ name: 'early_checkout_configuration' })
11
+ export class EarlyCheckoutConfiguration 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: 'varchar', nullable: true })
20
+ frequency: EarlyCheckoutFrequency;
21
+
22
+ @Column({ type: 'varchar', nullable: true })
23
+ region: string;
24
+
25
+ @Column({ type: 'varchar', nullable: true })
26
+ country: string;
27
+
28
+ @Column({ type: 'varchar', nullable: true })
29
+ location: string;
30
+
31
+ @Column({ type: 'varchar', nullable: true })
32
+ no_of_hours: string;
33
+
34
+
35
+ @Column({ type: 'date', nullable: true })
36
+ from_date: Date;
37
+
38
+ @Column({ type: 'date', nullable: true })
39
+ to_date: Date;
40
+
41
+ @Column({ type: 'varchar', nullable: true })
42
+ reason: string;
43
+
44
+ constructor(category: string, MandC_id: number, frequency: EarlyCheckoutFrequency, region: string, country: string, location: string, no_of_hours: string, from_date: Date, to_date: Date, reason: string) {
45
+ super();
46
+ this.category = category;
47
+ this.MandC_id = MandC_id;
48
+ this.no_of_hours = no_of_hours;
49
+ this.frequency = frequency;
50
+ this.region = region;
51
+ this.country = country;
52
+ this.location = location;
53
+ this.from_date = from_date;
54
+ this.to_date = to_date;
55
+ this.reason = reason;
56
+ }
57
+ }
@@ -0,0 +1,53 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum EarlyCheckoutTransactionStatus {
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 early checkout transactions for users
15
+ @Entity({ name: 'early_checkout_transactions' })
16
+ export class EarlyCheckoutTransaction extends BaseModel {
17
+
18
+ @Column({ type: 'int', nullable: false })
19
+ user_id: number;
20
+
21
+ @Column({ type: 'varchar', nullable: true })
22
+ hours_count: string;
23
+
24
+ @Column({ type: 'date', nullable: true })
25
+ from_date: Date;
26
+
27
+ @Column({ type: 'date', nullable: true })
28
+ to_date: Date;
29
+
30
+ @Column({ type: 'int', nullable: true })
31
+ year: number;
32
+
33
+ @Column({ type: 'varchar', nullable: false })
34
+ status: EarlyCheckoutTransactionStatus;
35
+
36
+ constructor(
37
+ user_id: number,
38
+ hours_count: string,
39
+ from_date: Date,
40
+ to_date: Date,
41
+ year: number,
42
+ status: EarlyCheckoutTransactionStatus
43
+ ) {
44
+ super();
45
+ this.user_id = user_id;
46
+ this.hours_count = hours_count;
47
+ this.from_date = from_date;
48
+ this.to_date = to_date;
49
+ this.year = year;
50
+ this.status = status;
51
+ }
52
+ }
53
+
@@ -0,0 +1,22 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'stay_after_hours_balance' })
5
+ export class StayAfterHoursBalance extends BaseModel {
6
+
7
+ @Column({ nullable: true })
8
+ user_id: string;
9
+
10
+ @Column({ nullable: true })
11
+ balance: number;
12
+
13
+ @Column({ nullable: true })
14
+ total_balance: number;
15
+
16
+ constructor(user_id: string, balance: number, total_balance: number) {
17
+ super();
18
+ this.user_id = user_id;
19
+ this.balance = balance;
20
+ this.total_balance = total_balance;
21
+ }
22
+ }
@@ -0,0 +1,53 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum StayAfterHoursTransactionStatus {
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 early checkout transactions for users
15
+ @Entity({ name: 'stay_after_hours_transactions' })
16
+ export class StayAfterHoursTransaction extends BaseModel {
17
+
18
+ @Column({ type: 'int', nullable: false })
19
+ user_id: number;
20
+
21
+ @Column({ type: 'varchar', nullable: true })
22
+ hours_count: string;
23
+
24
+ @Column({ type: 'date', nullable: true })
25
+ from_date: Date;
26
+
27
+ @Column({ type: 'date', nullable: true })
28
+ to_date: Date;
29
+
30
+ @Column({ type: 'int', nullable: true })
31
+ year: number;
32
+
33
+ @Column({ type: 'varchar', nullable: false })
34
+ status: StayAfterHoursTransactionStatus;
35
+
36
+ constructor(
37
+ user_id: number,
38
+ hours_count: string,
39
+ from_date: Date,
40
+ to_date: Date,
41
+ year: number,
42
+ status: StayAfterHoursTransactionStatus
43
+ ) {
44
+ super();
45
+ this.user_id = user_id;
46
+ this.hours_count = hours_count;
47
+ this.from_date = from_date;
48
+ this.to_date = to_date;
49
+ this.year = year;
50
+ this.status = status;
51
+ }
52
+ }
53
+