1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

[bug] do not show disabled groups and plans during availability creation

This commit is contained in:
Sylvain 2020-05-06 17:28:00 +02:00
parent a78a91c583
commit 4f43dc1407
3 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@
- Fix a bug: subscription page shows the groups without any active plans
- Fix a bug: cart price inconsistently updated after a subscription
- Fix a bug: background image of the profile is not shown and wrong menu hover color
- Fix a bug: do not show disabled groups and plans during availability creation
- Fix a security issue: updated jquery to fix [CVE-2020-11023](https://nvd.nist.gov/vuln/detail/CVE-2020-11023)
## v4.3.4 2020 April 14

View File

@ -757,9 +757,9 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui
});
// group plans by Group
for (let group of Array.from(groupsPromise)) {
for (let group of groupsPromise.filter(g => !g.disabled)) {
const groupObj = { id: group.id, name: group.name, plans: [] };
for (let plan of Array.from(plansPromise)) {
for (let plan of plansPromise.filter(g => !g.disabled)) {
if (plan.group_id === group.id) { groupObj.plans.push(plan); }
}
if (groupObj.plans.length > 0) {

View File

@ -183,7 +183,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
for (let plan of plansPromise) {
if (plan.group_id === group.id) {
groupObj.plans.push(plan);
if (!plan.disabled) { groupObj.actives++; }
if (!plan.disabled) { groupplansClassifiedByGroupObj.actives++; }
}
}
$scope.plansClassifiedByGroup.push(groupObj);