@platform-modules/foreign-ministry 1.3.364 → 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.
- package/dist/data-source.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/IconsModel.d.ts +7 -0
- package/dist/models/IconsModel.js +39 -0
- package/dist/models/importantLinksModel.d.ts +1 -0
- package/dist/models/importantLinksModel.js +5 -0
- package/package.json +1 -1
- package/sql/add_important_links_icon_id.sql +17 -0
- package/sql/create_icons.sql +21 -0
- package/src/data-source.ts +3 -1
- package/src/index.ts +1 -0
- package/src/models/IconsModel.ts +21 -0
- package/src/models/importantLinksModel.ts +4 -0
package/dist/data-source.js
CHANGED
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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
|
@@ -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);
|
package/src/data-source.ts
CHANGED
|
@@ -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';
|
|
@@ -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
|
|