-
Notifications
You must be signed in to change notification settings - Fork 392
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
Add enable and export actions to list items #1583
Conversation
|
||
size: { | ||
type: String, | ||
default: 'lg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep it consistent, i would like you to have the default as 'md', and add lg to the one that needs it.
@@ -319,7 +319,7 @@ | |||
|
|||
<export | |||
data-test-id="button-export-workflow" | |||
:workflows="[workflow.workflowID]" | |||
:workflows="([workflow.workflowID])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need the ( )
Guessing linter flagged it, but its your rule not the eslint configurations.
variant="light" | ||
> | ||
<font-awesome-icon | ||
class="text-primary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for text primary
@@ -164,6 +164,41 @@ | |||
/> | |||
</b-dropdown-item> | |||
|
|||
<b-dropdown-item | |||
variant="light" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove variant light since it doesn't achieve anything
> | ||
<font-awesome-icon | ||
:class="statusClass(w)" | ||
:icon="['fas', 'power-off']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you try giving toggle-on/off icon a shot
:icon="['fas', 'power-off']" | ||
/> | ||
|
||
<b-button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont need to add a b-button since the b-dropdown-item is a button itself
const { workflowID } = w | ||
this.$AutomationAPI.workflowRead({ workflowID }) | ||
.then(({ workflowID, enabled }) => { | ||
this.$AutomationAPI.workflowUpdate({ ...w, workflowID, enabled: !enabled }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think you misunderstood me here. The reason you fetch it is so you have the latest version and you only toggle the enabled.
.then((w) => { | ||
this.toastSuccess(this.$t('notification:update.success')) | ||
this.filterList() | ||
this.statusText(w) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you call this.statusText() and this.statusClass here?
this.statusText(w) | ||
this.statusClass(w) | ||
}) | ||
.catch(this.toastErrorHandler(this.$t('notification:update.failed'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont need two catches if you chain requests properly.
.then(({ workflowID, enabled }) => { | ||
this.$AutomationAPI.workflowUpdate({ ...w, workflowID, enabled: !enabled }) | ||
.then((w) => { | ||
this.toastSuccess(this.$t('notification:update.success')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dedicated notification for this please
<font-awesome-icon | ||
class="text-primary" | ||
:icon="['fas', 'file-export']" | ||
/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The export button is still a link so it appears blue. Please add text-dark, same as is for permissions button
61a456c
to
5b5b82f
Compare
The following changes are implemented
TODO: Summary
Changes in the user interface:
TODO: Add screenshots, recordings or remove this section
Checklist when submitting a final (!draft) PR
closes #1419