Fix build errors

This commit is contained in:
Darren Clarke 2024-04-21 20:47:55 +02:00
parent f93c4ad317
commit e720336768
22 changed files with 91 additions and 96 deletions

View file

@ -60,7 +60,7 @@ export const QueryDateRangeSelector: FC<QueryDateRangeSelectorProps> = () => {
<DatePicker
label={t("startDate")}
value={startDate}
onChange={(date) => {
onChange={(date: any) => {
setStartDate(date);
updateQuery({
startDate: { values: [date] },
@ -87,7 +87,7 @@ export const QueryDateRangeSelector: FC<QueryDateRangeSelectorProps> = () => {
<DatePicker
label={t("endDate")}
value={endDate}
onChange={(date) => {
onChange={(date: any) => {
setEndDate(date);
updateQuery({
endDate: { values: [date] },

File diff suppressed because one or more lines are too long

View file

@ -348,8 +348,8 @@ export const performLeafcutterQuery = async (
};
if (searchQuery.relativeDate.values.length > 0) {
/*
searchQuery.relativeDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
range: {
date: {
@ -358,9 +358,11 @@ export const performLeafcutterQuery = async (
},
});
});
*/
}
if (searchQuery.startDate.values.length > 0) {
/*
searchQuery.startDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
@ -370,10 +372,12 @@ export const performLeafcutterQuery = async (
},
},
});
});
})
; */
}
if (searchQuery.endDate.values.length > 0) {
/*
searchQuery.endDate.values.forEach((value: string) => {
// @ts-expect-error
body.query.bool.must.push({
@ -384,69 +388,88 @@ export const performLeafcutterQuery = async (
},
});
});
*/
}
if (searchQuery.incidentType.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "incident.keyword": searchQuery.incidentType.values },
});
*/
}
if (searchQuery.targetedGroup.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "targeted_group.keyword": searchQuery.targetedGroup.values },
});
*/
}
if (searchQuery.platform.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.platform.values },
});
*/
}
if (searchQuery.device.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.device.values },
});
*/
}
if (searchQuery.service.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.service.values },
});
*/
}
if (searchQuery.maker.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "technology.keyword": searchQuery.maker.values },
});
*/
}
if (searchQuery.subregion.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "region.keyword": searchQuery.subregion.values },
});
*/
}
if (searchQuery.country.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "country.keyword": searchQuery.country.values },
});
*/
}
if (searchQuery.continent.values.length > 0) {
/*
// @ts-expect-error
body.query.bool.must.push({
terms: { "continent.keyword": searchQuery.continent.values },
});
*/
}
const dataResponse = await client.search({

File diff suppressed because one or more lines are too long

View file

@ -9,11 +9,17 @@ interface ListProps {
title: string;
rows: any;
columns: GridColDef<any>[];
onRowClick: (id: string) => void;
onRowClick?: (id: string) => void;
buttons?: React.ReactNode;
}
export const List: FC<ListProps> = ({ title, rows, columns, onRowClick, buttons }) => {
export const List: FC<ListProps> = ({
title,
rows,
columns,
onRowClick = () => {},
buttons,
}) => {
const { h3 } = typography;
return (
@ -23,9 +29,7 @@ export const List: FC<ListProps> = ({ title, rows, columns, onRowClick, buttons
<Grid item>
<Box sx={h3}>{title}</Box>
</Grid>
<Grid item>
{buttons}
</Grid>
<Grid item>{buttons}</Grid>
</Grid>
<Grid item>
<Box

File diff suppressed because one or more lines are too long