|
|
|
@ -7,9 +7,10 @@ import { useUpdateStatus } from "../../../hooks/useUpdateStatus";
|
|
|
|
import { ArrowRightOutlined } from "@ant-design/icons";
|
|
|
|
import { ArrowRightOutlined } from "@ant-design/icons";
|
|
|
|
import { Title } from "../../../components/Title";
|
|
|
|
import { Title } from "../../../components/Title";
|
|
|
|
import { usePendingPointsFilters } from "../../../stores/usePendingPointsFilters";
|
|
|
|
import { usePendingPointsFilters } from "../../../stores/usePendingPointsFilters";
|
|
|
|
|
|
|
|
import { appendFiltersInUse } from "../../../utils.js";
|
|
|
|
|
|
|
|
|
|
|
|
export const TakeToWorkButton = ({ disabled }) => {
|
|
|
|
export const TakeToWorkButton = ({ disabled }) => {
|
|
|
|
const { filters } = usePendingPointsFilters();
|
|
|
|
const { filters, ranges } = usePendingPointsFilters();
|
|
|
|
const { prediction, categories, region } = filters;
|
|
|
|
const { prediction, categories, region } = filters;
|
|
|
|
const { selection } = usePointSelection();
|
|
|
|
const { selection } = usePointSelection();
|
|
|
|
const queryClient = useQueryClient();
|
|
|
|
const queryClient = useQueryClient();
|
|
|
|
@ -34,6 +35,8 @@ export const TakeToWorkButton = ({ disabled }) => {
|
|
|
|
"excluded[]": [...selection.excluded],
|
|
|
|
"excluded[]": [...selection.excluded],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
appendFiltersInUse(params, filters, ranges);
|
|
|
|
|
|
|
|
|
|
|
|
if (region) {
|
|
|
|
if (region) {
|
|
|
|
if (region.type === "ao") {
|
|
|
|
if (region.type === "ao") {
|
|
|
|
params.append("district[]", region.id);
|
|
|
|
params.append("district[]", region.id);
|
|
|
|
|