shared-ritm 1.3.112 → 1.3.114

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.
Files changed (80) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +14 -14
  3. package/dist/shared-ritm.umd.js +3 -3
  4. package/dist/types/api/services/EquipmentService.d.ts +0 -1
  5. package/dist/types/api/services/MetricsService.d.ts +2 -1
  6. package/dist/types/api/services/PhotoService.d.ts +40 -0
  7. package/dist/types/api/types/Api_Equipment.d.ts +8 -12
  8. package/dist/types/api/types/Api_Metrics.d.ts +30 -0
  9. package/dist/types/api/types/Api_Repairs.d.ts +13 -1
  10. package/dist/types/stories/Button.stories.d.ts +13 -0
  11. package/dist/types/stories/Checkbox.stories.d.ts +7 -0
  12. package/dist/types/stories/Confirm.stories.d.ts +8 -0
  13. package/dist/types/stories/DatePicker.stories.d.ts +8 -0
  14. package/dist/types/stories/Dropdown.stories.d.ts +8 -0
  15. package/dist/types/stories/File.stories.d.ts +8 -0
  16. package/dist/types/stories/Icon.stories.d.ts +7 -0
  17. package/dist/types/stories/Input.stories.d.ts +11 -0
  18. package/dist/types/stories/InputNew.stories.d.ts +12 -0
  19. package/dist/types/stories/InputSearch.stories.d.ts +10 -0
  20. package/dist/types/stories/Loader.stories.d.ts +8 -0
  21. package/dist/types/stories/Select.stories.d.ts +7 -0
  22. package/dist/types/stories/Toggle.stories.d.ts +8 -0
  23. package/package.json +70 -70
  24. package/src/App.vue +2461 -2461
  25. package/src/api/services/AuthService.ts +67 -67
  26. package/src/api/services/ControlsService.ts +100 -100
  27. package/src/api/services/EquipmentService.ts +0 -4
  28. package/src/api/services/InstrumentsService.ts +76 -76
  29. package/src/api/services/MetricsService.ts +148 -143
  30. package/src/api/services/RepairsService.ts +111 -111
  31. package/src/api/services/UserIssueService.ts +32 -32
  32. package/src/api/services/UserService.ts +129 -129
  33. package/src/api/services/VideoService.ts +118 -118
  34. package/src/api/types/Api_Auth.ts +121 -121
  35. package/src/api/types/Api_Controls.ts +112 -112
  36. package/src/api/types/Api_Equipment.ts +8 -12
  37. package/src/api/types/Api_Instruments.ts +182 -182
  38. package/src/api/types/Api_Metrics.ts +84 -51
  39. package/src/api/types/Api_Repairs.ts +200 -187
  40. package/src/api/types/Api_Search.ts +81 -81
  41. package/src/api/types/Api_Tasks.ts +376 -376
  42. package/src/api/types/Api_User.ts +160 -160
  43. package/src/api/types/Api_User_Issue.ts +36 -36
  44. package/src/api/types/Api_Video.ts +244 -244
  45. package/src/common/app-button/Button.stories.ts +369 -369
  46. package/src/common/app-checkbox/AppCheckbox.vue +31 -31
  47. package/src/common/app-checkbox/Checkbox.stories.ts +252 -252
  48. package/src/common/app-date-picker/DatePicker.stories.ts +66 -66
  49. package/src/common/app-datepicker/Datepicker.stories.ts +145 -145
  50. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  51. package/src/common/app-dialogs/Confirm.stories.ts +93 -93
  52. package/src/common/app-dropdown/Dropdown.stories.ts +94 -94
  53. package/src/common/app-file/File.stories.ts +104 -104
  54. package/src/common/app-icon/AppIcon.vue +110 -110
  55. package/src/common/app-icon/Icon.stories.ts +91 -91
  56. package/src/common/app-input/Input.stories.ts +160 -160
  57. package/src/common/app-input-new/AppInputNew.vue +181 -181
  58. package/src/common/app-input-new/InputNew.stories.ts +240 -240
  59. package/src/common/app-input-search/InputSearch.stories.ts +149 -149
  60. package/src/common/app-layout/components/AppLayoutHeader.vue +289 -289
  61. package/src/common/app-loader/Loader.stories.ts +114 -114
  62. package/src/common/app-modal/index.vue +101 -101
  63. package/src/common/app-select/Select.stories.ts +155 -155
  64. package/src/common/app-sidebar/AppSidebar.vue +174 -174
  65. package/src/common/app-table/AppTable.vue +313 -313
  66. package/src/common/app-table/components/ModalSelect.stories.ts +323 -323
  67. package/src/common/app-table/components/ModalSelect.vue +302 -302
  68. package/src/common/app-table/components/TableModal.vue +369 -369
  69. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  70. package/src/common/app-table/controllers/useTableModel.ts +97 -97
  71. package/src/common/app-toggle/AppToggle.vue +12 -12
  72. package/src/common/app-toggle/Toggle.stories.ts +245 -245
  73. package/src/common/app-wrapper/AppWrapper.vue +31 -31
  74. package/src/configs/storybook.ts +14 -14
  75. package/src/icons/sidebar/user-requests-icon.vue +23 -23
  76. package/src/index.ts +134 -134
  77. package/src/shared/styles/general.css +140 -140
  78. package/src/styles/variables.sass +12 -12
  79. package/src/utils/files.ts +38 -38
  80. package/src/utils/helpers.ts +59 -59
