shared-ritm 1.3.37 → 1.3.38-alpha.0

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 (86) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +12594 -12219
  3. package/dist/shared-ritm.umd.js +476 -476
  4. package/dist/types/api/services/AuthService.d.ts +1 -0
  5. package/dist/types/api/services/ControlsService.d.ts +3 -0
  6. package/dist/types/api/services/EquipmentService.d.ts +15 -5
  7. package/dist/types/api/services/GanttService.d.ts +22 -0
  8. package/dist/types/api/services/InstrumentsService.d.ts +6 -1
  9. package/dist/types/api/services/MetricsService.d.ts +5 -1
  10. package/dist/types/api/services/TasksService.d.ts +3 -2
  11. package/dist/types/api/services/UserIssueService.d.ts +15 -0
  12. package/dist/types/api/services/UserService.d.ts +2 -1
  13. package/dist/types/api/settings/ApiService.d.ts +6 -2
  14. package/dist/types/api/types/Api_Auth.d.ts +15 -0
  15. package/dist/types/api/types/Api_Controls.d.ts +1 -0
  16. package/dist/types/api/types/Api_Equipment.d.ts +45 -0
  17. package/dist/types/api/types/Api_Instruments.d.ts +24 -0
  18. package/dist/types/api/types/Api_Metrics.d.ts +69 -0
  19. package/dist/types/api/types/Api_Repairs.d.ts +14 -1
  20. package/dist/types/api/types/Api_Search.d.ts +1 -0
  21. package/dist/types/api/types/Api_User.d.ts +12 -0
  22. package/dist/types/api/types/Api_User_Issue.d.ts +33 -0
  23. package/dist/types/common/app-button/Button.stories.d.ts +13 -0
  24. package/dist/types/common/app-checkbox/Checkbox.stories.d.ts +12 -0
  25. package/dist/types/common/app-date-picker/DatePicker.stories.d.ts +7 -0
  26. package/dist/types/common/app-datepicker/Datepicker.stories.d.ts +10 -0
  27. package/dist/types/common/app-dialogs/Confirm.stories.d.ts +8 -0
  28. package/dist/types/common/app-dropdown/Dropdown.stories.d.ts +8 -0
  29. package/dist/types/common/app-file/File.stories.d.ts +8 -0
  30. package/dist/types/common/app-icon/Icon.stories.d.ts +7 -0
  31. package/dist/types/common/app-input/Input.stories.d.ts +9 -0
  32. package/dist/types/common/app-input-new/InputNew.stories.d.ts +12 -0
  33. package/dist/types/common/app-input-search/InputSearch.stories.d.ts +8 -0
  34. package/dist/types/common/app-loader/Loader.stories.d.ts +8 -0
  35. package/dist/types/common/app-select/Select.stories.d.ts +7 -0
  36. package/dist/types/common/app-table/components/ModalSelect.stories.d.ts +10 -0
  37. package/dist/types/common/app-toggle/Toggle.stories.d.ts +12 -0
  38. package/dist/types/configs/storybook.d.ts +1 -0
  39. package/dist/types/index.d.ts +3 -1
  40. package/dist/types/utils/files.d.ts +2 -0
  41. package/package.json +64 -64
  42. package/src/App.vue +2461 -2461
  43. package/src/api/services/AuthService.ts +53 -53
  44. package/src/api/services/ControlsService.ts +96 -96
  45. package/src/api/services/EquipmentService.ts +29 -29
  46. package/src/api/services/GanttService.ts +23 -23
  47. package/src/api/services/InstrumentsService.ts +68 -68
  48. package/src/api/services/MetricsService.ts +123 -123
  49. package/src/api/services/RepairsService.ts +111 -111
  50. package/src/api/services/TasksService.ts +157 -157
  51. package/src/api/services/UserService.ts +123 -123
  52. package/src/api/services/VideoService.ts +118 -118
  53. package/src/api/settings/ApiService.ts +2 -1
  54. package/src/api/types/Api_Auth.ts +105 -105
  55. package/src/api/types/Api_Controls.ts +111 -111
  56. package/src/api/types/Api_Equipment.ts +3 -3
  57. package/src/api/types/Api_Instruments.ts +156 -156
  58. package/src/api/types/Api_Metrics.ts +5 -5
  59. package/src/api/types/Api_Repairs.ts +186 -186
  60. package/src/api/types/Api_Search.ts +80 -80
  61. package/src/api/types/Api_Tasks.ts +376 -376
  62. package/src/api/types/Api_User.ts +146 -146
  63. package/src/api/types/Api_Video.ts +244 -244
  64. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  65. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  66. package/src/common/app-icon/AppIcon.vue +108 -108
  67. package/src/common/app-input/AppInput.vue +148 -148
  68. package/src/common/app-input-new/AppInputNew.vue +179 -179
  69. package/src/common/app-layout/components/AppLayoutHeader.vue +273 -273
  70. package/src/common/app-modal/index.vue +96 -96
  71. package/src/common/app-select/AppSelect.vue +159 -159
  72. package/src/common/app-sheet-new/AppSheetNew.vue +244 -244
  73. package/src/common/app-sidebar/AppSidebar.vue +174 -174
  74. package/src/common/app-table/AppTable.vue +313 -313
  75. package/src/common/app-table/components/ModalSelect.vue +298 -298
  76. package/src/common/app-table/components/TableModal.vue +367 -367
  77. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  78. package/src/common/app-table/controllers/useTableModel.ts +102 -102
  79. package/src/common/app-toggle/AppToggle.vue +24 -24
  80. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  81. package/src/index.ts +131 -131
  82. package/src/shared/styles/general.css +124 -124
  83. package/src/styles/variables.sass +12 -12
  84. package/src/utils/files.ts +19 -19
  85. package/src/utils/helpers.ts +59 -59
  86. package/dist/types/api/services/PhotoService.d.ts +0 -40
