feat: display author of changes in workflow tab (#5780)
This commit is contained in:
@ -882,6 +882,7 @@ export class Backend {
|
||||
label: collection && selectFileEntryLabel(collection, slug),
|
||||
mediaFiles,
|
||||
updatedOn: entryData.updatedAt,
|
||||
author: entryData.pullRequestAuthor,
|
||||
status: entryData.status,
|
||||
meta: { path: prepareMetaPath(path, collection) },
|
||||
});
|
||||
|
@ -128,12 +128,14 @@ function WorkflowCard({
|
||||
allowPublish,
|
||||
canPublish,
|
||||
onPublish,
|
||||
postAuthor,
|
||||
t,
|
||||
}) {
|
||||
return (
|
||||
<WorkflowCardContainer>
|
||||
<WorkflowLink to={editLink}>
|
||||
<CardCollection>{collectionLabel}</CardCollection>
|
||||
{postAuthor}
|
||||
<CardTitle>{title}</CardTitle>
|
||||
{(timestamp || authorLastChange) && <CardDate date={timestamp} author={authorLastChange} />}
|
||||
<CardBody>{body}</CardBody>
|
||||
@ -168,6 +170,7 @@ WorkflowCard.propTypes = {
|
||||
allowPublish: PropTypes.bool.isRequired,
|
||||
canPublish: PropTypes.bool.isRequired,
|
||||
onPublish: PropTypes.func.isRequired,
|
||||
postAuthor: PropTypes.string,
|
||||
t: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
|
@ -220,6 +220,7 @@ class WorkflowList extends React.Component {
|
||||
|
||||
const allowPublish = collection?.get('publish');
|
||||
const canPublish = ownStatus === status.last() && !entry.get('isPersisting', false);
|
||||
const postAuthor = entry.get('author');
|
||||
|
||||
return (
|
||||
<DragSource
|
||||
@ -244,6 +245,7 @@ class WorkflowList extends React.Component {
|
||||
allowPublish={allowPublish}
|
||||
canPublish={canPublish}
|
||||
onPublish={this.requestPublish.bind(this, collectionName, slug, ownStatus)}
|
||||
postAuthor={postAuthor}
|
||||
/>
|
||||
</div>,
|
||||
)
|
||||
|
Reference in New Issue
Block a user