shared-ritm 1.2.57 → 1.2.59

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 (103) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +1639 -1629
  4. package/dist/shared-ritm.umd.js +7 -7
  5. package/dist/types/api/services/VideoService.d.ts +6 -0
  6. package/dist/types/index.d.ts +2 -1
  7. package/package.json +63 -63
  8. package/src/App.vue +2461 -2461
  9. package/src/api/services/AuthService.ts +58 -58
  10. package/src/api/services/FileService.ts +15 -15
  11. package/src/api/services/GanttService.ts +17 -17
  12. package/src/api/services/MetricsService.ts +109 -109
  13. package/src/api/services/ProjectsService.ts +67 -67
  14. package/src/api/services/RepairsService.ts +100 -100
  15. package/src/api/services/TasksService.ts +137 -137
  16. package/src/api/services/VideoService.ts +14 -0
  17. package/src/api/settings/ApiService.ts +128 -128
  18. package/src/api/types/Api_Controls.ts +72 -72
  19. package/src/api/types/Api_Files.ts +1 -1
  20. package/src/api/types/Api_Projects.ts +55 -55
  21. package/src/api/types/Api_Repairs.ts +93 -93
  22. package/src/api/types/Api_Tasks.ts +155 -155
  23. package/src/common/app-button/AppButton.vue +173 -173
  24. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  25. package/src/common/app-date-picker/AppDatePicker.vue +81 -81
  26. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  27. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  28. package/src/common/app-icon/AppIcon.vue +108 -108
  29. package/src/common/app-input/AppInput.vue +148 -147
  30. package/src/common/app-input-search/AppInputSearch.vue +174 -174
  31. package/src/common/app-layout/AppLayout.vue +84 -84
  32. package/src/common/app-layout/components/AppLayoutHeader.vue +246 -246
  33. package/src/common/app-layout/components/AppLayoutPage.vue +16 -16
  34. package/src/common/app-loader/index.vue +43 -43
  35. package/src/common/app-page-layout/AppPageLayout.vue +122 -122
  36. package/src/common/app-select/AppSelect.vue +157 -157
  37. package/src/common/app-sheet/AppSheet.vue +120 -120
  38. package/src/common/app-sidebar/AppSidebar.vue +168 -168
  39. package/src/common/app-sidebar/components/SidebarMenu.vue +37 -37
  40. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  41. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  42. package/src/common/app-toggle/AppToggle.vue +23 -23
  43. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  44. package/src/global.d.ts +1 -1
  45. package/src/icons/components/arrow-down-icon.vue +25 -25
  46. package/src/icons/components/arrow-frame-icon.vue +19 -19
  47. package/src/icons/components/arrow-square.vue +22 -22
  48. package/src/icons/components/table-filter-icon.vue +30 -30
  49. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  50. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  51. package/src/icons/header/NotificationIcon.vue +18 -18
  52. package/src/icons/header/PersonIcon.vue +11 -11
  53. package/src/icons/header/SettingIcon.vue +14 -14
  54. package/src/icons/header/flashIcon.vue +24 -24
  55. package/src/icons/header/searchStatusIcon.vue +24 -24
  56. package/src/icons/header/smallCapsIcon.vue +34 -34
  57. package/src/icons/sidebar/assign-module-icon.vue +36 -36
  58. package/src/icons/sidebar/instrument-history-icon.vue +32 -32
  59. package/src/icons/sidebar/instrument-order-icon.vue +38 -38
  60. package/src/icons/sidebar/instrument-work-zone-icon.vue +18 -18
  61. package/src/icons/sidebar/instruments-icon.vue +45 -45
  62. package/src/icons/sidebar/logo-icon.vue +15 -15
  63. package/src/icons/sidebar/logout-icon.vue +13 -13
  64. package/src/icons/sidebar/modules-icon.vue +16 -16
  65. package/src/icons/sidebar/notifications-icon.vue +24 -24
  66. package/src/icons/sidebar/order-icon.vue +44 -44
  67. package/src/icons/sidebar/pass-icon.vue +38 -38
  68. package/src/icons/sidebar/positions-icon.vue +42 -42
  69. package/src/icons/sidebar/preorder-icon.vue +19 -19
  70. package/src/icons/sidebar/projects-icon.vue +31 -31
  71. package/src/icons/sidebar/repair-object-icon.vue +18 -18
  72. package/src/icons/sidebar/repairs-icon.vue +20 -20
  73. package/src/icons/sidebar/roles-icon.vue +26 -26
  74. package/src/icons/sidebar/status-history-icon.vue +24 -24
  75. package/src/icons/sidebar/tasks-icon.vue +28 -28
  76. package/src/icons/sidebar/tasks_tasks-icon.vue +39 -39
  77. package/src/icons/sidebar/tasks_today-icon.vue +27 -27
  78. package/src/icons/sidebar/teams-icon.vue +32 -32
  79. package/src/icons/sidebar/user-icon.vue +18 -18
  80. package/src/icons/sidebar/users-icon.vue +46 -46
  81. package/src/icons/sidebar/videosources-icon.vue +19 -19
  82. package/src/icons/sidebar/videowall-icon.vue +13 -13
  83. package/src/icons/sidebar/videozones-icon.vue +21 -21
  84. package/src/icons/sidebar/warehouses-icon.vue +43 -43
  85. package/src/icons/sidebar/workshop-icon.vue +100 -100
  86. package/src/icons/sidebar/workzones-icon.vue +22 -22
  87. package/src/icons/task/attention-icon.vue +13 -13
  88. package/src/icons/task/clock-icon.vue +10 -10
  89. package/src/icons/task/delete-icon.vue +10 -10
  90. package/src/icons/task/fire-icon.vue +16 -16
  91. package/src/index.ts +2 -0
  92. package/src/main.ts +28 -28
  93. package/src/quasar-user-options.ts +17 -17
  94. package/src/router/index.ts +10 -10
  95. package/src/shared/fonts/Inter_18pt-Black.ttf +0 -0
  96. package/src/shared/fonts/Inter_18pt-Bold.ttf +0 -0
  97. package/src/shared/fonts/Inter_18pt-Regular.ttf +0 -0
  98. package/src/shared/fonts/Inter_18pt-SemiBold.ttf +0 -0
  99. package/src/shared/styles/general.css +125 -96
  100. package/src/shims-vue.d.ts +5 -5
  101. package/src/styles/variables.sass +12 -12
  102. package/src/utils/confirm.ts +12 -12
  103. package/src/utils/notification.ts +9 -9
