@platform-modules/foreign-ministry 1.1.101 → 1.1.103

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.
@@ -120,6 +120,7 @@ const UserEducationDetailsModel_1 = require("./models/UserEducationDetailsModel"
120
120
  const DiplomaticTitlesMasterModel_1 = require("./models/DiplomaticTitlesMasterModel");
121
121
  const CountryMasterModel_1 = require("./models/CountryMasterModel");
122
122
  const NationalityMasterModel_1 = require("./models/NationalityMasterModel");
123
+ const OfficeMasterModel_1 = require("./models/OfficeMasterModel");
123
124
  exports.AppDataSource = new typeorm_1.DataSource({
124
125
  type: 'postgres',
125
126
  host: process.env.DB_HOST || 'localhost',
@@ -244,6 +245,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
244
245
  UserEducationDetailsModel_1.UserEducationDetails,
245
246
  DiplomaticTitlesMasterModel_1.DiplomaticTitlesMaster,
246
247
  CountryMasterModel_1.CountryMaster,
247
- NationalityMasterModel_1.NationalityMaster
248
+ NationalityMasterModel_1.NationalityMaster,
249
+ OfficeMasterModel_1.OfficeMaster
248
250
  ],
249
251
  });
package/dist/index.d.ts CHANGED
@@ -129,3 +129,4 @@ export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel'
129
129
  export * from './models/DiplomaticTitlesMasterModel';
130
130
  export * from './models/CountryMasterModel';
131
131
  export * from './models/NationalityMasterModel';
