Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion 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 @@ -35,6 +35,7 @@ const EventsDateCell = ({
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}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation:

Suggested change
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: presenter}));
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}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation:

Suggested change
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: seriesId}));
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}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation:

Suggested change
dispatch(goToPage(0));
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date}));
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}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation:

Suggested change
dispatch(goToPage(0));
dispatch(editFilterValue({filterName: filter.name, value: filterValue}));
dispatch(goToPage(0));
dispatch(editFilterValue({filterName: filter.name, value: filterValue}));

}
});
Expand Down
Loading