Skip to content

Commit

Permalink
Temporarly revert FieldSelectIssue as it affected e2e tests for curre…
Browse files Browse the repository at this point in the history
…nt workflow
  • Loading branch information
jardakotesovec committed Sep 23, 2024
1 parent d5aa1a4 commit c1debb4
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions src/components/Form/fields/FieldSelectIssue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
v-if="button"
v-bind="button"
class="pkpFormField--selectIssue__button"
@click="selectIssue"
@click="emitGlobal(button.event)"
>
{{ button.label }}
</PkpButton>
Expand Down Expand Up @@ -111,8 +111,15 @@ export default {
*/
button() {
let button = null;
if (this.publicationStatus !== pkp.const.STATUS_PUBLISHED) {
if (this.publicationStatus === pkp.const.STATUS_SCHEDULED) {
button = {
event: 'unpublish:publication',
isWarnable: true,
label: this.unscheduleLabel,
};
} else if (this.publicationStatus !== pkp.const.STATUS_PUBLISHED) {
button = {
event: 'schedule:publication',
label: this.value ? this.changeIssueLabel : this.assignLabel,
};
}
Expand Down Expand Up @@ -155,23 +162,6 @@ export default {
},
},
methods: {
async selectIssue() {
// workaround to avoid circular dependencies in storybook
// There is chain if imports, and some of them imported form
// which seems to be causing circular dependency
const {useSubmissionSummaryStore} = await import(
'@/pages/dashboard/SubmissionSummaryModal/submissionSummaryStore.js'
);
const summaryStore = useSubmissionSummaryStore();
summaryStore.workflowAssignToIssue({}, (finishedData) => {
if (finishedData.data.issueId) {
this.currentValue = finishedData.data.issueId;
}
});
},
/**
* Emit a global event
*
Expand Down

0 comments on commit c1debb4

Please sign in to comment.