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 = '' this.networkingDomain = ''
} }
}, },
selectServices(services) { selectServices(bundleId, services) {
services.forEach((s) => { if (this.nixinBundles.includes(bundleId)) {
if (this.nixinServices.indexOf(s) === -1) { services.forEach((s) => {
this.nixinServices.push(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"> <div v-for="bundle in availableBundles">
<label> <label>
<input type="checkbox" v-model="nixinBundles" :id="bundle.id" :value="bundle.id" <input type="checkbox" v-model="nixinBundles" :id="bundle.id" :value="bundle.id"
@click="selectServices(bundle.services)" /> @change="selectServices(bundle.id, bundle.services)" />
{{ bundle.name }} {{ bundle.name }}
</label> </label>
</div> </div>