@dexteel/mesf-core 4.0.1-alpha → 4.1.0

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 (48) hide show
  1. package/dist/components/navigation/hooks/useDefaultAreaId.d.ts +1 -1
  2. package/dist/configuration/pages/asset/components/dialogs/create-new-asset-dialog.d.ts +1 -1
  3. package/dist/configuration/pages/asset/components/dialogs/edit-asset-dialog.d.ts +1 -1
  4. package/dist/configuration/pages/asset/components/dialogs/remove-asset-dialog.d.ts +1 -1
  5. package/dist/configuration/pages/asset/components/hooks/useAssetActions.d.ts +9 -12
  6. package/dist/configuration/pages/asset/context/ConfigurationAssetContext.d.ts +0 -38
  7. package/dist/configuration/pages/asset/hooks/useSearchAssets.d.ts +6 -1
  8. package/dist/configuration/pages/asset/reducers/ConfigurationAssetReducer.d.ts +0 -38
  9. package/dist/configuration/pages/asset/repositories/ConfigurationAssetRepository.d.ts +17 -25
  10. package/dist/configuration/pages/job/components/JobsTable/customHooks/{TableDataJobs/useJobsTableData.d.ts → useJobsTableData.d.ts} +5 -5
  11. package/dist/configuration/pages/job/components/ResetJob.d.ts +11 -0
  12. package/dist/configuration/pages/job/components/onEnableJob.d.ts +9 -0
  13. package/dist/configuration/pages/job/context/JobsContext.d.ts +9 -0
  14. package/dist/configuration/pages/job/reducers/JobsReducer.d.ts +9 -0
  15. package/dist/configuration/pages/job/repositories/JobsRepository.d.ts +12 -18
  16. package/dist/configuration/pages/log/components/LogsTable/TableLogs.d.ts +1 -0
  17. package/dist/configuration/pages/log/components/LogsTable/customHooks/useLogTableData.d.ts +2 -33
  18. package/dist/configuration/pages/log/components/hook/useGetLogsFromAPI.d.ts +2 -2
  19. package/dist/configuration/pages/log/repositories/LogsRepository.d.ts +3 -5
  20. package/dist/configuration/pages/profiles/components/ProceduresOfProfile/{ProceduresOfProfile.d.ts → ActionsOfProfile.d.ts} +1 -1
  21. package/dist/configuration/pages/profiles/components/ProceduresOfProfile/ProceduresDataTable/index.d.ts +3 -3
  22. package/dist/configuration/pages/profiles/components/ProfilesTable/customHooks/useTableData.d.ts +2 -2
  23. package/dist/configuration/pages/profiles/components/common/Profiles/hook/useGetProfilesEffect.d.ts +2 -1
  24. package/dist/configuration/pages/profiles/models/Action.d.ts +4 -0
  25. package/dist/configuration/pages/profiles/models/Profile.d.ts +1 -0
  26. package/dist/configuration/pages/profiles/repositories/ProfilesRepository.d.ts +23 -62
  27. package/dist/configuration/pages/shifCrew/components/Create/CreateShift.d.ts +2 -3
  28. package/dist/configuration/pages/shifCrew/components/TableShifts.d.ts +3 -0
  29. package/dist/configuration/pages/shifCrew/components/customHooks/useTableShift.d.ts +5 -5
  30. package/dist/configuration/pages/shifCrew/context/ShiftsCrewsContext.d.ts +0 -11
  31. package/dist/configuration/pages/shifCrew/reducers/ShiftsCrewsReducer.d.ts +0 -11
  32. package/dist/configuration/pages/shifCrew/repositories/ShiftsCrewsRepository.d.ts +11 -26
  33. package/dist/configuration/pages/users/components/Create/CreateUser.d.ts +2 -3
  34. package/dist/configuration/pages/users/components/UsersDataTable/customHooks/useTableData.d.ts +6 -6
  35. package/dist/configuration/pages/users/components/common/ProfilesPicker.d.ts +2 -1
  36. package/dist/configuration/pages/users/repositories/UsersRepository.d.ts +26 -40
  37. package/dist/controls/panels.d.ts +1 -1
  38. package/dist/hooks/useSearchAssets.d.ts +1 -1
  39. package/dist/hooks/useSearchUTLSetting.d.ts +1 -1
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.esm.js +2000 -1669
  42. package/dist/repositorie/MESF-frontend-Repositorie.d.ts +16 -24
  43. package/dist/services/ApiService.d.ts +8 -1
  44. package/dist/utils.d.ts +1 -0
  45. package/package.json +1 -4
  46. package/dist/configuration/pages/profiles/components/common/hooks/useGetColorByPermissionId.d.ts +0 -5
  47. package/dist/configuration/pages/profiles/models/Procedure.d.ts +0 -4
  48. package/dist/utils/getError.d.ts +0 -1
