shared-ritm 1.2.65 → 1.2.67

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 (33) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +1381 -1371
  3. package/dist/shared-ritm.umd.js +7 -7
  4. package/dist/types/api/services/ControlsService.d.ts +2 -1
  5. package/dist/types/api/services/FileService.d.ts +2 -1
  6. package/dist/types/api/services/MetricsService.d.ts +2 -1
  7. package/dist/types/api/services/ProjectsService.d.ts +2 -1
  8. package/dist/types/api/services/RepairsService.d.ts +2 -1
  9. package/dist/types/api/services/SearchService.d.ts +8 -0
  10. package/dist/types/api/services/TasksService.d.ts +2 -1
  11. package/dist/types/api/settings/ApiService.d.ts +0 -8
  12. package/dist/types/api/types/Api_Search.d.ts +43 -0
  13. package/dist/types/api/types/Api_Service.d.ts +9 -0
  14. package/dist/types/api/types/Api_Users.d.ts +43 -0
  15. package/dist/types/index.d.ts +5 -2
  16. package/package.json +1 -1
  17. package/src/api/services/ControlsService.ts +65 -64
  18. package/src/api/services/FileService.ts +2 -1
  19. package/src/api/services/GanttService.ts +17 -17
  20. package/src/api/services/InstrumentsService.ts +22 -22
  21. package/src/api/services/MetricsService.ts +110 -109
  22. package/src/api/services/ProjectsService.ts +68 -67
  23. package/src/api/services/RepairsService.ts +101 -100
  24. package/src/api/services/SearchService.ts +16 -0
  25. package/src/api/services/TasksService.ts +2 -1
  26. package/src/api/services/VideoService.ts +14 -14
  27. package/src/api/settings/ApiService.ts +0 -9
  28. package/src/api/types/Api_Controls.ts +72 -72
  29. package/src/api/types/Api_Search.ts +48 -0
  30. package/src/api/types/Api_Service.ts +9 -0
  31. package/src/common/app-input/AppInput.vue +148 -148
  32. package/src/index.ts +93 -89
  33. package/src/main.ts +28 -28
@@ -1,5 +1,6 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
2
  import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '@/api/types/Api_Controls';
