ProjectListItem: Disabled sync button and render tooltip on sync.

Added feature of disabling sync button when users click sync button and rendering tooltip when disabled sync button on hover.
This commit is contained in:
seiwailai 2021-04-29 15:50:53 +08:00
parent bb896c0b02
commit 07d01c49c0
2 changed files with 8 additions and 1 deletions

View File

@ -169,7 +169,10 @@ function ProjectListItem({
visible={project.summary_fields.user_capabilities.start}
tooltip={i18n._(t`Sync Project`)}
>
<ProjectSyncButton projectId={project.id} />
<ProjectSyncButton
projectId={project.id}
lastJobStatus={project.summary_fields.last_job.status}
/>
</ActionItem>
<ActionItem
visible={project.summary_fields.user_capabilities.edit}

View File

@ -342,6 +342,10 @@ describe('<ProjectsListItem />', () => {
description: '',
name: 'Mock org',
},
last_job: {
id: 9000,
status: 'successful',
},
user_capabilities: {
start: true,
},