Add initial status to approve table

dev
Platon Yasev 3 years ago
parent cacef77eda
commit 740c85390a

@ -8,7 +8,7 @@ import { useUpdateStatus } from "../../../hooks/useUpdateStatus";
export const TakeToWorkButton = () => {
const { filters } = useFilters();
const { prediction, categories } = filters;
const { prediction, categories, region } = filters;
const { selection } = usePointSelection();
const queryClient = useQueryClient();
@ -30,6 +30,16 @@ export const TakeToWorkButton = () => {
"excluded[]": [...selection.excluded],
});
if (region) {
if (region.type === "ao") {
params.append("ao[]", region.id);
}
if (region.type === "rayon") {
params.append("rayon[]", region.id);
}
}
updateStatus(params);
};

@ -12,6 +12,7 @@ import { useUpdateStatus } from "../../../hooks/useUpdateStatus";
const statusOptions = [
{ label: STATUSES.approve, value: STATUSES.approve },
{ label: STATUSES.working, value: STATUSES.working },
{ label: STATUSES.initial, value: STATUSES.initial },
];
const StatusSelect = ({ value, onChange, disabled }) => {

Loading…
Cancel
Save