|
|
|
@ -11,7 +11,6 @@ import { LAYER_IDS } from "./constants";
|
|
|
|
import { RANGE_FILTERS_KEYS, usePendingPointsFilters } from "../../stores/usePendingPointsFilters";
|
|
|
|
import { RANGE_FILTERS_KEYS, usePendingPointsFilters } from "../../stores/usePendingPointsFilters";
|
|
|
|
import { fieldHasChanged, predictionHasChanged } from "../../utils.js";
|
|
|
|
import { fieldHasChanged, predictionHasChanged } from "../../utils.js";
|
|
|
|
import { useSourceLayerName } from "../../api.js";
|
|
|
|
import { useSourceLayerName } from "../../api.js";
|
|
|
|
import { useMode } from "../../stores/useMode.js";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rawStatusExpression = ["==", ["get", "status"], STATUSES.pending];
|
|
|
|
const rawStatusExpression = ["==", ["get", "status"], STATUSES.pending];
|
|
|
|
|
|
|
|
|
|
|
|
@ -19,7 +18,6 @@ const useFilterExpression = () => {
|
|
|
|
const { filters, ranges } = usePendingPointsFilters();
|
|
|
|
const { filters, ranges } = usePendingPointsFilters();
|
|
|
|
const { prediction, categories, region } = filters;
|
|
|
|
const { prediction, categories, region } = filters;
|
|
|
|
const { selection } = usePointSelection();
|
|
|
|
const { selection } = usePointSelection();
|
|
|
|
const { isImportMode } = useMode();
|
|
|
|
|
|
|
|
const includedArr = [...selection.included];
|
|
|
|
const includedArr = [...selection.included];
|
|
|
|
const excludedArr = [...selection.excluded];
|
|
|
|
const excludedArr = [...selection.excluded];
|
|
|
|
|
|
|
|
|
|
|
|
@ -50,7 +48,7 @@ const useFilterExpression = () => {
|
|
|
|
? ["in", ["get", "category"], ["literal", categories]]
|
|
|
|
? ["in", ["get", "category"], ["literal", categories]]
|
|
|
|
: true;
|
|
|
|
: true;
|
|
|
|
|
|
|
|
|
|
|
|
const statusExpression = isImportMode ? true : rawStatusExpression;
|
|
|
|
const statusExpression = rawStatusExpression;
|
|
|
|
const predictionExpression = predictionHasChanged(filters, ranges) ? rawPredictionExpression : [true];
|
|
|
|
const predictionExpression = predictionHasChanged(filters, ranges) ? rawPredictionExpression : [true];
|
|
|
|
|
|
|
|
|
|
|
|
const matchFilterExpression = [
|
|
|
|
const matchFilterExpression = [
|
|
|
|
|