Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'create, publish and add new' button functionality #2437

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
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const ItemCreate = () => {
},
}).then(() => {
// Retain non rtk-query fetch of item publishing for legacy code
dispatch(fetchItemPublishing(modelZUID, itemZUID));
dispatch(fetchItemPublishing(modelZUID, newItemZUID));
});
};

Expand Down
4 changes: 2 additions & 2 deletions src/shell/store/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading