@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
@@ -3,147 +3,152 @@ import { useTranslations } from "next-intl";
3
3
 
4
4
  // API
5
5
  import { getProcessExecutions } from "@evenicanpm/admin-integrate/api/dashboard/queries";
6
- import { ProcessExecutionInput } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
6
+ import {
7
+ ProcessExecutionInput,
8
+ GetProcessExecutionsQuery,
9
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
7
10
 
8
11
  // Custom components
9
12
  import SnackbarAlert, {
10
- iSnackbarAlert,
13
+ iSnackbarAlert,
11
14
  } from "@evenicanpm/admin-core/components/snackbar-alert";
12
15
 
13
16
  import DashboardList from "@evenicanpm/admin-integrate/components/dashboard-list";
14
17
 
15
18
  const defaultInput: ProcessExecutionInput = {
16
- sort: "startDate",
17
- sortDesc: true,
18
- top: 5,
19
- skip: 0,
19
+ sort: "startDate",
20
+ sortDesc: true,
21
+ top: 5,
22
+ skip: 0,
20
23
  };
21
24
 
22
25
  export default function DashboardListSections() {
23
- const t = useTranslations("Integrate.Dashboard");
24
- const m = useTranslations("Integrate.Message");
26
+ const t = useTranslations("Integrate.Dashboard");
27
+ const m = useTranslations("Integrate.Message");
25
28
 
26
- const [refreshed, setRefreshed] = useState<boolean>(false);
27
- const [message, setMessage] = useState<iSnackbarAlert>({ open: false });
29
+ const [refreshed, setRefreshed] = useState<boolean>(false);
30
+ const [message, setMessage] = useState<iSnackbarAlert>({ open: false });
28
31
 
29
- const {
30
- data: recent,
31
- isLoading: recentLoading,
32
- refetch: recentRefetch,
33
- isRefetchError: recentRefetchError,
34
- isRefetching: recentRefetching,
35
- } = getProcessExecutions.useData({ input: defaultInput });
32
+ const {
33
+ data: recent,
34
+ isLoading: recentLoading,
35
+ refetch: recentRefetch,
36
+ isRefetchError: recentRefetchError,
37
+ isRefetching: recentRefetching,
38
+ } = getProcessExecutions.useData({ input: defaultInput });
36
39
 
37
- const {
38
- data: notifications,
39
- isLoading: notificationsLoading,
40
- refetch: notificationsRefetch,
41
- isRefetchError: notificationsRefetchError,
42
- isRefetching: notificationsRefetching,
43
- } = getProcessExecutions.useData({
44
- input: { ...defaultInput, executionStatusIds: [450, 500, 999] },
45
- });
40
+ const {
41
+ data: notifications,
42
+ isLoading: notificationsLoading,
43
+ refetch: notificationsRefetch,
44
+ isRefetchError: notificationsRefetchError,
45
+ isRefetching: notificationsRefetching,
46
+ } = getProcessExecutions.useData({
47
+ input: { ...defaultInput, executionStatusIds: [450, 500, 999] },
48
+ });
46
49
 
47
- useEffect(() => {
48
- if (refreshed && !recentRefetching && !notificationsRefetching) {
49
- if (recentRefetchError || notificationsRefetchError) {
50
- setMessage({
51
- open: true,
52
- severity: "error",
53
- message: m("Refresh.error"),
54
- });
55
- } else {
56
- setMessage({
57
- open: true,
58
- severity: "success",
59
- message: m("Refresh.success"),
60
- });
61
- }
62
- setRefreshed(false);
63
- }
64
- }, [
65
- refreshed,
66
- recentRefetchError,
67
- notificationsRefetchError,
68
- recentRefetching,
69
- notificationsRefetching,
70
- ]);
50
+ useEffect(() => {
51
+ if (refreshed && !recentRefetching && !notificationsRefetching) {
52
+ if (recentRefetchError || notificationsRefetchError) {
53
+ setMessage({
54
+ open: true,
55
+ severity: "error",
56
+ message: m("Refresh.error"),
57
+ });
58
+ } else {
59
+ setMessage({
60
+ open: true,
61
+ severity: "success",
62
+ message: m("Refresh.success"),
63
+ });
64
+ }
65
+ setRefreshed(false);
66
+ }
67
+ }, [
68
+ refreshed,
69
+ recentRefetchError,
70
+ notificationsRefetchError,
71
+ recentRefetching,
72
+ notificationsRefetching,
73
+ ]);
71
74
 
72
- const handleRecentRefresh = () => {
73
- setRefreshed(true);
74
- recentRefetch();
75
- };
76
- const handleNotifRefresh = () => {
77
- setRefreshed(true);
78
- notificationsRefetch();
79
- };
75
+ const handleRecentRefresh = () => {
76
+ setRefreshed(true);
77
+ recentRefetch();
78
+ };
79
+ const handleNotifRefresh = () => {
80
+ setRefreshed(true);
81
+ notificationsRefetch();
82
+ };
80
83
 
81
- const recentExecutionsHeading = [
82
- {
83
- id: "name",
84
- label: t("ListHeader.integration"),
85
- align: "left",
86
- width: "70%",
87
- },
88
- {
89
- id: "startDate",
90
- label: t("ListHeader.lastRun"),
91
- align: "center",
92
- width: "15%",
93
- },
94
- {
95
- id: "view",
96
- label: t("ListHeader.actions"),
97
- align: "center",
98
- width: "5%",
99
- },
100
- ];
101
- const notificationsHeading = [
102
- {
103
- id: "name",
104
- label: t("ListHeader.message"),
105
- align: "left",
106
- width: "70%",
107
- },
108
- {
109
- id: "startDate",
110
- label: t("ListHeader.time"),
111
- align: "center",
112
- width: "15%",
113
- },
114
- {
115
- id: "view",
116
- label: t("ListHeader.actions"),
117
- align: "center",
118
- width: "5%",
119
- },
120
- ];
84
+ const recentExecutionsHeading = [
85
+ {
86
+ id: "name",
87
+ label: t("ListHeader.integration"),
88
+ align: "left",
89
+ width: "70%",
90
+ },
91
+ {
92
+ id: "startDate",
93
+ label: t("ListHeader.lastRun"),
94
+ align: "center",
95
+ width: "15%",
96
+ },
97
+ {
98
+ id: "view",
99
+ label: t("ListHeader.actions"),
100
+ align: "center",
101
+ width: "5%",
102
+ },
103
+ ];
104
+ const notificationsHeading = [
105
+ {
106
+ id: "name",
107
+ label: t("ListHeader.message"),
108
+ align: "left",
109
+ width: "70%",
110
+ },
111
+ {
112
+ id: "startDate",
113
+ label: t("ListHeader.time"),
114
+ align: "center",
115
+ width: "15%",
116
+ },
117
+ {
118
+ id: "view",
119
+ label: t("ListHeader.actions"),
120
+ align: "center",
121
+ width: "5%",
122
+ },
123
+ ];
121
124
 
122
- return (
123
- <>
124
- <DashboardList
125
- title={t("recentExecutions")}
126
- heading={recentExecutionsHeading}
127
- data={recent}
128
- loading={recentLoading || recentRefetching}
129
- url="/e4integrate/executions"
130
- handleRefresh={handleRecentRefresh}
131
- />
132
- <DashboardList
133
- title={t("notifications")}
134
- heading={notificationsHeading}
135
- data={notifications}
136
- loading={notificationsLoading || notificationsRefetching}
137
- url="/e4Integrate/executions?$filter=executionStatusId%20eq%20450%20or%20executionStatusId%20eq%20500%20or%20executionStatusId%20eq%20999"
138
- handleRefresh={handleNotifRefresh}
139
- enableBgColor
140
- />
141
- <SnackbarAlert
142
- open={message.open}
143
- severity={message.severity}
144
- message={message.message}
145
- handleClose={() => setMessage({ ...message, open: false })}
146
- />
147
- </>
148
- );
125
+ return (
126
+ <>
127
+ <DashboardList
128
+ title={t("recentExecutions")}
129
+ heading={recentExecutionsHeading}
130
+ data={recent as GetProcessExecutionsQuery}
131
+ loading={recentLoading || recentRefetching}
132
+ url="/e4integrate/executions"
133
+ handleRefresh={handleRecentRefresh}
134
+ />
135
+ <DashboardList
136
+ title={t("notifications")}
137
+ heading={notificationsHeading}
138
+ data={notifications as GetProcessExecutionsQuery}
139
+ loading={notificationsLoading || notificationsRefetching}
140
+ //temporarily commented out until filter logic is implemented
141
+ //url="/e4Integrate/executions?$filter=executionStatusId%20eq%20450%20or%20executionStatusId%20eq%20500%20or%20executionStatusId%20eq%20999"
142
+ url="/e4integrate/executions"
143
+ handleRefresh={handleNotifRefresh}
144
+ enableBgColor
145
+ />
146
+ <SnackbarAlert
147
+ open={message.open}
148
+ severity={message.severity}
149
+ message={message.message}
150
+ handleClose={() => setMessage({ ...message, open: false })}
151
+ />
152
+ </>
153
+ );
149
154
  }
@@ -5,10 +5,10 @@ import DashboardLinkCards from "@evenicanpm/admin-integrate/pages/dashboard/dash
5
5
  import DashboardListSections from "@evenicanpm/admin-integrate/pages/dashboard/dashboard-list-sections";
6
6
 
7
7
  export default function IntegrateDashboard() {
8
- return (
9
- <>
10
- <DashboardLinkCards />
11
- <DashboardListSections />
12
- </>
13
- );
8
+ return (
9
+ <>
10
+ <DashboardLinkCards />
11
+ <DashboardListSections />
12
+ </>
13
+ );
14
14
  }
@@ -2,42 +2,36 @@ import React from "react";
2
2
  import { useTranslations } from "next-intl";
3
3
 
4
4
  // MUI
5
- import { Theme, useTheme } from "@mui/material";
6
5
  import { Box } from "@mui/material";
7
6
 
8
7
  // Custom components
9
8
  import {
10
- IntegrateBreadcrumbs,
11
- Crumb,
9
+ IntegrateBreadcrumbs,
10
+ Crumb,
12
11
  } from "@evenicanpm/admin-integrate/components/breadcrumbs";
12
+ import IntegrationView from "@evenicanpm/admin-integrate/components/integration-view/integration-view";
13
13
 
14
14
  export default function ExecutionDetails() {
15
- const t = useTranslations("Integrate");
15
+ const t = useTranslations("Integrate");
16
16
 
17
- const theme = useTheme();
18
- const styles = getStyles(theme);
17
+ const breadcrumbs: Crumb[] = [
18
+ {
19
+ name: t("Header.dashboard"),
20
+ url: "/e4integrate",
21
+ },
22
+ {
23
+ name: t("Header.executions"),
24
+ url: "/e4integrate/executions",
25
+ },
26
+ {
27
+ name: "TODO: dynamic title",
28
+ },
29
+ ];
19
30
 
20
- const breadcrumbs: Crumb[] = [
21
- {
22
- name: t("Header.dashboard"),
23
- url: "/e4integrate",
24
- },
25
- {
26
- name: t("Header.executions"),
27
- url: "/e4integrate/executions",
28
- },
29
- {
30
- name: "TODO: dynamic title",
31
- },
32
- ];
33
-
34
- return (
35
- <Box>
36
- <IntegrateBreadcrumbs breadcrumbs={breadcrumbs} />
37
- </Box>
38
- );
31
+ return (
32
+ <Box>
33
+ <IntegrateBreadcrumbs breadcrumbs={breadcrumbs} />
34
+ <IntegrationView />
35
+ </Box>
36
+ );
39
37
  }
40
-
41
- const getStyles = (theme: Theme) => {
42
- return {};
43
- };
@@ -3,20 +3,21 @@ import { redirect, RedirectType } from "next/navigation";
3
3
 
4
4
  // MUI
5
5
  import { Theme, useTheme } from "@mui/material";
6
- import { Box, Stack, Typography, Popover } from "@mui/material";
6
+ import { Box, Stack, Typography } from "@mui/material";
7
7
  import { RemoveRedEye } from "@mui/icons-material";
8
8
  import { SxProps } from "@mui/material";
9
9
 
10
10
  // Custom components
11
11
  import {
12
- StyledTableCell,
13
- StyledTableRow,
14
- StyledIconButton,
12
+ StyledTableCell,
13
+ StyledTableRow,
14
+ StyledIconButton,
15
15
  } from "@evenicanpm/admin-integrate/components/data-table/table-row";
16
16
  import {
17
- ExecutionTag,
18
- ExecutionStatusIcon,
17
+ ExecutionTag,
18
+ ExecutionStatusIcon,
19
19
  } from "@evenicanpm/admin-integrate/components/execution";
20
+ import { DateTimePopover } from "@evenicanpm/admin-integrate/components/core";
20
21
 
21
22
  // Hooks
22
23
  import useTimestamp from "@evenicanpm/admin-integrate/hooks/use-timestamp";
@@ -27,116 +28,112 @@ import { Head } from "@evenicanpm/admin-integrate/components/data-table/table-he
27
28
  import { TableCellProps } from "@mui/material";
28
29
 
29
30
  interface Props {
30
- item: Item;
31
- heading: Head[]; // for alignment
32
- sx?: SxProps;
31
+ item: Item;
32
+ heading: Head[]; // for alignment
33
+ sx?: SxProps;
33
34
  }
34
35
 
35
36
  const ExecutionsListRow: React.FC<Props> = (props: Props) => {
36
- const theme = useTheme();
37
- const styles = getStyles(theme);
37
+ const theme = useTheme();
38
+ const styles = getStyles(theme);
38
39
 
39
- // e.g. "xx days ago"
40
- const time = useTimestamp(props.item.startDate);
41
- const localTime = new Date(props.item.startDate).toString();
40
+ // e.g. "xx days ago"
41
+ const time = useTimestamp(props.item.startDate);
42
+ const localTime = new Date(props.item.startDate).toString();
42
43
 
43
- const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
44
- const open = Boolean(anchorEl);
44
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
45
+ const open = Boolean(anchorEl);
45
46
 
46
- const handlePopoverOpen = (event: React.MouseEvent<HTMLElement>) => {
47
- setAnchorEl(event.currentTarget);
48
- };
47
+ const handlePopoverOpen = (event: React.MouseEvent<HTMLElement>) => {
48
+ setAnchorEl(event.currentTarget);
49
+ };
49
50
 
50
- const handlePopoverClose = () => {
51
- setAnchorEl(null);
52
- };
51
+ const handlePopoverClose = () => {
52
+ setAnchorEl(null);
53
+ };
53
54
 
54
- const handleRedirect = () => {
55
- //Temporarily commented out until executions detail page is implemented
56
- // redirect(
57
- // `/e4integrate/executions/${props.item.process.id}?ExecutionId=${props.item.id}`,
58
- // RedirectType.push,
59
- // );
60
- };
55
+ const handleRedirect = () => {
56
+ redirect(
57
+ `/e4integrate/executions/${props.item.process.id}?ExecutionId=${props.item.id}`,
58
+ RedirectType.push,
59
+ );
60
+ };
61
61
 
62
- return (
63
- <StyledTableRow sx={props.sx}>
64
- <StyledTableCell
65
- align={props.heading[0].align as TableCellProps["align"]}
66
- width={props.heading[0].width}
67
- >
68
- <Stack spacing={1} direction="row">
69
- <Box display="flex" justifyContent="flex-end" alignItems="center">
70
- <ExecutionStatusIcon
71
- executionStatusId={props.item.executionStatus.id}
72
- />
73
- </Box>
74
- <Box display="flex" justifyContent="flex-end" alignItems="center">
75
- <Typography>{props.item.name}</Typography>
76
- </Box>
77
- </Stack>
78
- </StyledTableCell>
79
- <StyledTableCell
80
- align={props.heading[1].align as TableCellProps["align"]}
81
- width={props.heading[1].width}
82
- >
83
- <ExecutionTag
84
- executionStatusId={props.item.executionStatus.id}
85
- sx={{ margin: "auto" }}
86
- />
87
- </StyledTableCell>
88
- <StyledTableCell
89
- align={props.heading[2].align as TableCellProps["align"]}
90
- width={props.heading[2].width}
91
- sx={styles.timeCell}
92
- >
93
- <Typography
94
- onMouseEnter={handlePopoverOpen}
95
- onMouseLeave={handlePopoverClose}
96
- >
97
- {time}
98
- </Typography>
99
- <Popover
100
- sx={{ pointerEvents: "none" }}
101
- open={open}
102
- anchorEl={anchorEl}
103
- anchorOrigin={{
104
- vertical: "bottom",
105
- horizontal: "center",
106
- }}
107
- transformOrigin={{
108
- vertical: "top",
109
- horizontal: "center",
110
- }}
111
- onClose={handlePopoverClose}
112
- disableRestoreFocus
113
- >
114
- <Box sx={styles.popover}>
115
- <Typography>{localTime}</Typography>
116
- </Box>
117
- </Popover>
118
- </StyledTableCell>
119
- <StyledTableCell
120
- align={props.heading[3].align as TableCellProps["align"]}
121
- width={props.heading[3].width}
122
- >
123
- <StyledIconButton onClick={handleRedirect}>
124
- <RemoveRedEye />
125
- </StyledIconButton>
126
- </StyledTableCell>
127
- </StyledTableRow>
128
- );
62
+ return (
63
+ <StyledTableRow sx={props.sx}>
64
+ <StyledTableCell
65
+ align={props.heading[0].align as TableCellProps["align"]}
66
+ width={props.heading[0].width}
67
+ >
68
+ <Stack spacing={1} direction="row">
69
+ <Box display="flex" justifyContent="flex-end" alignItems="center">
70
+ <ExecutionStatusIcon
71
+ executionStatusId={props.item.executionStatus.id}
72
+ />
73
+ </Box>
74
+ <Box display="flex" justifyContent="flex-end" alignItems="center">
75
+ <Typography>{props.item.name}</Typography>
76
+ </Box>
77
+ </Stack>
78
+ </StyledTableCell>
79
+ <StyledTableCell
80
+ align={props.heading[1].align as TableCellProps["align"]}
81
+ width={props.heading[1].width}
82
+ >
83
+ <ExecutionTag
84
+ executionStatusId={props.item.executionStatus.id}
85
+ sx={{ margin: "auto" }}
86
+ />
87
+ </StyledTableCell>
88
+ <StyledTableCell
89
+ align={props.heading[2].align as TableCellProps["align"]}
90
+ width={props.heading[2].width}
91
+ sx={styles.timeCell}
92
+ >
93
+ <Typography
94
+ onMouseEnter={handlePopoverOpen}
95
+ onMouseLeave={handlePopoverClose}
96
+ >
97
+ {time}
98
+ </Typography>
99
+ <DateTimePopover
100
+ dateIsoString={localTime}
101
+ sx={{ pointerEvents: "none" }}
102
+ open={open}
103
+ anchorEl={anchorEl}
104
+ anchorOrigin={{
105
+ vertical: "bottom",
106
+ horizontal: "center",
107
+ }}
108
+ transformOrigin={{
109
+ vertical: "top",
110
+ horizontal: "center",
111
+ }}
112
+ onClose={handlePopoverClose}
113
+ disableRestoreFocus
114
+ />
115
+ </StyledTableCell>
116
+ <StyledTableCell
117
+ align={props.heading[3].align as TableCellProps["align"]}
118
+ width={props.heading[3].width}
119
+ >
120
+ <StyledIconButton onClick={handleRedirect}>
121
+ <RemoveRedEye />
122
+ </StyledIconButton>
123
+ </StyledTableCell>
124
+ </StyledTableRow>
125
+ );
129
126
  };
130
127
 
131
128
  const getStyles = (theme: Theme) => {
132
- return {
133
- timeCell: {
134
- cursor: "default",
135
- },
136
- popover: {
137
- padding: theme.spacing(1),
138
- },
139
- };
129
+ return {
130
+ timeCell: {
131
+ cursor: "default",
132
+ },
133
+ popover: {
134
+ padding: theme.spacing(1),
135
+ },
136
+ };
140
137
  };
141
138
 
142
139
  export default ExecutionsListRow;