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

fix bug: cant reserve formation slot

This commit is contained in:
Du Peng 2020-02-11 13:21:25 +01:00
parent d9676b604c
commit 760109de05
5 changed files with 9 additions and 1 deletions

View File

@ -243,6 +243,8 @@ Application.Controllers.controller('ReserveSpaceController', ['$scope', '$stateP
// list of plans, classified by group
$scope.plansClassifiedByGroup = [];
$scope.groups = groupsPromise;
$scope.plans = plansPromise;
for (let group of Array.from(groupsPromise)) {
const groupObj = { id: group.id, name: group.name, plans: [] };
for (let plan of Array.from(plansPromise)) {

View File

@ -111,6 +111,8 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
{ member: {} };
// list of plans, classified by group
$scope.groups = groupsPromise;
$scope.plans = plansPromise;
$scope.plansClassifiedByGroup = [];
for (let group of Array.from(groupsPromise)) {
const groupObj = { id: group.id, name: group.name, plans: [] };

View File

@ -35,6 +35,8 @@
plan="selectedPlan"
plan-selection-time="planSelectionTime"
settings="settings"
plans="plans"
groups="groups"
on-slot-added-to-cart="markSlotAsAdded"
on-slot-removed-from-cart="markSlotAsRemoved"
on-slot-start-to-modify="markSlotAsModifying"

View File

@ -47,6 +47,8 @@
plan="selectedPlan"
plan-selection-time="planSelectionTime"
settings="settings"
plans="plans"
groups="groups"
on-slot-added-to-cart="markSlotAsAdded"
on-slot-removed-from-cart="markSlotAsRemoved"
on-slot-start-to-modify="markSlotAsModifying"

View File

@ -33,5 +33,5 @@ json.array!(@availabilities) do |a|
json.id t.id
json.name t.name
end
json.plan_ids slot.availability.plan_ids
json.plan_ids a.plan_ids
end