shared-ritm 1.2.118 → 1.2.120

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 (42) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared-ritm.es.js +1474 -1467
  3. package/dist/shared-ritm.umd.js +105 -105
  4. package/dist/types/api/services/AuthService.d.ts +0 -14
  5. package/dist/types/api/services/ComentsServise.d.ts +10 -0
  6. package/dist/types/api/services/PhotoService.d.ts +51 -38
  7. package/dist/types/api/services/ProjectsService.d.ts +3 -1
  8. package/dist/types/api/types/Api_Auth.d.ts +76 -0
  9. package/dist/types/api/types/Api_Projects.d.ts +4 -0
  10. package/dist/types/api/types/Api_Users.d.ts +43 -0
  11. package/dist/types/index.d.ts +1 -0
  12. package/package.json +64 -64
  13. package/src/api/services/AuthService.ts +11 -22
  14. package/src/api/services/BrigadesService.ts +32 -32
  15. package/src/api/services/EquipmentService.ts +29 -29
  16. package/src/api/services/InstrumentsService.ts +63 -63
  17. package/src/api/services/ModulesService.ts +27 -27
  18. package/src/api/services/ProjectsService.ts +8 -1
  19. package/src/api/services/SearchService.ts +22 -22
  20. package/src/api/services/UserService.ts +101 -101
  21. package/src/api/services/VideoService.ts +71 -71
  22. package/src/api/settings/ApiService.ts +124 -124
  23. package/src/api/types/Api_Auth.ts +86 -0
  24. package/src/api/types/Api_Brigades.ts +36 -36
  25. package/src/api/types/Api_Equipment.ts +3 -3
  26. package/src/api/types/Api_Instruments.ts +136 -136
  27. package/src/api/types/Api_Modules.ts +21 -21
  28. package/src/api/types/Api_Projects.ts +5 -0
  29. package/src/api/types/Api_Repairs.ts +117 -117
  30. package/src/api/types/Api_Search.ts +77 -77
  31. package/src/api/types/Api_User.ts +117 -117
  32. package/src/api/types/Api_Video.ts +140 -140
  33. package/src/common/app-input-new/AppInputNew.vue +175 -175
  34. package/src/common/app-layout/components/AppLayoutHeader.vue +23 -1
  35. package/src/common/app-sheet-new/AppSheetNew.vue +246 -246
  36. package/src/common/app-table/AppTable.vue +314 -314
  37. package/src/common/app-table/AppTableLayout.vue +137 -137
  38. package/src/common/app-table/components/ModalSelect.vue +270 -270
  39. package/src/common/app-table/components/TableModal.vue +356 -356
  40. package/src/common/app-table/controllers/useBaseTable.ts +45 -45
  41. package/src/index.ts +1 -0
  42. package/src/styles/variables.sass +12 -12
@@ -1,18 +1,4 @@
1
1
  import ApiService from '../settings/ApiService';
