attach action form and pivot values
I'm working on an attendance system and struggling with customising the attach action and form. There seem to be several affordances in that class, but I haven't been able to piece together how they all work.
I have the following DB schema:
cohort -hasMany()-> activity ->hasMany() - timeslot
cohort -hasMany()-> student
student-timeslot (many-many) pivot table to attach students to a timeslot - this has a pivot field to indicate (present, late, excused, absent)
I have a StudentsRelationManager on the TimeslotResource with an AttachAction.
The things I would like to do include:
* reference a different field in the attach select dropdown - I'm getting first_name and I'd like full_name
* scope the list of students available to attach to be limited to the timeslot->activity->cohort
* add another element to the attach form to set the pivot field - probably a dropdown with one of the above enumeration (p, l, e, a)
I've seen that the following might be possible, but don't know how they all fit together.
How could I implement these features?
0 Replies