@evenicanpm/admin-integrate 1.1.0 → 1.2.2

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 (114) hide show
  1. package/documents/Process/fragments.ts +13 -0
  2. package/documents/Process/list.ts +27 -0
  3. package/documents/ProcessSchedule/fragments.ts +24 -0
  4. package/documents/ProcessSchedule/read.ts +12 -0
  5. package/documents/ProcessScheduleGroup/fragments.ts +29 -0
  6. package/documents/ProcessScheduleGroup/read.ts +12 -0
  7. package/documents/ScheduledProcess/fragments.ts +24 -0
  8. package/documents/ScheduledProcess/list.ts +27 -0
  9. package/package.json +21 -17
  10. package/src/api/Integrations/queries/get-process.query.ts +48 -0
  11. package/src/api/Integrations/queries/get-process.server.ts +9 -0
  12. package/src/api/Integrations/queries/index.ts +1 -0
  13. package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
  14. package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
  15. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
  16. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
  17. package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
  18. package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
  19. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
  20. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
  21. package/src/api/scheduler/queries/index.ts +3 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
  23. package/src/components/breadcrumbs/index.ts +1 -1
  24. package/src/components/breadcrumbs/types.tsx +4 -0
  25. package/src/components/button/outlined-icon-button.tsx +26 -38
  26. package/src/components/core/date-time-popover.tsx +32 -0
  27. package/src/components/core/edited-typography.tsx +20 -0
  28. package/src/components/core/index.ts +3 -0
  29. package/src/components/core/loading.tsx +6 -6
  30. package/src/components/core/title-edit.tsx +122 -0
  31. package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
  32. package/src/components/dashboard-list/dashboard-list.tsx +119 -119
  33. package/src/components/data-table/table-header.tsx +85 -81
  34. package/src/components/data-table/table-pagination.tsx +27 -27
  35. package/src/components/data-table/table-row.tsx +14 -14
  36. package/src/components/data-table/table-skeleton.tsx +34 -34
  37. package/src/components/execution/execution-filter.ts +22 -22
  38. package/src/components/execution/execution-status-icon.tsx +16 -17
  39. package/src/components/execution/execution-tag.tsx +81 -80
  40. package/src/components/footer/footer.tsx +34 -34
  41. package/src/components/header/dashboard-list-header.tsx +64 -63
  42. package/src/components/header/execution-details-header.tsx +102 -129
  43. package/src/components/header/header.tsx +27 -27
  44. package/src/components/header/index.ts +1 -0
  45. package/src/components/header/integration-details-header.tsx +99 -0
  46. package/src/components/icons/up-down.tsx +15 -15
  47. package/src/components/integration-list/index.ts +2 -0
  48. package/src/components/integration-list/integration-filter.ts +21 -0
  49. package/src/components/integration-list/integration-status-icon.tsx +33 -0
  50. package/src/components/integration-list/integration-tag.tsx +77 -0
  51. package/src/components/integration-view/edges/default-edge.tsx +18 -17
  52. package/src/components/integration-view/elk-layout-options.ts +26 -26
  53. package/src/components/integration-view/elk-types.ts +16 -12
  54. package/src/components/integration-view/flow-types.tsx +5 -5
  55. package/src/components/integration-view/integration-view.tsx +132 -130
  56. package/src/components/integration-view/nodes/base-node.tsx +50 -0
  57. package/src/components/integration-view/nodes/connection-node.tsx +8 -8
  58. package/src/components/integration-view/nodes/entry-node.tsx +8 -8
  59. package/src/components/integration-view/nodes/group-node.tsx +47 -6
  60. package/src/components/integration-view/nodes/task-node.tsx +58 -13
  61. package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
  62. package/src/components/integration-view/types.ts +6 -6
  63. package/src/components/layouts/main-layout.tsx +13 -13
  64. package/src/components/layouts/root-container.tsx +25 -25
  65. package/src/components/link-cards/link-card.tsx +23 -23
  66. package/src/components/link-cards/styles.ts +15 -15
  67. package/src/components/list-filter/date-filter.tsx +41 -45
  68. package/src/components/list-filter/date-range-filter.tsx +78 -77
  69. package/src/components/list-filter/list-filter-types.ts +38 -38
  70. package/src/components/list-filter/list-filter.tsx +363 -354
  71. package/src/components/list-filter/multi-select-filter.tsx +94 -95
  72. package/src/components/list-filter/select-filter.tsx +67 -64
  73. package/src/components/scheduler/day-selector.tsx +174 -0
  74. package/src/components/scheduler/day-tag.tsx +73 -0
  75. package/src/components/scheduler/index.ts +4 -0
  76. package/src/components/scheduler/schedule-filter.ts +25 -0
  77. package/src/components/scheduler/schedule-icon.tsx +87 -0
  78. package/src/components/scheduler/scheduler-types.ts +40 -0
  79. package/src/hooks/use-breadcrumbs.ts +31 -31
  80. package/src/hooks/use-recurrence.tsx +13 -0
  81. package/src/hooks/use-timestamp.tsx +21 -21
  82. package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
  83. package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
  84. package/src/pages/dashboard/dashboard.tsx +6 -6
  85. package/src/pages/execution-details/execution-details.tsx +23 -29
  86. package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
  87. package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
  88. package/src/pages/executions/executions-list/executions-list.tsx +219 -212
  89. package/src/pages/executions/executions.tsx +67 -72
  90. package/src/pages/integrations/integration-list/index.ts +1 -0
  91. package/src/pages/integrations/integration-list/integration-list-row.tsx +147 -0
  92. package/src/pages/integrations/integration-list/integration-list-table.tsx +78 -0
  93. package/src/pages/integrations/integration-list/integration-list.tsx +262 -0
  94. package/src/pages/integrations/integrations.tsx +83 -28
  95. package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
  96. package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
  97. package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
  98. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
  99. package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
  100. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
  101. package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
  102. package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
  103. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
  104. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
  105. package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
  106. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
  107. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
  108. package/src/pages/scheduler/scheduler.tsx +106 -30
  109. package/src/pages/scheduler/schedules-list/index.ts +1 -0
  110. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
  111. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
  112. package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
  113. package/tsconfig.json +29 -26
  114. package/src/components/integration-view/temp-data/initialElements.ts +0 -238
