fix(striker-ui): rename to resetChecks

main
Tsu-ba-me 1 year ago
parent 47960b8565
commit 71729e3425
  1. 6
      striker-ui/components/ManageFence/ManageFencePanel.tsx
  2. 6
      striker-ui/components/ManageManifest/ManageManifestPanel.tsx
  3. 6
      striker-ui/hooks/useChecklist.tsx

@ -160,7 +160,7 @@ const ManageFencePanel: FC = () => {
checks, checks,
getCheck, getCheck,
hasChecks, hasChecks,
resetChecklist, resetChecks,
setCheck, setCheck,
} = useChecklist({ list: fenceOverviews }); } = useChecklist({ list: fenceOverviews });
@ -246,7 +246,7 @@ const ManageFencePanel: FC = () => {
method: 'delete', method: 'delete',
onSuccess: () => { onSuccess: () => {
getFenceOverviews(); getFenceOverviews();
resetChecklist(); resetChecks();
}, },
url: '/fence', url: '/fence',
}); });
@ -382,7 +382,7 @@ const ManageFencePanel: FC = () => {
getFormSummaryEntryLabel, getFormSummaryEntryLabel,
hasChecks, hasChecks,
isEditFences, isEditFences,
resetChecklist, resetChecks,
setCheck, setCheck,
setConfirmDialogProps, setConfirmDialogProps,
setFormDialogProps, setFormDialogProps,

@ -217,7 +217,7 @@ const ManageManifestPanel: FC = () => {
checks, checks,
getCheck, getCheck,
hasChecks, hasChecks,
resetChecklist, resetChecks,
setCheck, setCheck,
} = useChecklist({ } = useChecklist({
list: manifestOverviews, list: manifestOverviews,
@ -445,7 +445,7 @@ const ManageManifestPanel: FC = () => {
method: 'delete', method: 'delete',
onSuccess: () => { onSuccess: () => {
getManifestOverviews(); getManifestOverviews();
resetChecklist(); resetChecks();
}, },
url: `/manifest`, url: `/manifest`,
}); });
@ -503,7 +503,7 @@ const ManageManifestPanel: FC = () => {
hasChecks, hasChecks,
isEditManifests, isEditManifests,
manifestOverviews, manifestOverviews,
resetChecklist, resetChecks,
setCheck, setCheck,
setConfirmDialogProps, setConfirmDialogProps,
setManifestDetail, setManifestDetail,

@ -16,7 +16,7 @@ const useChecklist = ({
hasAllChecks: boolean; hasAllChecks: boolean;
hasChecks: boolean; hasChecks: boolean;
multipleItems: boolean; multipleItems: boolean;
resetChecklist: () => void; resetChecks: () => void;
setAllChecks: SetAllChecksFunction; setAllChecks: SetAllChecksFunction;
setCheck: SetCheckFunction; setCheck: SetCheckFunction;
} => { } => {
@ -62,7 +62,7 @@ const useChecklist = ({
[checklist], [checklist],
); );
const resetChecklist = useCallback(() => setChecklist({}), []); const resetChecks = useCallback(() => setChecklist({}), []);
const setAllChecks = useCallback<SetAllChecksFunction>( const setAllChecks = useCallback<SetAllChecksFunction>(
(checked) => (checked) =>
@ -92,7 +92,7 @@ const useChecklist = ({
hasAllChecks, hasAllChecks,
hasChecks, hasChecks,
multipleItems, multipleItems,
resetChecklist, resetChecks,
setAllChecks, setAllChecks,
setCheck, setCheck,
}; };

Loading…
Cancel
Save