@dexteel/mesf-core 3.0.0 → 3.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 (83) hide show
  1. package/README.md +16 -0
  2. package/dist/configuration/index.d.ts +8 -8
  3. package/dist/configuration/pages/job/JobsPage.d.ts +4 -0
  4. package/dist/configuration/pages/job/components/JobsTable/TableJobs.d.ts +2 -0
  5. package/dist/configuration/pages/job/components/JobsTable/customHooks/TableDataJobs/useJobsTableData.d.ts +19 -0
  6. package/dist/configuration/pages/job/context/JobsContext.d.ts +17 -0
  7. package/dist/configuration/pages/job/index.d.ts +4 -0
  8. package/dist/configuration/pages/job/models/Job.d.ts +16 -0
  9. package/dist/configuration/pages/job/reducers/JobsReducer.d.ts +11 -0
  10. package/dist/configuration/pages/job/repositories/JobsRepository.d.ts +27 -0
  11. package/dist/configuration/pages/log/LogsPage.d.ts +4 -0
  12. package/dist/configuration/pages/log/components/Filters/codeFilter.d.ts +7 -0
  13. package/dist/configuration/pages/log/components/Filters/dateFilter.d.ts +8 -0
  14. package/dist/configuration/pages/log/components/Filters/searchFilter.d.ts +7 -0
  15. package/dist/configuration/pages/log/components/LogsTable/TableLogs.d.ts +2 -0
  16. package/dist/configuration/pages/log/components/LogsTable/customHooks/useLogTableData.d.ts +43 -0
  17. package/dist/configuration/pages/log/components/ModalLogSelected/ModalLogSelected.d.ts +9 -0
  18. package/dist/configuration/pages/log/components/hook/useGetLogsFromAPI.d.ts +10 -0
  19. package/dist/configuration/pages/log/context/LogsContext.d.ts +61 -0
  20. package/dist/configuration/pages/log/data/LogTypeCodes.d.ts +4 -0
  21. package/dist/configuration/pages/log/index.d.ts +4 -0
  22. package/dist/configuration/pages/log/models/Log.d.ts +8 -0
  23. package/dist/configuration/pages/log/models/SearchData.d.ts +6 -0
  24. package/dist/configuration/pages/log/reducers/LogsReducer.d.ts +56 -0
  25. package/dist/configuration/pages/log/repositories/LogsRepository.d.ts +9 -0
  26. package/dist/configuration/pages/profiles/ProfilesPage.d.ts +4 -0
  27. package/dist/configuration/pages/profiles/components/Create/CreateProfile.d.ts +8 -0
  28. package/dist/configuration/pages/profiles/components/Delete/DeleteProfile.d.ts +9 -0
  29. package/dist/configuration/pages/profiles/components/Edit/EditProfile.d.ts +9 -0
  30. package/dist/configuration/pages/profiles/components/ProfilesTable/TableProfiles.d.ts +7 -0
  31. package/dist/configuration/pages/profiles/components/ProfilesTable/customHooks/useTableData.d.ts +21 -0
  32. package/dist/configuration/pages/profiles/components/common/Permissions/hooks/useGetPermissionsEffect.d.ts +7 -0
  33. package/dist/configuration/pages/profiles/components/common/Permissions/hooks/useHandleAsignedPermission.d.ts +6 -0
  34. package/dist/configuration/pages/profiles/components/common/Permissions/hooks/useIsPermissionInherited.d.ts +5 -0
  35. package/dist/configuration/pages/profiles/components/common/Permissions/utils/PermissionsUtils.d.ts +1 -0
  36. package/dist/configuration/pages/profiles/components/common/Pickers/PermissionsPicker.d.ts +11 -0
  37. package/dist/configuration/pages/profiles/components/common/Pickers/ProfilesPicker.d.ts +11 -0
  38. package/dist/configuration/pages/profiles/components/common/Profiles/hook/useGetProfilesEffect.d.ts +7 -0
  39. package/dist/configuration/pages/profiles/components/common/hooks/useGetColorByPermissionId.d.ts +5 -0
  40. package/dist/configuration/pages/profiles/context/ProfileContext.d.ts +26 -0
  41. package/dist/configuration/pages/profiles/index.d.ts +4 -0
  42. package/dist/configuration/pages/profiles/models/FormInitialValues.d.ts +2 -0
  43. package/dist/configuration/pages/profiles/models/Permission.d.ts +4 -0
  44. package/dist/configuration/pages/profiles/models/Profile.d.ts +8 -0
  45. package/dist/configuration/pages/profiles/reducers/ProfilesReducer.d.ts +21 -0
  46. package/dist/configuration/pages/profiles/repositories/ProfilesRepository.d.ts +55 -0
  47. package/dist/configuration/pages/shifCrew/ShiftsCrewsPage.d.ts +4 -0
  48. package/dist/configuration/pages/shifCrew/components/Create/CreateShift.d.ts +8 -0
  49. package/dist/configuration/pages/shifCrew/components/Delete/DeleteShift.d.ts +7 -0
  50. package/dist/configuration/pages/shifCrew/components/Edit/EditShift.d.ts +7 -0
  51. package/dist/configuration/pages/shifCrew/components/TableShifts.d.ts +7 -0
  52. package/dist/configuration/pages/shifCrew/components/customHooks/useTableShift.d.ts +19 -0
  53. package/dist/configuration/pages/shifCrew/context/ShiftsCrewsContext.d.ts +37 -0
  54. package/dist/configuration/pages/shifCrew/index.d.ts +4 -0
  55. package/dist/configuration/pages/shifCrew/models/FormInitialValues.d.ts +2 -0
  56. package/dist/configuration/pages/shifCrew/models/ShiftParameters.d.ts +12 -0
  57. package/dist/configuration/pages/shifCrew/reducers/ShiftsCrewsReducer.d.ts +31 -0
  58. package/dist/configuration/pages/shifCrew/repositories/ShiftsCrewsRepository.d.ts +37 -0
  59. package/dist/configuration/pages/users/UsersPage.d.ts +4 -0
  60. package/dist/configuration/pages/users/components/Create/CreateUser.d.ts +8 -0
  61. package/dist/configuration/pages/users/components/Delete/DeleteUser.d.ts +8 -0
  62. package/dist/configuration/pages/users/components/EditUser/EditUser.d.ts +8 -0
  63. package/dist/configuration/pages/users/components/Prueba/Prueba.d.ts +2 -0
  64. package/dist/configuration/pages/users/components/UsersDataTable/TableUsers.d.ts +7 -0
  65. package/dist/configuration/pages/users/components/UsersDataTable/customHooks/useTableData.d.ts +19 -0
  66. package/dist/configuration/pages/users/components/common/ProfilesPicker.d.ts +8 -0
  67. package/dist/configuration/pages/users/context/UsersContext.d.ts +17 -0
  68. package/dist/configuration/pages/users/index.d.ts +4 -0
  69. package/dist/configuration/pages/users/models/FormInitialValues.d.ts +2 -0
  70. package/dist/configuration/pages/users/models/Profile.d.ts +8 -0
  71. package/dist/configuration/pages/users/models/User.d.ts +11 -0
  72. package/dist/configuration/pages/users/reducers/UsersReducer.d.ts +11 -0
  73. package/dist/configuration/pages/users/repositories/UsersRepository.d.ts +55 -0
  74. package/dist/controls/LazyLoading/LazyLoading.d.ts +3 -0
  75. package/dist/controls/alert.d.ts +3 -0
  76. package/dist/index.esm.js +4697 -2297
  77. package/img.png +0 -0
  78. package/package.json +9 -2
  79. package/dist/configuration/JobConfig.d.ts +0 -2
  80. package/dist/configuration/LogConfig.d.ts +0 -2
  81. package/dist/configuration/profileManager.d.ts +0 -2
  82. package/dist/configuration/shiftCrew.d.ts +0 -2
  83. package/dist/configuration/usersManagment.d.ts +0 -2