@@ -1,143 +1,148 @@
1
- import ApiService from '../settings/ApiService'
2
- import { ResponseApi } from '../types/Api_Service'
3
- import {
4
- Api_Metrics_Instruments_Plan,
5
- Api_Metrics_Personnel_Plan,
6
- Api_Metrics_Personnel_Plan_Project,
7
- Api_Metrics_Personnel_Plan_Project_Body,
8
- Api_Metrics_Unused_Personnel,
9
- } from '@/api/types/Api_Metrics'
10
-
11
- class MetricsService extends ApiService {
12
- public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
13
- return await this.get('repairs/pie/projects' + '?' + queryString)
14
- }
15
-
16
- public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
17
- return await this.get('repairs/pie/tasks' + '?' + queryString)
18
- }
19
-
20
- public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
21
- return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
22
- }
23
-
24
- public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
25
- return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
26
- }
27
-
28
- public async fetchPersonnelInfo(params: string): Promise<any> {
29
- return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
30
- }
31
-
32
- public async fetchPersonnelDataNew(queryString: string): Promise<ResponseApi<any>> {
33
- return await this.get('repairs/metrics/v2/list_position_intersection_group_by_status' + '?' + queryString)
34
- }
35
-
36
- public async fetchPersonnelInfoNew(params: string): Promise<any> {
37
- return await this.get(`repairs/metrics/v2/list_position_intersection_details?${params}`)
38
- }
39
-
40
- public async fetchPersonnelUnused(params?: any): Promise<Api_Metrics_Unused_Personnel[]> {
41
- return await this.get('repairs/metrics/v2/unused_brigade_personnel', { params })
42
- }
43
-
44
- public async fetchPiePersonnelInfo(params: string): Promise<any> {
45
- return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
46
- }
47
-
48
- public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
49
- return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
50
- }
51
-
52
- public async fetchPieCriticalPathInfo(params: string): Promise<any> {
53
- return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
54
- }
55
-
56
- public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
57
- return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
58
- }
59
-
60
- public async fetchPieTmcInfo(params: string): Promise<any> {
61
- return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
62
- }
63
-
64
- public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
65
- return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
66
- }
67
-
68
- public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
69
- return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
70
- }
71
-
72
- public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
73
- return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
74
- }
75
-
76
- public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
77
- return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
78
- }
79
-
80
- public async fetchPersonnel(queryString: string): Promise<any[]> {
81
- return await this.get('repairs/statistic/personnel' + '?' + queryString)
82
- }
83
-
84
- public async fetchPieExpired(queryString: string): Promise<any[]> {
85
- return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
86
- }
87
-
88
- public async fetchPieExpiredInfo(params: string): Promise<any> {
89
- return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
90
- }
91
-
92
- public async fetchEconomicsPerformance(params: string): Promise<any> {
93
- return await this.get(`repairs/metrics/get_economic_performance?${params}`)
94
- }
95
-
96
- public async fetchEconomicsInfo(params: string): Promise<any> {
97
- return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
98
- }
99
- public async fetchQualityMetrics(params: string): Promise<any> {
100
- return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
101
- }
102
-
103
- public async fetchQualityInfo(params: string): Promise<any> {
104
- return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
105
- }
106
-
107
- public async fetchPieWorkZone(queryString: string): Promise<any> {
108
- return await this.get('repairs/metrics/get_statistics_on_controller_zones' + '?' + queryString)
109
- }
110
-
111
- public async fetchWorkZoneInfo(queryString: string): Promise<any> {
112
- return await this.get('exposed_equipment_zones/list' + '?' + queryString)
113
- }
114
-
115
- public async fetchPieAllTasks(queryString: string): Promise<any> {
116
- return await this.get('repairs/metrics/get_list_task_group_by_status' + '?' + queryString)
117
- }
118
-
119
- public async fetchPieAllTasksInfo(queryString: string): Promise<any> {
120
- return await this.get('repairs/metrics/get_list_task_by_status' + '?' + queryString)
121
- }
122
-
123
- public fetchPersonnelPlan(params: any): Promise<Api_Metrics_Personnel_Plan> {
124
- return this.get('repairs/metrics/personnel_plan', { params })
125
- }
126
-
127
- public fetchPersonnelPlanProjects(
128
- body: Api_Metrics_Personnel_Plan_Project_Body,
129
- ): Promise<Api_Metrics_Personnel_Plan_Project[]> {
130
- return this.post('repairs/metrics/projects_with_personnel_plan', body)
131
- }
132
-
133
- public fetchInstrumentsPlan(params: any): Promise<Api_Metrics_Instruments_Plan[]> {
134
- return this.get('repairs/metrics/instruments_plan', { params })
135
- }
136
- }
137
-
138
- let api: MetricsService
139
-
140
- export default function useMetricsService() {
141
- if (!api) api = new MetricsService()
142
- return api
143
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { ResponseApi } from '../types/Api_Service'
3
+ import {
4
+ Api_Metrics_Instruments_Plan,
5
+ Api_Metrics_Performance,
6
+ Api_Metrics_Personnel_Plan,
7
+ Api_Metrics_Personnel_Plan_Project,
8
+ Api_Metrics_Personnel_Plan_Project_Body,
9
+ Api_Metrics_Unused_Personnel,
10
+ } from '@/api/types/Api_Metrics'
11
+
12
+ class MetricsService extends ApiService {
13
+ public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
14
+ return await this.get('repairs/pie/projects' + '?' + queryString)
15
+ }
16
+
17
+ public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
18
+ return await this.get('repairs/pie/tasks' + '?' + queryString)
19
+ }
20
+
21
+ public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
22
+ return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
23
+ }
24
+
25
+ public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
26
+ return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
27
+ }
28
+
29
+ public async fetchPersonnelInfo(params: string): Promise<any> {
30
+ return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
31
+ }
32
+
33
+ public async fetchPersonnelDataNew(queryString: string): Promise<ResponseApi<any>> {
34
+ return await this.get('repairs/metrics/v2/list_position_intersection_group_by_status' + '?' + queryString)
35
+ }
36
+
37
+ public async fetchPersonnelInfoNew(params: string): Promise<any> {
38
+ return await this.get(`repairs/metrics/v2/list_position_intersection_details?${params}`)
39
+ }
40
+
41
+ public async fetchPersonnelUnused(params?: any): Promise<Api_Metrics_Unused_Personnel[]> {
42
+ return await this.get('repairs/metrics/v2/unused_brigade_personnel', { params })
43
+ }
44
+
45
+ public async fetchPiePersonnelInfo(params: string): Promise<any> {
46
+ return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
47
+ }
48
+
49
+ public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
50
+ return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
51
+ }
52
+
53
+ public async fetchPieCriticalPathInfo(params: string): Promise<any> {
54
+ return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
55
+ }
56
+
57
+ public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
58
+ return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
59
+ }
60
+
61
+ public async fetchPieTmcInfo(params: string): Promise<any> {
62
+ return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
63
+ }
64
+
65
+ public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
66
+ return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
67
+ }
68
+
69
+ public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
70
+ return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
71
+ }
72
+
73
+ public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
74
+ return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
75
+ }
76
+
77
+ public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
78
+ return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
79
+ }
80
+
81
+ public async fetchPersonnel(queryString: string): Promise<any[]> {
82
+ return await this.get('repairs/statistic/personnel' + '?' + queryString)
83
+ }
84
+
85
+ public async fetchPieExpired(queryString: string): Promise<any[]> {
86
+ return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
87
+ }
88
+
89
+ public async fetchPieExpiredInfo(params: string): Promise<any> {
90
+ return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
91
+ }
92
+
93
+ public async fetchEconomicsPerformance(params: string): Promise<any> {
94
+ return await this.get(`repairs/metrics/get_economic_performance?${params}`)
95
+ }
96
+
97
+ public async fetchEconomicsInfo(params: string): Promise<any> {
98
+ return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
99
+ }
100
+ public async fetchQualityMetrics(params: string): Promise<any> {
101
+ return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
102
+ }
103
+
104
+ public async fetchQualityInfo(params: string): Promise<any> {
105
+ return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
106
+ }
107
+
108
+ public async fetchPieWorkZone(queryString: string): Promise<any> {
109
+ return await this.get('repairs/metrics/get_statistics_on_controller_zones' + '?' + queryString)
110
+ }
111
+
112
+ public async fetchWorkZoneInfo(queryString: string): Promise<any> {
113
+ return await this.get('exposed_equipment_zones/list' + '?' + queryString)
114
+ }
115
+
116
+ public async fetchPieAllTasks(queryString: string): Promise<any> {
117
+ return await this.get('repairs/metrics/get_list_task_group_by_status' + '?' + queryString)
118
+ }
119
+
120
+ public async fetchPieAllTasksInfo(queryString: string): Promise<any> {
121
+ return await this.get('repairs/metrics/get_list_task_by_status' + '?' + queryString)
122
+ }
123
+
124
+ public fetchPersonnelPlan(params: any): Promise<Api_Metrics_Personnel_Plan> {
125
+ return this.get('repairs/metrics/personnel_plan', { params })
126
+ }
127
+
128
+ public fetchPersonnelPlanProjects(
129
+ body: Api_Metrics_Personnel_Plan_Project_Body,
130
+ ): Promise<Api_Metrics_Personnel_Plan_Project[]> {
131
+ return this.post('repairs/metrics/projects_with_personnel_plan', body)
132
+ }
133
+
134
+ public fetchInstrumentsPlan(params: any): Promise<Api_Metrics_Instruments_Plan[]> {
135
+ return this.get('repairs/metrics/instruments_plan', { params })
136
+ }
137
+
138
+ public fetchPerformanceAssigned(id: string): Promise<Api_Metrics_Performance> {
139
+ return this.get(`repairs/get_performance_assigned/${id}`)
140
+ }
141
+ }
142
+
143
+ let api: MetricsService
144
+
145
+ export default function useMetricsService() {
146
+ if (!api) api = new MetricsService()
147
+ return api
148
+ }
@@ -1,111 +1,111 @@
1
- import ApiService from '../settings/ApiService'
2
- import { ResponseApi } from '../types/Api_Service'
3
- import {
4
- Api_Create_Repair_With_Equipments,
5
- Api_Create_Repair_With_Template,
6
- Api_Repair_Dto,
7
- Api_Repair_Intersection,
8
- Api_Repair_Template,
9
- Api_Update_Repair,
10
- OptionFilters,
11
- } from '../types/Api_Repairs'
12
-
13
- class RepairsService extends ApiService {
14
- public fetchFilters(fullParams: string): Promise<OptionFilters> {
15
- return this.get(`get_list_repair?smart=1&${fullParams}`)
16
- }
17
-
18
- public fetchRepairs(
19
- isQuery: boolean,
20
- queries?: string,
21
- hasTeams?: boolean | string,
22
- teamsFilter?: string,
23
- typeFilter?: string,
24
- ): Promise<ResponseApi<Api_Repair_Dto[]>> {
25
- return this.get(
26
- 'get_list_repair' +
27
- (isQuery
28
- ? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
29
- : `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
30
- )
31
- }
32
-
33
- public fetchRepairTemplates(params?: any): Promise<ResponseApi<Api_Repair_Template[]>> {
34
- return this.get('repairs/get_repair_template_list', { params })
35
- }
36
-
37
- public createRepair(payload: Api_Create_Repair_With_Equipments) {
38
- return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
39
- }
40
-
41
- public createRepairFromTemplate(payload: Api_Create_Repair_With_Template) {
42
- return this.post<Api_Create_Repair_With_Template, any>('/repairs/create_repair_from_repair_template', payload)
43
- }
44
-
45
- public startRepair(id: string): Promise<void> {
46
- return this.post<null, void>(`/repairs/${id}/start`, null)
47
- }
48
-
49
- public finishRepair(id: string) {
50
- return this.post<any, void>(`/repairs/complete_repair_list`, {
51
- repairIdList: [id],
52
- })
53
- }
54
-
55
- public finishPreparationProject(id: string) {
56
- return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
57
- }
58
-
59
- public moveRepairToCurrent(id: string) {
60
- return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
61
- repairs: [id],
62
- })
63
- }
64
-
65
- public moveArchiveToCurrent(id: string) {
66
- return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
67
- repairs_ids: [id],
68
- })
69
- }
70
-
71
- public moveRepairToApr(id: string) {
72
- return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
73
- repairs: [id],
74
- })
75
- }
76
-
77
- public moveRepairToArchive(id: string) {
78
- return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
79
- repairs_ids: [id],
80
- })
81
- }
82
-
83
- public restoreRepair(id: string) {
84
- return this.post<any, void>(`/restore_repair`, {
85
- repairs_ids: [id],
86
- })
87
- }
88
-
89
- public updateRepair(payload: Api_Update_Repair, id: string) {
90
- return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
91
- }
92
-
93
- public copyRepair(id: string) {
94
- return this.post<null, any>(`/repairs/${id}/clone`, null)
95
- }
96
-
97
- public deleteRepair(id: string) {
98
- return this.delete<any>(`/repairs/${id}`)
99
- }
100
-
101
- public fetchIntersection(id: string): Promise<Api_Repair_Intersection[]> {
102
- return this.get(`v3/repairs/${id}/personnel/intersection`)
103
- }
104
- }
105
-
106
- let api: RepairsService
107
-
108
- export default function useRepairsService() {
109
- if (!api) api = new RepairsService()
110
- return api
111
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { ResponseApi } from '../types/Api_Service'
3
+ import {
4
+ Api_Create_Repair_With_Equipments,
5
+ Api_Create_Repair_With_Template,
6
+ Api_Repair_Dto,
7
+ Api_Repair_Intersection,
8
+ Api_Repair_Template,
9
+ Api_Update_Repair,
10
+ OptionFilters,
11
+ } from '../types/Api_Repairs'
12
+
13
+ class RepairsService extends ApiService {
14
+ public fetchFilters(fullParams: string): Promise<OptionFilters> {
15
+ return this.get(`get_list_repair?smart=1&${fullParams}`)
16
+ }
17
+
18
+ public fetchRepairs(
19
+ isQuery: boolean,
20
+ queries?: string,
21
+ hasTeams?: boolean | string,
22
+ teamsFilter?: string,
23
+ typeFilter?: string,
24
+ ): Promise<ResponseApi<Api_Repair_Dto[]>> {
25
+ return this.get(
26
+ 'get_list_repair' +
27
+ (isQuery
28
+ ? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
29
+ : `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
30
+ )
31
+ }
32
+
33
+ public fetchRepairTemplates(params?: any): Promise<ResponseApi<Api_Repair_Template[]>> {
34
+ return this.get('repairs/get_repair_template_list', { params })
35
+ }
36
+
37
+ public createRepair(payload: Api_Create_Repair_With_Equipments) {
38
+ return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
39
+ }
40
+
41
+ public createRepairFromTemplate(payload: Api_Create_Repair_With_Template) {
42
+ return this.post<Api_Create_Repair_With_Template, any>('/repairs/create_repair_from_repair_template', payload)
43
+ }
44
+
45
+ public startRepair(id: string): Promise<void> {
46
+ return this.post<null, void>(`/repairs/${id}/start`, null)
47
+ }
48
+
49
+ public finishRepair(id: string) {
50
+ return this.post<any, void>(`/repairs/complete_repair_list`, {
51
+ repairIdList: [id],
52
+ })
53
+ }
54
+
55
+ public finishPreparationProject(id: string) {
56
+ return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
57
+ }
58
+
59
+ public moveRepairToCurrent(id: string) {
60
+ return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
61
+ repairs: [id],
62
+ })
63
+ }
64
+
65
+ public moveArchiveToCurrent(id: string) {
66
+ return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
67
+ repairs_ids: [id],
68
+ })
69
+ }
70
+
71
+ public moveRepairToApr(id: string) {
72
+ return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
73
+ repairs: [id],
74
+ })
75
+ }
76
+
77
+ public moveRepairToArchive(id: string) {
78
+ return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
79
+ repairs_ids: [id],
80
+ })
81
+ }
82
+
83
+ public restoreRepair(id: string) {
84
+ return this.post<any, void>(`/restore_repair`, {
85
+ repairs_ids: [id],
86
+ })
87
+ }
88
+
89
+ public updateRepair(payload: Api_Update_Repair, id: string) {
90
+ return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
91
+ }
92
+
93
+ public copyRepair(id: string) {
94
+ return this.post<null, any>(`/repairs/${id}/clone`, null)
95
+ }
96
+
97
+ public deleteRepair(id: string) {
98
+ return this.delete<any>(`/repairs/${id}`)
99
+ }
100
+
101
+ public fetchIntersection(id: string): Promise<Api_Repair_Intersection[]> {
102
+ return this.get(`v3/repairs/${id}/personnel/intersection`)
103
+ }
104
+ }
105
+
106
+ let api: RepairsService
107
+
108
+ export default function useRepairsService() {
109
+ if (!api) api = new RepairsService()
110
+ return api
111
+ }
@@ -1,32 +1,32 @@
1
- import ApiService from '../settings/ApiService'
2
- import { Api_User_Issue, Api_User_Issue_List_Item, Api_User_Issue_Properties } from '@/api/types/Api_User_Issue'
3
- import { ResponseApi } from '@/api/types/Api_Service'
4
-
5
- class UserIssueService extends ApiService {
6
- public createUserIssue(body: any): Promise<Api_User_Issue_List_Item> {
7
- return this.post('user_issue', body, { headers: { 'Content-Type': 'multipart/form-data' } })
8
- }
9
-
10
- public getUserIssue(id: string): Promise<Api_User_Issue> {
11
- return this.get(`user_issue/${id}`)
12
- }
13
-
14
- public getUserIssueList(params: any): Promise<ResponseApi<Api_User_Issue_List_Item>> {
15
- return this.get('user_issue/list', { params })
16
- }
17
-
18
- public getProperties(): Promise<Api_User_Issue_Properties> {
19
- return this.get('user_issue/properties')
20
- }
21
-
22
- public deleteUserIssue(id: string): Promise<{ data: boolean; status: number }> {
23
- return this.delete(`user_issue/${id}`)
24
- }
25
- }
26
-
27
- let api: UserIssueService
28
-
29
- export default function useUserIssueService() {
30
- if (!api) api = new UserIssueService()
31
- return api
32
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { Api_User_Issue, Api_User_Issue_List_Item, Api_User_Issue_Properties } from '@/api/types/Api_User_Issue'
3
+ import { ResponseApi } from '@/api/types/Api_Service'
4
+
5
+ class UserIssueService extends ApiService {
6
+ public createUserIssue(body: any): Promise<Api_User_Issue_List_Item> {
7
+ return this.post('user_issue', body, { headers: { 'Content-Type': 'multipart/form-data' } })
8
+ }
9
+
10
+ public getUserIssue(id: string): Promise<Api_User_Issue> {
11
+ return this.get(`user_issue/${id}`)
12
+ }
13
+
14
+ public getUserIssueList(params: any): Promise<ResponseApi<Api_User_Issue_List_Item>> {
15
+ return this.get('user_issue/list', { params })
16
+ }
17
+
18
+ public getProperties(): Promise<Api_User_Issue_Properties> {
19
+ return this.get('user_issue/properties')
20
+ }
21
+
22
+ public deleteUserIssue(id: string): Promise<{ data: boolean; status: number }> {
23
+ return this.delete(`user_issue/${id}`)
24
+ }
25
+ }
26
+
27
+ let api: UserIssueService
28
+
29
+ export default function useUserIssueService() {
30
+ if (!api) api = new UserIssueService()
31
+ return api
32
+ }