Skip to content

Commit

Permalink
Deleting Stage1 is not allowed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mostend committed Mar 28, 2024
1 parent ca10235 commit 6fbc2cf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</div>
<div class="padding-lr5">
<button class="uk-button uk-button-primary uk-button-small"
x-on:click="DeleteStage(Stage)">Delete</button>
x-on:click="DeleteStage(Stage,index)">Delete</button>
</div>
</div>
</template>
Expand Down Expand Up @@ -384,7 +384,16 @@
}
UIkit.modal(document.getElementById("modal")).show();
},
DeleteStage(Stage) {
DeleteStage(Stage, index) {
if (index === 0) {
UIkit.notification(
`
<hr>
Deleting Stage1 is not allowed!
`
, { status: 'danger', timeout: 5000, pos: 'top-center' });
return
}
this.data.Stages.splice(this.data.Stages.indexOf(Stage), 1)
if (this.data.Stages.length === 0) {
this.data.LinearCascadeNoise = 0
Expand Down

0 comments on commit 6fbc2cf

Please sign in to comment.