Disable start button if no strategy is selected

This commit is contained in:
Matthias 2023-12-27 19:55:19 +01:00
parent dbbaac090d
commit 26e89f2185
2 changed files with 8 additions and 2 deletions

View File

@ -167,7 +167,11 @@
<b-button <b-button
id="start-backtest" id="start-backtest"
variant="primary" variant="primary"
:disabled="botStore.activeBot.backtestRunning || !botStore.activeBot.canRunBacktest" :disabled="
!btStore.canRunBacktest ||
botStore.activeBot.backtestRunning ||
!botStore.activeBot.canRunBacktest
"
class="mx-1" class="mx-1"
@click="clickBacktest" @click="clickBacktest"
> >

View File

@ -20,6 +20,8 @@ export const useBtStore = defineStore('btStore', {
}, },
}; };
}, },
getters: {}, getters: {
canRunBacktest: (state) => state.strategy !== '',
},
actions: {}, actions: {},
}); });