@platform-modules/foreign-ministry 1.3.339 → 1.3.341
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/models/CurrencyModel.d.ts +1 -1
- package/dist/models/CurrencyModel.js +3 -2
- package/dist/models/user.d.ts +1 -0
- package/dist/models/user.js +4 -0
- package/package.json +1 -1
- package/sql/add_users_is_selected_theme.sql +11 -0
- package/src/models/CurrencyModel.ts +2 -0
- package/src/models/user.ts +3 -0
|
@@ -7,5 +7,5 @@ export declare class Currency extends BaseModel {
|
|
|
7
7
|
symbol: string;
|
|
8
8
|
countries: string;
|
|
9
9
|
is_active: boolean;
|
|
10
|
-
constructor(code: string, name: string, symbol?: string, countries?: string);
|
|
10
|
+
constructor(code: string, name: string, arabic_name: string, symbol?: string, countries?: string);
|
|
11
11
|
}
|
|
@@ -13,10 +13,11 @@ exports.Currency = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let Currency = class Currency extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(code, name, symbol, countries) {
|
|
16
|
+
constructor(code, name, arabic_name, symbol, countries) {
|
|
17
17
|
super();
|
|
18
18
|
this.code = code;
|
|
19
19
|
this.name = name;
|
|
20
|
+
this.arabic_name = arabic_name;
|
|
20
21
|
this.symbol = symbol || '';
|
|
21
22
|
this.countries = countries || '[]';
|
|
22
23
|
this.is_active = true;
|
|
@@ -53,5 +54,5 @@ __decorate([
|
|
|
53
54
|
], Currency.prototype, "is_active", void 0);
|
|
54
55
|
exports.Currency = Currency = __decorate([
|
|
55
56
|
(0, typeorm_1.Entity)({ name: "currencies" }),
|
|
56
|
-
__metadata("design:paramtypes", [String, String, String, String])
|
|
57
|
+
__metadata("design:paramtypes", [String, String, String, String, String])
|
|
57
58
|
], Currency);
|
package/dist/models/user.d.ts
CHANGED
package/dist/models/user.js
CHANGED
|
@@ -249,6 +249,10 @@ __decorate([
|
|
|
249
249
|
(0, typeorm_1.Column)({ type: "enum", enum: ["English", "Arabic"], nullable: false, default: "English" }),
|
|
250
250
|
__metadata("design:type", String)
|
|
251
251
|
], User.prototype, "is_selected_lang", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ["Light", "Dark"], nullable: false, default: "Light" }),
|
|
254
|
+
__metadata("design:type", String)
|
|
255
|
+
], User.prototype, "is_selected_theme", void 0);
|
|
252
256
|
__decorate([
|
|
253
257
|
(0, typeorm_1.Column)({ type: "enum", enum: ["FM", "Embassy"], nullable: false, default: "FM" }),
|
|
254
258
|
__metadata("design:type", String)
|
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Add is_selected_theme column to users table (FM).
|
|
2
|
+
-- Run once per environment before deploying updated services.
|
|
3
|
+
|
|
4
|
+
DO $$ BEGIN
|
|
5
|
+
CREATE TYPE is_selected_theme_enum AS ENUM ('Light', 'Dark');
|
|
6
|
+
EXCEPTION
|
|
7
|
+
WHEN duplicate_object THEN NULL;
|
|
8
|
+
END $$;
|
|
9
|
+
|
|
10
|
+
ALTER TABLE IF EXISTS users
|
|
11
|
+
ADD COLUMN IF NOT EXISTS is_selected_theme is_selected_theme_enum NOT NULL DEFAULT 'Light';
|
|
@@ -27,12 +27,14 @@ export class Currency extends BaseModel {
|
|
|
27
27
|
constructor(
|
|
28
28
|
code: string,
|
|
29
29
|
name: string,
|
|
30
|
+
arabic_name: string,
|
|
30
31
|
symbol?: string,
|
|
31
32
|
countries?: string
|
|
32
33
|
) {
|
|
33
34
|
super();
|
|
34
35
|
this.code = code;
|
|
35
36
|
this.name = name;
|
|
37
|
+
this.arabic_name = arabic_name;
|
|
36
38
|
this.symbol = symbol || '';
|
|
37
39
|
this.countries = countries || '[]';
|
|
38
40
|
this.is_active = true;
|
package/src/models/user.ts
CHANGED
|
@@ -145,6 +145,9 @@ export class User extends BaseModel {
|
|
|
145
145
|
@Column({ type: "enum", enum: ["English", "Arabic"], nullable: false, default: "English" })
|
|
146
146
|
is_selected_lang: "English" | "Arabic";
|
|
147
147
|
|
|
148
|
+
@Column({ type: "enum", enum: ["Light", "Dark"], nullable: false, default: "Light" })
|
|
149
|
+
is_selected_theme: "Light" | "Dark";
|
|
150
|
+
|
|
148
151
|
@Column({ type: "enum", enum: ["FM", "Embassy"], nullable: false, default: "FM" })
|
|
149
152
|
category: "FM" | "Embassy"; // Mandatory
|
|
150
153
|
|