2
- export type LoginPayload = {
3
- email: string;
4
- password: string;
5
- };
6
- export type LoginResponse = {
7
- token: string;
8
- user: any;
9
- };
10
- export type ChangePasswordPayload = {
11
- password: string;
12
- password_confirmation: string;
13
- };
14
- export type ChangePasswordResponse = any;
15
- export type ConfigResponse = any;
16
2
  declare class AuthService extends ApiService {
17
3
  login(email: string, password: string): Promise<any>;
18
4
  loginPhoto(photo: any): Promise<any>;
@@ -0,0 +1,10 @@
1
+ import ApiService from '@/api/settings/ApiService'
2
+ import { Api_Comment_Request_Dto } from '@/api/types/Api_Comment'
3
+ import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
4
+ declare class CommentsService extends ApiService {
5
+ uploadComment(payload: Api_Comment_Request_Dto): Promise<Api_Tasks_Task_Dto>
6
+ deleteComment(commentId: string): Promise<unknown>
7
+ editComment(payload: { commentId: string; data: unknown }): Promise<unknown>
8
+ }
9
+ export default function useCommentsService(): CommentsService
10
+ export {}
@@ -1,40 +1,53 @@
1
- import * as faceapi from 'face-api.js';
1
+ import * as faceapi from 'face-api.js'
2
2
  declare class PhotoService {
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>;
3
+ getVideoStreamConfig(
4
+ width: number,
5
+ height: number,
6
+ ): {
7
+ audio: boolean
8
+ video: {
9
+ width: {
10
+ min: number
11
+ ideal: number
12
+ }
13
+ height: {
14
+ min: number
15
+ ideal: number
16
+ }
17
+ facingMode: string
18
+ }
19
+ }
20
+ getContourCoordinate(
21
+ width: number,
22
+ height: number,
23
+ ): {
24
+ x: number
25
+ y: number
26
+ width: number
27
+ height: number
28
+ }
29
+ getBoxData(box: any): {
30
+ x: any
31
+ y: any
32
+ width: any
33
+ height: any
34
+ } | null
35
+ setStylesForCanvas(canvasContainer: any): void
36
+ checkFaceInclusion(frame: any, face: any): boolean
37
+ getFaceDetections(videoRef: any): Promise<
38
+ faceapi.WithFaceExpressions<
39
+ faceapi.WithFaceLandmarks<
40
+ {
41
+ detection: faceapi.FaceDetection
42
+ },
43
+ faceapi.FaceLandmarks68
44
+ >
45
+ >[]
46
+ >
47
+ getCanvas(videoRef: any): HTMLCanvasElement
48
+ getResizedAndDetection(canvas: any, detections: any, ctx: any, videoWidth: number, videoHeight: number): void
49
+ getFaceSnapshot(inputImage: any, box: any): Promise<string | null>
50
+ initModels(): Promise<void>
38
51
  }
39
- export default function usePhotoService(): PhotoService;
40
- export {};
52
+ export default function usePhotoService(): PhotoService
53
+ export {}
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '../types/Api_Service';
3
- import { Api_Project_Dto } from '../types/Api_Projects';
3
+ import { Api_Project_Add_Root_Intervals_Payload, Api_Project_Dto } from '../types/Api_Projects';
4
4
  declare class ProjectsService extends ApiService {
5
5
  fetchProjectById(id: string): Promise<Api_Project_Dto>;
6
6
  createProject(params: any): Promise<Api_Project_Dto>;
@@ -16,6 +16,8 @@ declare class ProjectsService extends ApiService {
16
16
  fetchProjectTeamList(id: string): Promise<ResponseApi<any>>;
17
17
  deleteProject(id: string): Promise<any>;
18
18
  getDynamicProgressWidget(id: string): Promise<any>;
19
+ removeRootIntervals(): Promise<void>;
20
+ addRootIntervals(projectId: string, payload: Api_Project_Add_Root_Intervals_Payload): Promise<void>;
19
21
  }
20
22
  export default function useProjectsService(): ProjectsService;
21
23
  export {};
@@ -0,0 +1,76 @@
1
+ export type LoginPayload = {
2
+ email: string;
3
+ password: string;
4
+ };
5
+ export type Api_Auth_User_Education = {
6
+ created_at: string;
7
+ display_name: string;
8
+ id: string;
9
+ name: string;
10
+ };
11
+ export type Api_Auth_User_Photo = {
12
+ id: string;
13
+ name: string;
14
+ path: string;
15
+ type: string;
16
+ };
17
+ export type Api_Auth_User_Position = {
18
+ description: string;
19
+ display_name: string;
20
+ id: string;
21
+ name: string;
22
+ };
23
+ export type Api_User_Roles_Permissions = {
24
+ created_at: string;
25
+ description: string;
26
+ display_name: string;
27
+ id: string;
28
+ name: string;
29
+ updated_at: string;
30
+ };
31
+ export type Api_Auth_User_Role = {
32
+ display_name: string;
33
+ id: string;
34
+ name: string;
35
+ permissions: Api_User_Roles_Permissions[];
36
+ };
37
+ export type Api_Auth_User_Team = {
38
+ display_name: string;
39
+ id: string;
40
+ name: string;
41
+ roles: Api_Auth_User_Role[];
42
+ };
43
+ export type Api_Auth_User = {
44
+ RFID: string;
45
+ avatar_id: null | string;
46
+ avatar_path: null | string;
47
+ dismissal_at: null | string;
48
+ divisions: string;
49
+ educations: Api_Auth_User_Education[];
50
+ email: string;
51
+ email_verified_at: string;
52
+ first_name: string;
53
+ full_name: string;
54
+ id: string;
55
+ last_name: string;
56
+ passes: any[];
57
+ patronymic: string;
58
+ personnel_number: number;
59
+ phone: string;
60
+ photos: Api_Auth_User_Photo[];
61
+ positions: Api_Auth_User_Position[];
62
+ profession: string;
63
+ roles: Api_Auth_User_Role[];
64
+ security_warnings: any[];
65
+ teams: Api_Auth_User_Team[];
66
+ };
67
+ export type Api_Auth_Login = {
68
+ token: string;
69
+ user: Api_Auth_User;
70
+ };
71
+ export type ChangePasswordPayload = {
72
+ password: string;
73
+ password_confirmation: string;
74
+ };
75
+ export type ChangePasswordResponse = any;
76
+ export type ConfigResponse = any;
@@ -49,3 +49,7 @@ export type Api_Project_Dto = {
49
49
  category: Api_Project_Category;
50
50
  repair: Api_Project_Repair | null;
51
51
  };
52
+ export type Api_Project_Add_Root_Intervals_Payload = {
53
+ history: number;
54
+ with_status_in_progress: number;
55
+ };
@@ -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
+ }
@@ -52,6 +52,7 @@ export type { NotificationType } from './utils/notification';
52
52
  export { notificationSettings } from './utils/notification';
53
53
  export * from './utils/helpers';
54
54
  export * from './api/types/Api_Service';
55
+ export * from './api/types/Api_Auth';
55
56
  export * from './api/types/Api_Tasks';
56
57
  export * from './api/types/Api_Repairs';
57
58
  export * from './api/types/Api_Projects';
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "shared-ritm",
3
- "version": "1.2.118",
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
- "face-api.js": "^0.22.2",
33
- "axios": "^1.7.7",
34
- "vue": "^3.5.12",
35
- "vue-router": "^4.0.3"
36
- },
37
- "peerDependencies": {
38
- "quasar": "^2.18.1"
39
- },
40
- "devDependencies": {
41
- "@quasar/vite-plugin": "^1.9.0",
42
- "@rollup/pluginutils": "^5.1.3",
43
- "@types/node": "^22.7.9",
44
- "@typescript-eslint/eslint-plugin": "^4.25.0",
45
- "@typescript-eslint/parser": "^4.25.0",
46
- "@vitejs/plugin-vue": "^5.1.4",
47
- "@vue/compiler-sfc": "^3.0.5",
48
- "@vue/eslint-config-prettier": "^6.0.0",
49
- "@vue/eslint-config-typescript": "^7.0.0",
50
- "eslint": "^7.27.0",
51
- "eslint-plugin-prettier": "^3.4.0",
52
- "eslint-plugin-vue": "^7.10.0",
53
- "install": "^0.13.0",
54
- "npm": "^11.4.0",
55
- "prettier": "^2.3.0",
56
- "quasar": "^2.18.1",
57
- "rollup-plugin-visualizer": "^5.14.0",
58
- "sass": "^1.80.4",
59
- "typescript": "^5.6.3",
60
- "vite": "^5.4.9",
61
- "vite-plugin-css-modules": "^0.0.1",
62
- "vue-tsc": "^2.1.6"
63
- }
64
- }
1
+ {
2
+ "name": "shared-ritm",
3
+ "version": "1.2.120",
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
+ "face-api.js": "^0.22.2",
33
+ "axios": "^1.7.7",
34
+ "vue": "^3.5.12",
35
+ "vue-router": "^4.0.3"
36
+ },
37
+ "peerDependencies": {
38
+ "quasar": "^2.18.1"
39
+ },
40
+ "devDependencies": {
41
+ "@quasar/vite-plugin": "^1.9.0",
42
+ "@rollup/pluginutils": "^5.1.3",
43
+ "@types/node": "^22.7.9",
44
+ "@typescript-eslint/eslint-plugin": "^4.25.0",
45
+ "@typescript-eslint/parser": "^4.25.0",
46
+ "@vitejs/plugin-vue": "^5.1.4",
47
+ "@vue/compiler-sfc": "^3.0.5",
48
+ "@vue/eslint-config-prettier": "^6.0.0",
49
+ "@vue/eslint-config-typescript": "^7.0.0",
50
+ "eslint": "^7.27.0",
51
+ "eslint-plugin-prettier": "^3.4.0",
52
+ "eslint-plugin-vue": "^7.10.0",
53
+ "install": "^0.13.0",
54
+ "npm": "^11.4.0",
55
+ "prettier": "^2.3.0",
56
+ "quasar": "^2.18.1",
57
+ "rollup-plugin-visualizer": "^5.14.0",
58
+ "sass": "^1.80.4",
59
+ "typescript": "^5.6.3",
60
+ "vite": "^5.4.9",
61
+ "vite-plugin-css-modules": "^0.0.1",
62
+ "vue-tsc": "^2.1.6"
63
+ }
64
+ }
@@ -1,43 +1,32 @@
1
1
  import ApiService from '../settings/ApiService'
