@platform-modules/foreign-ministry 1.1.28 → 1.1.30

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,13 +1,5 @@
1
- # DB_HOST=localhost
2
- # DB_PORT=5433
3
- # DB_USER=postgres
4
- # DB_PASS=123
5
- # DB_NAME=FM
6
-
7
-
8
-
9
- DB_HOST=164.52.222.169
1
+ DB_HOST=localhost
10
2
  DB_PORT=5432
11
- DB_USER=postgres_admin_user
12
- DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
3
+ DB_USER=postgres
4
+ DB_PASS=Fa@123
13
5
  DB_NAME=FM
@@ -1,9 +1,16 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  import { FinancialRequests } from './FinancialRequestsModel';
3
+ export declare enum statusEnum {
4
+ PENDING = "Pending",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
3
8
  export declare class FinancialChats extends BaseModel {
4
9
  financial_request_id: number;
5
10
  content: string;
6
11
  sender_user_id: number;
12
+ role_id: number | null;
13
+ status: statusEnum | null;
7
14
  financialRequest?: FinancialRequests;
8
15
  constructor(financial_request_id: number, content: string, sender_user_id: number);
9
16
  }
@@ -9,10 +9,16 @@ 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.FinancialChats = void 0;
12
+ exports.FinancialChats = exports.statusEnum = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
+ var statusEnum;
17
+ (function (statusEnum) {
18
+ statusEnum["PENDING"] = "Pending";
19
+ statusEnum["APPROVED"] = "Approved";
20
+ statusEnum["REJECTED"] = "Rejected";
21
+ })(statusEnum || (exports.statusEnum = statusEnum = {}));
16
22
  let FinancialChats = class FinancialChats extends BaseModel_1.BaseModel {
17
23
  constructor(financial_request_id, content, sender_user_id) {
18
24
  super();
@@ -34,6 +40,14 @@ __decorate([
34
40
  (0, typeorm_1.Column)({ type: 'int' }),
35
41
  __metadata("design:type", Number)
36
42
  ], FinancialChats.prototype, "sender_user_id", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], FinancialChats.prototype, "role_id", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
49
+ __metadata("design:type", Object)
50
+ ], FinancialChats.prototype, "status", void 0);
37
51
  __decorate([
38
52
  (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.chats),
39
53
  (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
@@ -41,7 +41,7 @@ export declare class FinancialRequests extends BaseModel {
41
41
  payslipRequest?: PayslipRequests;
42
42
  salaryCertificateRequest?: SalaryCertificateRequests;
43
43
  allowanceRequest?: AllowanceRequests;
44
- reimbursementRequest?: ReimbursementRequests;
44
+ reimbursementRequests?: ReimbursementRequests[];
45
45
  bankAccountChangeRequest?: BankAccountChangeRequests;
46
46
  chats?: FinancialChats[];
47
47
  approvals?: FinancialApprovals[];
@@ -129,9 +129,9 @@ __decorate([
129
129
  __metadata("design:type", Function)
130
130
  ], FinancialRequests.prototype, "allowanceRequest", void 0);
131
131
  __decorate([
132
- (0, typeorm_1.OneToOne)('ReimbursementRequests', 'financialRequest', { nullable: true }),
133
- __metadata("design:type", Function)
134
- ], FinancialRequests.prototype, "reimbursementRequest", void 0);
132
+ (0, typeorm_1.OneToMany)('ReimbursementRequests', 'financialRequest', { nullable: true }),
133
+ __metadata("design:type", Array)
134
+ ], FinancialRequests.prototype, "reimbursementRequests", void 0);
135
135
  __decorate([
136
136
  (0, typeorm_1.OneToOne)('BankAccountChangeRequests', 'financialRequest', { nullable: true }),
137
137
  __metadata("design:type", Function)
@@ -11,6 +11,7 @@ export declare class ReimbursementRequests extends BaseModel {
11
11
  payment_processed: boolean;
12
12
  payment_mode: string;
13
13
  payment_date: Date;
14
+ currency: string;
14
15
  financialRequest?: FinancialRequests;
15
16
  constructor(financial_request_id: number, amount: number, quantity: number, total_amount: number, approved_amount: number, payment_mode: string, payment_date: Date, expense_description: string);
16
17
  }
@@ -29,7 +29,7 @@ let ReimbursementRequests = class ReimbursementRequests extends BaseModel_1.Base
29
29
  };
30
30
  exports.ReimbursementRequests = ReimbursementRequests;
31
31
  __decorate([
32
- (0, typeorm_1.Column)({ type: 'int', unique: true }),
32
+ (0, typeorm_1.Column)({ type: 'int' }),
33
33
  __metadata("design:type", Number)
34
34
  ], ReimbursementRequests.prototype, "financial_request_id", void 0);
35
35
  __decorate([
@@ -69,7 +69,11 @@ __decorate([
69
69
  __metadata("design:type", Date)
70
70
  ], ReimbursementRequests.prototype, "payment_date", void 0);
71
71
  __decorate([
72
- (0, typeorm_1.OneToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.reimbursementRequest),
72
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
73
+ __metadata("design:type", String)
74
+ ], ReimbursementRequests.prototype, "currency", void 0);
75
+ __decorate([
76
+ (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.reimbursementRequests),
73
77
  (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
74
78
  __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
75
79
  ], ReimbursementRequests.prototype, "financialRequest", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -2,6 +2,12 @@ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
3
  import { FinancialRequests } from './FinancialRequestsModel';
4
4
 
5
+ export enum statusEnum {
6
+ PENDING = "Pending",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected"
9
+ }
10
+
5
11
  @Entity({ name: 'financial_chats' })
6
12
  export class FinancialChats extends BaseModel {
7
13
  @Column({ type: 'int' })
@@ -13,6 +19,12 @@ export class FinancialChats extends BaseModel {
13
19
  @Column({ type: 'int' })
14
20
  sender_user_id: number;
15
21
 
22
+ @Column({ type: 'int', nullable: true })
23
+ role_id: number | null;
24
+
25
+ @Column({ type: 'varchar', length: 255, nullable: true })
26
+ status: statusEnum | null;
27
+
16
28
  @ManyToOne(() => FinancialRequests, fr => fr.chats)
17
29
  @JoinColumn({ name: 'financial_request_id' })
18
30
  financialRequest?: FinancialRequests;
@@ -91,8 +91,8 @@ export class FinancialRequests extends BaseModel {
91
91
  @OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
92
92
  allowanceRequest?: AllowanceRequests;
93
93
 
94
- @OneToOne('ReimbursementRequests', 'financialRequest', { nullable: true })
95
- reimbursementRequest?: ReimbursementRequests;
94
+ @OneToMany('ReimbursementRequests', 'financialRequest', { nullable: true })
95
+ reimbursementRequests?: ReimbursementRequests[];
96
96
 
97
97
  @OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
98
98
  bankAccountChangeRequest?: BankAccountChangeRequests;
@@ -1,10 +1,10 @@
1
- import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
1
+ import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
3
  import { FinancialRequests } from "./FinancialRequestsModel";
4
4
 
5
5
  @Entity({ name: 'reimbursement_requests' })
6
6
  export class ReimbursementRequests extends BaseModel {
7
- @Column({ type: 'int', unique: true })
7
+ @Column({ type: 'int' })
8
8
  financial_request_id: number;
9
9
 
10
10
  @Column({ type: 'text' })
@@ -34,10 +34,10 @@ export class ReimbursementRequests extends BaseModel {
34
34
  @Column({ type: 'date', nullable: true })
35
35
  payment_date: Date;
36
36
 
37
- // @OneToOne('FinancialRequests', 'reimbursementRequest')
38
- // financialRequest?: FinancialRequests;
37
+ @Column({ type: 'varchar', nullable: true })
38
+ currency : string;
39
39
 
40
- @OneToOne(() => FinancialRequests, fr => fr.reimbursementRequest)
40
+ @ManyToOne(() => FinancialRequests, fr => fr.reimbursementRequests)
41
41
  @JoinColumn({ name: 'financial_request_id' })
42
42
  financialRequest?: FinancialRequests;
43
43
 
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class HelpContentMappedCategories extends BaseModel {
3
- help_content_category_Id: number;
4
- help_content_Id: number;
5
- constructor(help_content_category_Id: number, help_content_Id: number);
6
- }
@@ -1,34 +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.HelpContentMappedCategories = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
16
- constructor(help_content_category_Id, help_content_Id) {
17
- super();
18
- this.help_content_category_Id = help_content_category_Id,
19
- this.help_content_Id = help_content_Id;
20
- }
21
- };
22
- exports.HelpContentMappedCategories = HelpContentMappedCategories;
23
- __decorate([
24
- (0, typeorm_1.Column)({ nullable: true }),
25
- __metadata("design:type", Number)
26
- ], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({ nullable: true }),
29
- __metadata("design:type", Number)
30
- ], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
31
- exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
32
- (0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
33
- __metadata("design:paramtypes", [Number, Number])
34
- ], HelpContentMappedCategories);
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class HelpContentMappedTags extends BaseModel {
3
- help_content_tag_Id: number;
4
- help_content_Id: number;
5
- constructor(help_content_tag_Id: number, help_content_Id: number);
6
- }
@@ -1,34 +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.HelpContentMappedTags = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
16
- constructor(help_content_tag_Id, help_content_Id) {
17
- super();
18
- this.help_content_tag_Id = help_content_tag_Id,
19
- this.help_content_Id = help_content_Id;
20
- }
21
- };
22
- exports.HelpContentMappedTags = HelpContentMappedTags;
23
- __decorate([
24
- (0, typeorm_1.Column)({ nullable: true }),
25
- __metadata("design:type", Number)
26
- ], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({ nullable: true }),
29
- __metadata("design:type", Number)
30
- ], HelpContentMappedTags.prototype, "help_content_Id", void 0);
31
- exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
32
- (0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
33
- __metadata("design:paramtypes", [Number, Number])
34
- ], HelpContentMappedTags);
@@ -1,5 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class HelpContentTags extends BaseModel {
3
- name: string;
4
- constructor(name: string);
5
- }
@@ -1,29 +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.HelpContentTags = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
16
- constructor(name) {
17
- super();
18
- this.name = name;
19
- }
20
- };
21
- exports.HelpContentTags = HelpContentTags;
22
- __decorate([
23
- (0, typeorm_1.Column)({ nullable: true }),
24
- __metadata("design:type", String)
25
- ], HelpContentTags.prototype, "name", void 0);
26
- exports.HelpContentTags = HelpContentTags = __decorate([
27
- (0, typeorm_1.Entity)({ name: 'help_content_tags' }),
28
- __metadata("design:paramtypes", [String])
29
- ], HelpContentTags);
@@ -1,6 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class QuestionTags extends BaseModel {
3
- name: string;
4
- question_Id: number;
5
- constructor(name: string, question_Id: number);
6
- }
@@ -1,34 +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.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);