@evenicanpm/admin-integrate 1.1.0 → 1.2.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 (101) hide show
  1. package/documents/ProcessSchedule/fragments.ts +24 -0
  2. package/documents/ProcessSchedule/read.ts +12 -0
  3. package/documents/ProcessScheduleGroup/fragments.ts +29 -0
  4. package/documents/ProcessScheduleGroup/read.ts +12 -0
  5. package/documents/ScheduledProcess/fragments.ts +24 -0
  6. package/documents/ScheduledProcess/list.ts +27 -0
  7. package/package.json +21 -17
  8. package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
  9. package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
  10. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
  11. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
  12. package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
  13. package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
  14. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
  15. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
  16. package/src/api/scheduler/queries/index.ts +3 -0
  17. package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
  18. package/src/components/breadcrumbs/index.ts +1 -1
  19. package/src/components/breadcrumbs/types.tsx +4 -0
  20. package/src/components/button/outlined-icon-button.tsx +26 -38
  21. package/src/components/core/date-time-popover.tsx +32 -0
  22. package/src/components/core/edited-typography.tsx +20 -0
  23. package/src/components/core/index.ts +3 -0
  24. package/src/components/core/loading.tsx +6 -6
  25. package/src/components/core/title-edit.tsx +122 -0
  26. package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
  27. package/src/components/dashboard-list/dashboard-list.tsx +119 -119
  28. package/src/components/data-table/table-header.tsx +85 -81
  29. package/src/components/data-table/table-pagination.tsx +27 -27
  30. package/src/components/data-table/table-row.tsx +14 -14
  31. package/src/components/data-table/table-skeleton.tsx +34 -34
  32. package/src/components/execution/execution-filter.ts +22 -22
  33. package/src/components/execution/execution-status-icon.tsx +16 -17
  34. package/src/components/execution/execution-tag.tsx +81 -80
  35. package/src/components/footer/footer.tsx +34 -34
  36. package/src/components/header/dashboard-list-header.tsx +64 -63
  37. package/src/components/header/execution-details-header.tsx +102 -129
  38. package/src/components/header/header.tsx +27 -27
  39. package/src/components/header/index.ts +1 -0
  40. package/src/components/header/integration-details-header.tsx +99 -0
  41. package/src/components/icons/up-down.tsx +15 -15
  42. package/src/components/integration-view/edges/default-edge.tsx +18 -17
  43. package/src/components/integration-view/elk-layout-options.ts +26 -26
  44. package/src/components/integration-view/elk-types.ts +16 -12
  45. package/src/components/integration-view/flow-types.tsx +5 -5
  46. package/src/components/integration-view/integration-view.tsx +132 -130
  47. package/src/components/integration-view/nodes/base-node.tsx +50 -0
  48. package/src/components/integration-view/nodes/connection-node.tsx +8 -8
  49. package/src/components/integration-view/nodes/entry-node.tsx +8 -8
  50. package/src/components/integration-view/nodes/group-node.tsx +47 -6
  51. package/src/components/integration-view/nodes/task-node.tsx +58 -13
  52. package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
  53. package/src/components/integration-view/types.ts +6 -6
  54. package/src/components/layouts/main-layout.tsx +13 -13
  55. package/src/components/layouts/root-container.tsx +25 -25
  56. package/src/components/link-cards/link-card.tsx +23 -23
  57. package/src/components/link-cards/styles.ts +15 -15
  58. package/src/components/list-filter/date-filter.tsx +41 -45
  59. package/src/components/list-filter/date-range-filter.tsx +78 -77
  60. package/src/components/list-filter/list-filter-types.ts +38 -38
  61. package/src/components/list-filter/list-filter.tsx +363 -354
  62. package/src/components/list-filter/multi-select-filter.tsx +94 -95
  63. package/src/components/list-filter/select-filter.tsx +67 -64
  64. package/src/components/scheduler/day-selector.tsx +174 -0
  65. package/src/components/scheduler/day-tag.tsx +73 -0
  66. package/src/components/scheduler/index.ts +4 -0
  67. package/src/components/scheduler/schedule-filter.ts +25 -0
  68. package/src/components/scheduler/schedule-icon.tsx +87 -0
  69. package/src/components/scheduler/scheduler-types.ts +40 -0
  70. package/src/hooks/use-breadcrumbs.ts +31 -31
  71. package/src/hooks/use-recurrence.tsx +13 -0
  72. package/src/hooks/use-timestamp.tsx +21 -21
  73. package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
  74. package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
  75. package/src/pages/dashboard/dashboard.tsx +6 -6
  76. package/src/pages/execution-details/execution-details.tsx +23 -29
  77. package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
  78. package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
  79. package/src/pages/executions/executions-list/executions-list.tsx +219 -212
  80. package/src/pages/executions/executions.tsx +67 -72
  81. package/src/pages/integrations/integrations.tsx +17 -25
  82. package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
  83. package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
  84. package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
  85. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
  86. package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
  87. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
  88. package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
  89. package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
  90. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
  91. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
  92. package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
  93. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
  94. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
  95. package/src/pages/scheduler/scheduler.tsx +106 -30
  96. package/src/pages/scheduler/schedules-list/index.ts +1 -0
  97. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
  98. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
  99. package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
  100. package/tsconfig.json +29 -26
  101. package/src/components/integration-view/temp-data/initialElements.ts +0 -238
