@platform-modules/foreign-ministry 1.3.237 → 1.3.238

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.
@@ -1,55 +1,55 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum MissionTravelWorkFlowStatus {
5
- COMPLETED = "Completed",
6
- NOT_YET_STARTED = "Not Yet Started",
7
- PENDING = "Pending"
8
- }
9
-
10
- @Entity({ name: 'mission_travel_workflows' })
11
- export class MissionTravelWorkFlow extends BaseModel {
12
- @Column({ type: 'int', nullable: false })
13
- request_id: number;
14
-
15
- @Column({ type: 'int', nullable: true })
16
- service_id: number | null;
17
-
18
- @Column({ type: 'int', nullable: true })
19
- sub_service_id: number | null;
20
-
21
- @Column({ type: 'int', nullable: true })
22
- order: number | null;
23
-
24
- @Column({ type: 'varchar', length: 255, nullable: false })
25
- content: string;
26
-
27
- @Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
28
- status: MissionTravelWorkFlowStatus;
29
-
30
- @Column({ type: 'integer', nullable: true })
31
- user_id: number | null;
32
-
33
- @Column({ type: 'integer', nullable: true })
34
- role_id: number | null;
35
-
36
- @Column({ type: 'integer', nullable: true })
37
- department_id: number | null;
38
-
39
- @Column({ type: 'integer', nullable: true })
40
- section_id: number | null;
41
-
42
- constructor(request_id: number, content: string, status: MissionTravelWorkFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
43
- super();
44
- this.request_id = request_id;
45
- this.content = content;
46
- this.status = status;
47
- this.order = order || null;
48
- this.service_id = service_id ?? null;
49
- this.sub_service_id = sub_service_id ?? null;
50
- this.user_id = user_id || null;
51
- this.role_id = role_id || null;
52
- this.department_id = department_id || null;
53
- this.section_id = section_id || null;
54
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum MissionTravelWorkFlowStatus {
5
+ COMPLETED = "Completed",
6
+ NOT_YET_STARTED = "Not Yet Started",
7
+ PENDING = "Pending"
8
+ }
9
+
10
+ @Entity({ name: 'mission_travel_workflows' })
11
+ export class MissionTravelWorkFlow extends BaseModel {
12
+ @Column({ type: 'int', nullable: false })
13
+ request_id: number;
14
+
15
+ @Column({ type: 'int', nullable: true })
16
+ service_id: number | null;
17
+
18
+ @Column({ type: 'int', nullable: true })
19
+ sub_service_id: number | null;
20
+
21
+ @Column({ type: 'int', nullable: true })
22
+ order: number | null;
23
+
24
+ @Column({ type: 'varchar', length: 255, nullable: false })
25
+ content: string;
26
+
27
+ @Column({ type: 'enum', enum: MissionTravelWorkFlowStatus, default: MissionTravelWorkFlowStatus.NOT_YET_STARTED, nullable: false })
28
+ status: MissionTravelWorkFlowStatus;
29
+
30
+ @Column({ type: 'integer', nullable: true })
31
+ user_id: number | null;
32
+
33
+ @Column({ type: 'integer', nullable: true })
34
+ role_id: number | null;
35
+
36
+ @Column({ type: 'integer', nullable: true })
37
+ department_id: number | null;
38
+
39
+ @Column({ type: 'integer', nullable: true })
40
+ section_id: number | null;
41
+
42
+ constructor(request_id: number, content: string, status: MissionTravelWorkFlowStatus, order?: number, service_id?: number | null, sub_service_id?: number | null, user_id?: number | null, role_id?: number | null, department_id?: number | null, section_id?: number | null) {
43
+ super();
44
+ this.request_id = request_id;
45
+ this.content = content;
46
+ this.status = status;
47
+ this.order = order || null;
48
+ this.service_id = service_id ?? null;
49
+ this.sub_service_id = sub_service_id ?? null;
50
+ this.user_id = user_id || null;
51
+ this.role_id = role_id || null;
52
+ this.department_id = department_id || null;
53
+ this.section_id = section_id || null;
54
+ }
55
55
  }
@@ -1,40 +1,50 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'project_milestone_phases' })
5
- export class ProjectMilestonePhases extends BaseModel {
6
- @Column({ type: 'int' })
7
- project_id: number;
8
-
9
- @Column({ type: 'int' })
10
- milestone_id: number;
11
-
12
- @Column({ type: 'varchar', length: 255 })
13
- phase_name: string;
14
-
15
- @Column({ type: 'int', default: 1 })
16
- display_order: number;
17
-
18
- @Column({ type: 'jsonb', nullable: true })
19
- checklists: string[] | null;
20
-
21
- @Column({ type: 'jsonb', nullable: true })
22
- criteria: string[] | null;
23
-
24
- constructor(
25
- project_id?: number,
26
- milestone_id?: number,
27
- phase_name?: string,
28
- display_order?: number,
29
- checklists?: string[] | null,
30
- criteria?: string[] | null
31
- ) {
32
- super();
33
- this.project_id = project_id ?? 0;
34
- this.milestone_id = milestone_id ?? 0;
35
- this.phase_name = phase_name ?? '';
36
- this.display_order = display_order ?? 1;
37
- this.checklists = checklists ?? null;
38
- this.criteria = criteria ?? null;
39
- }
40
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'project_milestone_phases' })
5
+ export class ProjectMilestonePhases extends BaseModel {
6
+ @Column({ type: 'int' })
7
+ project_id: number;
8
+
9
+ @Column({ type: 'int' })
10
+ milestone_id: number;
11
+
12
+ @Column({ type: 'varchar', length: 255 })
13
+ phase_name: string;
14
+
15
+ @Column({ type: 'int', default: 1 })
16
+ display_order: number;
17
+
18
+ @Column({ type: 'jsonb', nullable: true })
19
+ checklists: string[] | null;
20
+
21
+ @Column({ type: 'jsonb', nullable: true })
22
+ criteria: string[] | null;
23
+
24
+ @Column({ type: 'date', nullable: true })
25
+ start_date: Date | null;
26
+
27
+ @Column({ type: 'date', nullable: true })
28
+ end_date: Date | null;
29
+
30
+ constructor(
31
+ project_id?: number,
32
+ milestone_id?: number,
33
+ phase_name?: string,
34
+ display_order?: number,
35
+ checklists?: string[] | null,
36
+ criteria?: string[] | null,
37
+ start_date?: Date | null,
38
+ end_date?: Date | null
39
+ ) {
40
+ super();
41
+ this.project_id = project_id ?? 0;
42
+ this.milestone_id = milestone_id ?? 0;
43
+ this.phase_name = phase_name ?? '';
44
+ this.display_order = display_order ?? 1;
45
+ this.checklists = checklists ?? null;
46
+ this.criteria = criteria ?? null;
47
+ this.start_date = start_date ?? null;
48
+ this.end_date = end_date ?? null;
49
+ }
50
+ }
@@ -1,75 +1,75 @@
1
- import { Column, Entity } from 'typeorm';
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'projects' })
5
- export class Projects extends BaseModel {
6
- @Column({ type: 'varchar', length: 255 })
7
- project_name: string;
8
-
9
- @Column({ type: 'text' , nullable: true})
10
- project_objective: string;
11
-
12
- @Column({ type: 'text' , nullable: true})
13
- project_benefits: string;
14
-
15
- @Column({ type: 'text' , nullable: true})
16
- project_risks: string;
17
-
18
- @Column({ type: 'text' , nullable: true})
19
- project_challenges: string;
20
-
21
- @Column({ type: 'text' , nullable: true})
22
- project_description: string;
23
-
24
- @Column({ type: 'text' , nullable: true})
25
- project_status: string;
26
-
27
- @Column({ type: 'text' , nullable: true})
28
- roadmap_link: string;
29
-
30
- @Column({ type: 'jsonb' , nullable: true})
31
- template_ids: number[] | null;
32
-
33
- @Column({ name: 'start_date', type: 'date', nullable: true })
34
- startDate: Date | null;
35
-
36
- @Column({ name: 'end_date', type: 'date', nullable: true })
37
- endDate: Date | null;
38
-
39
- @Column({ type: 'varchar', length: 100, nullable: true})
40
- project_version: string;
41
-
42
- @Column({ type: 'int', default: 0, nullable: true })
43
- no_of_phases: number;
44
-
45
- constructor(
46
- project_name?: string,
47
- project_objective?: string,
48
- project_benefits?: string,
49
- project_risks?: string,
50
- project_challenges?: string,
51
- project_description?: string,
52
- project_status?: string,
53
- roadmap_link?: string | null,
54
- template_ids?: number[] | null,
55
- startDate?: Date | null,
56
- endDate?: Date | null,
57
- project_version?: string,
58
- no_of_phases?: number
59
- ) {
60
- super();
61
- this.project_name = project_name || '';
62
- this.project_objective = project_objective || '';
63
- this.project_benefits = project_benefits || '';
64
- this.project_risks = project_risks || '';
65
- this.project_challenges = project_challenges || '';
66
- this.project_description = project_description || '';
67
- this.project_status = project_status || '';
68
- this.roadmap_link = roadmap_link || '';
69
- this.template_ids = template_ids || [];
70
- this.startDate = startDate ?? null;
71
- this.endDate = endDate ?? null;
72
- this.project_version = project_version || '';
73
- this.no_of_phases = no_of_phases ?? 0;
74
- }
75
- }
1
+ import { Column, Entity } from 'typeorm';
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'projects' })
5
+ export class Projects extends BaseModel {
6
+ @Column({ type: 'varchar', length: 255 })
7
+ project_name: string;
8
+
9
+ @Column({ type: 'text' , nullable: true})
10
+ project_objective: string;
11
+
12
+ @Column({ type: 'text' , nullable: true})
13
+ project_benefits: string;
14
+
15
+ @Column({ type: 'text' , nullable: true})
16
+ project_risks: string;
17
+
18
+ @Column({ type: 'text' , nullable: true})
19
+ project_challenges: string;
20
+
21
+ @Column({ type: 'text' , nullable: true})
22
+ project_description: string;
23
+
24
+ @Column({ type: 'text' , nullable: true})
25
+ project_status: string;
26
+
27
+ @Column({ type: 'text' , nullable: true})
28
+ roadmap_link: string;
29
+
30
+ @Column({ type: 'jsonb' , nullable: true})
31
+ template_ids: number[] | null;
32
+
33
+ @Column({ name: 'start_date', type: 'date', nullable: true })
34
+ startDate: Date | null;
35
+
36
+ @Column({ name: 'end_date', type: 'date', nullable: true })
37
+ endDate: Date | null;
38
+
39
+ @Column({ type: 'varchar', length: 100, nullable: true})
40
+ project_version: string;
41
+
42
+ @Column({ type: 'int', default: 0, nullable: true })
43
+ no_of_phases: number;
44
+
45
+ constructor(
46
+ project_name?: string,
47
+ project_objective?: string,
48
+ project_benefits?: string,
49
+ project_risks?: string,
50
+ project_challenges?: string,
51
+ project_description?: string,
52
+ project_status?: string,
53
+ roadmap_link?: string | null,
54
+ template_ids?: number[] | null,
55
+ startDate?: Date | null,
56
+ endDate?: Date | null,
57
+ project_version?: string,
58
+ no_of_phases?: number
59
+ ) {
60
+ super();
61
+ this.project_name = project_name || '';
62
+ this.project_objective = project_objective || '';
63
+ this.project_benefits = project_benefits || '';
64
+ this.project_risks = project_risks || '';
65
+ this.project_challenges = project_challenges || '';
66
+ this.project_description = project_description || '';
67
+ this.project_status = project_status || '';
68
+ this.roadmap_link = roadmap_link || '';
69
+ this.template_ids = template_ids || [];
70
+ this.startDate = startDate ?? null;
71
+ this.endDate = endDate ?? null;
72
+ this.project_version = project_version || '';
73
+ this.no_of_phases = no_of_phases ?? 0;
74
+ }
75
+ }
@@ -1,36 +1,36 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'sections' })
5
- export class Sections extends BaseModel {
6
-
7
- @Column({ type: 'varchar', length: 64, nullable: false })
8
- section_name: string;
9
-
10
- @Column({ type: 'varchar', length: 64, nullable: false })
11
- section_code: string;
12
-
13
- @Column({ nullable: false })
14
- section_description: string;
15
-
16
- @Column({ type: 'bigint', nullable: true })
17
- department_id: number;
18
-
19
- @Column({ nullable: true , default: false})
20
- is_followup_sec?: boolean;
21
-
22
- constructor(
23
- section_name: string,
24
- section_code: string,
25
- section_description: string,
26
- department_id: number,
27
- is_followup_sec: boolean
28
- ) {
29
- super();
30
- this.section_name = section_name
31
- this.section_code = section_code
32
- this.section_description = section_description
33
- this.department_id = department_id
34
- this.is_followup_sec = is_followup_sec
35
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'sections' })
5
+ export class Sections extends BaseModel {
6
+
7
+ @Column({ type: 'varchar', length: 64, nullable: false })
8
+ section_name: string;
9
+
10
+ @Column({ type: 'varchar', length: 64, nullable: false })
11
+ section_code: string;
12
+
13
+ @Column({ nullable: false })
14
+ section_description: string;
15
+
16
+ @Column({ type: 'bigint', nullable: true })
17
+ department_id: number;
18
+
19
+ @Column({ nullable: true , default: false})
20
+ is_followup_sec?: boolean;
21
+
22
+ constructor(
23
+ section_name: string,
24
+ section_code: string,
25
+ section_description: string,
26
+ department_id: number,
27
+ is_followup_sec: boolean
28
+ ) {
29
+ super();
30
+ this.section_name = section_name
31
+ this.section_code = section_code
32
+ this.section_description = section_description
33
+ this.department_id = department_id
34
+ this.is_followup_sec = is_followup_sec
35
+ }
36
36
  }
