Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/events/partials/EventsDateCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { editFilterValue } from "../../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../../thunks/tableThunks";
import { getFilters } from "../../../selectors/tableFilterSelectors";
import { useAppDispatch, useAppSelector } from "../../../store";
import { fetchEvents } from "../../../slices/eventSlice";
Expand Down Expand Up @@ -34,7 +34,7 @@ const EventsDateCell = ({
endDate.setHours(23);
endDate.setMinutes(59);
endDate.setSeconds(59);

dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: startDate.toISOString() + "/" + endDate.toISOString()}));
await dispatch(fetchEvents());
dispatch(loadEventsIntoTable());
Expand Down
3 changes: 2 additions & 1 deletion src/components/events/partials/EventsLocationCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { getFilters } from "../../../selectors/tableFilterSelectors";
import { editFilterValue } from "../../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../../store";
import { fetchEvents } from "../../../slices/eventSlice";
import { Event } from "../../../slices/eventSlice";
Expand All @@ -23,6 +23,7 @@ const EventsLocationCell = ({
const addFilter = (location: string) => {
let filter = filterMap.find(({ name }) => name === "location");
if (!!filter) {
dispatch(goToPage(0));
dispatch(editFilterValue({filterName: filter.name, value: location}));
dispatch(fetchEvents());
dispatch(loadEventsIntoTable());
Expand Down
3 changes: 2 additions & 1 deletion src/components/events/partials/EventsPresentersCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { getFilters } from "../../../selectors/tableFilterSelectors";
import { editFilterValue } from "../../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../../store";
import { fetchEvents } from "../../../slices/eventSlice";
import { Event } from "../../../slices/eventSlice";
Expand All @@ -25,6 +25,7 @@ const EventsPresentersCell = ({
({ name }) => name === "presentersBibliographic"
);
if (!!filter) {
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: presenter}));
await dispatch(fetchEvents());
dispatch(loadEventsIntoTable());
Expand Down
3 changes: 2 additions & 1 deletion src/components/events/partials/EventsSeriesCell.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { getFilters } from "../../../selectors/tableFilterSelectors";
import { editFilterValue } from "../../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../../store";
import { fetchEvents } from "../../../slices/eventSlice";
import { Event } from "../../../slices/eventSlice";
Expand All @@ -23,6 +23,7 @@ const EventsSeriesCell = ({
const addFilter = async (seriesId: string) => {
let filter = filterMap.find(({ name }) => name === "series");
if (!!filter) {
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: seriesId}));
await dispatch(fetchEvents());
dispatch(loadEventsIntoTable());
Expand Down
3 changes: 2 additions & 1 deletion src/components/events/partials/EventsTechnicalDateCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { useTranslation } from "react-i18next";
import { getFilters } from "../../../selectors/tableFilterSelectors";
import { editFilterValue } from "../../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../../store";
import { fetchEvents } from "../../../slices/eventSlice";
import { renderValidDate } from "../../../utils/dateUtils";
Expand All @@ -26,6 +26,7 @@ const EventsTechnicalDateCell = ({
const addFilter = async (date: string) => {
let filter = filterMap.find(({ name }) => name === "technicalStart");
if (!!filter) {
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date}));
await dispatch(fetchEvents());
dispatch(loadEventsIntoTable());
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
editTextFilter,
removeTextFilter,
} from "../../slices/tableFilterSlice";
import { loadEventsIntoTable } from "../../thunks/tableThunks";
import { loadEventsIntoTable, goToPage } from "../../thunks/tableThunks";
import { useAppDispatch, useAppSelector } from "../../store";
import { fetchEvents } from "../../slices/eventSlice";
import { ParseKeys } from "i18next";
Expand Down Expand Up @@ -38,6 +38,7 @@ const Stats = () => {
let filter = filterMap.find(({ name }) => name === f.name);
filterValue = f.value;
if (!!filter) {
dispatch(goToPage(0));
dispatch(editFilterValue({filterName: filter.name, value: filterValue}));
}
});
Expand Down
Loading