@@ -1,123 +1,123 @@
1
- import ApiService from '../settings/ApiService'
2
- import { ResponseApi } from '../types/Api_Service'
3
- import { Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics'
4
-
5
- class MetricsService extends ApiService {
6
- public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
7
- return await this.get('repairs/pie/projects' + '?' + queryString)
8
- }
9
-
10
- public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
11
- return await this.get('repairs/pie/tasks' + '?' + queryString)
12
- }
13
-
14
- public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
15
- return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
16
- }
17
-
18
- public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
19
- return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
20
- }
21
-
22
- public async fetchPersonnelInfo(params: string): Promise<any> {
23
- return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
24
- }
25
-
26
- public async fetchPersonnelDataNew(queryString: string): Promise<ResponseApi<any>> {
27
- return await this.get('repairs/metrics/v2/list_position_intersection_group_by_status' + '?' + queryString)
28
- }
29
-
30
- public async fetchPersonnelInfoNew(params: string): Promise<any> {
31
- return await this.get(`repairs/metrics/v2/list_position_intersection_details?${params}`)
32
- }
33
-
34
- public async fetchPersonnelUnused(params?: any): Promise<Api_Metrics_Unused_Personnel[]> {
35
- return await this.get('repairs/metrics/v2/unused_brigade_personnel', { params })
36
- }
37
-
38
- public async fetchPiePersonnelInfo(params: string): Promise<any> {
39
- return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
40
- }
41
-
42
- public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
43
- return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
44
- }
45
-
46
- public async fetchPieCriticalPathInfo(params: string): Promise<any> {
47
- return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
48
- }
49
-
50
- public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
51
- return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
52
- }
53
-
54
- public async fetchPieTmcInfo(params: string): Promise<any> {
55
- return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
56
- }
57
-
58
- public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
59
- return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
60
- }
61
-
62
- public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
63
- return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
64
- }
65
-
66
- public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
67
- return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
68
- }
69
-
70
- public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
71
- return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
72
- }
73
-
74
- public async fetchPersonnel(queryString: string): Promise<any[]> {
75
- return await this.get('repairs/statistic/personnel' + '?' + queryString)
76
- }
77
-
78
- public async fetchPieExpired(queryString: string): Promise<any[]> {
79
- return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
80
- }
81
-
82
- public async fetchPieExpiredInfo(params: string): Promise<any> {
83
- return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
84
- }
85
-
86
- public async fetchEconomicsPerformance(params: string): Promise<any> {
87
- return await this.get(`repairs/metrics/get_economic_performance?${params}`)
88
- }
89
-
90
- public async fetchEconomicsInfo(params: string): Promise<any> {
91
- return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
92
- }
93
- public async fetchQualityMetrics(params: string): Promise<any> {
94
- return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
95
- }
96
-
97
- public async fetchQualityInfo(params: string): Promise<any> {
98
- return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
99
- }
100
-
101
- public async fetchPieWorkZone(queryString: string): Promise<any> {
102
- return await this.get('repairs/metrics/get_statistics_on_controller_zones' + '?' + queryString)
103
- }
104
-
105
- public async fetchWorkZoneInfo(queryString: string): Promise<any> {
106
- return await this.get('exposed_equipment_zones/list' + '?' + queryString)
107
- }
108
-
109
- public async fetchPieAllTasks(queryString: string): Promise<any> {
110
- return await this.get('repairs/metrics/get_list_task_group_by_status' + '?' + queryString)
111
- }
112
-
113
- public async fetchPieAllTasksInfo(queryString: string): Promise<any> {
114
- return await this.get('repairs/metrics/get_list_task_by_status' + '?' + queryString)
115
- }
116
- }
117
-
118
- let api: MetricsService
119
-
120
- export default function useMetricsService() {
121
- if (!api) api = new MetricsService()
122
- return api
123
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { ResponseApi } from '../types/Api_Service'
3
+ import { Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics'
4
+
5
+ class MetricsService extends ApiService {
6
+ public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
7
+ return await this.get('repairs/pie/projects' + '?' + queryString)
8
+ }
9
+
10
+ public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
11
+ return await this.get('repairs/pie/tasks' + '?' + queryString)
12
+ }
13
+
14
+ public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
15
+ return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
16
+ }
17
+
18
+ public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
19
+ return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
20
+ }
21
+
22
+ public async fetchPersonnelInfo(params: string): Promise<any> {
23
+ return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
24
+ }
25
+
26
+ public async fetchPersonnelDataNew(queryString: string): Promise<ResponseApi<any>> {
27
+ return await this.get('repairs/metrics/v2/list_position_intersection_group_by_status' + '?' + queryString)
28
+ }
29
+
30
+ public async fetchPersonnelInfoNew(params: string): Promise<any> {
31
+ return await this.get(`repairs/metrics/v2/list_position_intersection_details?${params}`)
32
+ }
33
+
34
+ public async fetchPersonnelUnused(params?: any): Promise<Api_Metrics_Unused_Personnel[]> {
35
+ return await this.get('repairs/metrics/v2/unused_brigade_personnel', { params })
36
+ }
37
+
38
+ public async fetchPiePersonnelInfo(params: string): Promise<any> {
39
+ return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
40
+ }
41
+
42
+ public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
43
+ return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
44
+ }
45
+
46
+ public async fetchPieCriticalPathInfo(params: string): Promise<any> {
47
+ return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
48
+ }
49
+
50
+ public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
51
+ return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
52
+ }
53
+
54
+ public async fetchPieTmcInfo(params: string): Promise<any> {
55
+ return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
56
+ }
57
+
58
+ public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
59
+ return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
60
+ }
61
+
62
+ public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
63
+ return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
64
+ }
65
+
66
+ public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
67
+ return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
68
+ }
69
+
70
+ public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
71
+ return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
72
+ }
73
+
74
+ public async fetchPersonnel(queryString: string): Promise<any[]> {
75
+ return await this.get('repairs/statistic/personnel' + '?' + queryString)
76
+ }
77
+
78
+ public async fetchPieExpired(queryString: string): Promise<any[]> {
79
+ return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
80
+ }
81
+
82
+ public async fetchPieExpiredInfo(params: string): Promise<any> {
83
+ return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
84
+ }
85
+
86
+ public async fetchEconomicsPerformance(params: string): Promise<any> {
87
+ return await this.get(`repairs/metrics/get_economic_performance?${params}`)
88
+ }
89
+
90
+ public async fetchEconomicsInfo(params: string): Promise<any> {
91
+ return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
92
+ }
93
+ public async fetchQualityMetrics(params: string): Promise<any> {
94
+ return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
95
+ }
96
+
97
+ public async fetchQualityInfo(params: string): Promise<any> {
98
+ return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
99
+ }
100
+
101
+ public async fetchPieWorkZone(queryString: string): Promise<any> {
102
+ return await this.get('repairs/metrics/get_statistics_on_controller_zones' + '?' + queryString)
103
+ }
104
+
105
+ public async fetchWorkZoneInfo(queryString: string): Promise<any> {
106
+ return await this.get('exposed_equipment_zones/list' + '?' + queryString)
107
+ }
108
+
109
+ public async fetchPieAllTasks(queryString: string): Promise<any> {
110
+ return await this.get('repairs/metrics/get_list_task_group_by_status' + '?' + queryString)
111
+ }
112
+
113
+ public async fetchPieAllTasksInfo(queryString: string): Promise<any> {
114
+ return await this.get('repairs/metrics/get_list_task_by_status' + '?' + queryString)
115
+ }
116
+ }
117
+
118
+ let api: MetricsService
119
+
120
+ export default function useMetricsService() {
121
+ if (!api) api = new MetricsService()
122
+ return api
123
+ }
@@ -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
+ }