shared-ritm 1.3.75 → 1.3.77

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,8 +1,24 @@
1
1
  import ApiService from '../settings/ApiService';
2
+ export type ApiCreateGanttLinkDto = {
3
+ type: 'FS' | 'SS' | 'FF' | 'SF';
4
+ parent_id: string;
5
+ child_id: string;
6
+ lag: number;
7
+ };
8
+ export type ApiGanttLinkDto = {
9
+ id: string;
10
+ type: 'FS' | 'SS' | 'FF' | 'SF';
11
+ parent_id: string;
12
+ child_id: string;
13
+ lag: number;
14
+ };
2
15
  declare class GanttService extends ApiService {
3
16
  fetchCriticalPathTasks(params: string): Promise<any>;
4
17
  fetchGanttList(params: string): Promise<any>;
5
18
  setFixPlan(project_id: string): Promise<any>;
19
+ getLinksByProject(id: string): Promise<ApiGanttLinkDto[]>;
20
+ createLink(payload: ApiCreateGanttLinkDto): Promise<ApiGanttLinkDto>;
21
+ deleteLink(id: string): Promise<any>;
6
22
  }
7
23
  export default function useGanttService(): GanttService;
8
24
  export {};
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '../types/Api_Service';
3
- import { Api_Metrics_Personnel_Plan, Api_Metrics_Personnel_Plan_Project, Api_Metrics_Personnel_Plan_Project_Body, Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics';
3
+ import { Api_Metrics_Instruments_Plan, Api_Metrics_Personnel_Plan, Api_Metrics_Personnel_Plan_Project, Api_Metrics_Personnel_Plan_Project_Body, Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics';
4
4
  declare class MetricsService extends ApiService {
5
5
  fetchPieProjects(queryString: string): Promise<ResponseApi<any>>;
6
6
  fetchPieTasks(queryString: string): Promise<ResponseApi<any>>;
@@ -32,6 +32,7 @@ declare class MetricsService extends ApiService {
32
32
  fetchPieAllTasksInfo(queryString: string): Promise<any>;
33
33
  fetchPersonnelPlan(params: any): Promise<Api_Metrics_Personnel_Plan>;
34
34
  fetchPersonnelPlanProjects(body: Api_Metrics_Personnel_Plan_Project_Body): Promise<Api_Metrics_Personnel_Plan_Project[]>;
35
+ fetchInstrumentsPlan(params: any): Promise<Api_Metrics_Instruments_Plan[]>;
35
36
  }
36
37
  export default function useMetricsService(): MetricsService;
37
38
  export {};
@@ -28,3 +28,14 @@ export type Api_Metrics_Personnel_Plan_Project = {
28
28
  export type Api_Metrics_Personnel_Plan_Project_Body = {
29
29
  repairs: string[];
30
30
  };
31
+ export type Api_Metrics_Instruments_Plan_Item = {
32
+ count: number;
33
+ instrument_name: string;
34
+ instrument_id: string;
35
+ };
36
+ export type Api_Metrics_Instruments_Plan = {
37
+ ready: Api_Metrics_Instruments_Plan_Item[];
38
+ fixed_repair: Api_Metrics_Instruments_Plan_Item[];
39
+ used: Api_Metrics_Instruments_Plan_Item[];
40
+ preparation_instrument_project: string[];
41
+ };
@@ -120,6 +120,7 @@ export type Api_Repair_Dto = {
120
120
  power_output_MWh: number | null;
121
121
  has_instruments_plan: boolean;
122
122
  has_positions_plan: boolean;
123
+ is_fixed_plan: boolean;
123
124
  plan_start_date: string | null;
124
125
  status: Api_Status_DTO;
125
126
  teams: Api_Team[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.75",
3
+ "version": "1.3.77",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,5 +1,20 @@
1
1
  import ApiService from '../settings/ApiService'
2
2
 
3
+ export type ApiCreateGanttLinkDto = {
4
+ type: 'FS' | 'SS' | 'FF' | 'SF'
5
+ parent_id: string
6
+ child_id: string
7
+ lag: number
8
+ }
9
+
10
+ export type ApiGanttLinkDto = {
11
+ id: string
12
+ type: 'FS' | 'SS' | 'FF' | 'SF'
13
+ parent_id: string
14
+ child_id: string
15
+ lag: number
16
+ }
17
+
3
18
  class GanttService extends ApiService {
4
19
  public async fetchCriticalPathTasks(params: string): Promise<any> {
5
20
  return await this.get(`gantt/get_list_task_on_critical_path?${params}`)
@@ -13,6 +28,15 @@ class GanttService extends ApiService {
13
28
  params.append(`filter[state]`, '1')
14
29
  return await this.post<null, any>(`/gantt/set-planned-date?${params.toString()}`, null)
15
30
  }
31
+ public getLinksByProject(id: string): Promise<ApiGanttLinkDto[]> {
32
+ return this.get<ApiGanttLinkDto[]>(`gantt/${id}/links/list`)
33
+ }
34
+ public createLink(payload: ApiCreateGanttLinkDto): Promise<ApiGanttLinkDto> {
35
+ return this.post<ApiCreateGanttLinkDto, ApiGanttLinkDto>(`gantt/task/link`, payload)
36
+ }
37
+ public deleteLink(id: string): Promise<any> {
38
+ return this.delete(`gantt/task/link/${id}`)
39
+ }
16
40
  }
17
41
 
18
42
  let api: GanttService
@@ -1,6 +1,7 @@
1
1
  import ApiService from '../settings/ApiService'
2
2
  import { ResponseApi } from '../types/Api_Service'
3
3
  import {
4
+ Api_Metrics_Instruments_Plan,
4
5
  Api_Metrics_Personnel_Plan,
5
6
  Api_Metrics_Personnel_Plan_Project,
6
7
  Api_Metrics_Personnel_Plan_Project_Body,
@@ -128,6 +129,10 @@ class MetricsService extends ApiService {
128
129
  ): Promise<Api_Metrics_Personnel_Plan_Project[]> {
129
130
  return this.post('repairs/metrics/projects_with_personnel_plan', body)
130
131
  }
132
+
133
+ public fetchInstrumentsPlan(params: any): Promise<Api_Metrics_Instruments_Plan[]> {
134
+ return this.get('repairs/metrics/instruments_plan', { params })
135
+ }
131
136
  }
132
137
 
133
138
  let api: MetricsService
@@ -33,3 +33,16 @@ export type Api_Metrics_Personnel_Plan_Project = {
33
33
  export type Api_Metrics_Personnel_Plan_Project_Body = {
34
34
  repairs: string[]
35
35
  }
36
+
37
+ export type Api_Metrics_Instruments_Plan_Item = {
38
+ count: number
39
+ instrument_name: string
40
+ instrument_id: string
41
+ }
42
+
43
+ export type Api_Metrics_Instruments_Plan = {
44
+ ready: Api_Metrics_Instruments_Plan_Item[]
45
+ fixed_repair: Api_Metrics_Instruments_Plan_Item[]
46
+ used: Api_Metrics_Instruments_Plan_Item[]
47
+ preparation_instrument_project: string[]
48
+ }
@@ -147,6 +147,7 @@ export type Api_Repair_Dto = {
147
147
  power_output_MWh: number | null
148
148
  has_instruments_plan: boolean
149
149
  has_positions_plan: boolean
150
+ is_fixed_plan: boolean
150
151
  plan_start_date: string | null
151
152
  status: Api_Status_DTO
152
153
  teams: Api_Team[]