shared-ritm 1.2.32 → 1.2.34

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 (41) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +3259 -3241
  4. package/dist/shared-ritm.umd.js +6 -6
  5. package/dist/types/api/services/AuthService.d.ts +13 -1
  6. package/package.json +1 -1
  7. package/src/App.vue +2461 -2461
  8. package/src/api/services/AuthService.ts +20 -3
  9. package/src/api/services/GanttService.ts +17 -17
  10. package/src/api/services/MetricsService.ts +101 -101
  11. package/src/api/services/RepairsService.ts +100 -100
  12. package/src/api/settings/ApiService.ts +126 -126
  13. package/src/api/types/Api_Files.ts +1 -1
  14. package/src/api/types/Api_Projects.ts +55 -55
  15. package/src/api/types/Api_Repairs.ts +93 -93
  16. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  17. package/src/common/app-date-picker/AppDatePicker.vue +81 -81
  18. package/src/common/app-dialogs/AppConfirmDialog.vue +100 -100
  19. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  20. package/src/common/app-icon/AppIcon.vue +108 -108
  21. package/src/common/app-input-search/AppInputSearch.vue +174 -174
  22. package/src/common/app-layout/AppLayout.vue +84 -84
  23. package/src/common/app-layout/components/AppLayoutHeader.vue +246 -246
  24. package/src/common/app-layout/components/AppLayoutPage.vue +16 -16
  25. package/src/common/app-select/AppSelect.vue +157 -157
  26. package/src/common/app-sidebar/components/SidebarMenuItem.vue +146 -146
  27. package/src/common/app-toggle/AppToggle.vue +23 -23
  28. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  29. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  30. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  31. package/src/icons/header/NotificationIcon.vue +18 -18
  32. package/src/icons/header/PersonIcon.vue +11 -11
  33. package/src/icons/header/SettingIcon.vue +14 -14
  34. package/src/icons/task/attention-icon.vue +13 -13
  35. package/src/icons/task/clock-icon.vue +10 -10
  36. package/src/icons/task/delete-icon.vue +10 -10
  37. package/src/icons/task/fire-icon.vue +16 -16
  38. package/src/main.ts +28 -28
  39. package/src/shared/styles/general.css +96 -96
  40. package/src/utils/confirm.ts +12 -12
  41. package/src/utils/notification.ts +9 -9
@@ -1,16 +1,22 @@
1
1
  import ApiService from '@/api/settings/ApiService'
2
2
 
