Replaces "entityState" with "state"

for consistency with the server-side.
This commit is contained in:
leekelleher
2024-04-29 18:34:39 +01:00
parent 5d49ed805b
commit 0c4651eb47
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import type { UmbDocumentCollectionItemModel } from '../types.js';
import { fromCamelCase } from '@umbraco-cms/backoffice/utils';
export { UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS, UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS } from './manifests.js';
@@ -13,8 +14,8 @@ export function getPropertyValueByAlias(sortOrder: number, item: UmbDocumentColl
return item.creator;
case 'name':
return item.name;
case 'entityState':
return item.state.replace(/([A-Z])/g, ' $1');
case 'state':
return fromCamelCase(item.state);
case 'published':
return item.state !== 'Draft' ? 'True' : 'False';
case 'sortOrder':

View File

@@ -47,9 +47,9 @@ export class UmbDocumentTableCollectionViewElement extends UmbLitElement {
},
{
name: this.localize.term('content_publishStatus'),
alias: 'entityState',
alias: 'state',
elementName: 'umb-document-table-column-state',
allowSorting: true,
allowSorting: false,
},
];