fix(generator): bundles double click and uncheck services
All checks were successful
deploy to prod / Build and deploy site (push) Successful in 35s

This commit is contained in:
Florian Schmitt 2024-10-02 13:52:33 +03:00
parent 2581265ded
commit 5efd795211

View file

@ -86,12 +86,21 @@ export default {
this.networkingDomain = ''
}
},
selectServices(services) {
services.forEach((s) => {
if (this.nixinServices.indexOf(s) === -1) {
this.nixinServices.push(s)
}
})
selectServices(bundleId, services) {
if (this.nixinBundles.includes(bundleId)) {
services.forEach((s) => {
if (this.nixinServices.indexOf(s) === -1) {
this.nixinServices.push(s)
}
})
} else {
services.forEach((s) => {
const index = this.nixinServices.indexOf(s);
if (index > -1) {
this.nixinServices.splice(index, 1);
}
})
}
}
}
}
@ -144,7 +153,7 @@ export default {
<div v-for="bundle in availableBundles">
<label>
<input type="checkbox" v-model="nixinBundles" :id="bundle.id" :value="bundle.id"
@click="selectServices(bundle.services)" />
@change="selectServices(bundle.id, bundle.services)" />
{{ bundle.name }}
</label>
</div>