@@ -0,0 +1,24 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PROCESS_SCHEDULE_FRAGMENT_MD = gql`
4
+ fragment e4ProcessScheduleFragmentMD on ProcessSchedule {
5
+ id
6
+ name
7
+ code
8
+ startDate
9
+ interval
10
+ intervalUnitId
11
+ isMonday
12
+ isTuesday
13
+ isWednesday
14
+ isThursday
15
+ isFriday
16
+ isSaturday
17
+ isSunday
18
+ process {
19
+ id
20
+ sort
21
+ name
22
+ }
23
+ }
24
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PROCESS_SCHEDULE_FRAGMENT_MD } from "./fragments";
4
+
5
+ const GetProcessSchedule = gql`
6
+ ${PROCESS_SCHEDULE_FRAGMENT_MD}
7
+ query GetProcessScheduleById($id: ID!) {
8
+ processScheduleById(id: $id) {
9
+ ...e4ProcessScheduleFragmentMD
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,29 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD = gql`
4
+ fragment e4ProcessScheduleGroupDetailsFragmentMD on ProcessScheduleGroupDetails {
5
+ id
6
+ name
7
+ code
8
+ startDate
9
+ interval
10
+ intervalUnitId
11
+ isMonday
12
+ isTuesday
13
+ isWednesday
14
+ isThursday
15
+ isFriday
16
+ isSaturday
17
+ isSunday
18
+ isDisabled
19
+ processSchedule {
20
+ id
21
+ processes {
22
+ id
23
+ sort
24
+ name
25
+ processIcon
26
+ }
27
+ }
28
+ }
29
+ `;
@@ -0,0 +1,12 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD } from "./fragments";
4
+
5
+ const GetProcessScheduleGroupDetails = gql`
6
+ ${PROCESS_SCHEDULE_GROUP_DETAILS_FRAGMENT_MD}
7
+ query GetProcessScheduleGroupDetails($id: ID!) {
8
+ processScheduleGroupDetails(id: $id) {
9
+ ...e4ProcessScheduleGroupDetailsFragmentMD
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,24 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const SCHEDULED_PROCESS_FRAGMENT_MD = gql`
4
+ fragment e4ScheduledProcessFragmentSM on ScheduledProcess {
5
+ id
6
+ name
7
+ processScheduleGroup {
8
+ id
9
+ }
10
+ startDate
11
+ interval
12
+ intervalUnitId
13
+ isMonday
14
+ isTuesday
15
+ isWednesday
16
+ isThursday
17
+ isFriday
18
+ isSaturday
19
+ isSunday
20
+ isDisabled
21
+ modified
22
+ scheduledIntegrations
23
+ }
24
+ `;
@@ -0,0 +1,27 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { SCHEDULED_PROCESS_FRAGMENT_MD } from "./fragments";
4
+
5
+ const GET_SCHEDULED_PROCESSES = gql`
6
+ ${SCHEDULED_PROCESS_FRAGMENT_MD}
7
+ query GetScheduledProcesses($input: ScheduledProcessInput) {
8
+ scheduledProcesses(input: $input) {
9
+ nodes {
10
+ ...e4ScheduledProcessFragmentSM
11
+ }
12
+ pageInfo {
13
+ resultsReturned
14
+ currentPage
15
+ hasNextPage
16
+ hasPreviousPage
17
+ skip
18
+ top
19
+ sort
20
+ sortDesc
21
+ search
22
+ daysOfTheWeek
23
+ }
24
+ recordCount
25
+ }
26
+ }
27
+ `;
package/package.json CHANGED
@@ -1,19 +1,23 @@
1
1
  {
2
- "name": "@evenicanpm/admin-integrate",
3
- "version": "1.1.0",
4
- "description": "e4Integrate Admin Panel",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "exports": {
9
- ".": "./index.js",
10
- "./*": "./*"
11
- },
12
- "author": "Evenica",
13
- "license": "ISC",
14
- "peerDependencies": {
15
- "@xyflow/react": "^12.8.4",
16
- "elkjs": "^0.10.0"
17
- },
18
- "gitHead": "0c9180f24435b0361dfc05ccba4a1f0e7ad19a7a"
2
+ "name": "@evenicanpm/admin-integrate",
3
+ "version": "1.2.0",
4
+ "description": "e4Integrate Admin Panel",
5
+ "type": "module",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "exports": {
10
+ ".": "./index.js",
11
+ "./*": "./*"
12
+ },
13
+ "author": "Evenica",
14
+ "license": "ISC",
15
+ "peerDependencies": {
16
+ "@dnd-kit/core": "^6.3.1",
17
+ "@dnd-kit/modifiers": "^9.0.0",
18
+ "@dnd-kit/sortable": "^10.0.0",
19
+ "@xyflow/react": "^12.8.4",
20
+ "elkjs": "^0.10.0"
21
+ },
22
+ "gitHead": "6a95e9f84f48a7e1e96bfdf4ee1a766a7d8808b6"
19
23
  }
@@ -1,48 +1,45 @@
1
1
  import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
2
  import { queryFn } from "./get-process-executions.server";
3
3
 
4
- import {
5
- GetProcessExecutionsQuery,
6
- GetProcessExecutionsQueryVariables,
7
- } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
+ import { GetProcessExecutionsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
8
5
 
9
6
  export const buildProcessExecutionsQueryKey = {
10
- all: () => ["getProcessExecutions"] as const,
11
- byInput: (variables?: GetProcessExecutionsQueryVariables) => [
12
- "getProcessExecutions",
13
- variables,
14
- ],
7
+ all: () => ["getProcessExecutions"] as const,
8
+ byInput: (variables?: GetProcessExecutionsQueryVariables) => [
9
+ "getProcessExecutions",
10
+ variables,
11
+ ],
15
12
  };
16
13
 
17
14
  export const getProcessExecutions = {
18
- queryKey: buildProcessExecutionsQueryKey.all(),
15
+ queryKey: buildProcessExecutionsQueryKey.all(),
19
16
 
20
- prefetch: (
21
- queryClient: QueryClient,
22
- variables?: GetProcessExecutionsQueryVariables,
23
- ) =>
24
- queryClient.prefetchQuery({
25
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
26
- queryFn: () => queryFn(variables),
27
- }),
17
+ prefetch: (
18
+ queryClient: QueryClient,
19
+ variables: GetProcessExecutionsQueryVariables,
20
+ ) =>
21
+ queryClient.prefetchQuery({
22
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
23
+ queryFn: () => queryFn(variables),
24
+ }),
28
25
 
29
- fetchData: async (
30
- queryClient: QueryClient,
31
- variables?: GetProcessExecutionsQueryVariables,
32
- ) => {
33
- return await queryClient.fetchQuery({
34
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
35
- queryFn: () => queryFn(variables),
36
- });
37
- },
26
+ fetchData: async (
27
+ queryClient: QueryClient,
28
+ variables: GetProcessExecutionsQueryVariables,
29
+ ) => {
30
+ return await queryClient.fetchQuery({
31
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
32
+ queryFn: () => queryFn(variables),
33
+ });
34
+ },
38
35
 
39
- useData: (
40
- variables?: GetProcessExecutionsQueryVariables,
41
- options?: UseQueryOptions,
42
- ) =>
43
- useQuery<GetProcessExecutionsQuery>({
44
- queryKey: buildProcessExecutionsQueryKey.byInput(variables),
45
- queryFn: () => queryFn(variables),
46
- ...options,
47
- }),
36
+ useData: (
37
+ variables: GetProcessExecutionsQueryVariables,
38
+ options?: UseQueryOptions,
39
+ ) =>
40
+ useQuery({
41
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
42
+ queryFn: () => queryFn(variables),
43
+ ...options,
44
+ }),
48
45
  };
@@ -3,9 +3,9 @@ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.cl
3
3
  import { GetProcessExecutionsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
4
 
5
5
  export const queryFn = async (
6
- variables?: GetProcessExecutionsQueryVariables,
6
+ variables: GetProcessExecutionsQueryVariables,
7
7
  ) => {
8
- const sdk = await createGraphqlclient();
9
- const { data } = await sdk.GetProcessExecutions(variables);
10
- return data;
8
+ const sdk = await createGraphqlclient();
9
+ const { data } = await sdk.GetProcessExecutions(variables);
10
+ return data;
11
11
  };
@@ -0,0 +1,45 @@
1
+ import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
+ import { queryFn } from "./get-process-schedule-group-details.server";
3
+
4
+ import { GetProcessScheduleGroupDetailsQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
5
+
6
+ export const buildProcessScheduleGroupDetailsQueryKey = {
7
+ all: () => ["getProcessScheduleGroupDetails"] as const,
8
+ byInput: (variables?: GetProcessScheduleGroupDetailsQueryVariables) => [
9
+ "getProcessScheduleGroupDetails",
10
+ variables,
11
+ ],
12
+ };
13
+
14
+ export const getProcessScheduleGroupDetails = {
15
+ queryKey: buildProcessScheduleGroupDetailsQueryKey.all(),
16
+
17
+ prefetch: (
18
+ queryClient: QueryClient,
19
+ variables: GetProcessScheduleGroupDetailsQueryVariables,
20
+ ) =>
21
+ queryClient.prefetchQuery({
22
+ queryKey: buildProcessScheduleGroupDetailsQueryKey.byInput(variables),
23
+ queryFn: () => queryFn(variables),
24
+ }),
25
+
26
+ fetchData: async (
27
+ queryClient: QueryClient,
28
+ variables: GetProcessScheduleGroupDetailsQueryVariables,
29
+ ) => {
30
+ return await queryClient.fetchQuery({
31
+ queryKey: buildProcessScheduleGroupDetailsQueryKey.byInput(variables),
32
+ queryFn: () => queryFn(variables),
33
+ });
34
+ },
35
+
36
+ useData: (
37
+ variables: GetProcessScheduleGroupDetailsQueryVariables,
38
+ options?: UseQueryOptions,
39
+ ) =>
40
+ useQuery({
41
+ queryKey: buildProcessScheduleGroupDetailsQueryKey.byInput(variables),
42
+ queryFn: () => queryFn(variables),
43
+ ...options,
44
+ }),
45
+ };
@@ -0,0 +1,14 @@
1
+ "use server";
2
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
+ import {
4
+ GetProcessScheduleGroupDetailsQueryVariables,
5
+ GetProcessScheduleGroupDetailsQuery,
6
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
7
+
8
+ export const queryFn = async (
9
+ variables: GetProcessScheduleGroupDetailsQueryVariables,
10
+ ): Promise<GetProcessScheduleGroupDetailsQuery> => {
11
+ const sdk = await createGraphqlclient();
12
+ const { data } = await sdk.GetProcessScheduleGroupDetails(variables);
13
+ return data;
14
+ };
@@ -0,0 +1,45 @@
1
+ import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
+ import { queryFn } from "./get-process-schedule.server";
3
+
4
+ import { GetProcessScheduleByIdQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
5
+
6
+ export const buildProcessScheduleQueryKey = {
7
+ all: () => ["getProcessScheduleGroupById"] as const,
8
+ byInput: (variables?: GetProcessScheduleByIdQueryVariables) => [
9
+ "getProcessScheduleGroupById",
10
+ variables,
11
+ ],
12
+ };
13
+
14
+ export const getProcessScheduleById = {
15
+ queryKey: buildProcessScheduleQueryKey.all(),
16
+
17
+ prefetch: (
18
+ queryClient: QueryClient,
19
+ variables: GetProcessScheduleByIdQueryVariables,
20
+ ) =>
21
+ queryClient.prefetchQuery({
22
+ queryKey: buildProcessScheduleQueryKey.byInput(variables),
23
+ queryFn: () => queryFn(variables),
24
+ }),
25
+
26
+ fetchData: async (
27
+ queryClient: QueryClient,
28
+ variables: GetProcessScheduleByIdQueryVariables,
29
+ ) => {
30
+ return await queryClient.fetchQuery({
31
+ queryKey: buildProcessScheduleQueryKey.byInput(variables),
32
+ queryFn: () => queryFn(variables),
33
+ });
34
+ },
35
+
36
+ useData: (
37
+ variables: GetProcessScheduleByIdQueryVariables,
38
+ options?: UseQueryOptions,
39
+ ) =>
40
+ useQuery({
41
+ queryKey: buildProcessScheduleQueryKey.byInput(variables),
42
+ queryFn: () => queryFn(variables),
43
+ ...options,
44
+ }),
45
+ };
@@ -0,0 +1,14 @@
1
+ "use server";
2
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
+ import {
4
+ GetProcessScheduleByIdQueryVariables,
5
+ GetProcessScheduleByIdQuery,
6
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
7
+
8
+ export const queryFn = async (
9
+ variables: GetProcessScheduleByIdQueryVariables,
10
+ ): Promise<GetProcessScheduleByIdQuery> => {
11
+ const sdk = await createGraphqlclient();
12
+ const { data } = await sdk.GetProcessScheduleById(variables);
13
+ return data;
14
+ };
@@ -0,0 +1,45 @@
1
+ import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
+ import { queryFn } from "./get-scheduled-processes.server";
3
+
4
+ import { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
5
+
6
+ export const buildScheduledProcessesQueryKey = {
7
+ all: () => ["getScheduledProcesses"] as const,
8
+ byInput: (variables?: GetScheduledProcessesQueryVariables) => [
9
+ "getScheduledProcesses",
10
+ variables,
11
+ ],
12
+ };
13
+
14
+ export const getScheduledProcesses = {
15
+ queryKey: buildScheduledProcessesQueryKey.all(),
16
+
17
+ prefetch: (
18
+ queryClient: QueryClient,
19
+ variables: GetScheduledProcessesQueryVariables,
20
+ ) =>
21
+ queryClient.prefetchQuery({
22
+ queryKey: buildScheduledProcessesQueryKey.byInput(variables),
23
+ queryFn: () => queryFn(variables),
24
+ }),
25
+
26
+ fetchData: async (
27
+ queryClient: QueryClient,
28
+ variables: GetScheduledProcessesQueryVariables,
29
+ ) => {
30
+ return await queryClient.fetchQuery({
31
+ queryKey: buildScheduledProcessesQueryKey.byInput(variables),
32
+ queryFn: () => queryFn(variables),
33
+ });
34
+ },
35
+
36
+ useData: (
37
+ variables: GetScheduledProcessesQueryVariables,
38
+ options?: UseQueryOptions,
39
+ ) =>
40
+ useQuery({
41
+ queryKey: buildScheduledProcessesQueryKey.byInput(variables),
42
+ queryFn: () => queryFn(variables),
43
+ ...options,
44
+ }),
45
+ };
@@ -0,0 +1,11 @@
1
+ "use server";
2
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
+ import { GetScheduledProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
+
5
+ export const queryFn = async (
6
+ variables: GetScheduledProcessesQueryVariables,
7
+ ) => {
8
+ const sdk = await createGraphqlclient();
9
+ const { data } = await sdk.GetScheduledProcesses(variables);
10
+ return data;
11
+ };
@@ -0,0 +1,3 @@
1
+ export { getScheduledProcesses } from "./get-scheduled-processes.query";
2
+ export { getProcessScheduleGroupDetails } from "./get-process-schedule-group-details.query";
3
+ export { getProcessScheduleById } from "./get-process-schedule.query";
@@ -5,38 +5,35 @@ import Link from "next/link";
5
5
  import styled from "@mui/material/styles/styled";
6
6
  import { Breadcrumbs, Typography } from "@mui/material";
7
7
 
8
+ import { Crumb } from "./types";
9
+
8
10
  // STYLED COMPONENTS
9
11
  export const Wrapper = styled("div")(({ theme }) => ({
10
- padding: theme.spacing(0, 1, 3),
12
+ padding: theme.spacing(0, 1, 3),
11
13
  }));
12
14
 
13
- export interface Crumb {
14
- name: string;
15
- url?: string;
16
- }
17
-
18
15
  type Props = {
19
- breadcrumbs: Crumb[];
16
+ breadcrumbs: Crumb[];
20
17
  };
21
18
 
22
19
  export default function IntegrateBreadcrumbs({ breadcrumbs }: Props) {
23
- return (
24
- <Wrapper>
25
- <Breadcrumbs>
26
- {breadcrumbs.map((bc) =>
27
- bc.url ? (
28
- <Link href={bc.url} key={bc.name}>
29
- <Typography variant="body1" color="info.main">
30
- {bc.name}
31
- </Typography>
32
- </Link>
33
- ) : (
34
- <Typography variant="body1" key={bc.name} color="info.main">
35
- {bc.name}
36
- </Typography>
37
- ),
38
- )}
39
- </Breadcrumbs>
40
- </Wrapper>
41
- );
20
+ return (
21
+ <Wrapper>
22
+ <Breadcrumbs>
23
+ {breadcrumbs.map((bc) =>
24
+ bc.url ? (
25
+ <Link href={bc.url} key={bc.name}>
26
+ <Typography variant="body1" color="info.main">
27
+ {bc.name}
28
+ </Typography>
29
+ </Link>
30
+ ) : (
31
+ <Typography variant="body1" key={bc.name} color="info.main">
32
+ {bc.name}
33
+ </Typography>
34
+ ),
35
+ )}
36
+ </Breadcrumbs>
37
+ </Wrapper>
38
+ );
42
39
  }
@@ -1,2 +1,2 @@
1
1
  export { default as IntegrateBreadcrumbs } from "./breadcrumbs";
2
- export { Crumb } from "./breadcrumbs";
2
+ export * from "./types";
@@ -0,0 +1,4 @@
1
+ export interface Crumb {
2
+ name: string;
3
+ url?: string;
4
+ }
@@ -1,47 +1,35 @@
1
1
  import React from "react";
2
- import { IconButton, SxProps } from "@mui/material";
2
+ import { IconButton, IconButtonProps } from "@mui/material";
3
3
 
4
- interface Props {
5
- color?:
6
- | "inherit"
7
- | "default"
8
- | "primary"
9
- | "secondary"
10
- | "error"
11
- | "info"
12
- | "success"
13
- | "warning";
14
- onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
15
- children: React.ReactNode;
16
- sx?: SxProps;
4
+ interface Props extends IconButtonProps {
5
+ children: React.ReactNode;
17
6
  }
18
7
 
19
- const OutlinedIconButton: React.FC<Props> = (props: Props) => {
20
- const sx = {
21
- // Default style
22
- borderWidth: "2px",
23
- borderStyle: "solid",
24
- borderColor: `${props.color}.light`,
25
- "&:hover": {
26
- backgroundColor: "action.hover",
27
- borderColor: `${props.color}.main`,
28
- },
29
- borderRadius: "8px",
8
+ const OutlinedIconButton: React.FC<Props> = ({
9
+ children,
10
+ sx,
11
+ ...props
12
+ }: Props) => {
13
+ const defaultSx = {
14
+ // Default style
15
+ borderWidth: "2px",
16
+ borderStyle: "solid",
17
+ borderColor: props.disabled ? "grey.500" : `${props.color}.light`,
18
+ "&:hover": {
19
+ backgroundColor: "action.hover",
20
+ borderColor: `${props.color}.main`,
21
+ },
22
+ borderRadius: "8px",
30
23
 
31
- // Override style
32
- ...props.sx,
33
- };
24
+ // Override style
25
+ ...sx,
26
+ };
34
27
 
35
- return (
36
- <IconButton
37
- centerRipple={false}
38
- color={props.color || "inherit"}
39
- sx={sx}
40
- onClick={props.onClick}
41
- >
42
- {props.children}
43
- </IconButton>
44
- );
28
+ return (
29
+ <IconButton sx={defaultSx} {...props}>
30
+ {children}
31
+ </IconButton>
32
+ );
45
33
  };
46
34
 
47
35
  export default OutlinedIconButton;
@@ -0,0 +1,32 @@
1
+ import { Theme, useTheme } from "@mui/material";
2
+ import { Popover, Box, Typography, PopoverProps } from "@mui/material";
3
+
4
+ interface Props extends PopoverProps {
5
+ dateIsoString: string;
6
+ }
7
+
8
+ export default function DateTimePopover({
9
+ dateIsoString,
10
+ ...popoverProps
11
+ }: Props) {
12
+ const theme = useTheme();
13
+ const styles = getStyles(theme);
14
+
15
+ const date = new Date(dateIsoString);
16
+
17
+ return (
18
+ <Popover {...popoverProps}>
19
+ <Box sx={styles.popover}>
20
+ <Typography>{date.toString()}</Typography>
21
+ </Box>
22
+ </Popover>
23
+ );
24
+ }
25
+
26
+ const getStyles = (theme: Theme) => {
27
+ return {
28
+ popover: {
29
+ padding: theme.spacing(1),
30
+ },
31
+ };
32
+ };
@@ -0,0 +1,20 @@
1
+ import { useTranslations } from "next-intl";
2
+ import { Typography } from "@mui/material";
3
+
4
+ interface Props {
5
+ edited: boolean;
6
+ }
7
+
8
+ export default function EditedTypography(props: Props) {
9
+ const t = useTranslations("Integrate.Scheduler");
10
+
11
+ return (
12
+ <Typography
13
+ variant="caption"
14
+ color="grey"
15
+ visibility={props.edited ? "visible" : "hidden"}
16
+ >
17
+ {t("edited")}
18
+ </Typography>
19
+ );
20
+ }
@@ -1 +1,4 @@
1
1
  export { default as Loading } from "./loading";
2
+ export { default as DateTimePopover } from "./date-time-popover";
3
+ export { default as TitleEdit } from "./title-edit";
4
+ export { default as EditedTypography } from "./edited-typography";