format
This commit is contained in:
1 parent
aea0b34533
commit
1326a6222b
2 files changed
+12
-3
No files matched your search
@@ -85,7 +85,12 @@ const Search = ({
|
|||||||
const enhancedOptions = React.useMemo(() => {
|
const enhancedOptions = React.useMemo(() => {
|
||||||
return multiple && isAdorned
|
return multiple && isAdorned
|
||||||
? [
|
? [
|
||||||
{ [filteredBy]: t("selectAll"), isSelectAll: true, _id: "select_all", id: "select_all" },
|
{
|
||||||
|
[filteredBy]: t("selectAll"),
|
||||||
|
isSelectAll: true,
|
||||||
|
_id: "select_all",
|
||||||
|
id: "select_all",
|
||||||
|
},
|
||||||
...options,
|
...options,
|
||||||
]
|
]
|
||||||
: options;
|
: options;
|
||||||
@@ -145,7 +150,9 @@ const Search = ({
|
|||||||
disableClearable
|
disableClearable
|
||||||
options={enhancedOptions}
|
options={enhancedOptions}
|
||||||
getOptionLabel={(option) => option[filteredBy]}
|
getOptionLabel={(option) => option[filteredBy]}
|
||||||
isOptionEqualToValue={(option, value) => (option._id ?? option.id) === (value?._id ?? value?.id)} // Compare by unique identifier
|
isOptionEqualToValue={(option, value) =>
|
||||||
|
(option._id ?? option.id) === (value?._id ?? value?.id)
|
||||||
|
} // Compare by unique identifier
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
<FieldWrapper
|
<FieldWrapper
|
||||||
label={label}
|
label={label}
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ const useMaintenanceData = () => {
|
|||||||
const endTime = dayjs(end);
|
const endTime = dayjs(end);
|
||||||
const durationInMs = endTime.diff(startTime, "milliseconds").toString();
|
const durationInMs = endTime.diff(startTime, "milliseconds").toString();
|
||||||
const { duration, durationUnit } = getDurationAndUnit(durationInMs);
|
const { duration, durationUnit } = getDurationAndUnit(durationInMs);
|
||||||
const monitor = monitorList.find((monitor) => (monitor._id ?? monitor.id) === monitorId);
|
const monitor = monitorList.find(
|
||||||
|
(monitor) => (monitor._id ?? monitor.id) === monitorId
|
||||||
|
);
|
||||||
const maintenanceWindowInformation = {
|
const maintenanceWindowInformation = {
|
||||||
name,
|
name,
|
||||||
repeat: REVERSE_REPEAT_LOOKUP[repeat],
|
repeat: REVERSE_REPEAT_LOOKUP[repeat],
|
||||||
|
|||||||
Reference in new issue
Block a user