@@ -0,0 +1,13 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ export const PROCESS_FRAGMENT_SM = gql`
4
+ fragment e4ProcessFragmentSM on Process {
5
+ name
6
+ code
7
+ id
8
+ modified
9
+ isScheduled
10
+ isTriggered
11
+ processIcon
12
+ }
13
+ `;
@@ -0,0 +1,27 @@
1
+ import { gql } from "graphql-request";
2
+
3
+ import { PROCESS_FRAGMENT_SM } from "./fragments";
4
+
5
+ const GET_PROCESS = gql`
6
+ ${PROCESS_FRAGMENT_SM}
7
+ query GetProcesses($input: ProcessInput) {
8
+ processes(input: $input) {
9
+ nodes {
10
+ ...e4ProcessFragmentSM
11
+ }
12
+ pageInfo {
13
+ resultsReturned
14
+ currentPage
15
+ hasNextPage
16
+ hasPreviousPage
17
+ skip
18
+ top
19
+ sort
20
+ sortDesc
21
+ search
22
+ integrationTags
23
+ }
24
+ recordCount
25
+ }
26
+ }
27
+ `;
@@ -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.2",
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": "608903e897229fead2b663cd82c019451ed65a45"
19
23
  }
@@ -0,0 +1,48 @@
1
+ import { useQuery, QueryClient, UseQueryOptions } from "@tanstack/react-query";
2
+ import { queryFn } from "./get-process.server";
3
+
4
+ import {
5
+ GetProcessesQuery,
6
+ GetProcessesQueryVariables,
7
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
8
+
9
+ export const buildProcessExecutionsQueryKey = {
10
+ all: () => ["getProcesses"] as const,
11
+ byInput: (variables?: GetProcessesQueryVariables) => [
12
+ "getProcesses",
13
+ variables,
14
+ ],
15
+ };
16
+
17
+ export const getProcesses = {
18
+ queryKey: buildProcessExecutionsQueryKey.all(),
19
+
20
+ prefetch: (
21
+ queryClient: QueryClient,
22
+ variables?: GetProcessesQueryVariables,
23
+ ) =>
24
+ queryClient.prefetchQuery({
25
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
26
+ queryFn: () => queryFn(variables),
27
+ }),
28
+
29
+ fetchData: async (
30
+ queryClient: QueryClient,
31
+ variables?: GetProcessesQueryVariables,
32
+ ) => {
33
+ return await queryClient.fetchQuery({
34
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
35
+ queryFn: () => queryFn(variables),
36
+ });
37
+ },
38
+
39
+ useData: (
40
+ variables?: GetProcessesQueryVariables,
41
+ options?: UseQueryOptions,
42
+ ) =>
43
+ useQuery<GetProcessesQuery>({
44
+ queryKey: buildProcessExecutionsQueryKey.byInput(variables),
45
+ queryFn: () => queryFn(variables),
46
+ ...options,
47
+ }),
48
+ };
@@ -0,0 +1,9 @@
1
+ "use server";
2
+ import createGraphqlclient from "@evenicanpm/admin-core/api/sdk/graphqlClient.client";
3
+ import { GetProcessesQueryVariables } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
4
+
5
+ export const queryFn = async (variables?: GetProcessesQueryVariables) => {
6
+ const sdk = await createGraphqlclient();
7
+ const { data } = await sdk.GetProcesses(variables);
8
+ return data;
9
+ };
@@ -0,0 +1 @@
1
+ export { getProcesses } from "./get-process.query";
@@ -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
+ }