Skip to content

Commit

Permalink
Merge pull request #34 from vivid-planet/disable-edit-for-sent-campaign
Browse files Browse the repository at this point in the history
COM-343: Disable edit for sent campaign
  • Loading branch information
RainbowBunchie authored Feb 5, 2024
2 parents 32dc41a + dbef5c4 commit 7784108
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/admin/src/emailCampaigns/EmailCampaignsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,16 @@ export function EmailCampaignsGrid({
headerName: "",
sortable: false,
filterable: false,
align: "right",
type: "actions",
renderCell: ({ row }) => {
return (
<>
<IconButton component={StackLink} pageName="edit" payload={row.id}>
<Edit color="primary" />
</IconButton>
{!(row.sendingState === "SENT" || (row.scheduledAt && row.scheduledAt < new Date())) && (
<IconButton component={StackLink} pageName="edit" payload={row.id}>
<Edit color="primary" />
</IconButton>
)}
<CrudContextMenu
copyData={() => {
return {
Expand Down

0 comments on commit 7784108

Please sign in to comment.