-
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
2023.9.x feature clone report #1805
Conversation
@@ -28,28 +28,26 @@ | |||
size="lg" | |||
size-confirm="lg" | |||
variant="danger" | |||
:disabled="deleteDisabled || processingDelete || processing" |
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 need to keep the processing otherwise the other buttons are clickable when saving is processing.
size="lg" | ||
variant="light" | ||
:disabled="processing" | ||
:disabled="cloneDisabled || processingClone" | ||
:processing="processingClone" |
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 button variant should match the other clone buttons in the system
@@ -95,14 +97,12 @@ export default { | |||
handleClone (report) { | |||
this.processing = true | |||
this.processingClone = true | |||
const { handle, meta, sources, blocks, scenarios, labels } = report | |||
const clonedReport = this.report.clone() |
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.
There is no need to clone the report (this causes the list clone to fail)
Just prepare the variables which you get from the report and pass them to the reportCreate
meta.name = `${meta.name} (${this.$t('general:cloneSuffix')})` | ||
const handle = reportHandle ? `${report.handle}_${this.$t('general:cloneSuffix')}` : '' |
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.
I know i said to add the clone to the handle, but it just occurred to me that could raise an error if you clone the same report twice (they'll both have same handle)
So its honestly better to not have a handle at all.
9c4fada
to
76d2377
Compare
052d3e3
to
7dedd83
Compare
7dedd83
to
8a78320
Compare
8a78320
to
0ac8bde
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