do active center filtering in frontend for person creation

This commit is contained in:
2023-09-14 14:30:58 +02:00
parent b4f9501af5
commit cd85e37c1b
3 changed files with 5 additions and 5 deletions

View File

@@ -329,12 +329,13 @@ export default {
if (this.action !== 'create') {
this.loadData();
} else {
console.log('show centers', this.showCenters);
// console.log('show centers', this.showCenters);
getCentersForPersonCreation()
.then(params => {
this.config.centers = params.centers;
this.config.centers = params.centers.filter(c => c.isActive);
this.showCenters = params.showCenters;
console.log('show centers inside', this.showCenters);
// console.log('centers', this.config.centers)
// console.log('show centers inside', this.showCenters);
if (this.showCenters && this.config.centers.length === 1) {
this.person.center = this.config.centers[0];
}