shared-ritm 1.3.125 → 1.3.126

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 (82) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +502 -484
  3. package/dist/shared-ritm.umd.js +3 -3
  4. package/dist/types/api/services/MetricsService.d.ts +0 -1
  5. package/dist/types/api/services/PhotoService.d.ts +40 -0
  6. package/dist/types/stories/Button.stories.d.ts +13 -0
  7. package/dist/types/stories/Checkbox.stories.d.ts +7 -0
  8. package/dist/types/stories/Confirm.stories.d.ts +8 -0
  9. package/dist/types/stories/DatePicker.stories.d.ts +8 -0
  10. package/dist/types/stories/Dropdown.stories.d.ts +8 -0
  11. package/dist/types/stories/File.stories.d.ts +8 -0
  12. package/dist/types/stories/Icon.stories.d.ts +7 -0
  13. package/dist/types/stories/Input.stories.d.ts +11 -0
  14. package/dist/types/stories/InputNew.stories.d.ts +12 -0
  15. package/dist/types/stories/InputSearch.stories.d.ts +10 -0
  16. package/dist/types/stories/Loader.stories.d.ts +8 -0
  17. package/dist/types/stories/Select.stories.d.ts +7 -0
  18. package/dist/types/stories/Toggle.stories.d.ts +8 -0
  19. package/package.json +70 -70
  20. package/src/App.vue +2461 -2461
  21. package/src/api/services/AuthService.ts +67 -67
  22. package/src/api/services/ControlsService.ts +100 -100
  23. package/src/api/services/EquipmentService.ts +68 -68
  24. package/src/api/services/GanttService.ts +58 -58
  25. package/src/api/services/InstrumentsService.ts +76 -76
  26. package/src/api/services/MetricsService.ts +0 -3
  27. package/src/api/services/RepairsService.ts +111 -111
  28. package/src/api/services/TasksService.ts +165 -165
  29. package/src/api/services/UserIssueService.ts +32 -32
  30. package/src/api/services/UserService.ts +129 -129
  31. package/src/api/services/VideoService.ts +118 -118
  32. package/src/api/settings/ApiService.ts +185 -185
  33. package/src/api/types/Api_Auth.ts +121 -121
  34. package/src/api/types/Api_Controls.ts +112 -112
  35. package/src/api/types/Api_Equipment.ts +54 -54
  36. package/src/api/types/Api_Instruments.ts +182 -182
  37. package/src/api/types/Api_Metrics.ts +89 -89
  38. package/src/api/types/Api_Repairs.ts +200 -200
  39. package/src/api/types/Api_Search.ts +81 -81
  40. package/src/api/types/Api_Tasks.ts +378 -378
  41. package/src/api/types/Api_User.ts +161 -161
  42. package/src/api/types/Api_User_Issue.ts +36 -36
  43. package/src/api/types/Api_Video.ts +244 -244
  44. package/src/common/app-button/Button.stories.ts +369 -369
  45. package/src/common/app-checkbox/AppCheckbox.vue +33 -31
  46. package/src/common/app-checkbox/Checkbox.stories.ts +252 -252
  47. package/src/common/app-date-picker/DatePicker.stories.ts +66 -66
  48. package/src/common/app-datepicker/Datepicker.stories.ts +145 -145
  49. package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
  50. package/src/common/app-dialogs/Confirm.stories.ts +93 -93
  51. package/src/common/app-dropdown/Dropdown.stories.ts +94 -94
  52. package/src/common/app-file/File.stories.ts +104 -104
  53. package/src/common/app-icon/AppIcon.vue +110 -110
  54. package/src/common/app-icon/Icon.stories.ts +91 -91
  55. package/src/common/app-input/AppInput.vue +150 -150
  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/AppSelect.vue +159 -159
  64. package/src/common/app-select/Select.stories.ts +155 -155
  65. package/src/common/app-sheet-new/AppSheetNew.vue +254 -254
  66. package/src/common/app-sidebar/AppSidebar.vue +177 -177
  67. package/src/common/app-table/AppTable.vue +313 -313
  68. package/src/common/app-table/components/ModalSelect.stories.ts +323 -323
  69. package/src/common/app-table/components/ModalSelect.vue +311 -302
  70. package/src/common/app-table/components/TableModal.vue +369 -369
  71. package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
  72. package/src/common/app-table/controllers/useTableModel.ts +98 -98
  73. package/src/common/app-toggle/AppToggle.vue +12 -12
  74. package/src/common/app-toggle/Toggle.stories.ts +245 -245
  75. package/src/common/app-wrapper/AppWrapper.vue +31 -31
  76. package/src/configs/storybook.ts +14 -14
  77. package/src/icons/sidebar/user-requests-icon.vue +23 -23
  78. package/src/index.ts +134 -134
  79. package/src/shared/styles/general.css +140 -140
  80. package/src/styles/variables.sass +12 -12
  81. package/src/utils/files.ts +38 -38
  82. package/src/utils/helpers.ts +59 -59