3
+ import { ResponseApi } from '@/api/types/Api_Service';
3
4
  declare class ControlsService extends ApiService {
4
5
  fetchControlZones(params: Record<string, any>): Promise<ResponseApi<Api_ControlZones_Dto[]>>;
5
6
  fetchControlZone(id: string): Promise<ResponseApi<Api_ControlZones_Dto>>;
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
2
3
  import { Api_Files_Responsible_Dto } from '@/api/types/Api_Files';
3
4
  declare class FileService extends ApiService {
4
5
  uploadFile(data: FormData): Promise<ResponseApi<Api_Files_Responsible_Dto>>;
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
2
3
  declare class MetricsService extends ApiService {
3
4
  fetchPieProjects(queryString: string): Promise<ResponseApi<any>>;
4
5
  fetchPieTasks(queryString: string): Promise<ResponseApi<any>>;
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
2
3
  import { Api_Project_Dto } from '@/api/types/Api_Projects';
3
4
  declare class ProjectsService extends ApiService {
4
5
  fetchProjectById(id: string): Promise<ResponseApi<Api_Project_Dto>>;
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
2
3
  import { Api_Create_Repair_With_Equipments, Api_Equipment_Full_Dto, Api_Repair_Dto, Api_Update_Repair, OptionFilters } from '@/api/types/Api_Repairs';
3
4
  declare class RepairsService extends ApiService {
4
5
  fetchFilters(fullParams: string): Promise<OptionFilters>;
@@ -0,0 +1,8 @@
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
3
+ import { Api_Search_User } from '@/api/types/Api_Search';
4
+ declare class SearchService extends ApiService {
5
+ fetchSearchUsers(params: any): Promise<ResponseApi<Api_Search_User>>;
6
+ }
7
+ export default function useSearchService(): SearchService;
8
+ export {};
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService';
1
+ import ApiService from '@/api/settings/ApiService';
2
+ import { ResponseApi } from '@/api/types/Api_Service';
2
3
  import { Api_Task_Close_Reason, Api_Task_Instrument_Dto, Api_Task_Instrument_From_Warehouse, Api_Task_Module_Instrument_Condition, Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
3
4
  import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '@/api/types/Api_Repairs';
4
5
  declare class TasksService extends ApiService {
@@ -2,14 +2,6 @@ import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  export declare enum ApiServiceType {
3
3
  SERVICE_AUTH = "SERVICE_AUTH"
4
4
  }
5
- export type ResponseApi<T> = {
6
- count: number;
7
- current_page: number;
8
- data: T;
9
- per_page: number;
10
- total: number;
11
- total_pages: number;
12
- };
13
5
  export default class ApiService {
14
6
  private axiosInstance;
15
7
  constructor();
@@ -0,0 +1,43 @@
1
+ export type Api_Search_User_Passes = {
2
+ id: string;
3
+ type: string;
4
+ uuid: string;
5
+ };
6
+ export type Api_Search_User_Positions = {
7
+ id: string;
8
+ name: string;
9
+ display_name: string;
10
+ description: string;
11
+ };
12
+ export type Api_Search_User_Roles = {
13
+ id: string;
14
+ name: string;
15
+ display_name: string;
16
+ };
17
+ export type Api_Search_User_Teams = {
18
+ id: string;
19
+ name: string;
20
+ display_name: string;
21
+ roles: Api_Search_User_Roles[];
22
+ };
23
+ export type Api_Search_User_Photos = {
24
+ id: string;
25
+ name: string;
26
+ path: string;
27
+ type: string;
28
+ };
29
+ export type Api_Search_User = {
30
+ id: string;
31
+ full_name: string;
32
+ last_name: string;
33
+ first_name: string;
34
+ patronymic: string;
35
+ email: string;
36
+ phone: string;
37
+ divisions: string;
38
+ personnel_number: string;
39
+ passes: Api_Search_User_Passes[];
40
+ positions: Api_Search_User_Positions[];
41
+ teams: Api_Search_User_Teams[];
42
+ photos: Api_Search_User_Photos[];
43
+ };
@@ -0,0 +1,9 @@
1
+ export type ResponseApi<T> = {
2
+ count: number;
3
+ current_page: number;
4
+ data: T;
5
+ per_page: number;
6
+ total: number;
7
+ total_pages: number;
8
+ filter_value?: string;
9
+ };
@@ -0,0 +1,43 @@
1
+ export type Api_Search_User_Passes = {
2
+ id: string;
3
+ type: string;
4
+ uuid: string;
5
+ };
6
+ export type Api_Search_User_Positions = {
7
+ id: string;
8
+ name: string;
9
+ display_name: string;
10
+ description: string;
11
+ };
12
+ export type Api_Search_User_Roles = {
13
+ id: string;
14
+ name: string;
15
+ display_name: string;
16
+ };
17
+ export type Api_Search_User_Teams = {
18
+ id: string;
19
+ name: string;
20
+ display_name: string;
21
+ roles: Api_Search_User_Roles[];
22
+ };
23
+ export type Api_Search_User_Photos = {
24
+ id: string;
25
+ name: string;
26
+ path: string;
27
+ type: string;
28
+ };
29
+ export type Api_Search_User = {
30
+ id: string;
31
+ full_name: string;
32
+ last_name: string;
33
+ first_name: string;
34
+ patronymic: string;
35
+ email: string;
36
+ phone: string;
37
+ divisions: string;
38
+ personnel_number: string;
39
+ passes: Api_Search_User_Passes[];
40
+ positions: Api_Search_User_Positions[];
41
+ teams: Api_Search_User_Teams[];
42
+ photos: Api_Search_User_Photos[];
43
+ };
@@ -21,6 +21,7 @@ import AppTableModal from '@/common/app-table/components/TableModal.vue';
21
21
  import AppTable from '@/common/app-table/AppTable.vue';
22
22
  import AppTableLayout from '@/common/app-table/AppTableLayout.vue';
23
23
  import AppModalSelect from '@/common/app-table/components/ModalSelect.vue';
24
+ import ApiService from '@/api/settings/ApiService';
24
25
  import useGanttService from '@/api/services/GanttService';
25
26
  import useMetricsService from '@/api/services/MetricsService';
26
27
  import useProjectsService from '@/api/services/ProjectsService';
@@ -30,18 +31,20 @@ import useAuthService from '@/api/services/AuthService';
30
31
  import useFileService from '@/api/services/FileService';
31
32
  import useVideoService from '@/api/services/VideoService';
32
33
  import useInstrumentsService from '@/api/services/InstrumentsService';
33
- import ApiService from '@/api/settings/ApiService';
34
34
  import useControlsService from '@/api/services/ControlsService';
35
+ import useSearchService from '@/api/services/SearchService';
35
36
  export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
36
- export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useInstrumentsService, };
37
+ export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useInstrumentsService, useSearchService, };
37
38
  export { useBaseTable } from './common/app-table/controllers/useBaseTable';
38
39
  export { useTableModel } from './common/app-table/controllers/useTableModel';
39
40
  export { useColumnSelector } from './common/app-table/controllers/useColumnSelector';
40
41
  export type { FilterOption, TableModel, TableColumn } from './common/app-table/controllers/useTableModel';
41
42
  export type { NotificationType } from './utils/notification';
42
43
  export { notificationSettings } from './utils/notification';
44
+ export * from './api/types/Api_Service';
43
45
  export * from './api/types/Api_Tasks';
44
46
  export * from './api/types/Api_Repairs';
45
47
  export * from './api/types/Api_Projects';
46
48
  export * from './api/types/Api_Controls';
47
49
  export * from './api/types/Api_Instruments';
50
+ export * from './api/types/Api_Search';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.65",
3
+ "version": "1.2.67",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,64 +1,65 @@
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 from '@/api/settings/ApiService'
2
+
3
+ import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '@/api/types/Api_Controls'
4
+ import { ResponseApi } from '@/api/types/Api_Service'
5
+
6
+ class ControlsService extends ApiService {
7
+ public fetchControlZones(params: Record<string, any>): Promise<ResponseApi<Api_ControlZones_Dto[]>> {
8
+ return this.get('/frame/list', { params })
9
+ }
10
+
11
+ public async fetchControlZone(id: string): Promise<ResponseApi<Api_ControlZones_Dto>> {
12
+ return this.get(`/frame/${id}`)
13
+ }
14
+
15
+ public createControlZone(params: any): Promise<ResponseApi<any>> {
16
+ return this.post<any, ResponseApi<any>>('/frame', params)
17
+ }
18
+
19
+ public editControlZone(id: string, params: any): Promise<ResponseApi<any>> {
20
+ return this.put<any, ResponseApi<any>>(`/frame/${id}`, params)
21
+ }
22
+
23
+ public deleteControlZone(id: string): Promise<any> {
24
+ return this.delete<ResponseApi<any>>(`/frame/${id}`)
25
+ }
26
+
27
+ public fetchControlLogs(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
28
+ return this.get('/exposed_equipment_zones/list', { params })
29
+ }
30
+
31
+ public fetchControllers(params: Record<string, any>): Promise<ResponseApi<Api_ControlLogs_Dto[]>> {
32
+ return this.get('/frame/controllers/list', { params })
33
+ }
34
+
35
+ public fetchUsersWithPasses(): Promise<any> {
36
+ return this.get('inspector/users-with-passes')
37
+ }
38
+
39
+ public fetchWarehousesList(): Promise<any> {
40
+ return this.get('tasks/warehouse/list?only_outside_exposed_equipment_zone=1')
41
+ }
42
+
43
+ public manualEntry(params: any): Promise<ResponseApi<any>> {
44
+ return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/enter', params)
45
+ }
46
+
47
+ public manualExit(params: any): Promise<ResponseApi<any>> {
48
+ return this.post<any, ResponseApi<any>>('exposed_equipment_zones/hand/exit', params)
49
+ }
50
+
51
+ public deleteControlLogs(params: any): Promise<any> {
52
+ return this.delete<ResponseApi<any>>(`exposed_equipment_zones`, params)
53
+ }
54
+
55
+ public fetchInstrumentTypeList(params: any): Promise<any> {
56
+ return this.get<ResponseApi<any>>(`search/instrument_types`, { params })
57
+ }
58
+ }
59
+
60
+ let api: ControlsService
61
+
62
+ export default function useControlsService() {
63
+ if (!api) api = new ControlsService()
64
+ return api
65
+ }
@@ -1,4 +1,5 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
1
+ import ApiService from '@/api/settings/ApiService'
2
+ import { ResponseApi } from '@/api/types/Api_Service'
2
3
  import { Api_Files_Responsible_Dto } from '@/api/types/Api_Files'
3
4
 
4
5
  class FileService extends ApiService {
@@ -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,22 +1,22 @@
1
- import ApiService from '@/api/settings/ApiService'
2
- import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments'
3
-
4
- class InstrumentsService extends ApiService {
5
- public async fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse> {
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
- }
1
+ import ApiService from '@/api/settings/ApiService'
2
+ import { Api_instruments_HistoryResponse } from '@/api/types/Api_Instruments'
3
+
4
+ class InstrumentsService extends ApiService {
5
+ public async fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse> {
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
+ }