@@ -1,128 +1,128 @@
1
- import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
2
-
3
- export enum ApiServiceType {
4
- SERVICE_AUTH = 'SERVICE_AUTH',
5
- }
6
-
7
- export type ResponseApi<T> = {
8
- count: number
9
- current_page: number
10
- data: T
11
- per_page: number
12
- total: number
13
- total_pages: number
14
- }
15
-
16
- export default class ApiService {
17
- private axiosInstance: AxiosInstance
18
-
19
- constructor() {
20
- this.axiosInstance = axios.create({
21
- baseURL: process.env.VUE_APP_BACKEND,
22
- headers: {
23
- 'Content-Type': 'application/json',
24
- Accept: 'application/json',
25
- },
26
- })
27
-
28
- this.axiosInstance.interceptors.request.use(
29
- (config: InternalAxiosRequestConfig) => {
30
- const token = this.getToken()
31
- if (token && config.headers) {
32
- config.headers.Authorization = `Bearer ${token}`
33
- }
34
- return config
35
- },
36
- (error: AxiosError) => {
37
- return Promise.reject(error)
38
- },
39
- )
40
-
41
- this.axiosInstance.interceptors.response.use(
42
- (response: AxiosResponse) => {
43
- return response.data
44
- },
45
- (error: AxiosError) => {
46
- if (error.response?.status === 401 || error.response?.status === 403) {
47
- this.logout()
48
- }
49
- return Promise.reject(error)
50
- },
51
- )
52
- }
53
-
54
- private getToken() {
55
- return localStorage.getItem('token')
56
- }
57
-
58
- private removeToken() {
59
- localStorage.removeItem('token')
60
- }
61
-
62
- public logout(): void {
63
- this.removeToken()
64
- window.location.href = '/sign-in'
65
- }
66
-
67
- private handleError(error: AxiosError): void {
68
- if (error.response) {
69
- console.error('API Error:', error.response.status, error.response.data)
70
- } else if (error.request) {
71
- console.error('No response received:', error.request)
72
- } else {
73
- console.error('Error during request setup:', error.message)
74
- }
75
- }
76
-
77
- protected async get<T>(url: string, options?: AxiosRequestConfig) {
78
- try {
79
- const response: AxiosResponse<T> = await this.axiosInstance.get<T>(url, options)
80
- if (response?.data === false) return false as unknown as T
81
- return response?.data ?? (response as unknown as T)
82
- } catch (error) {
83
- const axiosError = error as AxiosError
84
- this.handleError(axiosError)
85
- throw error
86
- }
87
- }
88
-
89
- protected async delete<T>(url: string, options?: AxiosRequestConfig) {
90
- try {
91
- return await this.axiosInstance.delete<T>(url, options)
92
- } catch (error) {
93
- const axiosError = error as AxiosError
94
- this.handleError(axiosError)
95
- throw error
96
- }
97
- }
98
-
99
- protected async post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
100
- try {
101
- const response: AxiosResponse<T2> = await this.axiosInstance.post<T1, AxiosResponse<T2>>(url, payload, options)
102
- if (response?.data === false) return false
103
- return response?.data || (response as any)
104
- } catch (error) {
105
- const axiosError = error as AxiosError
106
- this.handleError(axiosError)
107
- throw error
108
- }
109
- }
110
-
111
- // protected patch<T1, T2>(url: string, payload: T1, type: ApiServiceType, options?: AxiosRequestConfig): Promise<T2> {
112
- // return axios
113
- // .patch<T1, AxiosResponse<T2>>(apiServiceUrls[type] + url, payload, options)
114
- // .catch((err: AxiosError) => processError401<T2>(err))
115
- // .then(extractData)
116
- // }
117
- //
118
- protected async put<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
119
- try {
120
- const response: AxiosResponse<T2> = await this.axiosInstance.put<T1, AxiosResponse<T2>>(url, payload, options)
121
- return response.data
122
- } catch (error) {
123
- const axiosError = error as AxiosError
124
- this.handleError(axiosError)
125
- throw error
126
- }
127
- }
128
- }
1
+ import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
2
+
3
+ export enum ApiServiceType {
4
+ SERVICE_AUTH = 'SERVICE_AUTH',
5
+ }
6
+
7
+ export type ResponseApi<T> = {
8
+ count: number
9
+ current_page: number
10
+ data: T
11
+ per_page: number
12
+ total: number
13
+ total_pages: number
14
+ }
15
+
16
+ export default class ApiService {
17
+ private axiosInstance: AxiosInstance
18
+
19
+ constructor() {
20
+ this.axiosInstance = axios.create({
21
+ baseURL: process.env.VUE_APP_BACKEND,
22
+ headers: {
23
+ 'Content-Type': 'application/json',
24
+ Accept: 'application/json',
25
+ },
26
+ })
27
+
28
+ this.axiosInstance.interceptors.request.use(
29
+ (config: InternalAxiosRequestConfig) => {
30
+ const token = this.getToken()
31
+ if (token && config.headers) {
32
+ config.headers.Authorization = `Bearer ${token}`
33
+ }
34
+ return config
35
+ },
36
+ (error: AxiosError) => {
37
+ return Promise.reject(error)
38
+ },
39
+ )
40
+
41
+ this.axiosInstance.interceptors.response.use(
42
+ (response: AxiosResponse) => {
43
+ return response.data
44
+ },
45
+ (error: AxiosError) => {
46
+ if (error.response?.status === 401 || error.response?.status === 403) {
47
+ this.logout()
48
+ }
49
+ return Promise.reject(error)
50
+ },
51
+ )
52
+ }
53
+
54
+ private getToken() {
55
+ return localStorage.getItem('token')
56
+ }
57
+
58
+ private removeToken() {
59
+ localStorage.removeItem('token')
60
+ }
61
+
62
+ public logout(): void {
63
+ this.removeToken()
64
+ window.location.href = '/sign-in'
65
+ }
66
+
67
+ private handleError(error: AxiosError): void {
68
+ if (error.response) {
69
+ console.error('API Error:', error.response.status, error.response.data)
70
+ } else if (error.request) {
71
+ console.error('No response received:', error.request)
72
+ } else {
73
+ console.error('Error during request setup:', error.message)
74
+ }
75
+ }
76
+
77
+ protected async get<T>(url: string, options?: AxiosRequestConfig) {
78
+ try {
79
+ const response: AxiosResponse<T> = await this.axiosInstance.get<T>(url, options)
80
+ if (response?.data === false) return false as unknown as T
81
+ return response?.data ?? (response as unknown as T)
82
+ } catch (error) {
83
+ const axiosError = error as AxiosError
84
+ this.handleError(axiosError)
85
+ throw error
86
+ }
87
+ }
88
+
89
+ protected async delete<T>(url: string, options?: AxiosRequestConfig) {
90
+ try {
91
+ return await this.axiosInstance.delete<T>(url, options)
92
+ } catch (error) {
93
+ const axiosError = error as AxiosError
94
+ this.handleError(axiosError)
95
+ throw error
96
+ }
97
+ }
98
+
99
+ protected async post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
100
+ try {
101
+ const response: AxiosResponse<T2> = await this.axiosInstance.post<T1, AxiosResponse<T2>>(url, payload, options)
102
+ if (response?.data === false) return false
103
+ return response?.data || (response as any)
104
+ } catch (error) {
105
+ const axiosError = error as AxiosError
106
+ this.handleError(axiosError)
107
+ throw error
108
+ }
109
+ }
110
+
111
+ // protected patch<T1, T2>(url: string, payload: T1, type: ApiServiceType, options?: AxiosRequestConfig): Promise<T2> {
112
+ // return axios
113
+ // .patch<T1, AxiosResponse<T2>>(apiServiceUrls[type] + url, payload, options)
114
+ // .catch((err: AxiosError) => processError401<T2>(err))
115
+ // .then(extractData)
116
+ // }
117
+ //
118
+ protected async put<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
119
+ try {
120
+ const response: AxiosResponse<T2> = await this.axiosInstance.put<T1, AxiosResponse<T2>>(url, payload, options)
121
+ return response.data
122
+ } catch (error) {
123
+ const axiosError = error as AxiosError
124
+ this.handleError(axiosError)
125
+ throw error
126
+ }
127
+ }
128
+ }
@@ -1,72 +1,72 @@
1
- export type Api_User_Dto = {
2
- id: string
3
- full_name: string
4
- }
5
- export type Api_ControlZones_Dto = {
6
- id: string
7
- name: string
8
- inventory_number: string
9
- uuid: string
10
- controller_zone: string
11
- users?: Api_User_Dto[]
12
- }
13
- export type ControlsParams = {
14
- search?: string
15
- page?: number
16
- filter?: Record<string, string[]>
17
- }
18
-
19
- export interface ControlMeta {
20
- total: number
21
- perPage: number
22
- totalPages: number
23
- currentPage: number
24
- }
25
-
26
- export type FiltersValue = {
27
- users?: {
28
- users: Api_User_Dto[]
29
- }
30
- controller?: {
31
- controller: Api_User_Dto[]
32
- }
33
- responsible?: {
34
- responsible: Api_User_Dto[]
35
- }
36
- status?: {
37
- status: boolean
38
- }
39
- }
40
- export type Api_Instrument_Dto = {
41
- id: string
42
- name: string
43
- storage_id?: string
44
- }
45
- export type Api_Warehouse_Dto = {
46
- id: string
47
- invoice_ref_key: string
48
- inventory_number: string
49
- instrument: Api_Instrument_Dto[]
50
- }
51
-
52
- export type Api_ControlLogs_Dto = {
53
- id: string
54
- automatically: string
55
- in_zone: string
56
- uuid: string
57
- controller_zone: string
58
- controller: Api_User_Dto[]
59
- user: Api_User_Dto[]
60
- frame: Api_ControlZones_Dto[]
61
- warehouse: Api_Warehouse_Dto[]
62
- }
63
- export type Api_New_Items = {
64
- title: string
65
- inventory_numbers: string
66
- storage_id: string
67
- }
68
- export type Api_ManualEntry_Dto = {
69
- user: string
70
- items?: string[]
71
- new_items?: Api_New_Items[]
72
- }
1
+ export type Api_User_Dto = {
2
+ id: string
3
+ full_name: string
4
+ }
5
+ export type Api_ControlZones_Dto = {
6
+ id: string
7
+ name: string
8
+ inventory_number: string
9
+ uuid: string
10
+ controller_zone: string
11
+ users?: Api_User_Dto[]
12
+ }
13
+ export type ControlsParams = {
14
+ search?: string
15
+ page?: number
16
+ filter?: Record<string, string[]>
17
+ }
18
+
19
+ export interface ControlMeta {
20
+ total: number
21
+ perPage: number
22
+ totalPages: number
23
+ currentPage: number
24
+ }
25
+
26
+ export type FiltersValue = {
27
+ users?: {
28
+ users: Api_User_Dto[]
29
+ }
30
+ controller?: {
31
+ controller: Api_User_Dto[]
32
+ }
33
+ responsible?: {
34
+ responsible: Api_User_Dto[]
35
+ }
36
+ status?: {
37
+ status: boolean
38
+ }
39
+ }
40
+ export type Api_Instrument_Dto = {
41
+ id: string
42
+ name: string
43
+ storage_id?: string
44
+ }
45
+ export type Api_Warehouse_Dto = {
46
+ id: string
47
+ invoice_ref_key: string
48
+ inventory_number: string
49
+ instrument: Api_Instrument_Dto[]
50
+ }
51
+
52
+ export type Api_ControlLogs_Dto = {
53
+ id: string
54
+ automatically: string
55
+ in_zone: string
56
+ uuid: string
57
+ controller_zone: string
58
+ controller: Api_User_Dto[]
59
+ user: Api_User_Dto[]
60
+ frame: Api_ControlZones_Dto[]
61
+ warehouse: Api_Warehouse_Dto[]
62
+ }
63
+ export type Api_New_Items = {
64
+ title: string
65
+ inventory_numbers: string
66
+ storage_id: string
67
+ }
68
+ export type Api_ManualEntry_Dto = {
69
+ user: string
70
+ items?: string[]
71
+ new_items?: Api_New_Items[]
72
+ }
@@ -1 +1 @@
1
- export type Api_Files_Responsible_Dto = unknown
1
+ export type Api_Files_Responsible_Dto = unknown
@@ -1,55 +1,55 @@
1
- export type Api_Project_Repair = {
2
- id: string
3
- name: string
4
- start_date: null | string
5
- end_date: null | string
6
- }
7
-
8
- export type Api_Project_Team = {
9
- id: string
10
- name: string
11
- display_name: string
12
- description: string
13
- created_at: string
14
- updated_at: string
15
- pivot: {
16
- project_id: string
17
- team_id: string
18
- }
19
- }
20
-
21
- export type Api_Project_Category = {
22
- code: number
23
- display_name: string
24
- name: string
25
- }
26
-
27
- export type Api_Project_Status = {
28
- id: string
29
- name: string
30
- title: string
31
- description: string
32
- created_at: string | null
33
- updated_at: string | null
34
- deleted_at: string | null
35
- }
36
-
37
- export type Api_Project_Dto = {
38
- id: string
39
- name: string
40
- description: null
41
- image: null
42
- plan_date: string | null
43
- deadline: string | null
44
- fact_start_date: string | null
45
- fact_end_date: string | null
46
- planned_start: string | null
47
- planned_end: string | null
48
- deleted_at: string | null
49
- total_tasks: number
50
- is_archive: boolean
51
- teams: Api_Project_Team[]
52
- status: Api_Project_Status
53
- category: Api_Project_Category
54
- repair: Api_Project_Repair | null
55
- }
1
+ export type Api_Project_Repair = {
2
+ id: string
3
+ name: string
4
+ start_date: null | string
5
+ end_date: null | string
6
+ }
7
+
8
+ export type Api_Project_Team = {
9
+ id: string
10
+ name: string
11
+ display_name: string
12
+ description: string
13
+ created_at: string
14
+ updated_at: string
15
+ pivot: {
16
+ project_id: string
17
+ team_id: string
18
+ }
19
+ }
20
+
21
+ export type Api_Project_Category = {
22
+ code: number
23
+ display_name: string
24
+ name: string
25
+ }
26
+
27
+ export type Api_Project_Status = {
28
+ id: string
29
+ name: string
30
+ title: string
31
+ description: string
32
+ created_at: string | null
33
+ updated_at: string | null
34
+ deleted_at: string | null
35
+ }
36
+
37
+ export type Api_Project_Dto = {
38
+ id: string
39
+ name: string
40
+ description: null
41
+ image: null
42
+ plan_date: string | null
43
+ deadline: string | null
44
+ fact_start_date: string | null
45
+ fact_end_date: string | null
46
+ planned_start: string | null
47
+ planned_end: string | null
48
+ deleted_at: string | null
49
+ total_tasks: number
50
+ is_archive: boolean
51
+ teams: Api_Project_Team[]
52
+ status: Api_Project_Status
53
+ category: Api_Project_Category
54
+ repair: Api_Project_Repair | null
55
+ }