shared-ritm 1.2.82 → 1.2.83
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.
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +3066 -3050
- package/dist/shared-ritm.umd.js +269 -269
- package/dist/types/api/services/AuthService.d.ts +1 -1
- package/dist/types/api/services/ComentsServise.d.ts +10 -0
- package/dist/types/api/services/CommentsService.d.ts +10 -0
- package/dist/types/api/services/ControlsService.d.ts +3 -3
- package/dist/types/api/services/FileService.d.ts +3 -4
- package/dist/types/api/services/GanttService.d.ts +1 -1
- package/dist/types/api/services/InstrumentsService.d.ts +2 -2
- package/dist/types/api/services/MetricsService.d.ts +2 -2
- package/dist/types/api/services/PhotoService.d.ts +51 -38
- package/dist/types/api/services/ProjectsService.d.ts +7 -7
- package/dist/types/api/services/RepairsService.d.ts +3 -3
- package/dist/types/api/services/SearchService.d.ts +4 -4
- package/dist/types/api/services/TasksService.d.ts +25 -34
- package/dist/types/api/services/UserService.d.ts +3 -3
- package/dist/types/api/services/VideoService.d.ts +2 -1
- package/dist/types/api/types/Api_Comment.d.ts +37 -0
- package/dist/types/api/types/Api_Files.d.ts +7 -1
- package/dist/types/api/types/Api_Instruments.d.ts +1 -1
- package/dist/types/api/types/Api_Tasks.d.ts +133 -18
- package/dist/types/api/types/Api_Users.d.ts +43 -0
- package/dist/types/index.d.ts +43 -40
- package/dist/types/utils/faceApiHelper.d.ts +40 -0
- package/package.json +1 -1
- package/src/api/services/AuthService.ts +1 -1
- package/src/api/services/CommentsService.ts +24 -0
- package/src/api/services/ControlsService.ts +3 -3
- package/src/api/services/FileService.ts +6 -5
- package/src/api/services/GanttService.ts +1 -1
- package/src/api/services/InstrumentsService.ts +2 -2
- package/src/api/services/MetricsService.ts +2 -2
- package/src/api/services/ProjectsService.ts +10 -10
- package/src/api/services/RepairsService.ts +3 -3
- package/src/api/services/SearchService.ts +5 -5
- package/src/api/services/TasksService.ts +72 -65
- package/src/api/services/UserService.ts +3 -3
- package/src/api/services/VideoService.ts +4 -1
- package/src/api/types/Api_Comment.ts +40 -0
- package/src/api/types/Api_Files.ts +7 -1
- package/src/api/types/Api_Instruments.ts +1 -1
- package/src/api/types/Api_Tasks.ts +144 -18
- package/src/common/app-dialogs/AppConfirmDialog.vue +1 -1
- package/src/index.ts +48 -41
- package/src/shared/styles/general.css +0 -1
- package/src/styles/variables.sass +12 -12
- package/src/{api/services/PhotoService.ts → utils/faceApiHelper.ts} +5 -5
- package/src/utils/helpers.ts +1 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import AppButton from '
|
|
3
|
-
import AppCheckbox from '
|
|
4
|
-
import AppDatePicker from '
|
|
5
|
-
import AppDatepicker from '
|
|
6
|
-
import AppInput from '
|
|
7
|
-
import AppInputNew from '
|
|
8
|
-
import AppInputSearch from '
|
|
9
|
-
import AppLayout from '
|
|
10
|
-
import AppLayoutHeader from '
|
|
11
|
-
import AppLayoutPage from '
|
|
12
|
-
import AppLoader from '
|
|
13
|
-
import AppSelect from '
|
|
14
|
-
import AppSheet from '
|
|
1
|
+
import './shared/styles/general.css';
|
|
2
|
+
import AppButton from './common/app-button/AppButton.vue';
|
|
3
|
+
import AppCheckbox from './common/app-checkbox/AppCheckbox.vue';
|
|
4
|
+
import AppDatePicker from './common/app-date-picker/AppDatePicker.vue';
|
|
5
|
+
import AppDatepicker from './common/app-datepicker/AppDatepicker.vue';
|
|
6
|
+
import AppInput from './common/app-input/AppInput.vue';
|
|
7
|
+
import AppInputNew from './common/app-input-new/AppInputNew.vue';
|
|
8
|
+
import AppInputSearch from './common/app-input-search/AppInputSearch.vue';
|
|
9
|
+
import AppLayout from './common/app-layout/AppLayout.vue';
|
|
10
|
+
import AppLayoutHeader from './common/app-layout/components/AppLayoutHeader.vue';
|
|
11
|
+
import AppLayoutPage from './common/app-layout/components/AppLayoutPage.vue';
|
|
12
|
+
import AppLoader from './common/app-loader/index.vue';
|
|
13
|
+
import AppSelect from './common/app-select/AppSelect.vue';
|
|
14
|
+
import AppSheet from './common/app-sheet/AppSheet.vue';
|
|
15
15
|
import AppSheetNew from '@/common/app-sheet-new/AppSheetNew.vue';
|
|
16
|
-
import AppSidebar from '
|
|
17
|
-
import AppToggle from '
|
|
18
|
-
import AppWrapper from '
|
|
19
|
-
import AppConfirmDialog from '
|
|
20
|
-
import AppDropdown from '
|
|
21
|
-
import AppTablePagination from '
|
|
22
|
-
import AppTableSearch from '
|
|
23
|
-
import AppTableModal from '
|
|
24
|
-
import AppTable from '
|
|
25
|
-
import AppTableLayout from '
|
|
26
|
-
import AppModalSelect from '
|
|
27
|
-
import ApiService from '
|
|
28
|
-
import useGanttService from '
|
|
29
|
-
import useMetricsService from '
|
|
30
|
-
import useProjectsService from '
|
|
31
|
-
import useRepairsService from '
|
|
32
|
-
import useTasksService from '
|
|
33
|
-
import useAuthService from '
|
|
34
|
-
import useFileService from '
|
|
35
|
-
import useVideoService from '
|
|
36
|
-
import useUserService from '
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
16
|
+
import AppSidebar from './common/app-sidebar/AppSidebar.vue';
|
|
17
|
+
import AppToggle from './common/app-toggle/AppToggle.vue';
|
|
18
|
+
import AppWrapper from './common/app-wrapper/AppWrapper.vue';
|
|
19
|
+
import AppConfirmDialog from './common/app-dialogs/AppConfirmDialog.vue';
|
|
20
|
+
import AppDropdown from './common/app-dropdown/AppDropdown.vue';
|
|
21
|
+
import AppTablePagination from './common/app-table/components/TablePagination.vue';
|
|
22
|
+
import AppTableSearch from './common/app-table/components/TableSearch.vue';
|
|
23
|
+
import AppTableModal from './common/app-table/components/TableModal.vue';
|
|
24
|
+
import AppTable from './common/app-table/AppTable.vue';
|
|
25
|
+
import AppTableLayout from './common/app-table/AppTableLayout.vue';
|
|
26
|
+
import AppModalSelect from './common/app-table/components/ModalSelect.vue';
|
|
27
|
+
import ApiService from './api/settings/ApiService';
|
|
28
|
+
import useGanttService from './api/services/GanttService';
|
|
29
|
+
import useMetricsService from './api/services/MetricsService';
|
|
30
|
+
import useProjectsService from './api/services/ProjectsService';
|
|
31
|
+
import useRepairsService from './api/services/RepairsService';
|
|
32
|
+
import useTasksService from './api/services/TasksService';
|
|
33
|
+
import useAuthService from './api/services/AuthService';
|
|
34
|
+
import useFileService from './api/services/FileService';
|
|
35
|
+
import useVideoService from './api/services/VideoService';
|
|
36
|
+
import useUserService from './api/services/UserService';
|
|
37
|
+
import useInstrumentsService from './api/services/InstrumentsService';
|
|
38
|
+
import useControlsService from './api/services/ControlsService';
|
|
39
|
+
import useSearchService from './api/services/SearchService';
|
|
40
|
+
import useCommentsService from './api/services/CommentsService';
|
|
41
|
+
import useFaceApiHelper from './utils/faceApiHelper';
|
|
41
42
|
export { AppButton, AppCheckbox, AppDatepicker, AppDatePicker, AppInput, AppInputNew, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSheetNew, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
|
|
42
|
-
export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService,
|
|
43
|
+
export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, useInstrumentsService, useSearchService, useCommentsService, useFaceApiHelper, };
|
|
43
44
|
export { useBaseTable } from './common/app-table/controllers/useBaseTable';
|
|
44
45
|
export { useTableModel } from './common/app-table/controllers/useTableModel';
|
|
45
46
|
export { useColumnSelector } from './common/app-table/controllers/useColumnSelector';
|
|
@@ -55,3 +56,5 @@ export * from './api/types/Api_Controls';
|
|
|
55
56
|
export * from './api/types/Api_Instruments';
|
|
56
57
|
export * from './api/types/Api_Search';
|
|
57
58
|
export * from './api/types/Api_User';
|
|
59
|
+
export * from './api/types/Api_Comment';
|
|
60
|
+
export * from './api/types/Api_Files';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as faceapi from 'face-api.js';
|
|
2
|
+
declare class FaceApiHelper {
|
|
3
|
+
getVideoStreamConfig(width: number, height: number): {
|
|
4
|
+
audio: boolean;
|
|
5
|
+
video: {
|
|
6
|
+
width: {
|
|
7
|
+
min: number;
|
|
8
|
+
ideal: number;
|
|
9
|
+
};
|
|
10
|
+
height: {
|
|
11
|
+
min: number;
|
|
12
|
+
ideal: number;
|
|
13
|
+
};
|
|
14
|
+
facingMode: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
getContourCoordinate(width: number, height: number): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
getBoxData(box: any): {
|
|
24
|
+
x: any;
|
|
25
|
+
y: any;
|
|
26
|
+
width: any;
|
|
27
|
+
height: any;
|
|
28
|
+
} | null;
|
|
29
|
+
setStylesForCanvas(canvasContainer: any): void;
|
|
30
|
+
checkFaceInclusion(frame: any, face: any): boolean;
|
|
31
|
+
getFaceDetections(videoRef: any): Promise<faceapi.WithFaceExpressions<faceapi.WithFaceLandmarks<{
|
|
32
|
+
detection: faceapi.FaceDetection;
|
|
33
|
+
}, faceapi.FaceLandmarks68>>[]>;
|
|
34
|
+
getCanvas(videoRef: any): HTMLCanvasElement;
|
|
35
|
+
getResizedAndDetection(canvas: any, detections: any, ctx: any, videoWidth: number, videoHeight: number): void;
|
|
36
|
+
getFaceSnapshot(inputImage: any, box: any): Promise<string | null>;
|
|
37
|
+
initModels(): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export default function useFaceApiHelper(): FaceApiHelper;
|
|
40
|
+
export {};
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { Api_Comment_Request_Dto, Api_Comment_Update_Dto } from '../types/Api_Comment'
|
|
3
|
+
import { Api_Tasks_Task_Dto } from '../types/Api_Tasks'
|
|
4
|
+
|
|
5
|
+
class CommentsService extends ApiService {
|
|
6
|
+
public async uploadComment(payload: Api_Comment_Request_Dto): Promise<Api_Tasks_Task_Dto> {
|
|
7
|
+
return await this.post<Api_Comment_Request_Dto, Api_Tasks_Task_Dto>('comments', payload)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async deleteComment(commentId: string): Promise<any> {
|
|
11
|
+
return await this.delete(`comments/${commentId}`)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async editComment(commentId: string, payload: Api_Comment_Request_Dto): Promise<Api_Comment_Update_Dto> {
|
|
15
|
+
return await this.put(`comments/${commentId}`, payload)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let api: CommentsService
|
|
20
|
+
|
|
21
|
+
export default function useCommentsService() {
|
|
22
|
+
if (!api) api = new CommentsService()
|
|
23
|
+
return api
|
|
24
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ApiService from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
2
|
|
|
3
|
-
import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '
|
|
4
|
-
import { ResponseApi } from '
|
|
3
|
+
import { Api_ControlLogs_Dto, Api_ControlZones_Dto } from '../types/Api_Controls'
|
|
4
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
5
5
|
|
|
6
6
|
class ControlsService extends ApiService {
|
|
7
7
|
public fetchControlZones(params: Record<string, any>): Promise<ResponseApi<Api_ControlZones_Dto[]>> {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import {
|
|
3
|
-
import { Api_Files_Responsible_Dto } from '@/api/types/Api_Files'
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { Api_Files_Responsible_Dto } from '../types/Api_Files'
|
|
4
3
|
|
|
5
4
|
class FileService extends ApiService {
|
|
6
|
-
public uploadFile(data: FormData): Promise<
|
|
7
|
-
return this.post<FormData,
|
|
5
|
+
public uploadFile(data: FormData): Promise<Api_Files_Responsible_Dto[]> {
|
|
6
|
+
return this.post<FormData, Api_Files_Responsible_Dto[]>(`/upload-file`, data, {
|
|
7
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
8
|
+
})
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { Api_instruments_HistoryResponse } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { Api_instruments_HistoryResponse } from '../types/Api_Instruments'
|
|
3
3
|
|
|
4
4
|
class InstrumentsService extends ApiService {
|
|
5
5
|
public async fetchUserInstrumentsHistory(id: string, page: number): Promise<Api_instruments_HistoryResponse> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { ResponseApi } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
3
3
|
|
|
4
4
|
class MetricsService extends ApiService {
|
|
5
5
|
public async fetchPieProjects(queryString: string): Promise<ResponseApi<any>> {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import ApiService from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
2
|
|
|
3
|
-
import { ResponseApi } from '
|
|
4
|
-
import { Api_Project_Dto } from '
|
|
3
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
4
|
+
import { Api_Project_Dto } from '../types/Api_Projects'
|
|
5
5
|
|
|
6
6
|
class ProjectsService extends ApiService {
|
|
7
|
-
public async fetchProjectById(id: string): Promise<
|
|
7
|
+
public async fetchProjectById(id: string): Promise<Api_Project_Dto> {
|
|
8
8
|
return this.get(`/projects/${id}`)
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
public createProject(params: any): Promise<
|
|
12
|
-
return this.post<any,
|
|
11
|
+
public createProject(params: any): Promise<Api_Project_Dto> {
|
|
12
|
+
return this.post<any, Api_Project_Dto>('/projects', params)
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
public editProject(id: string, params: any): Promise<
|
|
16
|
-
return this.put<any,
|
|
15
|
+
public editProject(id: string, params: any): Promise<Api_Project_Dto> {
|
|
16
|
+
return this.put<any, Api_Project_Dto>(`/projects/${id}`, params)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
|
|
20
20
|
return this.get(`/search/projects`, { params })
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
public cloneProject(project:
|
|
24
|
-
return this.post<
|
|
23
|
+
public cloneProject(project: Api_Project_Dto): Promise<Api_Project_Dto> {
|
|
24
|
+
return this.post<Api_Project_Dto, Api_Project_Dto>(`projects/${project.id}/clone`, project)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { ResponseApi } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
3
3
|
import {
|
|
4
4
|
Api_Create_Repair_With_Equipments,
|
|
5
5
|
Api_Create_Repair_With_Template,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Api_Repair_Template,
|
|
9
9
|
Api_Update_Repair,
|
|
10
10
|
OptionFilters,
|
|
11
|
-
} from '
|
|
11
|
+
} from '../types/Api_Repairs'
|
|
12
12
|
|
|
13
13
|
class RepairsService extends ApiService {
|
|
14
14
|
public fetchFilters(fullParams: string): Promise<OptionFilters> {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { ResponseApi } from '
|
|
3
|
-
import { Api_Search_User } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
3
|
+
import { Api_Search_User } from '../types/Api_Search'
|
|
4
4
|
|
|
5
5
|
class SearchService extends ApiService {
|
|
6
|
-
public fetchSearchUsers(params: any): Promise<ResponseApi<Api_Search_User>> {
|
|
7
|
-
return this.get('search/users', { params })
|
|
6
|
+
public fetchSearchUsers(params: any): Promise<ResponseApi<Api_Search_User[]>> {
|
|
7
|
+
return this.get<ResponseApi<Api_Search_User[]>>('search/users', { params })
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,132 +1,139 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { ResponseApi } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
3
3
|
import {
|
|
4
4
|
Api_Task_Close_Reason,
|
|
5
5
|
Api_Task_Instrument_Dto,
|
|
6
6
|
Api_Task_Instrument_From_Warehouse,
|
|
7
7
|
Api_Task_Module_Instrument_Condition,
|
|
8
|
-
|
|
8
|
+
Api_Task_Dto,
|
|
9
9
|
Api_Tasks_Task_Dto,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Api_Task_ChangeStatusVerification_Dto,
|
|
11
|
+
Api_QualityMetric_Request_Dto,
|
|
12
|
+
Api_Tasks_Task_Edit_Request_Dto,
|
|
13
|
+
Api_Tasks_ReplaceInstrument_Request_Dto,
|
|
14
|
+
Api_Tasks_AllPersonalUser_Dto,
|
|
15
|
+
Api_Tasks_InstrumentHistory_Item_Dto,
|
|
16
|
+
} from '../types/Api_Tasks'
|
|
17
|
+
import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '../types/Api_Repairs'
|
|
18
|
+
|
|
19
|
+
export type EquipmentData = {
|
|
20
|
+
id: string
|
|
21
|
+
model: unknown
|
|
22
|
+
name: string
|
|
23
|
+
registration_number: string
|
|
24
|
+
repair_frequency: unknown
|
|
25
|
+
repair_range: number
|
|
26
|
+
}
|
|
12
27
|
|
|
13
28
|
class TasksService extends ApiService {
|
|
14
|
-
public
|
|
15
|
-
return
|
|
29
|
+
public fetchTaskById(id: string): Promise<Api_Tasks_Task_Dto> {
|
|
30
|
+
return this.get<Api_Tasks_Task_Dto>(`/tasks/${id}`)
|
|
16
31
|
}
|
|
17
32
|
|
|
18
|
-
public
|
|
19
|
-
return
|
|
33
|
+
public fetchTasksList(params: any): Promise<ResponseApi<Api_Task_Dto[]>> {
|
|
34
|
+
return this.get<ResponseApi<Api_Task_Dto[]>>('/list/tasks/search', { params })
|
|
20
35
|
}
|
|
21
36
|
|
|
22
|
-
public
|
|
23
|
-
return
|
|
37
|
+
public fetchSubtasksList(id: string): Promise<Api_Task_Dto[]> {
|
|
38
|
+
return this.get<Api_Task_Dto[]>(`/task/${id}/subtasks/list`)
|
|
24
39
|
}
|
|
25
40
|
|
|
26
|
-
public
|
|
27
|
-
return
|
|
41
|
+
public fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
42
|
+
return this.get(`/get_list_task_branch?task_id=${id}`)
|
|
28
43
|
}
|
|
29
44
|
|
|
30
|
-
public
|
|
31
|
-
return
|
|
45
|
+
public fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
46
|
+
return this.get('admin/instruments', { params })
|
|
32
47
|
}
|
|
33
48
|
|
|
34
|
-
public
|
|
49
|
+
public fetchInstrumentTypeListWithPreparedWarehouse(params: {
|
|
35
50
|
page: number
|
|
36
51
|
per_page: number
|
|
37
52
|
'filterList[taskId]'?: string | undefined
|
|
38
53
|
search?: string
|
|
39
|
-
}): Promise<Api_Task_Instrument_From_Warehouse[]
|
|
40
|
-
return
|
|
54
|
+
}): Promise<ResponseApi<Api_Task_Instrument_From_Warehouse[]>> {
|
|
55
|
+
return this.get('/instrument_type/get_instrument_type_list_with_prepared_warehouse', { params })
|
|
41
56
|
}
|
|
42
57
|
|
|
43
|
-
public
|
|
44
|
-
return
|
|
58
|
+
public fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
|
|
59
|
+
return this.get<ResponseApi<Api_Task_Instrument_Dto[]>>('tasks/instrument/list', { params })
|
|
45
60
|
}
|
|
46
61
|
|
|
47
|
-
public
|
|
48
|
-
return
|
|
62
|
+
public fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
|
|
63
|
+
return this.get<ResponseApi<Api_Task_Module_Instrument_Condition>>(`tasks/${params.taskId}/fill/module`, {
|
|
64
|
+
params,
|
|
65
|
+
})
|
|
49
66
|
}
|
|
50
67
|
|
|
51
|
-
public
|
|
52
|
-
return
|
|
68
|
+
public replaceInstruments(payload: Api_Tasks_ReplaceInstrument_Request_Dto[]): Promise<ResponseApi<any[]>> {
|
|
69
|
+
return this.post<Api_Tasks_ReplaceInstrument_Request_Dto[], ResponseApi<any[]>>(
|
|
70
|
+
`/instruments/equivalent/attach`,
|
|
71
|
+
payload,
|
|
72
|
+
)
|
|
53
73
|
}
|
|
54
74
|
|
|
55
|
-
public
|
|
56
|
-
return
|
|
75
|
+
public fetchTaskUsagePersonal(task_id: string): Promise<Api_Tasks_AllPersonalUser_Dto> {
|
|
76
|
+
return this.get<Api_Tasks_AllPersonalUser_Dto>(`tasks/${task_id}/usage/users`)
|
|
57
77
|
}
|
|
58
78
|
|
|
59
|
-
public
|
|
60
|
-
return
|
|
79
|
+
public fetchTaskUsageInstrument(task_id: string): Promise<Api_Tasks_InstrumentHistory_Item_Dto[]> {
|
|
80
|
+
return this.get<Api_Tasks_InstrumentHistory_Item_Dto[]>(`tasks/${task_id}/usage/instruments`)
|
|
61
81
|
}
|
|
62
82
|
|
|
63
83
|
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
64
|
-
return this.get('repairs/equipment/list', { params })
|
|
84
|
+
return this.get<ResponseApi<Api_Equipment_Full_Dto[]>>('repairs/equipment/list', { params })
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
public fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>> {
|
|
68
|
-
return this.get('work_zone/get_list_video_source', { params })
|
|
88
|
+
return this.get<ResponseApi<Api_Task_Video_Source[]>>('work_zone/get_list_video_source', { params })
|
|
69
89
|
}
|
|
70
90
|
|
|
71
91
|
public fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>> {
|
|
72
|
-
return this.get('horizon/video-source', { params })
|
|
92
|
+
return this.get<ResponseApi<Api_Task_Video_Source_Stream[]>>('horizon/video-source', { params })
|
|
73
93
|
}
|
|
74
94
|
|
|
75
95
|
public createWorkZone(payload: any): Promise<unknown> {
|
|
76
96
|
return this.post('admin/work-zones', payload)
|
|
77
97
|
}
|
|
78
98
|
|
|
79
|
-
public
|
|
80
|
-
return
|
|
99
|
+
public createTask(payload: any): Promise<ResponseApi<any>> {
|
|
100
|
+
return this.post(`tasks`, payload)
|
|
81
101
|
}
|
|
82
102
|
|
|
83
|
-
public
|
|
84
|
-
return
|
|
103
|
+
public editTask(task_id: string, payload: Api_Tasks_Task_Edit_Request_Dto): Promise<Api_Tasks_Task_Dto> {
|
|
104
|
+
return this.put<Api_Tasks_Task_Edit_Request_Dto, Api_Tasks_Task_Dto>(`tasks/${task_id}`, payload)
|
|
85
105
|
}
|
|
86
106
|
|
|
87
|
-
public
|
|
88
|
-
return
|
|
107
|
+
public mergeTask(payload: { name: string; tasks_id: string[]; defect?: string }): Promise<ResponseApi<any>> {
|
|
108
|
+
return this.post(`tasks/merge`, payload)
|
|
89
109
|
}
|
|
90
110
|
|
|
91
|
-
public
|
|
92
|
-
return
|
|
111
|
+
public deleteTask(id: string): Promise<any> {
|
|
112
|
+
return this.delete(`tasks/${id}`)
|
|
93
113
|
}
|
|
94
114
|
|
|
95
|
-
public
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
public async uploadComment(payload: unknown): Promise<unknown> {
|
|
101
|
-
return await this.post('comments', payload)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public async deleteComment(commentId: string): Promise<unknown> {
|
|
105
|
-
return await this.delete(`comments/${commentId}`)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public async editComment(payload: { commentId: string; data: unknown }): Promise<unknown> {
|
|
109
|
-
const { commentId, data } = payload
|
|
110
|
-
return await this.put(`comments/${commentId}`, data)
|
|
115
|
+
public changeStatus(taskId: string, statusId: string): Promise<any> {
|
|
116
|
+
return this.put<{ status_id: string }, any>(`task/${taskId}/change-status`, {
|
|
117
|
+
status_id: statusId,
|
|
118
|
+
})
|
|
111
119
|
}
|
|
112
120
|
|
|
113
|
-
public
|
|
114
|
-
return
|
|
121
|
+
public saveMetrics(payload: Api_QualityMetric_Request_Dto[]): Promise<EquipmentData[]> {
|
|
122
|
+
return this.put<Api_QualityMetric_Request_Dto[], EquipmentData[]>('/update_quality_metrics', payload)
|
|
115
123
|
}
|
|
116
124
|
|
|
117
|
-
public
|
|
118
|
-
return
|
|
125
|
+
public checkReasonForStatus(task_id: string): Promise<Api_Task_Close_Reason> {
|
|
126
|
+
return this.post<{ task_id: string }, Api_Task_Close_Reason>('/tasks/check_reason_for_task', { task_id })
|
|
119
127
|
}
|
|
120
128
|
|
|
121
|
-
public
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
params: data,
|
|
129
|
+
public verifyTaskStatus(task_id: string, status_id: string): Promise<Api_Task_ChangeStatusVerification_Dto[]> {
|
|
130
|
+
return this.get<Api_Task_ChangeStatusVerification_Dto[]>(`/task/${task_id}/change-status/verification`, {
|
|
131
|
+
params: { status_id },
|
|
125
132
|
})
|
|
126
133
|
}
|
|
127
134
|
|
|
128
|
-
public
|
|
129
|
-
return
|
|
135
|
+
public checkBranchBeforeCloseTask(task_id: string): Promise<ResponseApi<boolean>> {
|
|
136
|
+
return this.post<{ task_id: string }, ResponseApi<boolean>>(`/check_branch_before_close_task`, { task_id })
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ApiService from '
|
|
2
|
-
import { Api_User, Api_User_Role } from '
|
|
3
|
-
import { ResponseApi } from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
|
+
import { Api_User, Api_User_Role } from '../types/Api_User'
|
|
3
|
+
import { ResponseApi } from '../types/Api_Service'
|
|
4
4
|
|
|
5
5
|
class UserService extends ApiService {
|
|
6
6
|
public async editUser({ id, model }: { id: string; model: any }): Promise<Api_User> {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import ApiService from '
|
|
1
|
+
import ApiService from '../settings/ApiService'
|
|
2
2
|
|
|
3
3
|
class VideoService extends ApiService {
|
|
4
4
|
public async startVideoAnalytics(): Promise<boolean> {
|
|
5
5
|
return await this.post('/statanly/start', null)
|
|
6
6
|
}
|
|
7
|
+
public reloadVideoAnalytics(ids: string[]): Promise<any> {
|
|
8
|
+
return this.post('/horizon/video-source/reload', { video_source_ids: ids })
|
|
9
|
+
}
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
let api: VideoService
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type FileRequest = {
|
|
2
|
+
name: string
|
|
3
|
+
type: string
|
|
4
|
+
path: string
|
|
5
|
+
extension: string
|
|
6
|
+
id: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type Api_Comment_Dto = {
|
|
10
|
+
created_at: string
|
|
11
|
+
files: FileRequest[]
|
|
12
|
+
first_name: string
|
|
13
|
+
for_status: boolean
|
|
14
|
+
full_name: string
|
|
15
|
+
id: string
|
|
16
|
+
last_name: string
|
|
17
|
+
text: string
|
|
18
|
+
user_id: string
|
|
19
|
+
user_name: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type Api_Comment_Request_Dto = {
|
|
23
|
+
for_status?: boolean
|
|
24
|
+
task_id?: string
|
|
25
|
+
text?: string
|
|
26
|
+
type_id?: string
|
|
27
|
+
files?: string[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Api_Comment_Update_Dto = {
|
|
31
|
+
created_at: string
|
|
32
|
+
files: FileRequest[]
|
|
33
|
+
for_status: false
|
|
34
|
+
id: string
|
|
35
|
+
text: string
|
|
36
|
+
type: string | null
|
|
37
|
+
type_id: string | null
|
|
38
|
+
updated_at: string
|
|
39
|
+
user_id: string
|
|
40
|
+
}
|