shared-ritm 1.2.58 → 1.2.60

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 (55) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +4323 -4296
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/api/services/InstrumentsService.d.ts +7 -0
  6. package/dist/types/api/services/VideoService.d.ts +6 -0
  7. package/dist/types/api/types/Api_Instruments.d.ts +133 -0
  8. package/dist/types/index.d.ts +3 -1
  9. package/package.json +63 -63
  10. package/src/api/services/ControlsService.ts +64 -64
  11. package/src/api/services/GanttService.ts +17 -17
  12. package/src/api/services/InstrumentsService.ts +22 -0
  13. package/src/api/services/MetricsService.ts +109 -109
  14. package/src/api/services/ProjectsService.ts +67 -67
  15. package/src/api/services/RepairsService.ts +100 -100
  16. package/src/api/services/VideoService.ts +14 -0
  17. package/src/api/types/Api_Files.ts +1 -1
  18. package/src/api/types/Api_Instruments.ts +133 -0
  19. package/src/api/types/Api_Projects.ts +55 -55
  20. package/src/api/types/Api_Repairs.ts +93 -93
  21. package/src/api/types/Api_Tasks.ts +155 -155
  22. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  23. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  24. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  25. package/src/common/app-select/AppSelect.vue +157 -157
  26. package/src/common/app-sheet/AppSheet.vue +120 -120
  27. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  28. package/src/common/app-table/AppTable.vue +241 -241
  29. package/src/common/app-table/AppTableLayout.vue +102 -102
  30. package/src/common/app-table/components/ModalSelect.vue +264 -264
  31. package/src/common/app-table/components/TableModal.vue +329 -329
  32. package/src/common/app-table/components/TablePagination.vue +150 -150
  33. package/src/common/app-table/components/TableSearch.vue +76 -76
  34. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  35. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  36. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  37. package/src/common/app-toggle/AppToggle.vue +23 -23
  38. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  39. package/src/icons/components/table-filter-icon.vue +30 -30
  40. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  41. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  42. package/src/icons/task/attention-icon.vue +13 -13
  43. package/src/icons/task/clock-icon.vue +10 -10
  44. package/src/icons/task/delete-icon.vue +10 -10
  45. package/src/icons/task/fire-icon.vue +16 -16
  46. package/src/index.ts +88 -84
  47. package/src/shared/fonts/Inter_18pt-Black.ttf +0 -0
  48. package/src/shared/fonts/Inter_18pt-Bold.ttf +0 -0
  49. package/src/shared/fonts/Inter_18pt-Regular.ttf +0 -0
  50. package/src/shared/fonts/Inter_18pt-SemiBold.ttf +0 -0
  51. package/src/shared/styles/general.css +125 -96
  52. package/src/styles/variables.sass +12 -12
  53. package/src/utils/confirm.ts +12 -12
  54. package/src/utils/helpers.ts +39 -39
  55. package/src/utils/notification.ts +9 -9