@@ -0,0 +1,55 @@
1
+ import { Profile } from "../../profiles/models/Profile";
2
+ export declare const getProfiles: () => Promise<{
3
+ ok: boolean;
4
+ data: any;
5
+ message?: undefined;
6
+ } | {
7
+ ok: boolean;
8
+ message: any;
9
+ data?: undefined;
10
+ }>;
11
+ export declare const getPermissions: () => Promise<{
12
+ ok: boolean;
13
+ data: any;
14
+ message?: undefined;
15
+ } | {
16
+ ok: boolean;
17
+ message: any;
18
+ data?: undefined;
19
+ }>;
20
+ export declare const upsertProfile: (profile: Profile) => Promise<{
21
+ ok: boolean;
22
+ data: any;
23
+ message?: undefined;
24
+ } | {
25
+ ok: boolean;
26
+ message: any;
27
+ data?: undefined;
28
+ }>;
29
+ export declare const setPermissionsToProfile: (ProfileId: number, PermissionIds: number[]) => Promise<{
30
+ ok: boolean;
31
+ data: any;
32
+ message?: undefined;
33
+ } | {
34
+ ok: boolean;
35
+ message: any;
36
+ data?: undefined;
37
+ }>;
38
+ export declare const setProfilesToProfile: (ProfileId: number, HasProfilesId: number[]) => Promise<{
39
+ ok: boolean;
40
+ message: any;
41
+ data?: undefined;
42
+ } | {
43
+ ok: boolean;
44
+ data: any;
45
+ message?: undefined;
46
+ }>;
47
+ export declare const deleteProfile: (profileId: number) => Promise<{
48
+ ok: boolean;
49
+ data: any;
50
+ message?: undefined;
51
+ } | {
52
+ ok: boolean;
53
+ message: any;
54
+ data?: undefined;
55
+ }>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {};
3
+ export declare const ShiftsCrews: (prop: Props) => JSX.Element;
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ show: boolean;
4
+ onHide: () => void;
5
+ getShiftsCrewsFromAPI: Function;
6
+ };
7
+ export declare const CreateShift: ({ show, onHide, getShiftsCrewsFromAPI }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ show: boolean;
4
+ onHide: (shouldUpdate: boolean) => void;
5
+ };
6
+ export declare const DeleteShift: ({ show, onHide }: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ show: boolean;
4
+ onHide: (shouldUpdate: boolean) => void;
5
+ };
6
+ export declare const EditShift: ({ show, onHide }: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ getShiftsCrewsFromAPI: Function;
4
+ isLoading: boolean;
5
+ };
6
+ export declare const TableShiftsCrews: ({ isLoading, getShiftsCrewsFromAPI }: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import { GridColDef } from "@material-ui/data-grid";
2
+ declare type Props = {
3
+ setModalEditShift: Function;
4
+ setModalDeleteShift: Function;
5
+ };
6
+ export declare const useTableData: ({ setModalEditShift, setModalDeleteShift }: Props) => {
7
+ rows: {
8
+ id: string;
9
+ PatternStart: Date;
10
+ ShiftCodes: string;
11
+ Crews: string;
12
+ PatternDays: number;
13
+ CrewRotation: string;
14
+ Comments: string | null;
15
+ CanEdit: boolean;
16
+ }[];
17
+ columns: GridColDef[];
18
+ };
19
+ export {};
@@ -0,0 +1,37 @@
1
+ import { ReactNode } from "react";
2
+ export declare const useShiftsCrewsContext: () => {
3
+ state: {
4
+ shifts: import("../models/ShiftParameters").ShiftParameters[];
5
+ shiftTableData: import("../models/ShiftParameters").ShiftParameters;
6
+ pruebas: string;
7
+ };
8
+ actions: import("@reduxjs/toolkit").CaseReducerActions<{
9
+ setShiftsCrews(state: import("immer/dist/internal").WritableDraft<{
10
+ shifts: import("../models/ShiftParameters").ShiftParameters[];
11
+ shiftTableData: import("../models/ShiftParameters").ShiftParameters;
12
+ pruebas: string;
13
+ }>, { payload }: {
14
+ payload: any;
15
+ type: string;
16
+ }): void;
17
+ setShiftTableData(state: import("immer/dist/internal").WritableDraft<{
18
+ shifts: import("../models/ShiftParameters").ShiftParameters[];
19
+ 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
+ }>, { payload }: {
30
+ payload: any;
31
+ type: string;
32
+ }): void;
33
+ }>;
34
+ };
35
+ export declare const ShiftsCrewsProvider: ({ children }: {
36
+ children: ReactNode;
37
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {};
3
+ declare const ShiftsCrewsPage: (props: Props) => JSX.Element;
4
+ export default ShiftsCrewsPage;
@@ -0,0 +1,2 @@
1
+ import { ShiftParameters } from "./ShiftParameters";
2
+ export declare const INITIAL_VALUES: ShiftParameters;
@@ -0,0 +1,12 @@
1
+ export interface ShiftParameters {
2
+ PatternStart: Date;
3
+ ShiftCodes: string;
4
+ Crews: string;
5
+ CrewRotation: string;
6
+ User: string;
7
+ Comments: null | string;
8
+ PatternDays: number;
9
+ CanEdit: boolean;
10
+ ShiftsPerDay: number;
11
+ NumberOfCrews: number;
12
+ }
@@ -0,0 +1,31 @@
1
+ import { ShiftParameters } from "../models/ShiftParameters";
2
+ export declare const ShiftsCrewsReducer: import("@reduxjs/toolkit").Slice<{
3
+ shifts: ShiftParameters[];
4
+ shiftTableData: ShiftParameters;
5
+ pruebas: string;
6
+ }, {
7
+ setShiftsCrews(state: import("immer/dist/internal").WritableDraft<{
8
+ shifts: ShiftParameters[];
9
+ shiftTableData: ShiftParameters;
10
+ pruebas: string;
11
+ }>, { payload }: {
12
+ payload: any;
13
+ type: string;
14
+ }): void;
15
+ setShiftTableData(state: import("immer/dist/internal").WritableDraft<{
16
+ shifts: ShiftParameters[];
17
+ 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
+ }>, { payload }: {
28
+ payload: any;
29
+ type: string;
30
+ }): void;
31
+ }, "__">;
@@ -0,0 +1,37 @@
1
+ import { ShiftParameters } from "../models/ShiftParameters";
2
+ export declare const getShiftParameters: () => Promise<{
3
+ ok: boolean;
4
+ data: any;
5
+ message?: undefined;
6
+ } | {
7
+ ok: boolean;
8
+ message: any;
9
+ data?: undefined;
10
+ }>;
11
+ export declare const upsertShiftParameters: ({ PatternStart, ShiftCodes, Crews, CrewRotation, Comments, }: ShiftParameters) => Promise<{
12
+ ok: boolean;
13
+ data: any;
14
+ message?: undefined;
15
+ } | {
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;
22
+ data: any;
23
+ message?: undefined;
24
+ } | {
25
+ ok: boolean;
26
+ message: any;
27
+ data?: undefined;
28
+ }>;
29
+ export declare const DeleteShiftParameters: (PatternStart: Date) => Promise<{
30
+ ok: boolean;
31
+ data: any;
32
+ message?: undefined;
33
+ } | {
34
+ ok: boolean;
35
+ message: any;
36
+ data?: undefined;
37
+ }>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {};
3
+ export declare const Users: (prop: Props) => JSX.Element;
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ show: boolean;
4
+ onHide: () => void;
5
+ getUsersFromAPI: Function;
6
+ };
7
+ export declare const CreateUser: ({ show, onHide, getUsersFromAPI }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ userIdForDelete: number | null;
4
+ show: boolean;
5
+ onHide: (shouldUpdate: boolean) => void;
6
+ };
7
+ export declare const DeleteUser: ({ userIdForDelete, show, onHide }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ userIdForEdit: number | null;
4
+ show: boolean;
5
+ onHide: (shouldUpdate: boolean) => void;
6
+ };
7
+ export declare const EditUser: ({ userIdForEdit, show, onHide }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const PruebaUserId: () => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ getUsersFromAPI: Function;
4
+ isLoading: boolean;
5
+ };
6
+ export declare const TableUsers: ({ getUsersFromAPI, isLoading }: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import { GridColDef } from '@material-ui/data-grid';
2
+ declare type Props = {
3
+ setModalEditDataUser: Function;
4
+ setModalDeleteUser: Function;
5
+ setUserIdForEdit: Function;
6
+ setUserIdForDelete: Function;
7
+ };
8
+ export declare const useTableData: ({ setUserIdForEdit, setModalEditDataUser, setUserIdForDelete, setModalDeleteUser }: Props) => {
9
+ rows: {
10
+ UserId: number | null;
11
+ UserName: string;
12
+ LastName: string;
13
+ FirstName: string;
14
+ Profiles: string;
15
+ id: number | null;
16
+ }[];
17
+ columns: GridColDef[];
18
+ };
19
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ value: number[];
4
+ onChange: Function;
5
+ userIdForDelete: number | null;
6
+ };
7
+ export declare const ProfilesPicker: ({ value, onChange, userIdForDelete }: Props) => JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from "react";
2
+ export declare const useUsersContext: () => {
3
+ state: {
4
+ users: import("../models/User").User[];
5
+ };
6
+ actions: import("@reduxjs/toolkit").CaseReducerActions<{
7
+ setUsers(state: import("immer/dist/internal").WritableDraft<{
8
+ users: import("../models/User").User[];
9
+ }>, { payload }: {
10
+ payload: any;
11
+ type: string;
12
+ }): void;
13
+ }>;
14
+ };
15
+ export declare const UsersProvider: ({ children }: {
16
+ children: ReactNode;
17
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {};
3
+ declare const UsersPage: (props: Props) => JSX.Element;
4
+ export default UsersPage;
@@ -0,0 +1,2 @@
1
+ import { User } from "./User";
2
+ export declare const INITIAL_VALUES: User;
@@ -0,0 +1,8 @@
1
+ export interface Profile {
2
+ ProfileId: number;
3
+ ProfileName: string;
4
+ HasProfilesId: null | string;
5
+ HasProfiles: null | string;
6
+ PermissionsId: string;
7
+ Permissions: string;
8
+ }
@@ -0,0 +1,11 @@
1
+ export interface User {
2
+ UserId: null | number;
3
+ UserName: string;
4
+ FirstName: string;
5
+ LastName: string;
6
+ IsDomainUser: boolean;
7
+ IsActive: boolean;
8
+ LastLogin: null | Date;
9
+ ProfilesId: string | number[];
10
+ Profiles: string | string[];
11
+ }
@@ -0,0 +1,11 @@
1
+ import { User } from "../models/User";
2
+ export declare const UsersReducer: import("@reduxjs/toolkit").Slice<{
3
+ users: User[];
4
+ }, {
5
+ setUsers(state: import("immer/dist/internal").WritableDraft<{
6
+ users: User[];
7
+ }>, { payload }: {
8
+ payload: any;
9
+ type: string;
10
+ }): void;
11
+ }, "__">;
@@ -0,0 +1,55 @@
1
+ import { User } from "../models/User";
2
+ export declare const getUsers: () => Promise<{
3
+ ok: boolean;
4
+ data: any;
5
+ message?: undefined;
6
+ } | {
7
+ ok: boolean;
8
+ message: any;
9
+ data?: undefined;
10
+ }>;
11
+ export declare const getDataUser: (UserId: number | null) => Promise<{
12
+ ok: boolean;
13
+ data: any;
14
+ message?: undefined;
15
+ } | {
16
+ ok: boolean;
17
+ message: any;
18
+ data?: undefined;
19
+ }>;
20
+ export declare const getProfiles: () => Promise<{
21
+ ok: boolean;
22
+ data: any;
23
+ message?: undefined;
24
+ } | {
25
+ ok: boolean;
26
+ message: any;
27
+ data?: undefined;
28
+ }>;
29
+ export declare const deleteUser: (userId: number) => Promise<{
30
+ ok: boolean;
31
+ data: any;
32
+ message?: undefined;
33
+ } | {
34
+ ok: boolean;
35
+ message: any;
36
+ data?: undefined;
37
+ }>;
38
+ export declare const upsertUser: (user: User) => Promise<{
39
+ ok: boolean;
40
+ data: any;
41
+ message?: undefined;
42
+ } | {
43
+ ok: boolean;
44
+ message: any;
45
+ data?: undefined;
46
+ }>;
47
+ export declare const setProfilesToUser: (UserId: number, profileIds: number[]) => Promise<{
48
+ ok: boolean;
49
+ data: any;
50
+ message?: undefined;
51
+ } | {
52
+ ok: boolean;
53
+ message: any;
54
+ data?: undefined;
55
+ }>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import "./LazyLoading.css";
3
+ export declare const LazyLoading: () => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AlertProps } from '@material-ui/lab/Alert';
3
+ export declare const Alert: (props: AlertProps) => JSX.Element;