2
-
3
- export type LoginPayload = {
4
- email: string
5
- password: string
6
- }
7
-
8
- export type LoginResponse = {
9
- token: string
10
- user: any
11
- }
12
-
13
- export type ChangePasswordPayload = {
14
- password: string
15
- password_confirmation: string
16
- }
17
-
18
- export type ChangePasswordResponse = any
19
- export type ConfigResponse = any
2
+ import {
3
+ Api_Auth_Login,
4
+ ChangePasswordPayload,
5
+ ChangePasswordResponse,
6
+ ConfigResponse,
7
+ LoginPayload,
8
+ } from '@/api/types/Api_Auth'
20
9
 
21
10
  class AuthService extends ApiService {
22
11
  public login(email: string, password: string) {
23
- return this.post<LoginPayload, LoginResponse>(`/login`, {
12
+ return this.post<LoginPayload, Api_Auth_Login>(`/login`, {
24
13
  email,
25
14
  password,
26
15
  })
27
16
  }
28
17
 
29
18
  public loginPhoto(photo: any) {
30
- return this.post<any, LoginResponse>(`/login/from_photo`, { photo })
19
+ return this.post<any, Api_Auth_Login>(`/login/from_photo`, { photo })
31
20
  }
32
21
 
33
22
  public loginVideo(data: any) {
34
- return this.post<any, LoginResponse>(`/login/video`, data, {
23
+ return this.post<any, Api_Auth_Login>(`/login/video`, data, {
35
24
  transformRequest: d => d,
36
25
  })
37
26
  }
38
27
 
39
28
  public logout() {
40
- return this.post<null, LoginResponse>(`/logout`, null)
29
+ return this.post<null, Api_Auth_Login>(`/logout`, null)
41
30
  }
42
31
 
43
32
  public userInfo() {
@@ -1,32 +1,32 @@
1
- import ApiService from '../settings/ApiService'
2
- import { Api_Brigade, Api_Brigade_Create, Api_Brigade_Search } from '../types/Api_Brigades'
3
- import { ResponseApi } from '../types/Api_Service'
4
-
5
- class BrigadesService extends ApiService {
6
- public fetchBrigades(params: any): Promise<ResponseApi<Api_Brigade_Search[]>> {
7
- return this.get<ResponseApi<Api_Brigade_Search[]>>('/search/brigades', { params })
8
- }
9
-
10
- public editBrigade({ id, model }: { id: string; model: Partial<Api_Brigade_Create> }): Promise<Api_Brigade> {
11
- return this.put<Partial<Api_Brigade_Create>, Api_Brigade>(`/brigades/${id}`, model)
12
- }
13
-
14
- public getBrigade(id: string): Promise<Api_Brigade> {
15
- return this.get<Api_Brigade>(`/brigades/${id}`)
16
- }
17
-
18
- public createBrigade(model: Api_Brigade_Create): Promise<Api_Brigade> {
19
- return this.post<Api_Brigade_Create, Api_Brigade>('/brigades', model)
20
- }
21
-
22
- public deleteBrigade(id: string): Promise<{ data: boolean; status: number }> {
23
- return this.delete(`/brigades/${id}`)
24
- }
25
- }
26
-
27
- let api: BrigadesService
28
-
29
- export default function useBrigadesService() {
30
- if (!api) api = new BrigadesService()
31
- return api
32
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { Api_Brigade, Api_Brigade_Create, Api_Brigade_Search } from '../types/Api_Brigades'
3
+ import { ResponseApi } from '../types/Api_Service'
4
+
5
+ class BrigadesService extends ApiService {
6
+ public fetchBrigades(params: any): Promise<ResponseApi<Api_Brigade_Search[]>> {
7
+ return this.get<ResponseApi<Api_Brigade_Search[]>>('/search/brigades', { params })
8
+ }
9
+
10
+ public editBrigade({ id, model }: { id: string; model: Partial<Api_Brigade_Create> }): Promise<Api_Brigade> {
11
+ return this.put<Partial<Api_Brigade_Create>, Api_Brigade>(`/brigades/${id}`, model)
12
+ }
13
+
14
+ public getBrigade(id: string): Promise<Api_Brigade> {
15
+ return this.get<Api_Brigade>(`/brigades/${id}`)
16
+ }
17
+
18
+ public createBrigade(model: Api_Brigade_Create): Promise<Api_Brigade> {
19
+ return this.post<Api_Brigade_Create, Api_Brigade>('/brigades', model)
20
+ }
21
+
22
+ public deleteBrigade(id: string): Promise<{ data: boolean; status: number }> {
23
+ return this.delete(`/brigades/${id}`)
24
+ }
25
+ }
26
+
27
+ let api: BrigadesService
28
+
29
+ export default function useBrigadesService() {
30
+ if (!api) api = new BrigadesService()
31
+ return api
32
+ }
@@ -1,29 +1,29 @@
1
- import ApiService from '../settings/ApiService'
2
- import { ResponseApi } from '../types/Api_Service'
3
- import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
4
- import { Api_Equipment_Create } from '@/api/types/Api_Equipment'
5
-
6
- class EquipmentService extends ApiService {
7
- public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
8
- return this.get<ResponseApi<Api_Equipment_Full_Dto[]>>('repairs/equipment/list', { params })
9
- }
10
-
11
- public createEquipment(body: Api_Equipment_Create): Promise<Api_Equipment_Full_Dto> {
12
- return this.post<Api_Equipment_Create, Api_Equipment_Full_Dto>('repairs/equipment', body)
13
- }
14
-
15
- public editEquipment(id: string, body: Partial<Api_Equipment_Create>): Promise<Api_Equipment_Full_Dto> {
16
- return this.put<Partial<Api_Equipment_Create>, Api_Equipment_Full_Dto>(`repairs/equipment/${id}`, body)
17
- }
18
-
19
- public deleteEquipment(id: string): Promise<{ data: boolean; status: number }> {
20
- return this.delete(`repairs/equipment/${id}`)
21
- }
22
- }
23
-
24
- let api: EquipmentService
25
-
26
- export default function useEquipmentService() {
27
- if (!api) api = new EquipmentService()
28
- return api
29
- }
1
+ import ApiService from '../settings/ApiService'
2
+ import { ResponseApi } from '../types/Api_Service'
3
+ import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
4
+ import { Api_Equipment_Create } from '@/api/types/Api_Equipment'
5
+
6
+ class EquipmentService extends ApiService {
7
+ public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
8
+ return this.get<ResponseApi<Api_Equipment_Full_Dto[]>>('repairs/equipment/list', { params })
9
+ }
10
+
11
+ public createEquipment(body: Api_Equipment_Create): Promise<Api_Equipment_Full_Dto> {
12
+ return this.post<Api_Equipment_Create, Api_Equipment_Full_Dto>('repairs/equipment', body)
13
+ }
14
+
15
+ public editEquipment(id: string, body: Partial<Api_Equipment_Create>): Promise<Api_Equipment_Full_Dto> {
16
+ return this.put<Partial<Api_Equipment_Create>, Api_Equipment_Full_Dto>(`repairs/equipment/${id}`, body)
17
+ }
18
+
19
+ public deleteEquipment(id: string): Promise<{ data: boolean; status: number }> {
20
+ return this.delete(`repairs/equipment/${id}`)
21
+ }
22
+ }
23
+
24
+ let api: EquipmentService
25
+
26
+ export default function useEquipmentService() {
27
+ if (!api) api = new EquipmentService()
28
+ return api
29
+ }