@@ -0,0 +1,7 @@
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { InstrumentHistoryParams, InstrumentHistoryResponse } from '@/api/types/Api_Instruments';
3
+ declare class InstrumentsService extends ApiService {
4
+ fetchUserInstrumentsHistory(id: string, params: InstrumentHistoryParams): Promise<InstrumentHistoryResponse>;
5
+ }
6
+ export default function useInstrumentsService(): InstrumentsService;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import ApiService from '@/api/settings/ApiService';
2
+ declare class VideoService extends ApiService {
3
+ startVideoAnalytics(): Promise<boolean>;
4
+ }
5
+ export default function useVideoService(): VideoService;
6
+ export {};
@@ -0,0 +1,133 @@
1
+ type InstrumentStorage = {
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
+ type InstrumentType = {
14
+ id: string;
15
+ name: string;
16
+ created_at: string;
17
+ updated_at: string;
18
+ deleted_at: string | null;
19
+ icon: string;
20
+ storage_id: string;
21
+ storage: InstrumentStorage;
22
+ };
23
+ type InstrumentLocation = {
24
+ id: string;
25
+ name: string;
26
+ title: string;
27
+ description: string;
28
+ created_at: string;
29
+ updated_at: string;
30
+ deleted_at: string | null;
31
+ state_id: unknown | null;
32
+ };
33
+ type UserTeam = {
34
+ id: string;
35
+ name: string;
36
+ display_name: string;
37
+ description: string;
38
+ created_at: string;
39
+ updated_at: string;
40
+ pivot: {
41
+ team_id: string;
42
+ user_id: string;
43
+ };
44
+ };
45
+ type InstrumentStatus = {
46
+ id: string;
47
+ description: string;
48
+ name: string;
49
+ title: string;
50
+ created_at: string;
51
+ updated_at: string;
52
+ deleted_at: string | null;
53
+ };
54
+ type InstrumentResponsible = {
55
+ id: string;
56
+ RFID: string;
57
+ avatar: unknown | null;
58
+ avatar_id: string | null;
59
+ change_password: string;
60
+ created_at: string;
61
+ updated_at: string;
62
+ deleted_at: string | null;
63
+ dismissal_at: string | null;
64
+ email_verified_at: string;
65
+ divisions: string;
66
+ email: string;
67
+ face_recognition_id: string | null;
68
+ first_name: string;
69
+ full_name: string;
70
+ last_name: string;
71
+ patronymic: string;
72
+ personnel_number: number;
73
+ phone: string;
74
+ profession: string;
75
+ teams: UserTeam[];
76
+ };
77
+ type Instrument = {
78
+ id: string;
79
+ RFID: string | null;
80
+ instrument_id: string;
81
+ arrival_at: string;
82
+ created_at: string;
83
+ supply_at: string;
84
+ updated_at: string;
85
+ deleted_at: string | null;
86
+ inventory_number: string;
87
+ instrument_type: InstrumentType;
88
+ invoice_ref_key: string;
89
+ last_status_updated_at: string;
90
+ location_id: string;
91
+ location: InstrumentLocation;
92
+ misplacement: boolean;
93
+ module: string | null;
94
+ module_id: string | null;
95
+ name: string;
96
+ pressure: unknown | null;
97
+ registry_module_id: string;
98
+ responsible_id: string;
99
+ responsible: InstrumentResponsible;
100
+ status: InstrumentStatus;
101
+ status_id: string;
102
+ storage: InstrumentStorage;
103
+ supervisor: unknown | null;
104
+ supervisor_id: string;
105
+ type: unknown | null;
106
+ weight: unknown | null;
107
+ };
108
+ export type InstrumentHistoryParams = {
109
+ status?: string;
110
+ page?: number;
111
+ desc?: string;
112
+ column?: string;
113
+ };
114
+ export type InstrumentHistoryResponse = {
115
+ data: Instrument[];
116
+ from: number;
117
+ to: number;
118
+ total: number;
119
+ per_page: number;
120
+ current_page: number;
121
+ last_page: number;
122
+ last_page_url: string;
123
+ first_page_url: string;
124
+ next_page_url: string | null;
125
+ prev_page_url: string | null;
126
+ path: string;
127
+ links: {
128
+ label: string;
129
+ url: string;
130
+ active: boolean;
131
+ }[];
132
+ };
133
+ export {};
@@ -28,10 +28,12 @@ import useRepairsService from '@/api/services/RepairsService';
28
28
  import useTasksService from '@/api/services/TasksService';
29
29
  import useAuthService from '@/api/services/AuthService';
30
30
  import useFileService from '@/api/services/FileService';
31
+ import useVideoService from '@/api/services/VideoService';
32
+ import useInstrumentsService from '@/api/services/InstrumentsService';
31
33
  import ApiService from '@/api/settings/ApiService';
32
34
  import useControlsService from '@/api/services/ControlsService';
33
35
  export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
34
- export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, };
36
+ export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useInstrumentsService, };
35
37
  export { useBaseTable } from './common/app-table/controllers/useBaseTable';
36
38
  export { useTableModel } from './common/app-table/controllers/useTableModel';