@@ -1,55 +1,55 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum ServicesNotificationTriggerType {
5
- FINAL_APPROVAL = "final_approval",
6
- EVERY_APPROVAL = "every_approval"
7
- }
8
-
9
- @Entity({ name: "services_notification_configs" })
10
- export class ServicesNotificationConfigs extends BaseModel {
11
- @Column({ type: "integer", nullable: false })
12
- department_id: number;
13
-
14
- @Column({ type: "integer", nullable: true })
15
- section_id: number | null;
16
-
17
- @Column({ type: "integer", nullable: false })
18
- service_id: number;
19
-
20
- @Column({ type: "integer", nullable: true })
21
- sub_service_id: number | null;
22
-
23
- @Column({ type: "integer", nullable: true })
24
- role_id: number;
25
-
26
- @Column({
27
- type: "enum",
28
- enum: ServicesNotificationTriggerType,
29
- nullable: false,
30
- default: ServicesNotificationTriggerType.FINAL_APPROVAL
31
- })
32
- trigger: ServicesNotificationTriggerType;
33
-
34
- @Column({ type: "boolean", nullable: false, default: true })
35
- is_active: boolean;
36
-
37
- constructor(
38
- department_id: number,
39
- section_id: number | null = null,
40
- service_id: number,
41
- sub_service_id: number | null = null,
42
- role_id: number,
43
- trigger: ServicesNotificationTriggerType = ServicesNotificationTriggerType.FINAL_APPROVAL,
44
- is_active: boolean = true
45
- ) {
46
- super();
47
- this.department_id = department_id;
48
- this.section_id = section_id;
49
- this.service_id = service_id;
50
- this.sub_service_id = sub_service_id;
51
- this.role_id = role_id;
52
- this.trigger = trigger;
53
- this.is_active = is_active;
54
- }
55
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum ServicesNotificationTriggerType {
5
+ FINAL_APPROVAL = "final_approval",
6
+ EVERY_APPROVAL = "every_approval"
7
+ }
8
+
9
+ @Entity({ name: "services_notification_configs" })
10
+ export class ServicesNotificationConfigs extends BaseModel {
11
+ @Column({ type: "integer", nullable: false })
12
+ department_id: number;
13
+
14
+ @Column({ type: "integer", nullable: true })
15
+ section_id: number | null;
16
+
17
+ @Column({ type: "integer", nullable: false })
18
+ service_id: number;
19
+
20
+ @Column({ type: "integer", nullable: true })
21
+ sub_service_id: number | null;
22
+
23
+ @Column({ type: "integer", nullable: true })
24
+ role_id: number;
25
+
26
+ @Column({
27
+ type: "enum",
28
+ enum: ServicesNotificationTriggerType,
29
+ nullable: false,
30
+ default: ServicesNotificationTriggerType.FINAL_APPROVAL
31
+ })
32
+ trigger: ServicesNotificationTriggerType;
33
+
34
+ @Column({ type: "boolean", nullable: false, default: true })
35
+ is_active: boolean;
36
+
37
+ constructor(
38
+ department_id: number,
39
+ section_id: number | null = null,
40
+ service_id: number,
41
+ sub_service_id: number | null = null,
42
+ role_id: number,
43
+ trigger: ServicesNotificationTriggerType = ServicesNotificationTriggerType.FINAL_APPROVAL,
44
+ is_active: boolean = true
45
+ ) {
46
+ super();
47
+ this.department_id = department_id;
48
+ this.section_id = section_id;
49
+ this.service_id = service_id;
50
+ this.sub_service_id = sub_service_id;
51
+ this.role_id = role_id;
52
+ this.trigger = trigger;
53
+ this.is_active = is_active;
54
+ }
55
+ }
@@ -1,3 +0,0 @@
1
- -- Run against the FM database before deploying the updated Departments entity.
2
- ALTER TABLE departments
3
- ADD COLUMN IF NOT EXISTS is_geographical_dept boolean NOT NULL DEFAULT false;