shared-ritm 1.2.63 → 1.2.65

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 (48) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +4462 -4455
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/common/app-table/controllers/useTableModel.d.ts +1 -1
  6. package/package.json +63 -63
  7. package/src/api/services/ControlsService.ts +64 -64
  8. package/src/api/services/GanttService.ts +17 -17
  9. package/src/api/services/InstrumentsService.ts +22 -22
  10. package/src/api/services/MetricsService.ts +109 -109
  11. package/src/api/services/ProjectsService.ts +67 -67
  12. package/src/api/services/RepairsService.ts +100 -100
  13. package/src/api/services/VideoService.ts +14 -14
  14. package/src/api/types/Api_Files.ts +1 -1
  15. package/src/api/types/Api_Instruments.ts +133 -133
  16. package/src/api/types/Api_Projects.ts +55 -55
  17. package/src/api/types/Api_Repairs.ts +93 -93
  18. package/src/api/types/Api_Tasks.ts +155 -155
  19. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  20. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  21. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  22. package/src/common/app-select/AppSelect.vue +157 -157
  23. package/src/common/app-sheet/AppSheet.vue +120 -120
  24. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  25. package/src/common/app-table/AppTable.vue +250 -241
  26. package/src/common/app-table/AppTableLayout.vue +111 -102
  27. package/src/common/app-table/components/ModalSelect.vue +264 -264
  28. package/src/common/app-table/components/TableModal.vue +329 -329
  29. package/src/common/app-table/components/TablePagination.vue +152 -150
  30. package/src/common/app-table/components/TableSearch.vue +76 -76
  31. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  32. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  33. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  34. package/src/common/app-toggle/AppToggle.vue +23 -23
  35. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  36. package/src/icons/components/table-filter-icon.vue +30 -30
  37. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  38. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  39. package/src/icons/task/attention-icon.vue +13 -13
  40. package/src/icons/task/clock-icon.vue +10 -10
  41. package/src/icons/task/delete-icon.vue +10 -10
  42. package/src/icons/task/fire-icon.vue +16 -16
  43. package/src/index.ts +89 -89
  44. package/src/shared/styles/general.css +125 -125
  45. package/src/styles/variables.sass +12 -12
  46. package/src/utils/confirm.ts +12 -12
  47. package/src/utils/helpers.ts +39 -39
  48. package/src/utils/notification.ts +9 -9