37
39
  export { useColumnSelector } from './common/app-table/controllers/useColumnSelector';
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "shared-ritm",
3
- "version": "1.2.58",
4
- "private": false,
5
- "files": [
6
- "dist",
7
- "src"
8
- ],
9
- "main": "dist/shared-ritm.umd.js",
10
- "type": "module",
11
- "module": "./dist/shared-ritm.es.js",
12
- "types": "./dist/types/index.d.ts",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/shared-ritm.es.js",
16
- "require": "./dist/shared-ritm.umd.js",
17
- "default": "./dist/shared-ritm.es.js",
18
- "types": "./dist/types/index.d.ts"
19
- },
20
- "./style": "./dist/index.css"
21
- },
22
- "scripts": {
23
- "dev": "vite",
24
- "build": "vite build && tsc --emitDeclarationOnly",
25
- "typecheck": "vue-tsc --noEmit",
26
- "lint": "eslint --fix",
27
- "format": "prettier -w -u ."
28
- },
29
- "dependencies": {
30
- "@quasar/extras": "^1.16.17",
31
- "@vueuse/core": "^10.1.2",
32
- "axios": "^1.7.7",
33
- "vue": "^3.5.12",
34
- "vue-router": "^4.0.3"
35
- },
36
- "peerDependencies": {
37
- "quasar": "^2.18.1"
38
- },
39
- "devDependencies": {
40
- "@quasar/vite-plugin": "^1.9.0",
41
- "@rollup/pluginutils": "^5.1.3",
42
- "@types/node": "^22.7.9",
43
- "@typescript-eslint/eslint-plugin": "^4.25.0",
44
- "@typescript-eslint/parser": "^4.25.0",
45
- "@vitejs/plugin-vue": "^5.1.4",
46
- "@vue/compiler-sfc": "^3.0.5",
47
- "@vue/eslint-config-prettier": "^6.0.0",
48
- "@vue/eslint-config-typescript": "^7.0.0",
49
- "eslint": "^7.27.0",
50
- "eslint-plugin-prettier": "^3.4.0",
51
- "eslint-plugin-vue": "^7.10.0",
52
- "install": "^0.13.0",
53
- "npm": "^11.4.0",
54
- "prettier": "^2.3.0",
55
- "quasar": "^2.18.1",
56
- "rollup-plugin-visualizer": "^5.14.0",
57
- "sass": "^1.80.4",
58
- "typescript": "^5.6.3",
59
- "vite": "^5.4.9",
60
- "vite-plugin-css-modules": "^0.0.1",
61
- "vue-tsc": "^2.1.6"
62
- }
63
- }
1
+ {
2
+ "name": "shared-ritm",
3
+ "version": "1.2.60",
4
+ "private": false,
5
+ "files": [
6
+ "dist",
7
+ "src"
8
+ ],
9
+ "main": "dist/shared-ritm.umd.js",
10
+ "type": "module",
11
+ "module": "./dist/shared-ritm.es.js",
12
+ "types": "./dist/types/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/shared-ritm.es.js",
16
+ "require": "./dist/shared-ritm.umd.js",
17
+ "default": "./dist/shared-ritm.es.js",
18
+ "types": "./dist/types/index.d.ts"
19
+ },
20
+ "./style": "./dist/index.css"
21
+ },
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "vite build && tsc --emitDeclarationOnly",
25
+ "typecheck": "vue-tsc --noEmit",
26
+ "lint": "eslint --fix",
27
+ "format": "prettier -w -u ."
28
+ },
29
+ "dependencies": {
30
+ "@quasar/extras": "^1.16.17",
31
+ "@vueuse/core": "^10.1.2",
32
+ "axios": "^1.7.7",
33
+ "vue": "^3.5.12",
34
+ "vue-router": "^4.0.3"
35
+ },
36
+ "peerDependencies": {
37
+ "quasar": "^2.18.1"
38
+ },
39
+ "devDependencies": {
40
+ "@quasar/vite-plugin": "^1.9.0",
41
+ "@rollup/pluginutils": "^5.1.3",
42
+ "@types/node": "^22.7.9",
43
+ "@typescript-eslint/eslint-plugin": "^4.25.0",
44
+ "@typescript-eslint/parser": "^4.25.0",
45
+ "@vitejs/plugin-vue": "^5.1.4",
46
+ "@vue/compiler-sfc": "^3.0.5",
47
+ "@vue/eslint-config-prettier": "^6.0.0",
48
+ "@vue/eslint-config-typescript": "^7.0.0",
49
+ "eslint": "^7.27.0",
50
+ "eslint-plugin-prettier": "^3.4.0",
51
+ "eslint-plugin-vue": "^7.10.0",
52
+ "install": "^0.13.0",
53
+ "npm": "^11.4.0",
54
+ "prettier": "^2.3.0",
55
+ "quasar": "^2.18.1",
56
+ "rollup-plugin-visualizer": "^5.14.0",
57
+ "sass": "^1.80.4",
58
+ "typescript": "^5.6.3",
59
+ "vite": "^5.4.9",
60
+ "vite-plugin-css-modules": "^0.0.1",
61
+ "vue-tsc": "^2.1.6"
62
+ }
63
+ }
@@ -1,64 +1,64 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
-
3
- import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '@/api/types/Api_Controls'
4
-
5
- class ControlsService extends ApiService {
6
- public fetchControlZones(params: Record<string, any>): Promise<ResponseApi<Api_ControlZones_Dto[]>> {
7
- return this.get('/frame/list', { params })
8
- }
9
-
10
- public async fetchControlZone(id: string): Promise<ResponseApi<Api_ControlZones_Dto>> {
11
- return this.get(`/frame/${id}`)
12
- }
13
-
14
- public createControlZone(params: any): Promise<ResponseApi<any>> {
15
- return this.post<any, ResponseApi<any>>('/frame', params)
16
- }
17
-
18
- public editControlZone(id: string, params: any): Promise<ResponseApi<any>> {
19
- return this.put<any, ResponseApi<any>>(`/frame/${id}`, params)
20
- }
21
-
22
- public deleteControlZone(id: string): Promise<any> {
23
- return this.delete<ResponseApi<any>>(`/frame/${id}`)
24
- }
25
-
26
- public fetchControlLogs(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
27
- return this.get('/exposed_equipment_zones/list', { params })
28
- }
29
-
30
- public fetchControllers(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
31
- return this.get('/frame/controllers/list', { params })
32
- }
33
-
34
- public fetchUsersWithPasses(): Promise<any> {
35
- return this.get('inspector/users-with-passes')
36
- }
37
-
38
- public fetchWarehousesList(): Promise<any> {
39
- return this.get('tasks/warehouse/list?only_outside_exposed_equipment_zone=1')
40
- }
41
-
42
- public manualEntry(params: any): Promise<ResponseApi<any>> {
43
- return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/enter', params)
44
- }
45
-
46
- public manualExit(params: any): Promise<ResponseApi<any>> {
47
- return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/exit', params)
48
- }
49
-
50
- public deleteControlLogs(params: any): Promise<any> {
51
- return this.delete<ResponseApi<any>>(`exposed_equipment_zones`, params)
52
- }
53
-
54
- public fetchInstrumentTypeList(params: any): Promise<any> {
55
- return this.get<ResponseApi<any>>(`search/instrument_types`, { params })
56
- }
57
- }
58
-
59
- let api: ControlsService
60
-
61
- export default function useControlsService() {
62
- if (!api) api = new ControlsService()
63
- return api
64
- }
1
+ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
+
3
+ import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '@/api/types/Api_Controls'
4
+
5
+ class ControlsService extends ApiService {
6
+ public fetchControlZones(params: Record<string, any>): Promise<ResponseApi<Api_ControlZones_Dto[]>> {
7
+ return this.get('/frame/list', { params })
8
+ }
9
+
10
+ public async fetchControlZone(id: string): Promise<ResponseApi<Api_ControlZones_Dto>> {
11
+ return this.get(`/frame/${id}`)
12
+ }
13
+
14
+ public createControlZone(params: any): Promise<ResponseApi<any>> {
15
+ return this.post<any, ResponseApi<any>>('/frame', params)
16
+ }
17
+
18
+ public editControlZone(id: string, params: any): Promise<ResponseApi<any>> {
19
+ return this.put<any, ResponseApi<any>>(`/frame/${id}`, params)
20
+ }
21
+
22
+ public deleteControlZone(id: string): Promise<any> {
23
+ return this.delete<ResponseApi<any>>(`/frame/${id}`)
24
+ }
25
+
26
+ public fetchControlLogs(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
27
+ return this.get('/exposed_equipment_zones/list', { params })
28
+ }
29
+
30
+ public fetchControllers(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
31
+ return this.get('/frame/controllers/list', { params })
32
+ }
33
+
34
+ public fetchUsersWithPasses(): Promise<any> {
35
+ return this.get('inspector/users-with-passes')
36
+ }
37
+
38
+ public fetchWarehousesList(): Promise<any> {
39
+ return this.get('tasks/warehouse/list?only_outside_exposed_equipment_zone=1')
40
+ }
41
+
42
+ public manualEntry(params: any): Promise<ResponseApi<any>> {
43
+ return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/enter', params)
44
+ }
45
+
46
+ public manualExit(params: any): Promise<ResponseApi<any>> {
47
+ return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/exit', params)
48
+ }
49
+
50
+ public deleteControlLogs(params: any): Promise<any> {
51
+ return this.delete<ResponseApi<any>>(`exposed_equipment_zones`, params)
52
+ }
53
+
54
+ public fetchInstrumentTypeList(params: any): Promise<any> {
55
+ return this.get<ResponseApi<any>>(`search/instrument_types`, { params })
56
+ }
57
+ }
58
+
59
+ let api: ControlsService
60
+
61
+ export default function useControlsService() {
62
+ if (!api) api = new ControlsService()
63
+ return api
64
+ }
@@ -1,17 +1,17 @@
1
- import ApiService from '@/api/settings/ApiService'
2
-
3
- class GanttService extends ApiService {
4
- public async fetchCriticalPathTasks(params: string): Promise<any> {
5
- return await this.get(`gantt/get_list_task_on_critical_path?${params}`)
6
- }
7
- public async fetchGanttList(params: string): Promise<any> {
8
- return await this.get(`/list/tasks/search?${params}&gantt=1`)
9
- }
10
- }
11
-
12
- let api: GanttService
13
-
14
- export default function useGanttService() {
15
- if (!api) api = new GanttService()
16
- return api
17
- }
1
+ import ApiService from '@/api/settings/ApiService'
2
+
3
+ class GanttService extends ApiService {
4
+ public async fetchCriticalPathTasks(params: string): Promise<any> {
5
+ return await this.get(`gantt/get_list_task_on_critical_path?${params}`)
6
+ }
7
+ public async fetchGanttList(params: string): Promise<any> {
8
+ return await this.get(`/list/tasks/search?${params}&gantt=1`)
9
+ }
10
+ }
11
+
12
+ let api: GanttService
13
+
14
+ export default function useGanttService() {
15
+ if (!api) api = new GanttService()
16
+ return api
17
+ }
@@ -0,0 +1,22 @@
1
+ import ApiService from '@/api/settings/ApiService'
2
+ import { InstrumentHistoryResponse } from '@/api/types/Api_Instruments'
3
+
4
+ class InstrumentsService extends ApiService {
5
+ public async fetchUserInstrumentsHistory(id: string, page: number): Promise<InstrumentHistoryResponse> {
6
+ const params = {
7
+ status: 'issued',
8
+ page,
9
+ desc: 'desc',
10
+ column: 'updated_at',
11
+ }
12
+
13
+ return await this.get(`users/${id}/instruments`, { params })
14
+ }
15
+ }
16
+
17
+ let api: InstrumentsService
18
+
19
+ export default function useInstrumentsService() {
20
+ if (!api) api = new InstrumentsService()
21
+ return api
22
+ }