Skip to content

Commit

Permalink
Merge pull request #854 from dennis531/fix-event-action-pages
Browse files Browse the repository at this point in the history
Show correct event details modal with table actions
  • Loading branch information
lkiesow authored Jul 30, 2024
2 parents 3584cdc + d59e007 commit 8e84375
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/components/events/partials/EventActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ import {
} from "../../../slices/seriesDetailsSlice";
import { Event, deleteEvent } from "../../../slices/eventSlice";
import { Tooltip } from "../../shared/Tooltip";
import {
openModal,
setModalPage
} from "../../../slices/eventDetailsSlice";
import { openModal } from "../../../slices/eventDetailsSlice";

/**
* This component renders the action cells of events in the table view
Expand Down Expand Up @@ -55,10 +52,6 @@ const EventActionCell = ({
setEmbeddingCodeModal(true);
};

const showEventDetailsModal = () => {
dispatch(openModal(EventDetailsPage.Metadata, row))
};

const showSeriesDetailsModal = () => {
setSeriesDetailsModal(true);
};
Expand All @@ -80,23 +73,19 @@ const EventActionCell = ({
};

const onClickEventDetails = () => {
dispatch(setModalPage(EventDetailsPage.Metadata));
showEventDetailsModal();
dispatch(openModal(EventDetailsPage.Metadata, row));
};

const onClickComments = () => {
dispatch(setModalPage(EventDetailsPage.Comments));
showEventDetailsModal();
dispatch(openModal(EventDetailsPage.Comments, row));
};

const onClickWorkflow = () => {
dispatch(setModalPage(EventDetailsPage.Workflow));
showEventDetailsModal();
dispatch(openModal(EventDetailsPage.Workflow, row));
};

const onClickAssets = () => {
dispatch(setModalPage(EventDetailsPage.Assets));
showEventDetailsModal();
dispatch(openModal(EventDetailsPage.Assets, row));
};

return (
Expand Down

0 comments on commit 8e84375

Please sign in to comment.