@@ -1,67 +1,67 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
-
3
- import { Api_Project_Dto } from '@/api/types/Api_Projects'
4
-
5
- class ProjectsService extends ApiService {
6
- public async fetchProjectById(id: string): Promise<ResponseApi<Api_Project_Dto>> {
7
- return this.get(`/projects/${id}`)
8
- }
9
-
10
- public createProject(params: any): Promise<ResponseApi<any>> {
11
- return this.post<any, ResponseApi<any>>('/projects', params)
12
- }
13
-
14
- public editProject(id: string, params: any): Promise<ResponseApi<any>> {
15
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, params)
16
- }
17
-
18
- public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
19
- return this.get(`/search/projects`, { params })
20
- }
21
-
22
- public cloneProject(project: any): Promise<ResponseApi<any>> {
23
- return this.post<any, ResponseApi<any>>(`projects/${project.id}/clone`, project)
24
- }
25
-
26
- public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
27
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
28
- }
29
-
30
- public unArchiveProject(id: string, data: any): Promise<ResponseApi<any>> {
31
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
32
- }
33
-
34
- public moveAprProject(id: string): Promise<ResponseApi<any>> {
35
- return this.post<any, ResponseApi<any>>('repairs/move_plan_to_real', {
36
- repairs: [id],
37
- })
38
- }
39
- public restoreProject(id: string): Promise<ResponseApi<any>> {
40
- return this.post<any, ResponseApi<any>>('/restore_project', { projects_ids: [id] })
41
- }
42
-
43
- public importTasks(payload: any): Promise<ResponseApi<any>> {
44
- return this.post<any, ResponseApi<any>>('tasks/import', payload)
45
- }
46
-
47
- public importKtd(payload: any): Promise<ResponseApi<any>> {
48
- return this.post<any, ResponseApi<any>>('/parse_ktd', payload, {
49
- headers: { 'Content-Type': 'multipart/form-data' },
50
- })
51
- }
52
-
53
- public fetchProjectTeamList(id: string): Promise<ResponseApi<any>> {
54
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, null)
55
- }
56
-
57
- public deleteProject(id: string): Promise<any> {
58
- return this.delete<ResponseApi<any>>(`/projects/${id}`)
59
- }
60
- }
61
-
62
- let api: ProjectsService
63
-
64
- export default function useProjectsService() {
65
- if (!api) api = new ProjectsService()
66
- return api
67
- }
1
+ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
+
3
+ import { Api_Project_Dto } from '@/api/types/Api_Projects'
4
+
5
+ class ProjectsService extends ApiService {
6
+ public async fetchProjectById(id: string): Promise<ResponseApi<Api_Project_Dto>> {
7
+ return this.get(`/projects/${id}`)
8
+ }
9
+
10
+ public createProject(params: any): Promise<ResponseApi<any>> {
11
+ return this.post<any, ResponseApi<any>>('/projects', params)
12
+ }
13
+
14
+ public editProject(id: string, params: any): Promise<ResponseApi<any>> {
15
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, params)
16
+ }
17
+
18
+ public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
19
+ return this.get(`/search/projects`, { params })
20
+ }
21
+
22
+ public cloneProject(project: any): Promise<ResponseApi<any>> {
23
+ return this.post<any, ResponseApi<any>>(`projects/${project.id}/clone`, project)
24
+ }
25
+
26
+ public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
27
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
28
+ }
29
+
30
+ public unArchiveProject(id: string, data: any): Promise<ResponseApi<any>> {
31
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
32
+ }
33
+
34
+ public moveAprProject(id: string): Promise<ResponseApi<any>> {
35
+ return this.post<any, ResponseApi<any>>('repairs/move_plan_to_real', {
36
+ repairs: [id],
37
+ })
38
+ }
39
+ public restoreProject(id: string): Promise<ResponseApi<any>> {
40
+ return this.post<any, ResponseApi<any>>('/restore_project', { projects_ids: [id] })
41
+ }
42
+
43
+ public importTasks(payload: any): Promise<ResponseApi<any>> {
44
+ return this.post<any, ResponseApi<any>>('tasks/import', payload)
45
+ }
46
+
47
+ public importKtd(payload: any): Promise<ResponseApi<any>> {
48
+ return this.post<any, ResponseApi<any>>('/parse_ktd', payload, {
49
+ headers: { 'Content-Type': 'multipart/form-data' },
50
+ })
51
+ }
52
+
53
+ public fetchProjectTeamList(id: string): Promise<ResponseApi<any>> {
54
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, null)
55
+ }
56
+
57
+ public deleteProject(id: string): Promise<any> {
58
+ return this.delete<ResponseApi<any>>(`/projects/${id}`)
59
+ }
60
+ }
61
+
62
+ let api: ProjectsService
63
+
64
+ export default function useProjectsService() {
65
+ if (!api) api = new ProjectsService()
66
+ return api
67
+ }
@@ -1,100 +1,100 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
- import {
3
- Api_Create_Repair_With_Equipments,
4
- Api_Equipment_Full_Dto,
5
- Api_Repair_Dto,
6
- Api_Update_Repair,
7
- OptionFilters,
8
- } from '@/api/types/Api_Repairs'
9
-
10
- class RepairsService extends ApiService {
11
- public fetchFilters(fullParams: string): Promise<OptionFilters> {
12
- return this.get(`get_list_repair?smart=1&${fullParams}`)
13
- }
14
-
15
- public fetchRepairs(
16
- isQuery: boolean,
17
- queries?: string,
18
- hasTeams?: boolean | string,
19
- teamsFilter?: string,
20
- typeFilter?: string,
21
- ): Promise<ResponseApi<Api_Repair_Dto[]>> {
22
- return this.get(
23
- 'get_list_repair' +
24
- (isQuery
25
- ? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
26
- : `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
27
- )
28
- }
29
-
30
- public fetchEquipment(): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
31
- return this.get('repairs/equipment/list?per_page=100000')
32
- }
33
-
34
- public createRepair(payload: Api_Create_Repair_With_Equipments) {
35
- return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
36
- }
37
-
38
- public startRepair(id: string): Promise<void> {
39
- return this.post<null, void>(`/repairs/${id}/start`, null)
40
- }
41
-
42
- public finishRepair(id: string) {
43
- return this.post<any, void>(`/repairs/complete_repair_list`, {
44
- repairIdList: [id],
45
- })
46
- }
47
-
48
- public finishPreparationProject(id: string) {
49
- return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
50
- }
51
-
52
- public moveRepairToCurrent(id: string) {
53
- return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
54
- repairs: [id],
55
- })
56
- }
57
-
58
- public moveArchiveToCurrent(id: string) {
59
- return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
60
- repairs_ids: [id],
61
- })
62
- }
63
-
64
- public moveRepairToApr(id: string) {
65
- return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
66
- repairs: [id],
67
- })
68
- }
69
-
70
- public moveRepairToArchive(id: string) {
71
- return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
72
- repairs_ids: [id],
73
- })
74
- }
75
-
76
- public restoreRepair(id: string) {
77
- return this.post<any, void>(`/restore_repair`, {
78
- repairs_ids: [id],
79
- })
80
- }
81
-
82
- public updateRepair(payload: Api_Update_Repair, id: string) {
83
- return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
84
- }
85
-
86
- public copyRepair(id: string) {
87
- return this.post<null, any>(`/repairs/${id}/clone`, null)
88
- }
89
-
90
- public deleteRepair(id: string) {
91
- return this.delete<any>(`/repairs/${id}`)
92
- }
93
- }
94
-
95
- let api: RepairsService
96
-
97
- export default function useRepairsService() {
98
- if (!api) api = new RepairsService()
99
- return api
100
- }
1
+ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
+ import {
3
+ Api_Create_Repair_With_Equipments,
4
+ Api_Equipment_Full_Dto,
5
+ Api_Repair_Dto,
6
+ Api_Update_Repair,
7
+ OptionFilters,
8
+ } from '@/api/types/Api_Repairs'
9
+
10
+ class RepairsService extends ApiService {
11
+ public fetchFilters(fullParams: string): Promise<OptionFilters> {
12
+ return this.get(`get_list_repair?smart=1&${fullParams}`)
13
+ }
14
+
15
+ public fetchRepairs(
16
+ isQuery: boolean,
17
+ queries?: string,
18
+ hasTeams?: boolean | string,
19
+ teamsFilter?: string,
20
+ typeFilter?: string,
21
+ ): Promise<ResponseApi<Api_Repair_Dto[]>> {
22
+ return this.get(
23
+ 'get_list_repair' +
24
+ (isQuery
25
+ ? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
26
+ : `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
27
+ )
28
+ }
29
+
30
+ public fetchEquipment(): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
31
+ return this.get('repairs/equipment/list?per_page=100000')
32
+ }
33
+
34
+ public createRepair(payload: Api_Create_Repair_With_Equipments) {
35
+ return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
36
+ }
37
+
38
+ public startRepair(id: string): Promise<void> {
39
+ return this.post<null, void>(`/repairs/${id}/start`, null)
40
+ }
41
+
42
+ public finishRepair(id: string) {
43
+ return this.post<any, void>(`/repairs/complete_repair_list`, {
44
+ repairIdList: [id],
45
+ })
46
+ }
47
+
48
+ public finishPreparationProject(id: string) {
49
+ return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
50
+ }
51
+
52
+ public moveRepairToCurrent(id: string) {
53
+ return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
54
+ repairs: [id],
55
+ })
56
+ }
57
+
58
+ public moveArchiveToCurrent(id: string) {
59
+ return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
60
+ repairs_ids: [id],
61
+ })
62
+ }
63
+
64
+ public moveRepairToApr(id: string) {
65
+ return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
66
+ repairs: [id],
67
+ })
68
+ }
69
+
70
+ public moveRepairToArchive(id: string) {
71
+ return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
72
+ repairs_ids: [id],
73
+ })
74
+ }
75
+
76
+ public restoreRepair(id: string) {
77
+ return this.post<any, void>(`/restore_repair`, {
78
+ repairs_ids: [id],
79
+ })
80
+ }
81
+
82
+ public updateRepair(payload: Api_Update_Repair, id: string) {
83
+ return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
84
+ }
85
+
86
+ public copyRepair(id: string) {
87
+ return this.post<null, any>(`/repairs/${id}/clone`, null)
88
+ }
89
+
90
+ public deleteRepair(id: string) {
91
+ return this.delete<any>(`/repairs/${id}`)
92
+ }
93
+ }
94
+
95
+ let api: RepairsService
96
+
97
+ export default function useRepairsService() {
98
+ if (!api) api = new RepairsService()
99
+ return api
100
+ }
@@ -1,14 +1,14 @@
1
- import ApiService from '@/api/settings/ApiService'
2
-
3
- class VideoService extends ApiService {
4
- public async startVideoAnalytics(): Promise<boolean> {
5
- return await this.post('/statanly/start', null)
6
- }
7
- }
8
-
9
- let api: VideoService
10
-
11
- export default function useVideoService() {
12
- if (!api) api = new VideoService()
13
- return api
14
- }
1
+ import ApiService from '@/api/settings/ApiService'
2
+
3
+ class VideoService extends ApiService {
4
+ public async startVideoAnalytics(): Promise<boolean> {
5
+ return await this.post('/statanly/start', null)
6
+ }
7
+ }
8
+
9
+ let api: VideoService
10
+
11
+ export default function useVideoService() {
12
+ if (!api) api = new VideoService()
13
+ return api
14
+ }
@@ -1 +1 @@
1
- export type Api_Files_Responsible_Dto = unknown
1
+ export type Api_Files_Responsible_Dto = unknown
@@ -1,133 +1,133 @@
1
- export type Api_Instrument_Storage = {
2
- id: string
3
- created_at: string
4
- deleted_at: string | null
5
- updated_at: string
6
- description: string
7
- name: string
8
- title: string
9
- parent: unknown | null
10
- parents: unknown[]
11
- state_id: unknown | null
12
- }
13
-
14
- export type Api_Instrument_Type = {
15
- id: string
16
- name: string
17
- created_at: string
18
- updated_at: string
19
- deleted_at: string | null
20
- icon: string
21
- storage_id: string
22
- storage: Api_Instrument_Storage
23
- }
24
-
25
- export type Api_Instrument_Location = {
26
- id: string
27
- name: string
28
- title: string
29
- description: string
30
- created_at: string
31
- updated_at: string
32
- deleted_at: string | null
33
- state_id: unknown | null
34
- }
35
-
36
- export type Api_User_Team = {
37
- id: string
38
- name: string
39
- display_name: string
40
- description: string
41
- created_at: string
42
- updated_at: string
43
- pivot: {
44
- team_id: string
45
- user_id: string
46
- }
47
- }
48
-
49
- export type Api_Instrument_Status = {
50
- id: string
51
- description: string
52
- name: string
53
- title: string
54
- created_at: string
55
- updated_at: string
56
- deleted_at: string | null
57
- }
58
-
59
- export type Api_User = {
60
- id: string
61
- RFID: string
62
- avatar: unknown | null
63
- avatar_id: string | null
64
- change_password: string
65
- created_at: string
66
- updated_at: string
67
- deleted_at: string | null
68
- dismissal_at: string | null
69
- email_verified_at: string
70
- divisions: string
71
- email: string
72
- face_recognition_id: string | null
73
- first_name: string
74
- full_name: string
75
- last_name: string
76
- patronymic: string
77
- personnel_number: number
78
- phone: string
79
- profession: string
80
- teams: Api_User_Team[]
81
- }
82
-
83
- export type Api_Instrument = {
84
- id: string
85
- RFID: string | null
86
- instrument_id: string
87
- arrival_at: string
88
- created_at: string
89
- supply_at: string
90
- updated_at: string
91
- deleted_at: string | null
92
- inventory_number: string
93
- instrument_type: Api_Instrument_Type
94
- invoice_ref_key: string
95
- last_status_updated_at: string
96
- location_id: string
97
- location: Api_Instrument_Location
98
- misplacement: boolean
99
- module: string | null
100
- module_id: string | null
101
- name: string
102
- pressure: unknown | null
103
- registry_module_id: string
104
- responsible_id: string
105
- responsible: Api_User
106
- status: Api_Instrument_Status
107
- status_id: string
108
- storage: Api_Instrument_Storage
109
- supervisor: unknown | null
110
- supervisor_id: string
111
- type: unknown | null
112
- weight: unknown | null
113
- }
114
-
115
- export type Api_instruments_HistoryResponse = {
116
- data: Api_Instrument[]
117
- from: number
118
- to: number
119
- total: number
120
- per_page: number
121
- current_page: number
122
- last_page: number
123
- last_page_url: string
124
- first_page_url: string
125
- next_page_url: string | null
126
- prev_page_url: string | null
127
- path: string
128
- links: {
129
- label: string
130
- url: string
131
- active: boolean
132
- }[]
133
- }
1
+ export type Api_Instrument_Storage = {
2
+ id: string
3
+ created_at: string
4
+ deleted_at: string | null
5
+ updated_at: string
6
+ description: string
7
+ name: string
8
+ title: string
9
+ parent: unknown | null
10
+ parents: unknown[]
11
+ state_id: unknown | null
12
+ }
13
+
14
+ export type Api_Instrument_Type = {
15
+ id: string
16
+ name: string
17
+ created_at: string
18
+ updated_at: string
19
+ deleted_at: string | null
20
+ icon: string
21
+ storage_id: string
22
+ storage: Api_Instrument_Storage
23
+ }
24
+
25
+ export type Api_Instrument_Location = {
26
+ id: string
27
+ name: string
28
+ title: string
29
+ description: string
30
+ created_at: string
31
+ updated_at: string
32
+ deleted_at: string | null
33
+ state_id: unknown | null
34
+ }
35
+
36
+ export type Api_User_Team = {
37
+ id: string
38
+ name: string
39
+ display_name: string
40
+ description: string
41
+ created_at: string
42
+ updated_at: string
43
+ pivot: {
44
+ team_id: string
45
+ user_id: string
46
+ }
47
+ }
48
+
49
+ export type Api_Instrument_Status = {
50
+ id: string
51
+ description: string
52
+ name: string
53
+ title: string
54
+ created_at: string
55
+ updated_at: string
56
+ deleted_at: string | null
57
+ }
58
+
59
+ export type Api_User = {
60
+ id: string
61
+ RFID: string
62
+ avatar: unknown | null
63
+ avatar_id: string | null
64
+ change_password: string
65
+ created_at: string
66
+ updated_at: string
67
+ deleted_at: string | null
68
+ dismissal_at: string | null
69
+ email_verified_at: string
70
+ divisions: string
71
+ email: string
72
+ face_recognition_id: string | null
73
+ first_name: string
74
+ full_name: string
75
+ last_name: string
76
+ patronymic: string
77
+ personnel_number: number
78
+ phone: string
79
+ profession: string
80
+ teams: Api_User_Team[]
81
+ }
82
+
83
+ export type Api_Instrument = {
84
+ id: string
85
+ RFID: string | null
86
+ instrument_id: string
87
+ arrival_at: string
88
+ created_at: string
89
+ supply_at: string
90
+ updated_at: string
91
+ deleted_at: string | null
92
+ inventory_number: string
93
+ instrument_type: Api_Instrument_Type
94
+ invoice_ref_key: string
95
+ last_status_updated_at: string
96
+ location_id: string
97
+ location: Api_Instrument_Location
98
+ misplacement: boolean
99
+ module: string | null
100
+ module_id: string | null
101
+ name: string
102
+ pressure: unknown | null
103
+ registry_module_id: string
104
+ responsible_id: string
105
+ responsible: Api_User
106
+ status: Api_Instrument_Status
107
+ status_id: string
108
+ storage: Api_Instrument_Storage
109
+ supervisor: unknown | null
110
+ supervisor_id: string
111
+ type: unknown | null
112
+ weight: unknown | null
113
+ }
114
+
115
+ export type Api_instruments_HistoryResponse = {
116
+ data: Api_Instrument[]
117
+ from: number
118
+ to: number
119
+ total: number
120
+ per_page: number
121
+ current_page: number
122
+ last_page: number
123
+ last_page_url: string
124
+ first_page_url: string
125
+ next_page_url: string | null
126
+ prev_page_url: string | null
127
+ path: string
128
+ links: {
129
+ label: string
130
+ url: string
131
+ active: boolean
132
+ }[]
133
+ }