shared-ritm 1.1.54 → 1.1.55

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,5 +1,5 @@
1
1
  import ApiService, { ResponseApi } from '@/api/settings/ApiService';
2
- import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
2
+ import { Api_Task_Instrument_Dto, Api_Task_Module_Instrument_Condition, Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
3
3
  import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs';
4
4
  declare class TasksService extends ApiService {
5
5
  fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>>;
@@ -7,6 +7,9 @@ declare class TasksService extends ApiService {
7
7
  fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>>;
8
8
  fetchTaskBranch(id: string): Promise<ResponseApi<any>>;
9
9
  fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>>;
10
+ fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>>;
11
+ fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>>;
12
+ replaceInstruments(payload: any): Promise<ResponseApi<any>>;
10
13
  fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>>;
11
14
  createTask(payload: any): Promise<ResponseApi<any>>;
12
15
  editTask(payload: any): Promise<ResponseApi<any>>;
@@ -18,8 +21,8 @@ declare class TasksService extends ApiService {
18
21
  changeStatus(payload: {
19
22
  taskId: string;
20
23
  data: unknown;
21
- }): Promise<any>;
22
- uploadComment(payload: unknown): Promise<any>;
24
+ }): Promise<unknown>;
25
+ uploadComment(payload: unknown): Promise<unknown>;
23
26
  }
24
27
  export default function useTasksService(): TasksService;
25
28
  export {};
@@ -114,3 +114,15 @@ export type Api_Tasks_Dto = {
114
114
  pause_sec: number;
115
115
  work_sec: number;
116
116
  };
117
+ export type Api_Task_Instrument_Dto = {
118
+ id: string;
119
+ name: string;
120
+ };
121
+ export type Api_Task_Module_Instrument_Condition = {
122
+ instruments_types_conditions: Record<string, {
123
+ warehouse_responsible: boolean;
124
+ warehouse_statuses: boolean;
125
+ warehouse_modules: boolean;
126
+ }>;
127
+ instruments_types_count: Record<string, number>;
128
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.1.54",
3
+ "version": "1.1.55",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,5 +1,10 @@
1
1
  import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
- import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
2
+ import {
3
+ Api_Task_Instrument_Dto,
4
+ Api_Task_Module_Instrument_Condition,
5
+ Api_Tasks_Dto,
6
+ Api_Tasks_Task_Dto,
7
+ } from '@/api/types/Api_Tasks'
3
8
  import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
4
9
 
5
10
  class TasksService extends ApiService {
@@ -23,6 +28,18 @@ class TasksService extends ApiService {
23
28
  return await this.get(`admin/instruments`, { params })
24
29
  }
25
30
 
31
+ public async fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
32
+ return await this.get(`tasks/instrument/list`, { params })
33
+ }
34
+
35
+ public async fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
36
+ return await this.get(`tasks/${params.taskId}/fill/module`, { params })
37
+ }
38
+
39
+ public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
40
+ return await this.post(`/instruments/equivalent/attach`, payload)
41
+ }
42
+
26
43
  public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
27
44
  return this.get('repairs/equipment/list', { params })
28
45
  }
@@ -43,12 +60,12 @@ class TasksService extends ApiService {
43
60
  return await this.delete(`tasks/${id}`)
44
61
  }
45
62
 
46
- public async changeStatus(payload: { taskId: string; data: unknown }): Promise<any> {
63
+ public async changeStatus(payload: { taskId: string; data: unknown }): Promise<unknown> {
47
64
  const { taskId, data } = payload
48
65
  return await this.put(`task/${taskId}/change-status`, data)
49
66
  }
50
67
 
51
- public async uploadComment(payload: unknown): Promise<any> {
68
+ public async uploadComment(payload: unknown): Promise<unknown> {
52
69
  return await this.post('comments', payload)
53
70
  }
54
71
  }
@@ -122,3 +122,20 @@ export type Api_Tasks_Dto = {
122
122
  pause_sec: number
123
123
  work_sec: number
124
124
  }
125
+
126
+ export type Api_Task_Instrument_Dto = {
127
+ id: string
128
+ name: string
129
+ }
130
+
131
+ export type Api_Task_Module_Instrument_Condition = {
132
+ instruments_types_conditions: Record<
133
+ string,
134
+ {
135
+ warehouse_responsible: boolean
136
+ warehouse_statuses: boolean
137
+ warehouse_modules: boolean
138
+ }
139
+ >
140
+ instruments_types_count: Record<string, number>
141
+ }