Conversation
|
Looks much better - maybe we could publish a JSON schema? Probably would make it clear and we could have the users validate their data beforehand / know the exact spect we're looking for. |
|
Requested the issue creator to look at the Images and the doc's that I have modified to check it ticks the boxes for what was proposed, from a backend side is to make sure it actually reserves the stand for the user and if we need to make modifications to the plugin itself. |
|
Plugin changes should not be required, stand assignments are handled on the server + given some of the stand reservation logic is already present we can assume that it works. |
Good to here no response from Issue poster so at your discretion if your happy with the changes feel free with the merge |
|
I dont think I have strong opinions about how it might work main concerns are is it documented well - looks like it is if we give VAA's stand assignment authority we have to be able to protect ourselves from them abusing this thanks for moving this forward :) |
@cpawley VAA role has only Upload permissions, authority of Approval is done by the other roles from Web/Admin team of UKCP potentially may add another role for Events team to approve but that is a different discussion I can look at adding Temporary role placement for the VAA role as well as the static role for verified VAA's (eg: BAV) |
|
then perfect, concept wise im happy :) this adds a huge amount of flexibility to our system and offers VAA's the chance to be actively involved in events where they take the driving seat :) thanks! |
|
I just realised a small flaw in my code in regards to the slot planning, It is currently set PER slot for one callsign for the entire event period but in regards to as an Example Speedbird24 its multiple different callsigns at a "Slot" so need to tweak the JSON formatting to accommodate this and the System on the backend. So currently this is how it works BAW1234 is expected between 9:00 and 9:30 so Stand 531 is reserved for them The system currently reserves the slot for the entire Period of the Event for BAW1234 Proposed change to how it will work BAW1234 is expected between 9:00 and 9:30 on Stand 531 and the stand is reserved for them System Picks up the change from within the plan that's uploaded by the VAA and so VATUK can limit (if they wish) the amount of Stands an Event can use, and can also assist planning teams of the VAA |
|
since some events can be 8->24 hrs this would need to be adopted - they need to assign stands for multiple time periods in the day |
Downside of thinking about code while watching movies with the family |
🧾 Summary of changes (Activation + slot-based stand reservation plans)🆕 New scheduled command: activate plans + sync assignments
🧰 Import tooling: JSON now supports
|
|
This is way too big for me to review atm. Coby might take a look |
|
Just to confirm, are we matching aircraft to stands via CID or Callsign? |
|
both, but for arrival stand allocation the system tries CID-reserved first, then (after user-requested) callsign+flightplan reserved.
For plan-activation matching specifically, it checks by callsign, and if CID is present it also allows matching by CID (callsign OR cid). If required I can switch it to whichever you would prefer, from an event space we can not reserve callsigns, hence the reason for CID matching. |
CLC0609
left a comment
There was a problem hiding this comment.
Quite a big review so apologies if I have missed something that makes one of my comments irrelevant.
In terms of CID vs Callsign matching.
I think we should use CID matching only instead of callsigns. I do not see a reason that they would need to provide both or have both allocators as, if we do it by CID irrelevant of the callsign the user is using they would get assigned the correct stand. Could you update the docs to reflect using CID only as well please.
| $schedule->command('plugin-events:clean')->everyTenMinutes()->doNotMonitor(); | ||
| $schedule->command('metars:update')->everyMinute(); | ||
| $schedule->command('database:check-table-updates')->everyMinute(); | ||
| $schedule->command('stand-reservations:activate-plans')->everyMinute()->doNotMonitor(); |
There was a problem hiding this comment.
Does this need to run every minute, I feel its unlikely that an event would start its stand allocation at 13:03 for example and not just 13:00? Maybe 10 or 15 minutes instead just to make this slightly less resource intensive?
There was a problem hiding this comment.
Do we need both this file and app/Support/StandReservationPayloadRows.php, they seem to do very similar things?
| private function matchingAircraftForReservation(StandReservation $reservation): ?NetworkAircraft | ||
| { | ||
| $query = NetworkAircraft::query()->notTimedOut()->where(function ($query) use ($reservation) { | ||
| $query->where('callsign', $reservation->callsign); |
There was a problem hiding this comment.
Shouldn't this match with the CID not the callsign? Otherwise the stand could be assigned to a random aircraft who took the callsign first.
| - `stand_slots`: array of one or more stand-slot objects. | ||
| - Optional top-level default datetimes: | ||
| - `event_start` / `event_finish` (preferred event-window names) | ||
| - `start` / `end` (legacy) |
There was a problem hiding this comment.
If this is legacy does it need to be included in the documentation?
| - Exactly one of: | ||
| - `airfield`: ICAO code, or | ||
| - `airport`: ICAO code alias (optional when inherited from `stand_slots[].airfield` / `airport`). |
There was a problem hiding this comment.
Could we standardise to using airport instead of airfield throughout the documentation and the code. So instead of allowing airport and airfield just have airport inline with the rest of the API.
This will remove the need for lines like this $slotAirfield = $standSlot['airfield'] ?? $standSlot['airport'] ?? null;
|
|
||
| ### Event-day activation task | ||
|
|
||
| Approved plans can be activated automatically on event day with: |
There was a problem hiding this comment.
Does this need to be in the public facing documentation?
There was a problem hiding this comment.
Could we split this into two jobs. One to activate the reservation plans, and one to do the stand reservation logic. It seems we deviated from the name ActivateStandReservationPlans.
The activate plan job can run less often than the job handling the stand reservation.
|
Totally fine it is a massive feature will look at your review later and start replying/making changes |
Co-authored-by: Coby Chapman <cobylc.121@gmail.com>
Co-authored-by: Coby Chapman <cobylc.121@gmail.com>
Co-authored-by: Coby Chapman <cobylc.121@gmail.com>
Co-authored-by: Coby Chapman <cobylc.121@gmail.com>
Co-authored-by: Coby Chapman <cobylc.121@gmail.com>
|
|
Will do the rest later on |





Fixes #1763
🛠️ Summary of Changes in FEAT: VAA Event Stand Planning (#1810)
This PR introduces a complete stand reservation plan submission and approval workflow with backend logic, API endpoints, and admin UI support.
✨ New Features
Stand Reservation Plan Workflow
StandReservationPlanmodel to store JSON payloads, approval metadata, and reservation counts.pending,pendingWithinApprovalWindow) and a new migration for thestand_reservation_planstable.New
VAARoleRoleKeys::VAA.vaarole if not present.JSON Support for Importing Stand Reservations
stand-reservations:importconsole command now supports.jsonfiles and root-level arrays.Refactored Import Logic
StandReservationsImportnow:cid,origin,destination.📡 API Endpoints Added
POST /stand/reservations/plan: Submit a new plan (VAA role required).GET /stand/reservations/plan/pending: List pending plans.PATCH /stand/reservations/plan/{id}/approve: Approve a pending plan within its approval window, import reservations, and update approval metadata.🧑💼 Admin UI (Filament)
StandReservationPlanSubmissionpage for authorised roles (VAA, Web Team, Ops Team, Division Staff):🧪 Tests Updated
Collectionimport for tests.Overall, this PR implements a robust stand reservation planning feature with role-based submissions, import support for JSON, administrative UI, and approval workflows.