@@ -1,5 +1,5 @@
1
- import { GridColDef } from "@material-ui/data-grid";
2
1
  import { Profile } from '../../../models/Profile';
2
+ import { ColDef } from 'ag-grid-community';
3
3
  type Props = {
4
4
  setProfileForEdit: (profile: Profile) => void;
5
5
  setModalProceduresProfile: (showModal: boolean) => void;
@@ -13,6 +13,6 @@ export declare const useTableData: ({ setProfileForEdit, setModalProceduresProfi
13
13
  ProfileId: number | null;
14
14
  ProfileName: string;
15
15
  }[];
16
- columns: GridColDef[];
16
+ columnDefs: ColDef<any>[];
17
17
  };
18
18
  export {};
@@ -2,6 +2,7 @@ import { Profile } from "../../../../models/Profile";
2
2
  type Props = {
3
3
  setIsLoading: (isLoading: boolean) => void;
4
4
  setProfiles: (permissions: Profile[]) => void;
5
+ setError: (err: string) => void;
5
6
  };
6
- export declare const useGetProfilesEffect: ({ setIsLoading, setProfiles, }: Props) => void;
7
+ export declare const useGetProfilesEffect: ({ setIsLoading, setProfiles, setError }: Props) => void;
7
8
  export {};
@@ -0,0 +1,4 @@
1
+ export interface Action {
2
+ ActionId: number;
3
+ ActionName: string;
4
+ }
@@ -1,4 +1,5 @@
1
1
  export interface Profile {
2
2
  ProfileId: number | null;
3
3
  ProfileName: string;
4
+ HasProfilesId?: string;
4
5
  }
@@ -1,83 +1,44 @@
1
1
  import { Profile } from "../../profiles/models/Profile";
2
- import { Procedure } from "../models/Procedure";
2
+ import { Action } from "../models/Action";
3
3
  export declare const getProfiles: () => Promise<{
4
- ok: boolean;
5
- data: any;
6
- message?: undefined;
4
+ ok: false;
5
+ message: string;
7
6
  } | {
8
- ok: boolean;
9
- message: any;
10
- data?: undefined;
11
- }>;
12
- export declare const getPermissions: () => Promise<{
13
- ok: boolean;
7
+ ok: true;
14
8
  data: any;
15
- message?: undefined;
16
- } | {
17
- ok: boolean;
18
- message: any;
19
- data?: undefined;
20
9
  }>;
21
10
  export declare const upsertProfile: (profile: Profile) => Promise<{
22
- ok: boolean;
23
- message: any;
24
- data?: undefined;
11
+ ok: false;
12
+ message: string;
25
13
  } | {
26
- ok: boolean;
14
+ ok: true;
27
15
  data: any;
28
- message?: undefined;
29
16
  }>;
30
- export declare const getProcedures: () => Promise<{
31
- ok: boolean;
32
- message: any;
33
- data?: undefined;
17
+ export declare const getActions: () => Promise<{
18
+ ok: false;
19
+ message: string;
34
20
  } | {
35
- ok: boolean;
21
+ ok: true;
36
22
  data: any;
37
- message?: undefined;
38
23
  }>;
39
- export declare const getProceduresByProfileId: (profile: Profile) => Promise<{
40
- ok: boolean;
41
- message: any;
42
- data?: undefined;
24
+ export declare const getActionsByProfileId: (profile: Profile) => Promise<{
25
+ ok: false;
26
+ message: string;
43
27
  } | {
44
- ok: boolean;
28
+ ok: true;
45
29
  data: any;
46
- message?: undefined;
47
30
  }>;
48
- export declare const upsertProfilesProcedures: (profile: Profile, procedures: Procedure[]) => Promise<{
49
- ok: boolean;
50
- message: any;
51
- data?: undefined;
31
+ export declare const upsertProfileActions: (profile: Profile, actions: Action[]) => Promise<{
32
+ ok: false;
33
+ message: string;
52
34
  } | {
53
- ok: boolean;
35
+ ok: true;
54
36
  data: any;
55
- message?: undefined;
56
- }>;
57
- export declare const setPermissionsToProfile: (ProfileId: number, PermissionIds: number[]) => Promise<{
58
- ok: boolean;
59
- data: any;
60
- message?: undefined;
61
- } | {
62
- ok: boolean;
63
- message: any;
64
- data?: undefined;
65
- }>;
66
- export declare const setProfilesToProfile: (ProfileId: number, HasProfilesId: number[]) => Promise<{
67
- ok: boolean;
68
- message: any;
69
- data?: undefined;
70
- } | {
71
- ok: boolean;
72
- data: any;
73
- message?: undefined;
74
37
  }>;
75
38
  export declare const deleteProfile: (profileId: number) => Promise<{
76
- ok: boolean;
77
- data: any;
78
- message?: undefined;
39
+ ok: false;
40
+ message: string;
79
41
  } | {
80
- ok: boolean;
81
- message: any;
82
- data?: undefined;
42
+ ok: true;
43
+ data: any;
83
44
  }>;
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  type Props = {
3
3
  show: boolean;
4
- onHide: () => void;
5
- getShiftsCrewsFromAPI: Function;
4
+ onHide: (shouldUpdate: boolean) => void;
6
5
  };
7
- export declare const CreateShift: ({ show, onHide, getShiftsCrewsFromAPI }: Props) => React.JSX.Element;
6
+ export declare const CreateShift: ({ show, onHide }: Props) => React.JSX.Element;
8
7
  export {};
@@ -1,4 +1,7 @@
1
1
  import * as React from 'react';
2
+ import 'ag-grid-community/styles/ag-grid.css';
3
+ import 'ag-grid-community/styles/ag-theme-alpine.css';
4
+ import 'ag-grid-enterprise';
2
5
  type Props = {
3
6
  getShiftsCrewsFromAPI: Function;
4
7
  isLoading: boolean;
@@ -1,9 +1,9 @@
1
- import { GridColDef } from "@material-ui/data-grid";
1
+ import { ColDef } from 'ag-grid-community';
2
2
  type Props = {
3
- setModalEditShift: Function;
4
- setModalDeleteShift: Function;
3
+ setOpenModalEditShift: Function;
4
+ setOpenModalDeleteShift: Function;
5
5
  };
6
- export declare const useTableData: ({ setModalEditShift, setModalDeleteShift }: Props) => {
6
+ export declare const useTableData: ({ setOpenModalEditShift, setOpenModalDeleteShift }: Props) => {
7
7
  rows: {
8
8
  id: string;
9
9
  PatternStart: Date;
@@ -14,6 +14,6 @@ export declare const useTableData: ({ setModalEditShift, setModalDeleteShift }:
14
14
  Comments: string | null;
15
15
  CanEdit: boolean;
16
16
  }[];
17
- columns: GridColDef[];
17
+ columnDefs: ColDef<any>[];
18
18
  };
19
19
  export {};
@@ -3,13 +3,11 @@ export declare const useShiftsCrewsContext: () => {
3
3
  state: {
4
4
  shifts: import("../models/ShiftParameters").ShiftParameters[];
5
5
  shiftTableData: import("../models/ShiftParameters").ShiftParameters;
6
- pruebas: string;
7
6
  };
8
7
  actions: import("@reduxjs/toolkit").CaseReducerActions<{
9
8
  setShiftsCrews(state: import("immer/dist/internal").WritableDraft<{
10
9
  shifts: import("../models/ShiftParameters").ShiftParameters[];
11
10
  shiftTableData: import("../models/ShiftParameters").ShiftParameters;
12
- pruebas: string;
13
11
  }>, { payload }: {
14
12
  payload: any;
15
13
  type: string;
@@ -17,15 +15,6 @@ export declare const useShiftsCrewsContext: () => {
17
15
  setShiftTableData(state: import("immer/dist/internal").WritableDraft<{
18
16
  shifts: import("../models/ShiftParameters").ShiftParameters[];
19
17
  shiftTableData: import("../models/ShiftParameters").ShiftParameters;
20
- pruebas: string;
21
- }>, { payload }: {
22
- payload: any;
23
- type: string;
24
- }): void;
25
- setPruebas(state: import("immer/dist/internal").WritableDraft<{
26
- shifts: import("../models/ShiftParameters").ShiftParameters[];
27
- shiftTableData: import("../models/ShiftParameters").ShiftParameters;
28
- pruebas: string;
29
18
  }>, { payload }: {
30
19
  payload: any;
31
20
  type: string;
@@ -2,12 +2,10 @@ import { ShiftParameters } from "../models/ShiftParameters";
2
2
  export declare const ShiftsCrewsReducer: import("@reduxjs/toolkit").Slice<{
3
3
  shifts: ShiftParameters[];
4
4
  shiftTableData: ShiftParameters;
5
- pruebas: string;
6
5
  }, {
7
6
  setShiftsCrews(state: import("immer/dist/internal").WritableDraft<{
8
7
  shifts: ShiftParameters[];
9
8
  shiftTableData: ShiftParameters;
10
- pruebas: string;
11
9
  }>, { payload }: {
12
10
  payload: any;
13
11
  type: string;
@@ -15,15 +13,6 @@ export declare const ShiftsCrewsReducer: import("@reduxjs/toolkit").Slice<{
15
13
  setShiftTableData(state: import("immer/dist/internal").WritableDraft<{
16
14
  shifts: ShiftParameters[];
17
15
  shiftTableData: ShiftParameters;
18
- pruebas: string;
19
- }>, { payload }: {
20
- payload: any;
21
- type: string;
22
- }): void;
23
- setPruebas(state: import("immer/dist/internal").WritableDraft<{
24
- shifts: ShiftParameters[];
25
- shiftTableData: ShiftParameters;
26
- pruebas: string;
27
16
  }>, { payload }: {
28
17
  payload: any;
29
18
  type: string;
@@ -1,37 +1,22 @@
1
1
  import { ShiftParameters } from "../models/ShiftParameters";
2
2
  export declare const getShiftParameters: () => Promise<{
3
- ok: boolean;
4
- data: any;
5
- message?: undefined;
3
+ ok: false;
4
+ message: string;
6
5
  } | {
7
- ok: boolean;
8
- message: any;
9
- data?: undefined;
6
+ ok: true;
7
+ data: any;
10
8
  }>;
11
9
  export declare const upsertShiftParameters: ({ PatternStart, ShiftCodes, Crews, CrewRotation, Comments, }: ShiftParameters) => Promise<{
12
- ok: boolean;
13
- data: any;
14
- message?: undefined;
10
+ ok: false;
11
+ message: string;
15
12
  } | {
16
- ok: boolean;
17
- message: any;
18
- data?: undefined;
19
- }>;
20
- export declare const CreateShiftsJob: (StartDate: Date | null, DaysInAdvance: number, Loop: number) => Promise<{
21
- ok: boolean;
13
+ ok: true;
22
14
  data: any;
23
- message?: undefined;
24
- } | {
25
- ok: boolean;
26
- message: any;
27
- data?: undefined;
28
15
  }>;
29
16
  export declare const DeleteShiftParameters: (PatternStart: Date) => Promise<{
30
- ok: boolean;
31
- data: any;
32
- message?: undefined;
17
+ ok: false;
18
+ message: string;
33
19
  } | {
34
- ok: boolean;
35
- message: any;
36
- data?: undefined;
20
+ ok: true;
21
+ data: any;
37
22
  }>;
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  type Props = {
3
3
  show: boolean;
4
- onHide: () => void;
5
- getUsersFromAPI: Function;
4
+ onHide: (shouldUpdate: boolean) => void;
6
5
  };
7
- export declare const CreateUser: ({ show, onHide, getUsersFromAPI }: Props) => React.JSX.Element;
6
+ export declare const CreateUser: ({ show, onHide }: Props) => React.JSX.Element;
8
7
  export {};
@@ -1,13 +1,13 @@
1
- import { GridColDef } from '@material-ui/data-grid';
1
+ import { ColDef } from 'ag-grid-community';
2
2
  type Props = {
3
- setModalEditDataUser: Function;
4
- setModalDeleteUser: Function;
3
+ setOpenModalEditDataUser: Function;
4
+ setOpenModalDeleteUser: Function;
5
5
  setUserIdForEdit: Function;
6
6
  setUserIdForDelete: Function;
7
- setModalChangePassword: Function;
7
+ setOpenModalChangePasswordd: Function;
8
8
  setUserForPasswordChange: Function;
9
9
  };
10
- export declare const useTableData: ({ setUserIdForEdit, setModalEditDataUser, setUserIdForDelete, setModalDeleteUser, setModalChangePassword, setUserForPasswordChange }: Props) => {
10
+ export declare const useTableData: ({ setUserIdForEdit, setOpenModalEditDataUser, setUserIdForDelete, setOpenModalDeleteUser, setOpenModalChangePasswordd, setUserForPasswordChange }: Props) => {
11
11
  rows: {
12
12
  UserId: number | null;
13
13
  UserName: string;
@@ -16,6 +16,6 @@ export declare const useTableData: ({ setUserIdForEdit, setModalEditDataUser, se
16
16
  Profiles: string;
17
17
  id: number | null;
18
18
  }[];
19
- columns: GridColDef[];
19
+ columnDefs: ColDef<any>[];
20
20
  };
21
21
  export {};
@@ -3,6 +3,7 @@ type Props = {
3
3
  value: number[];
4
4
  onChange: Function;
5
5
  userIdForDelete: number | null;
6
+ setprofileError: (err: string) => void;
6
7
  };
7
- export declare const ProfilesPicker: ({ value, onChange, userIdForDelete }: Props) => React.JSX.Element;
8
+ export declare const ProfilesPicker: ({ value, onChange, userIdForDelete, setprofileError }: Props) => React.JSX.Element;
8
9
  export {};
@@ -1,39 +1,31 @@
1
1
  import { User } from "../models/User";
2
2
  export declare const getUsers: () => Promise<{
3
- ok: boolean;
4
- message: any;
5
- data?: undefined;
3
+ ok: false;
4
+ message: string;
6
5
  } | {
7
- ok: boolean;
6
+ ok: true;
8
7
  data: any;
9
- message?: undefined;
10
8
  }>;
11
9
  export declare const getDataUser: (UserId: number | null) => Promise<{
12
- ok: boolean;
13
- data: any;
14
- message?: undefined;
10
+ ok: false;
11
+ message: string;
15
12
  } | {
16
- ok: boolean;
17
- message: any;
18
- data?: undefined;
13
+ ok: true;
14
+ data: any;
19
15
  }>;
20
16
  export declare const getProfiles: () => Promise<{
21
- ok: boolean;
22
- data: any;
23
- message?: undefined;
17
+ ok: false;
18
+ message: string;
24
19
  } | {
25
- ok: boolean;
26
- message: any;
27
- data?: undefined;
20
+ ok: true;
21
+ data: any;
28
22
  }>;
29
23
  export declare const deleteUser: (userId: number) => Promise<{
30
- ok: boolean;
31
- data: any;
32
- message?: undefined;
24
+ ok: false;
25
+ message: string;
33
26
  } | {
34
- ok: boolean;
35
- message: any;
36
- data?: undefined;
27
+ ok: true;
28
+ data: any;
37
29
  }>;
38
30
  export declare const setPassword: (userId: number, password: string) => Promise<{
39
31
  ok: boolean;
@@ -45,29 +37,23 @@ export declare const setPassword: (userId: number, password: string) => Promise<
45
37
  data?: undefined;
46
38
  }>;
47
39
  export declare const upsertUser: (user: User) => Promise<{
48
- ok: boolean;
49
- data: any;
50
- message?: undefined;
40
+ ok: false;
41
+ message: string;
51
42
  } | {
52
- ok: boolean;
53
- message: any;
54
- data?: undefined;
43
+ ok: true;
44
+ data: any;
55
45
  }>;
56
46
  export declare const getAuthTypes: () => Promise<{
57
- ok: boolean;
58
- message: any;
59
- data?: undefined;
47
+ ok: false;
48
+ message: string;
60
49
  } | {
61
- ok: boolean;
50
+ ok: true;
62
51
  data: any;
63
- message?: undefined;
64
52
  }>;
65
53
  export declare const setProfilesToUser: (UserId: number, profileIds: number[]) => Promise<{
66
- ok: boolean;
67
- data: any;
68
- message?: undefined;
54
+ ok: false;
55
+ message: string;
69
56
  } | {
70
- ok: boolean;
71
- message: any;
72
- data?: undefined;
57
+ ok: true;
58
+ data: any;
73
59
  }>;
@@ -1,7 +1,7 @@
1
1
  import React, { Component, MouseEventHandler } from "react";
2
2
  type GenericPanelProps = {
3
3
  title: string;
4
- description: string;
4
+ description?: string;
5
5
  showPromptSuccess?: boolean;
6
6
  showPromptError?: boolean;
7
7
  onDismissSuccess?: MouseEventHandler;
@@ -1,3 +1,3 @@
1
- export declare const useSearchAssets: () => {
1
+ export declare const useSearchAssets: (setError: (err: string) => void) => {
2
2
  searchAssets: () => void;
3
3
  };
@@ -1,3 +1,3 @@
1
- export declare const useSearchUTLSettings: () => {
1
+ export declare const useSearchUTLSettings: (setError: (err: string) => void) => {
2
2
  searchUTLSettings: () => void;
3
3
  };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from "./account";
2
2
  export * from "./context/axiosInstance";
3
3
  export * from "./MESFMain";
4
4
  export * from "./components/modals/modal.mesf";
5
+ export * from "./components/modals/error-modal";
5
6
  export * from "./configuration";
6
7
  export * from "./context/UTLSettingContext";
7
8
  export * from "./context/assetContext";