3
- type LoginPayload = {
3
+ export type LoginPayload = {
4
4
  email: string
5
5
  password: string
6
6
  }
7
7
 
8
- type LoginResponse = {
8
+ export type LoginResponse = {
9
9
  token: string
10
10
  user: any
11
11
  }
12
12
 
13
- type ConfigResponse = any
13
+ export type ChangePasswordPayload = {
14
+ password: string
15
+ password_confirmation: string
16
+ }
17
+
18
+ export type ChangePasswordResponse = any
19
+ export type ConfigResponse = any
14
20
 
15
21
  class AuthService extends ApiService {
16
22
  public login(email: string, password: string) {
@@ -20,6 +26,10 @@ class AuthService extends ApiService {
20
26
  })
21
27
  }
22
28
 
29
+ public loginPhoto(photo: any) {
30
+ return this.post<any, LoginResponse>(`/login/from_photo`, { photo })
31
+ }
32
+
23
33
  public logout() {
24
34
  return this.post<null, LoginResponse>(`/logout`, null)
25
35
  }
@@ -31,6 +41,13 @@ class AuthService extends ApiService {
31
41
  public configs() {
32
42
  return this.get<ConfigResponse>(`/configs`)
33
43
  }
44
+
45
+ public changePassword(id: string, password: string, password_confirmation: string) {
46
+ return this.put<ChangePasswordPayload, ChangePasswordResponse>(`/users/${id}/password`, {
47
+ password,
48
+ password_confirmation,
49
+ })
50
+ }
34
51
  }
35
52
 
36
53
  let api: AuthService
@@ -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
+ }
@@ -1,101 +1,101 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
-
3
- class MetricsService extends ApiService {
4
- public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
5
- return await this.get('repairs/pie/projects' + '?' + queryString)
6
- }
7
-
8
- public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
9
- return await this.get('repairs/pie/tasks' + '?' + queryString)
10
- }
11
-
12
- public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
13
- return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
14
- }
15
-
16
- public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
17
- return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
18
- }
19
-
20
- public async fetchPersonnelInfo(params: string): Promise<ResponseApi<any>> {
21
- return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
22
- }
23
-
24
- public async fetchPiePersonnelInfo(params: string): Promise<any> {
25
- return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
26
- }
27
-
28
- public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
29
- return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
30
- }
31
-
32
- public async fetchPieCriticalPathInfo(params: string): Promise<any> {
33
- return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
34
- }
35
-
36
- public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
37
- return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
38
- }
39
-
40
- public async fetchPieTmcInfo(params: string): Promise<any> {
41
- return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
42
- }
43
-
44
- public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
45
- return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
46
- }
47
-
48
- public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
49
- return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
50
- }
51
-
52
- public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
53
- return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
54
- }
55
-
56
- public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
57
- return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
58
- }
59
-
60
- public async fetchPersonnel(queryString: string): Promise<any[]> {
61
- return await this.get('repairs/statistic/personnel' + '?' + queryString)
62
- }
63
-
64
- public async fetchPieExpired(queryString: string): Promise<any[]> {
65
- return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
66
- }
67
-
68
- public async fetchPieExpiredInfo(params: string): Promise<any> {
69
- return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
70
- }
71
-
72
- public async fetchEconomicsPerformance(params: string): Promise<any> {
73
- return await this.get(`repairs/metrics/get_economic_performance?${params}`)
74
- }
75
-
76
- public async fetchEconomicsInfo(params: string): Promise<any> {
77
- return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
78
- }
79
- public async fetchQualityMetrics(params: string): Promise<any> {
80
- return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
81
- }
82
-
83
- public async fetchQualityInfo(params: string): Promise<any> {
84
- return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
85
- }
86
-
87
- public async fetchPieWorkZone(queryString: string): Promise<ResponseApi<any>> {
88
- return await this.get('repairs/metrics/get_list_work_zone_instrument' + '?' + queryString)
89
- }
90
-
91
- public async fetchWorkZoneInfo(queryString: string): Promise<ResponseApi<any>> {
92
- return await this.get('repairs/metrics/get_list_work_zone_instrument_by_status' + '?' + queryString)
93
- }
94
- }
95
-
96
- let api: MetricsService
97
-
98
- export default function useMetricsService() {
99
- if (!api) api = new MetricsService()
100
- return api
101
- }
1
+ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
+
3
+ class MetricsService extends ApiService {
4
+ public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
5
+ return await this.get('repairs/pie/projects' + '?' + queryString)
6
+ }
7
+
8
+ public async fetchPieTasks(queryString: string): Promise<ResponseApi<any>> {
9
+ return await this.get('repairs/pie/tasks' + '?' + queryString)
10
+ }
11
+
12
+ public async fetchPiePersonnel(queryString: string): Promise<ResponseApi<any>> {
13
+ return await this.get('repairs/metrics/get_list_position' + '?' + queryString)
14
+ }
15
+
16
+ public async fetchPersonnelData(queryString: string): Promise<ResponseApi<any>> {
17
+ return await this.get('repairs/metrics/list_position_intersection_group_by_status' + '?' + queryString)
18
+ }
19
+
20
+ public async fetchPersonnelInfo(params: string): Promise<ResponseApi<any>> {
21
+ return await this.get(`repairs/metrics/list_position_intersection_details?${params}`)
22
+ }
23
+
24
+ public async fetchPiePersonnelInfo(params: string): Promise<any> {
25
+ return await this.get(`repairs/metrics/get_list_user_by_position?${params}`)
26
+ }
27
+
28
+ public async fetchPieCriticalPath(queryString: string): Promise<any[]> {
29
+ return await this.get('repairs/metrics/get_critical_path_group_by_status' + '?' + queryString)
30
+ }
31
+
32
+ public async fetchPieCriticalPathInfo(params: string): Promise<any> {
33
+ return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${params}`)
34
+ }
35
+
36
+ public async fetchPieTmc(queryString: string): Promise<ResponseApi<any>> {
37
+ return await this.get('repairs/metrics/get_list_instrument_type' + '?' + queryString)
38
+ }
39
+
40
+ public async fetchPieTmcInfo(params: string): Promise<any> {
41
+ return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${params}`)
42
+ }
43
+
44
+ public async fetchPieUntimelyClosedTask(queryString: string): Promise<any[]> {
45
+ return await this.get('repairs/metrics/get_list_comment_type' + '?' + queryString)
46
+ }
47
+
48
+ public async fetchPieUntimelyClosedTaskInfo(params: string): Promise<any> {
49
+ return await this.get(`repairs/metrics/get_list_task_by_comment_type?${params}`)
50
+ }
51
+
52
+ public async fetchPieAdditionalTasks(queryString: string): Promise<any[]> {
53
+ return await this.get('repairs/metrics/get_list_task_after_plan_fixate_group_by_status' + '?' + queryString)
54
+ }
55
+
56
+ public async fetchPieAdditionalTasksInfo(params: string): Promise<any> {
57
+ return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${params}`)
58
+ }
59
+
60
+ public async fetchPersonnel(queryString: string): Promise<any[]> {
61
+ return await this.get('repairs/statistic/personnel' + '?' + queryString)
62
+ }
63
+
64
+ public async fetchPieExpired(queryString: string): Promise<any[]> {
65
+ return await this.get('repairs/metrics/get_list_task_expired_group_by_status' + '?' + queryString)
66
+ }
67
+
68
+ public async fetchPieExpiredInfo(params: string): Promise<any> {
69
+ return await this.get(`repairs/metrics/get_list_task_expired?${params}`)
70
+ }
71
+
72
+ public async fetchEconomicsPerformance(params: string): Promise<any> {
73
+ return await this.get(`repairs/metrics/get_economic_performance?${params}`)
74
+ }
75
+
76
+ public async fetchEconomicsInfo(params: string): Promise<any> {
77
+ return await this.get(`repairs/metrics/get_list_task_economic_performance?${params}`)
78
+ }
79
+ public async fetchQualityMetrics(params: string): Promise<any> {
80
+ return await this.get(`repairs/metrics/get_quality_metrics?${params}`)
81
+ }
82
+
83
+ public async fetchQualityInfo(params: string): Promise<any> {
84
+ return await this.get(`repairs/metrics/get_list_task_by_quality?${params}`)
85
+ }
86
+
87
+ public async fetchPieWorkZone(queryString: string): Promise<ResponseApi<any>> {
88
+ return await this.get('repairs/metrics/get_list_work_zone_instrument' + '?' + queryString)
89
+ }
90
+
91
+ public async fetchWorkZoneInfo(queryString: string): Promise<ResponseApi<any>> {
92
+ return await this.get('repairs/metrics/get_list_work_zone_instrument_by_status' + '?' + queryString)
93
+ }
94
+ }
95
+
96
+ let api: MetricsService
97
+
98
+ export default function useMetricsService() {
99
+ if (!api) api = new MetricsService()
100
+ return api
101
+ }
@@ -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
+ }