@platform-modules/foreign-ministry 1.2.2 → 1.2.4

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  DB_HOST=localhost
2
2
  DB_PORT=5432
3
3
  DB_USER=postgres
4
- DB_PASS=Fa@123
4
+ DB_PASS=stevejobs
5
5
  DB_NAME=FM
@@ -16,5 +16,7 @@ export declare class LeaveConfiguration extends BaseModel {
16
16
  from_date: Date;
17
17
  to_date: Date;
18
18
  reason: string;
19
- 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);
19
+ emergency_balance_days: number | null;
20
+ last_credited: Date | null;
21
+ 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, emergency_balance_days?: number | null, last_credited?: Date | null);
20
22
  }
@@ -19,7 +19,7 @@ var enumFrequency;
19
19
  })(enumFrequency || (exports.enumFrequency = enumFrequency = {}));
20
20
  //This model is used to store the Financial Grade declaration on the Admin Side
21
21
  let LeaveConfiguration = class LeaveConfiguration extends BaseModel_1.BaseModel {
22
- constructor(category, MandC_id, leave_type_id, frequency, region, country, location, is_carryforward, carryforward_limit, from_date, to_date, reason) {
22
+ constructor(category, MandC_id, leave_type_id, frequency, region, country, location, is_carryforward, carryforward_limit, from_date, to_date, reason, emergency_balance_days, last_credited) {
23
23
  super();
24
24
  this.category = category;
25
25
  this.MandC_id = MandC_id;
@@ -33,6 +33,8 @@ let LeaveConfiguration = class LeaveConfiguration extends BaseModel_1.BaseModel
33
33
  this.from_date = from_date;
34
34
  this.to_date = to_date;
35
35
  this.reason = reason;
36
+ this.emergency_balance_days = emergency_balance_days ?? null;
37
+ this.last_credited = last_credited ?? null;
36
38
  }
37
39
  };
38
40
  exports.LeaveConfiguration = LeaveConfiguration;
@@ -84,7 +86,15 @@ __decorate([
84
86
  (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
85
87
  __metadata("design:type", String)
86
88
  ], LeaveConfiguration.prototype, "reason", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
91
+ __metadata("design:type", Object)
92
+ ], LeaveConfiguration.prototype, "emergency_balance_days", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
95
+ __metadata("design:type", Object)
96
+ ], LeaveConfiguration.prototype, "last_credited", void 0);
87
97
  exports.LeaveConfiguration = LeaveConfiguration = __decorate([
88
98
  (0, typeorm_1.Entity)({ name: 'leave_configuration' }),
89
- __metadata("design:paramtypes", [String, Number, Number, String, String, String, String, Boolean, Number, Date, Date, String])
99
+ __metadata("design:paramtypes", [String, Number, Number, String, String, String, String, Boolean, Number, Date, Date, String, Object, Object])
90
100
  ], LeaveConfiguration);
@@ -57,11 +57,11 @@ __decorate([
57
57
  __metadata("design:type", Number)
58
58
  ], StationeryRequests.prototype, "material_id", void 0);
59
59
  __decorate([
60
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
60
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
61
61
  __metadata("design:type", String)
62
62
  ], StationeryRequests.prototype, "material_name", void 0);
63
63
  __decorate([
64
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
64
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
65
65
  __metadata("design:type", Number)
66
66
  ], StationeryRequests.prototype, "quantity_required", void 0);
67
67
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,64 +1,72 @@
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
- }
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
+ @Column({ type: 'int', nullable: true })
50
+ emergency_balance_days: number | null;
51
+
52
+ @Column({ type: 'date', nullable: true })
53
+ last_credited: Date | null;
54
+
55
+ 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, emergency_balance_days?: number|null, last_credited?: Date|null) {
56
+ super();
57
+ this.category = category;
58
+ this.MandC_id = MandC_id;
59
+ this.leave_type_id = leave_type_id;
60
+ this.frequency = frequency;
61
+ this.region = region;
62
+ this.country = country;
63
+ this.location = location;
64
+ this.is_carryforward = is_carryforward;
65
+ this.carryforward_limit = carryforward_limit;
66
+ this.from_date = from_date;
67
+ this.to_date = to_date;
68
+ this.reason = reason;
69
+ this.emergency_balance_days = emergency_balance_days ?? null;
70
+ this.last_credited = last_credited ?? null;
71
+ }
64
72
  }
@@ -37,10 +37,10 @@ export class StationeryRequests extends BaseModel {
37
37
  @Column({ type: 'int', nullable: false })
38
38
  material_id: number; // Reference to stationery_material_master table
39
39
 
40
- @Column({ type: 'int', nullable: false })
40
+ @Column({ type: 'int', nullable: true })
41
41
  material_name: string; // Reference to stationery_material_type_master table
42
42
 
43
- @Column({ type: 'int', nullable: false })
43
+ @Column({ type: 'int', nullable: true })
44
44
  quantity_required: number;
45
45
 
46
46
  @Column({ type: 'varchar', length: 500, nullable: true })