@@ -1,76 +1,76 @@
1
- import ApiService from '../settings/ApiService'
2
- import {
3
- Api_Instrument,
4
- Api_instruments_HistoryResponse,
5
- Api_Search_Instrument,
6
- Api_Warehouse_Create, Api_Warehouse_Discard,
7
- Api_Warehouse_Search,
8
- Api_Warehouse_Status_History_Item,
9
- } from '../types/Api_Instruments'
10
- import { ResponseApi } from '@/api/types/Api_Service'
11
-
12
- class InstrumentsService extends ApiService {
13
- public async fetchUserInstrumentsHistory(id: string, page?: number): Promise<Api_instruments_HistoryResponse> {
14
- const params = {
15
- status: 'issued',
16
- page,
17
- desc: 'desc',
18
- column: 'issued_in',
19
- }
20
-
21
- return await this.get(`users/${id}/instruments`, { params })
22
- }
23
-
24
- public async fetchDiscardWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
25
- return await this.get('v2/search/discards', { params })
26
- }
27
-
28
- public async fetchWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
29
- return await this.get('search/warehouses', { params })
30
- }
31
-
32
- public async fetchWarehouse(id: string): Promise<Api_Instrument> {
33
- return await this.get(`admin/warehouses/${id}`)
34
- }
35
-
36
- public async fetchStatusHistory(id: string): Promise<Api_Warehouse_Status_History_Item[]> {
37
- return await this.get(`warehouses/${id}/history/status`)
38
- }
39
-
40
- public async createWarehouse(model: Api_Warehouse_Create): Promise<Api_Instrument> {
41
- return await this.post('admin/warehouses', model)
42
- }
43
-
44
- public async editWarehouse({
45
- id,
46
- model,
47
- }: {
48
- id: string
49
- model: Partial<Api_Warehouse_Create>
50
- }): Promise<Api_Instrument> {
51
- return await this.put(`admin/warehouses/${id}`, model)
52
- }
53
-
54
- public deleteWarehouse(id: string): Promise<{ data: boolean; status: number }> {
55
- return this.delete(`admin/warehouses/${id}`)
56
- }
57
-
58
- public changeStatusWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{ data: boolean; status: number }> {
59
- return this.put(`v2/warehouses/status`, model)
60
- }
61
-
62
- public async unsetWarehouseRfid(model: { warehouses: string[] }): Promise<Api_Warehouse_Search[]> {
63
- return await this.post('warehouses/unset-rfid', model)
64
- }
65
-
66
- public async searchInstruments(params: any): Promise<ResponseApi<Api_Search_Instrument[]>> {
67
- return await this.get('search/instruments', { params })
68
- }
69
- }
70
-
71
- let api: InstrumentsService
72
-
73
- export default function useInstrumentsService() {
74
- if (!api) api = new InstrumentsService()
75
- return api
76
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import {
3
+ Api_Instrument,
4
+ Api_instruments_HistoryResponse,
5
+ Api_Search_Instrument,
6
+ Api_Warehouse_Create, Api_Warehouse_Discard,
7
+ Api_Warehouse_Search,
8
+ Api_Warehouse_Status_History_Item,
9
+ } from '../types/Api_Instruments'
10
+ import { ResponseApi } from '@/api/types/Api_Service'
11
+
12
+ class InstrumentsService extends ApiService {
13
+ public async fetchUserInstrumentsHistory(id: string, page?: number): Promise<Api_instruments_HistoryResponse> {
14
+ const params = {
15
+ status: 'issued',
16
+ page,
17
+ desc: 'desc',
18
+ column: 'issued_in',
19
+ }
20
+
21
+ return await this.get(`users/${id}/instruments`, { params })
22
+ }
23
+
24
+ public async fetchDiscardWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
25
+ return await this.get('v2/search/discards', { params })
26
+ }
27
+
28
+ public async fetchWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
29
+ return await this.get('search/warehouses', { params })
30
+ }
31
+
32
+ public async fetchWarehouse(id: string): Promise<Api_Instrument> {
33
+ return await this.get(`admin/warehouses/${id}`)
34
+ }
35
+
36
+ public async fetchStatusHistory(id: string): Promise<Api_Warehouse_Status_History_Item[]> {
37
+ return await this.get(`warehouses/${id}/history/status`)
38
+ }
39
+
40
+ public async createWarehouse(model: Api_Warehouse_Create): Promise<Api_Instrument> {
41
+ return await this.post('admin/warehouses', model)
42
+ }
43
+
44
+ public async editWarehouse({
45
+ id,
46
+ model,
47
+ }: {
48
+ id: string
49
+ model: Partial<Api_Warehouse_Create>
50
+ }): Promise<Api_Instrument> {
51
+ return await this.put(`admin/warehouses/${id}`, model)
52
+ }
53
+
54
+ public deleteWarehouse(id: string): Promise<{ data: boolean; status: number }> {
55
+ return this.delete(`admin/warehouses/${id}`)
56
+ }
57
+
58
+ public changeStatusWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{ data: boolean; status: number }> {
59
+ return this.put(`v2/warehouses/status`, model)
60
+ }
61
+
62
+ public async unsetWarehouseRfid(model: { warehouses: string[] }): Promise<Api_Warehouse_Search[]> {
63
+ return await this.post('warehouses/unset-rfid', model)
64
+ }
65
+
66
+ public async searchInstruments(params: any): Promise<ResponseApi<Api_Search_Instrument[]>> {
67
+ return await this.get('search/instruments', { params })
68
+ }
69
+ }
70
+
71
+ let api: InstrumentsService
72
+
73
+ export default function useInstrumentsService() {
74
+ if (!api) api = new InstrumentsService()
75
+ return api
76
+ }
@@ -150,9 +150,6 @@ class MetricsService extends ApiService {
150
150
  public async fetchWarehouseByCompliance(params: string): Promise<any> {
151
151
  return await this.get(`repairs/metrics/get_warehouse_by_compliance?${params}`)
152
152
  }
153
- public async fetchEquipmentTree(params: string): Promise<any> {
154
- return await this.get(`repairs/equipments/get_equipment_tree_repaired_not_repaired?${params}`)
155
- }
156
153
  }
157
154
 
158
155
  let api: MetricsService
@@ -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
+ }