132
+ export * from './models/OfficeMasterModel';
package/dist/index.js CHANGED
@@ -160,3 +160,4 @@ Object.defineProperty(exports, "ProfileUpdateRequestStatus", { enumerable: true,
160
160
  __exportStar(require("./models/DiplomaticTitlesMasterModel"), exports);
161
161
  __exportStar(require("./models/CountryMasterModel"), exports);
162
162
  __exportStar(require("./models/NationalityMasterModel"), exports);
163
+ __exportStar(require("./models/OfficeMasterModel"), exports);
@@ -0,0 +1,12 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class OfficeMaster extends BaseModel {
3
+ office_name: string;
4
+ office_name_arabic: string | null;
5
+ office_code: string | null;
6
+ description: string | null;
7
+ location: string | null;
8
+ address: string | null;
9
+ is_active: boolean;
10
+ display_order: number;
11
+ constructor(office_name: string);
12
+ }
@@ -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.OfficeMaster = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let OfficeMaster = class OfficeMaster extends BaseModel_1.BaseModel {
16
+ constructor(office_name) {
17
+ super();
18
+ this.office_name = office_name;
19
+ this.is_active = true;
20
+ this.display_order = 0;
21
+ }
22
+ };
23
+ exports.OfficeMaster = OfficeMaster;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
26
+ __metadata("design:type", String)
27
+ ], OfficeMaster.prototype, "office_name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], OfficeMaster.prototype, "office_name_arabic", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], OfficeMaster.prototype, "office_code", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], OfficeMaster.prototype, "description", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], OfficeMaster.prototype, "location", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], OfficeMaster.prototype, "address", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
50
+ __metadata("design:type", Boolean)
51
+ ], OfficeMaster.prototype, "is_active", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'int', default: 0 }),
54
+ __metadata("design:type", Number)
55
+ ], OfficeMaster.prototype, "display_order", void 0);
56
+ exports.OfficeMaster = OfficeMaster = __decorate([
57
+ (0, typeorm_1.Entity)({ name: 'office_master' }),
58
+ __metadata("design:paramtypes", [String])
59
+ ], OfficeMaster);
@@ -19,7 +19,7 @@ export declare class ProfileUpdateRequests extends BaseModel {
19
19
  is_diplomatic: boolean | null;
20
20
  assigned_to_department: string | null;
21
21
  comments: string | null;
22
- title: string | null;
22
+ diplomatic_title_id: number | null;
23
23
  first_name: string | null;
24
24
  second_name: string | null;
25
25
  third_name: string | null;
@@ -30,7 +30,7 @@ export declare class ProfileUpdateRequests extends BaseModel {
30
30
  sect: string | null;
31
31
  date_of_birth: Date | null;
32
32
  place_of_birth: string | null;
33
- nationality: string | null;
33
+ nationality_id: number | null;
34
34
  gender: string | null;
35
35
  marital_status: string | null;
36
36
  number_of_dependents: number | null;
@@ -51,7 +51,7 @@ export declare class ProfileUpdateRequests extends BaseModel {
51
51
  governorate: string | null;
52
52
  wilayat: string | null;
53
53
  locality: string | null;
54
- country: string | null;
54
+ country_id: number | null;
55
55
  phone_number: string | null;
56
56
  fax_number: string | null;
57
57
  email: string | null;
@@ -68,7 +68,7 @@ export declare class ProfileUpdateRequests extends BaseModel {
68
68
  nature_of_work: string | null;
69
69
  retirement_date: Date | null;
70
70
  proposed_position: string | null;
71
- proposed_financial_grade: string | null;
71
+ proposed_financial_grade_id: number | null;
72
72
  secondment_start_date: Date | null;
73
73
  secondment_end_date: Date | null;
74
74
  disability_type: string | null;
@@ -80,7 +80,7 @@ export declare class ProfileUpdateRequests extends BaseModel {
80
80
  entity_transferred_to: string | null;
81
81
  date_of_transfer_to: Date | null;
82
82
  job_description: string | null;
83
- country_appointment: string | null;
83
+ country_appointment_id: number | null;
84
84
  date_of_appointment: Date | null;
85
85
  appointment_grade: string | null;
86
86
  type_of_appointment: string | null;
@@ -69,9 +69,9 @@ __decorate([
69
69
  __metadata("design:type", Object)
70
70
  ], ProfileUpdateRequests.prototype, "comments", void 0);
71
71
  __decorate([
72
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
72
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
73
73
  __metadata("design:type", Object)
74
- ], ProfileUpdateRequests.prototype, "title", void 0);
74
+ ], ProfileUpdateRequests.prototype, "diplomatic_title_id", void 0);
75
75
  __decorate([
76
76
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
77
77
  __metadata("design:type", Object)
@@ -113,9 +113,9 @@ __decorate([
113
113
  __metadata("design:type", Object)
114
114
  ], ProfileUpdateRequests.prototype, "place_of_birth", void 0);
115
115
  __decorate([
116
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
116
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
117
117
  __metadata("design:type", Object)
118
- ], ProfileUpdateRequests.prototype, "nationality", void 0);
118
+ ], ProfileUpdateRequests.prototype, "nationality_id", void 0);
119
119
  __decorate([
120
120
  (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
121
121
  __metadata("design:type", Object)
@@ -197,9 +197,9 @@ __decorate([
197
197
  __metadata("design:type", Object)
198
198
  ], ProfileUpdateRequests.prototype, "locality", void 0);
199
199
  __decorate([
200
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
200
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
201
201
  __metadata("design:type", Object)
202
- ], ProfileUpdateRequests.prototype, "country", void 0);
202
+ ], ProfileUpdateRequests.prototype, "country_id", void 0);
203
203
  __decorate([
204
204
  (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
205
205
  __metadata("design:type", Object)
@@ -265,9 +265,9 @@ __decorate([
265
265
  __metadata("design:type", Object)
266
266
  ], ProfileUpdateRequests.prototype, "proposed_position", void 0);
267
267
  __decorate([
268
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
268
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
269
269
  __metadata("design:type", Object)
270
- ], ProfileUpdateRequests.prototype, "proposed_financial_grade", void 0);
270
+ ], ProfileUpdateRequests.prototype, "proposed_financial_grade_id", void 0);
271
271
  __decorate([
272
272
  (0, typeorm_1.Column)({ type: 'date', nullable: true }),
273
273
  __metadata("design:type", Object)
@@ -313,9 +313,9 @@ __decorate([
313
313
  __metadata("design:type", Object)
314
314
  ], ProfileUpdateRequests.prototype, "job_description", void 0);
315
315
  __decorate([
316
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
316
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
317
317
  __metadata("design:type", Object)
318
- ], ProfileUpdateRequests.prototype, "country_appointment", void 0);
318
+ ], ProfileUpdateRequests.prototype, "country_appointment_id", void 0);
319
319
  __decorate([
320
320
  (0, typeorm_1.Column)({ type: 'date', nullable: true }),
321
321
  __metadata("design:type", Object)
@@ -14,9 +14,8 @@ export declare class StationeryRequests extends BaseModel {
14
14
  sub_service_id: number | null;
15
15
  user_id: number;
16
16
  date_of_request_preparation: Date;
17
- office: string;
18
- material_type: string;
19
- material_name: string;
17
+ office_id: number;
18
+ material_id: number;
20
19
  quantity_required: number;
21
20
  comments: string | null;
22
21
  status: StationeryRequestStatus;
@@ -49,17 +49,13 @@ __decorate([
49
49
  __metadata("design:type", Date)
50
50
  ], StationeryRequests.prototype, "date_of_request_preparation", void 0);
51
51
  __decorate([
52
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
53
- __metadata("design:type", String)
54
- ], StationeryRequests.prototype, "office", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
57
- __metadata("design:type", String)
58
- ], StationeryRequests.prototype, "material_type", void 0);
52
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
53
+ __metadata("design:type", Number)
54
+ ], StationeryRequests.prototype, "office_id", void 0);
59
55
  __decorate([
60
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
61
- __metadata("design:type", String)
62
- ], StationeryRequests.prototype, "material_name", void 0);
56
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
57
+ __metadata("design:type", Number)
58
+ ], StationeryRequests.prototype, "material_id", void 0);
63
59
  __decorate([
64
60
  (0, typeorm_1.Column)({ type: 'int', nullable: false }),
65
61
  __metadata("design:type", Number)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.101",
3
+ "version": "1.1.103",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -125,6 +125,7 @@ import { UserEducationDetails } from './models/UserEducationDetailsModel'
125
125
  import { DiplomaticTitlesMaster } from './models/DiplomaticTitlesMasterModel'
126
126
  import { CountryMaster } from './models/CountryMasterModel'
127
127
  import { NationalityMaster } from './models/NationalityMasterModel'
128
+ import { OfficeMaster } from './models/OfficeMasterModel'
128
129
 
129
130
 
130
131
  export const AppDataSource = new DataSource({
@@ -251,6 +252,7 @@ export const AppDataSource = new DataSource({
251
252
  UserEducationDetails,
252
253
  DiplomaticTitlesMaster,
253
254
  CountryMaster,
254
- NationalityMaster
255
+ NationalityMaster,
256
+ OfficeMaster
255
257
  ],
256
258
  });
package/src/index.ts CHANGED
@@ -129,3 +129,4 @@ export { ProfileUpdateRequestStatus } from './models/ProfileUpdateRequestsModel'
129
129
  export * from './models/DiplomaticTitlesMasterModel';
130
130
  export * from './models/CountryMasterModel';
131
131
  export * from './models/NationalityMasterModel';
132
+ export * from './models/OfficeMasterModel';
@@ -0,0 +1,37 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'office_master' })
5
+ export class OfficeMaster extends BaseModel {
6
+ @Column({ type: 'varchar', length: 255, nullable: false })
7
+ office_name: string; // Office name
8
+
9
+ @Column({ type: 'varchar', length: 255, nullable: true })
10
+ office_name_arabic: string | null; // Arabic translation
11
+
12
+ @Column({ type: 'varchar', length: 100, nullable: true })
13
+ office_code: string | null; // Optional office code for identification
14
+
15
+ @Column({ type: 'text', nullable: true })
16
+ description: string | null; // Description of the office
17
+
18
+ @Column({ type: 'varchar', length: 255, nullable: true })
19
+ location: string | null; // Office location
20
+
21
+ @Column({ type: 'varchar', length: 255, nullable: true })
22
+ address: string | null; // Office address
23
+
24
+ @Column({ type: 'boolean', default: true })
25
+ is_active: boolean; // Whether the office is active
26
+
27
+ @Column({ type: 'int', default: 0 })
28
+ display_order: number; // Order for display in dropdowns
29
+
30
+ constructor(office_name: string) {
31
+ super();
32
+ this.office_name = office_name;
33
+ this.is_active = true;
34
+ this.display_order = 0;
35
+ }
36
+ }
37
+
@@ -48,8 +48,8 @@ export class ProfileUpdateRequests extends BaseModel {
48
48
 
49
49
  // ========== PERSONAL DETAILS FIELDS (all nullable) ==========
50
50
  // Name fields
51
- @Column({ type: 'varchar', length: 255, nullable: true })
52
- title: string | null;
51
+ @Column({ type: 'int', nullable: true })
52
+ diplomatic_title_id: number | null; // Reference to diplomatic_titles_master table
53
53
 
54
54
  @Column({ type: 'varchar', length: 255, nullable: true })
55
55
  first_name: string | null;
@@ -82,8 +82,8 @@ export class ProfileUpdateRequests extends BaseModel {
82
82
  @Column({ type: 'varchar', length: 255, nullable: true })
83
83
  place_of_birth: string | null;
84
84
 
85
- @Column({ type: 'varchar', length: 100, nullable: true })
86
- nationality: string | null;
85
+ @Column({ type: 'int', nullable: true })
86
+ nationality_id: number | null; // Reference to nationality_master table
87
87
 
88
88
  @Column({ type: 'varchar', length: 50, nullable: true })
89
89
  gender: string | null;
@@ -148,8 +148,8 @@ export class ProfileUpdateRequests extends BaseModel {
148
148
  @Column({ type: 'varchar', length: 255, nullable: true })
149
149
  locality: string | null;
150
150
 
151
- @Column({ type: 'varchar', length: 100, nullable: true })
152
- country: string | null;
151
+ @Column({ type: 'int', nullable: true })
152
+ country_id: number | null; // Reference to country_master table
153
153
 
154
154
  // Contact Information
155
155
  @Column({ type: 'varchar', length: 50, nullable: true })
@@ -203,8 +203,8 @@ export class ProfileUpdateRequests extends BaseModel {
203
203
  @Column({ type: 'varchar', length: 255, nullable: true })
204
204
  proposed_position: string | null;
205
205
 
206
- @Column({ type: 'varchar', length: 100, nullable: true })
207
- proposed_financial_grade: string | null;
206
+ @Column({ type: 'int', nullable: true })
207
+ proposed_financial_grade_id: number | null; // Reference to financial_grade table
208
208
 
209
209
  @Column({ type: 'date', nullable: true })
210
210
  secondment_start_date: Date | null;
@@ -241,8 +241,8 @@ export class ProfileUpdateRequests extends BaseModel {
241
241
  job_description: string | null;
242
242
 
243
243
  // Appointment Information
244
- @Column({ type: 'varchar', length: 255, nullable: true })
245
- country_appointment: string | null;
244
+ @Column({ type: 'int', nullable: true })
245
+ country_appointment_id: number | null; // Reference to country_master table
246
246
 
247
247
  @Column({ type: 'date', nullable: true })
248
248
  date_of_appointment: Date | null;
@@ -31,14 +31,11 @@ export class StationeryRequests extends BaseModel {
31
31
  @Column({ type: 'date', nullable: false })
32
32
  date_of_request_preparation: Date;
33
33
 
34
- @Column({ type: 'varchar', length: 255, nullable: false })
35
- office: string;
36
-
37
- @Column({ type: 'varchar', length: 255, nullable: false })
38
- material_type: string;
34
+ @Column({ type: 'int', nullable: false })
35
+ office_id: number; // Reference to office_master table
39
36
 
40
- @Column({ type: 'varchar', length: 255, nullable: false })
41
- material_name: string;
37
+ @Column({ type: 'int', nullable: false })
38
+ material_id: number; // Reference to stationery_material_master table
42
39
 
43
40
  @Column({ type: 'int', nullable: false })
44
41
  quantity_required: number;