|
|
|
|
@ -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);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|