I would like to ask help on how to change the field 'Branch' seen from the New Schedule Form
from single selection to multiple selection (like the first field 'Employee').
I actually have managed to figure out how to turn it into multiple selection in the UI but I'm having problems on successfully saving multiple records at the same time, like the current mass adding to the schedule, if multiple employees are selected.
What I'm actually planning was if multiple employees are selected and also multiple branches, if I click save it should have multiple rows shown in the schedule grid per employee per branch.
Can someone guide me which codes to edit in ScheduleViewController.js, where I believe the changes have to be done? I tried looking for occurences of
"user_id, user_ids, branch_id, branch_ids"
but the codes really looks complicated to me especially if I tried to mimic the codes for 'mass add employee', I worry that I have to do cascading changes since it was designed to have only single Branch selection.
I tried to look at other forms if there is a multiple selection field used for Branch but there is nothing I've found.
I hope my request is reasonable. Thanks
Btw, im using community edition, see below
Discussion for TimeTrex open source community developers.
3 posts • Page 1 of 1
If I understand you correctly, what you are asking for isn't going to work. If you select multiple employees and/or multiple branches for the same Start/End time, it would try to create duplicate schedules, which would be in conflict with one another and wouldn't make sense.
Well can we make it dynamic? I mean for every extra Branch selected there will be another set of fields showing for Start/End time to specify the separate schedule. Or is that too much work?