From 42fbe6833c85f08086a2c1872d85321a486a2e2a Mon Sep 17 00:00:00 2001 From: Andres Date: Wed, 3 Jan 2024 14:39:40 -0800 Subject: [PATCH 1/3] Revert published logic change --- src/shell/store/content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/store/content.js b/src/shell/store/content.js index fd82ec10f2..045e77b186 100644 --- a/src/shell/store/content.js +++ b/src/shell/store/content.js @@ -860,8 +860,8 @@ function parsePublishState(records) { If `publishAt` is set but unpublishAt is not you only need to determine if `nowGMT` is after `publishAt`. a.k.a is it live If both `publishAt` and `unpublishAt` are set you need determine all 3 states. **/ - const nowGMT = moment.utc().startOf("minute"); - const publishAtGMT = moment(record.publishAt).startOf("minute"); + const nowGMT = moment.utc(); + const publishAtGMT = moment(record.publishAt); const unpublishAtGMT = moment(record.unpublishAt); // Current time is before publishAt so it is scheduled From 3fe753ccab61adf09847103a9879072a1c63a084 Mon Sep 17 00:00:00 2001 From: Andres Date: Mon, 8 Jan 2024 17:49:42 -0800 Subject: [PATCH 2/3] Fix create, publish and add new button functionality --- .../content-editor/src/app/views/ItemCreate/ItemCreate.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx b/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx index fd3fb10c3a..f00ba993d9 100644 --- a/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx +++ b/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx @@ -208,6 +208,7 @@ export const ItemCreate = () => { break; case "publishAddNew": + console.log("testing here", res.data.ZUID); // Publish but stay on page handlePublish(res.data.ZUID); setWillRedirect(false); @@ -260,7 +261,7 @@ export const ItemCreate = () => { }, }).then(() => { // Retain non rtk-query fetch of item publishing for legacy code - dispatch(fetchItemPublishing(modelZUID, itemZUID)); + dispatch(fetchItemPublishing(modelZUID, newItemZUID)); }); }; From 48150e49f6ceffaa16d92b5d4363ba1ccbc3f0ea Mon Sep 17 00:00:00 2001 From: Andres Date: Mon, 8 Jan 2024 17:51:25 -0800 Subject: [PATCH 3/3] remove console log --- src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx b/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx index f00ba993d9..4630729a21 100644 --- a/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx +++ b/src/apps/content-editor/src/app/views/ItemCreate/ItemCreate.tsx @@ -208,7 +208,6 @@ export const ItemCreate = () => { break; case "publishAddNew": - console.log("testing here", res.data.ZUID); // Publish but stay on page handlePublish(res.data.ZUID); setWillRedirect(false);