diff --git a/src/App.vue b/src/App.vue index d614253..d718fd6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -143,6 +143,7 @@ break; } case 'FINISH_LOOKBACK': { + console.debug('Lookback completed'); this.$bvToast.toast(`Lookback completed`, { title: 'Notification', variant: 'success', diff --git a/src/components/PatternsDropdown.vue b/src/components/PatternsDropdown.vue index 80c0546..e07637a 100644 --- a/src/components/PatternsDropdown.vue +++ b/src/components/PatternsDropdown.vue @@ -30,6 +30,12 @@
+ +
- + @@ -64,7 +70,7 @@ export default { name: 'PatternsDropdown', - components: {AddPattern: PatternModal, }, + components: {PatternModal: PatternModal, }, data() { return { patternModalIsCreating: true, @@ -99,7 +105,16 @@ this.patternModalIsCreating = true; this.patternModalEditingPattern = {}; this.$bvModal.show('patternModal'); - console.debug('Showing patternModal...'); + console.debug('Showing patternModal (create)'); + }, + showEditPattern(pattern) { + this.patternModalIsCreating = false; + this.patternModalEditingPattern = {}; + this.$nextTick(() => { + this.patternModalEditingPattern = pattern; + this.$bvModal.show('patternModal'); + console.debug('Showing patternModal (edit)'); + }); }, showLookBack(pattern) { // Не знаю, как сделать это без костылей diff --git a/src/views/PatternModal.vue b/src/views/PatternModal.vue index 2a5114e..856ce5b 100644 --- a/src/views/PatternModal.vue +++ b/src/views/PatternModal.vue @@ -14,6 +14,7 @@ { const data = response.data; - console.debug('Done adding pattern', data); + console.debug('Done adding/editing pattern', data); this.$emit('patternAddComplete'); this.reset(); this.$bvModal.hide('patternModal');