@griddo/ax 11.4.12 → 11.4.13-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "11.4.
|
|
4
|
+
"version": "11.4.13-rc.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
@@ -220,5 +220,5 @@
|
|
|
220
220
|
"publishConfig": {
|
|
221
221
|
"access": "public"
|
|
222
222
|
},
|
|
223
|
-
"gitHead": "
|
|
223
|
+
"gitHead": "ce34b7c15cd11a725be71a317afd8bde37880bb2"
|
|
224
224
|
}
|
|
@@ -113,9 +113,9 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
113
113
|
const isTranslated = pageLanguages.length > 1;
|
|
114
114
|
const activeColumns = columns.filter((col) => col.show).map((col) => col.id);
|
|
115
115
|
const API_URL = process.env.GRIDDO_API_URL || process.env.REACT_APP_API_ENDPOINT;
|
|
116
|
-
const isPublished = liveStatus
|
|
116
|
+
const isPublished = liveStatus?.status === pageStatus.PUBLISHED || liveStatus?.status === pageStatus.UPLOAD_PENDING;
|
|
117
117
|
const isAllowedToDelete = (isPublished && isAllowedToDeletePublishedPage) || (!isPublished && isAllowedToDeletePage);
|
|
118
|
-
const isScheduledPub = !!publicationScheduled && (liveStatus
|
|
118
|
+
const isScheduledPub = !!publicationScheduled && (liveStatus?.status === pageStatus.SCHEDULED || haveDraftPage);
|
|
119
119
|
|
|
120
120
|
const publishedTooltip: Record<string, string> = {
|
|
121
121
|
active: "Live",
|
|
@@ -408,7 +408,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
408
408
|
action: viewPage,
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
-
const publishAction = getPublishItem(page.liveStatus
|
|
411
|
+
const publishAction = getPublishItem(page.liveStatus?.status, canBeUnpublished);
|
|
412
412
|
|
|
413
413
|
menuOptions = publishAction && isAllowedToPublishPages ? [publishAction, ...menuOptions] : menuOptions;
|
|
414
414
|
|
|
@@ -432,7 +432,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
432
432
|
|
|
433
433
|
menuOptions = page.haveDraftPage ? [...editOptions, ...menuOptions] : menuOptions;
|
|
434
434
|
|
|
435
|
-
menuOptions = page.liveStatus
|
|
435
|
+
menuOptions = page.liveStatus?.status === pageStatus.PUBLISHED ? [viewOption, ...menuOptions] : menuOptions;
|
|
436
436
|
|
|
437
437
|
const GlobalMark = () => (
|
|
438
438
|
<Tooltip content="Global Page">
|
|
@@ -467,7 +467,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
467
467
|
|
|
468
468
|
const mainCopyModalAction = { title: "Copy page", onClick: copyToOtherSite, disabled: !site };
|
|
469
469
|
|
|
470
|
-
const getLiveStatus = () => (isScheduledPub ? "scheduled" : haveDraftPage ? "modified" : liveStatus
|
|
470
|
+
const getLiveStatus = () => (isScheduledPub ? "scheduled" : haveDraftPage ? "modified" : liveStatus?.status);
|
|
471
471
|
|
|
472
472
|
const mainUnpublishAction = { title: "Ok", onClick: toggleUnpublishModal };
|
|
473
473
|
|
|
@@ -268,12 +268,12 @@ const GlobalPageItem = (props: IGlobalPageItemProps): JSX.Element => {
|
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
const publishAction = getPublishItem(globalPage.liveStatus
|
|
271
|
+
const publishAction = getPublishItem(globalPage.liveStatus?.status);
|
|
272
272
|
menuOptions = publishAction && isAllowedToPublishPages ? [publishAction, ...menuOptions] : menuOptions;
|
|
273
273
|
|
|
274
274
|
menuOptions = globalPage.haveDraftPage ? [...editOptions, ...menuOptions] : menuOptions;
|
|
275
275
|
|
|
276
|
-
menuOptions = globalPage.liveStatus
|
|
276
|
+
menuOptions = globalPage.liveStatus?.status === pageStatus.PUBLISHED ? [viewOption, ...menuOptions] : menuOptions;
|
|
277
277
|
|
|
278
278
|
const mainDuplicateModalAction = {
|
|
279
279
|
title: "Duplicate",
|