@platform-modules/foreign-ministry 1.3.363 → 1.3.365

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.
@@ -283,6 +283,7 @@ const ProjectTaskCommentsModel_1 = require("./models/ProjectTaskCommentsModel");
283
283
  const DocumentationFolderModel_1 = require("./models/DocumentationFolderModel");
284
284
  const DocumentationFileModel_1 = require("./models/DocumentationFileModel");
285
285
  const UniversalLanguageMasterModel_1 = require("./models/UniversalLanguageMasterModel");
286
+ const IconsModel_1 = require("./models/IconsModel");
286
287
  const MeetingAppointmentReminderLogModel_1 = require("./models/MeetingAppointmentReminderLogModel");
287
288
  const EvaluationEligibilitySettingModel_1 = require("./models/EvaluationEligibilitySettingModel");
288
289
  const EvaluationFormModel_1 = require("./models/EvaluationFormModel");
@@ -672,5 +673,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
672
673
  ServiceSlaApprovalModel_1.ServiceSlaApproval,
673
674
  SlaConfigModel_1.SlaConfig,
674
675
  ChatbotQnsAnsMappingModel_1.ChatbotQnsAnsMapping,
676
+ IconsModel_1.Icons,
675
677
  ],
676
678
  });
package/dist/index.d.ts CHANGED
@@ -218,6 +218,7 @@ export * from './models/CountryMasterModel';
218
218
  export * from './models/CityMasterModel';
219
219
  export * from './models/NationalityMasterModel';
220
220
  export * from './models/UniversalLanguageMasterModel';
221
+ export * from './models/IconsModel';
221
222
  export * from './models/OfficeMasterModel';
222
223
  export * from './models/UpdateAttendanceAttachmentModel';
223
224
  export * from './models/RoutingGroupUsersModel';
package/dist/index.js CHANGED
@@ -255,6 +255,7 @@ __exportStar(require("./models/CountryMasterModel"), exports);
255
255
  __exportStar(require("./models/CityMasterModel"), exports);
256
256
  __exportStar(require("./models/NationalityMasterModel"), exports);
257
257
  __exportStar(require("./models/UniversalLanguageMasterModel"), exports);
258
+ __exportStar(require("./models/IconsModel"), exports);
258
259
  __exportStar(require("./models/OfficeMasterModel"), exports);
259
260
  __exportStar(require("./models/UpdateAttendanceAttachmentModel"), exports);
260
261
  __exportStar(require("./models/RoutingGroupUsersModel"), exports);
@@ -127,11 +127,11 @@ __decorate([
127
127
  __metadata("design:type", Object)
128
128
  ], GatePassRequests.prototype, "purpose_of_entry", void 0);
129
129
  __decorate([
130
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
130
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
131
131
  __metadata("design:type", Object)
132
132
  ], GatePassRequests.prototype, "from_date", void 0);
133
133
  __decorate([
134
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
134
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
135
135
  __metadata("design:type", Object)
136
136
  ], GatePassRequests.prototype, "to_date", void 0);
137
137
  __decorate([
@@ -119,11 +119,11 @@ __decorate([
119
119
  __metadata("design:type", Object)
120
120
  ], GatePassVisitors.prototype, "purpose_of_entry", void 0);
121
121
  __decorate([
122
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
122
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
123
123
  __metadata("design:type", Object)
124
124
  ], GatePassVisitors.prototype, "from_date", void 0);
125
125
  __decorate([
126
- (0, typeorm_1.Column)({ type: 'date', nullable: true }),
126
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
127
127
  __metadata("design:type", Object)
128
128
  ], GatePassVisitors.prototype, "to_date", void 0);
129
129
  __decorate([
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare class Icons extends BaseModel {
3
+ icon_name: string;
4
+ icon_name_arabic: string | null;
5
+ url: string;
6
+ constructor(icon_name: string, url: string);
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.Icons = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let Icons = class Icons extends BaseModel_1.BaseModel {
16
+ constructor(icon_name, url) {
17
+ super();
18
+ this.icon_name = icon_name;
19
+ this.url = url;
20
+ this.icon_name_arabic = null;
21
+ }
22
+ };
23
+ exports.Icons = Icons;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
26
+ __metadata("design:type", String)
27
+ ], Icons.prototype, "icon_name", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], Icons.prototype, "icon_name_arabic", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "varchar", length: 2000, nullable: false }),
34
+ __metadata("design:type", String)
35
+ ], Icons.prototype, "url", void 0);
36
+ exports.Icons = Icons = __decorate([
37
+ (0, typeorm_1.Entity)({ name: "icons" }),
38
+ __metadata("design:paramtypes", [String, String])
39
+ ], Icons);
@@ -2,5 +2,6 @@ import { BaseModel } from './BaseModel';
2
2
  export declare class ImportantLinks extends BaseModel {
3
3
  title: string;
4
4
  url: string;
5
+ icon_id: number | null;
5
6
  constructor(title: string, url: string);
6
7
  }
@@ -17,6 +17,7 @@ let ImportantLinks = class ImportantLinks extends BaseModel_1.BaseModel {
17
17
  super();
18
18
  this.title = title;
19
19
  this.url = url;
20
+ this.icon_id = null;
20
21
  }
21
22
  };
22
23
  exports.ImportantLinks = ImportantLinks;
@@ -28,6 +29,10 @@ __decorate([
28
29
  (0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
29
30
  __metadata("design:type", String)
30
31
  ], ImportantLinks.prototype, "url", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], ImportantLinks.prototype, "icon_id", void 0);
31
36
  exports.ImportantLinks = ImportantLinks = __decorate([
32
37
  (0, typeorm_1.Entity)({ name: 'important_links' }),
33
38
  __metadata("design:paramtypes", [String, String])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.363",
3
+ "version": "1.3.365",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -0,0 +1,17 @@
1
+ -- Add icon_id column to important_links table (FM).
2
+ -- Run once per environment before deploying updated services.
3
+
4
+ ALTER TABLE IF EXISTS important_links
5
+ ADD COLUMN IF NOT EXISTS icon_id INTEGER NULL;
6
+
7
+ CREATE INDEX IF NOT EXISTS idx_important_links_icon_id
8
+ ON important_links (icon_id)
9
+ WHERE is_deleted = FALSE;
10
+
11
+ DO $$ BEGIN
12
+ ALTER TABLE important_links
13
+ ADD CONSTRAINT fk_important_links_icon_id
14
+ FOREIGN KEY (icon_id) REFERENCES icons (id);
15
+ EXCEPTION
16
+ WHEN duplicate_object THEN NULL;
17
+ END $$;
@@ -0,0 +1,21 @@
1
+ -- Icons master table (User Service)
2
+ -- PostgreSQL
3
+
4
+ CREATE TABLE IF NOT EXISTS icons (
5
+ id SERIAL PRIMARY KEY,
6
+ icon_name VARCHAR(255) NOT NULL,
7
+ icon_name_arabic VARCHAR(255) NULL,
8
+ url VARCHAR(2000) NOT NULL,
9
+ created_by VARCHAR NULL,
10
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
11
+ updated_by VARCHAR NULL,
12
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
13
+ is_deleted BOOLEAN DEFAULT FALSE
14
+ );
15
+
16
+ CREATE INDEX IF NOT EXISTS idx_icons_icon_name
17
+ ON icons (LOWER(icon_name))
18
+ WHERE is_deleted = FALSE;
19
+
20
+ CREATE INDEX IF NOT EXISTS idx_icons_is_deleted
21
+ ON icons (is_deleted);
@@ -0,0 +1,8 @@
1
+ -- Store gate pass validity window with date and time (not date-only).
2
+ ALTER TABLE gate_pass_requests
3
+ ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
4
+ ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
5
+
6
+ ALTER TABLE gate_pass_visitors
7
+ ALTER COLUMN from_date TYPE timestamptz USING from_date::timestamptz,
8
+ ALTER COLUMN to_date TYPE timestamptz USING to_date::timestamptz;
@@ -288,7 +288,8 @@ import { ProjectActivity } from './models/ProjectActivityModel';
288
288
  import { ProjectTaskComments } from './models/ProjectTaskCommentsModel';
289
289
  import { DocumentationFolder } from './models/DocumentationFolderModel';
290
290
  import { DocumentationFile } from './models/DocumentationFileModel';
291
- import { UniversalLanguageMaster } from './models/UniversalLanguageMasterModel';
291
+ import { UniversalLanguageMaster } from './models/UniversalLanguageMasterModel';
292
+ import { Icons } from './models/IconsModel';
292
293
  import { MeetingAppointmentReminderLog } from './models/MeetingAppointmentReminderLogModel';
293
294
  import {
294
295
  EvaluationEligibilitySetting,
@@ -684,5 +685,6 @@ export const AppDataSource = new DataSource({
684
685
  ServiceSlaApproval,
685
686
  SlaConfig,
686
687
  ChatbotQnsAnsMapping,
688
+ Icons,
687
689
  ],
688
690
  });
package/src/index.ts CHANGED
@@ -218,6 +218,7 @@ export * from './models/CountryMasterModel';
218
218
  export * from './models/CityMasterModel';
219
219
  export * from './models/NationalityMasterModel';
220
220
  export * from './models/UniversalLanguageMasterModel';
221
+ export * from './models/IconsModel';
221
222
  export * from './models/OfficeMasterModel';
222
223
  export * from './models/UpdateAttendanceAttachmentModel';
223
224
  export * from './models/RoutingGroupUsersModel';
@@ -79,10 +79,10 @@ export class GatePassRequests extends BaseModel {
79
79
  @Column({ type: 'text', nullable: true })
80
80
  purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
81
81
 
82
- @Column({ type: 'date', nullable: true })
82
+ @Column({ type: 'timestamptz', nullable: true })
83
83
  from_date: Date | null; // من (From)
84
84
 
85
- @Column({ type: 'date', nullable: true })
85
+ @Column({ type: 'timestamptz', nullable: true })
86
86
  to_date: Date | null; // الى (To)
87
87
 
88
88
  @Column({ type: 'enum', enum: GatePassType, nullable: true })
@@ -72,10 +72,10 @@ export class GatePassVisitors extends BaseModel {
72
72
  @Column({ type: 'text', nullable: true })
73
73
  purpose_of_entry: string | null; // الغرض من الدخول (Purpose of Entry)
74
74
 
75
- @Column({ type: 'date', nullable: true })
75
+ @Column({ type: 'timestamptz', nullable: true })
76
76
  from_date: Date | null; // من (From)
77
77
 
78
- @Column({ type: 'date', nullable: true })
78
+ @Column({ type: 'timestamptz', nullable: true })
79
79
  to_date: Date | null; // الى (To)
80
80
 
81
81
  // Store as varchar to avoid DB enum coupling (values: "Short-term" / "Long-term")
@@ -0,0 +1,21 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "icons" })
5
+ export class Icons extends BaseModel {
6
+ @Column({ type: "varchar", length: 255, nullable: false })
7
+ icon_name: string;
8
+
9
+ @Column({ type: "varchar", length: 255, nullable: true })
10
+ icon_name_arabic: string | null;
11
+
12
+ @Column({ type: "varchar", length: 2000, nullable: false })
13
+ url: string;
14
+
15
+ constructor(icon_name: string, url: string) {
16
+ super();
17
+ this.icon_name = icon_name;
18
+ this.url = url;
19
+ this.icon_name_arabic = null;
20
+ }
21
+ }
@@ -10,6 +10,9 @@ export class ImportantLinks extends BaseModel {
10
10
  @Column({ type: 'varchar', nullable: false })
11
11
  url: string;
12
12
 
13
+ @Column({ type: 'integer', nullable: true })
14
+ icon_id: number | null;
15
+
13
16
  constructor(
14
17
  title: string,
15
18
  url: string
@@ -17,6 +20,7 @@ export class ImportantLinks extends BaseModel {
17
20
  super();
18
21
  this.title = title;
19
22
  this.url = url;
23
+ this.icon_id = null;
20
24
  }
21
25
  }
22
26