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 |
CLC0609
left a comment
There was a problem hiding this comment.
Hey, looking good, A few more points.
Could you take a look through at any comments you've added and make sure they are needed please. There seem to be quite a few comments in there that explain things that don't really need explaining, or are explaining why you have changed something. Just eager to keep the codebase clean
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>
|
Did that all in a batch but it didnt do it .... hmmmm |
|
Removed the optional Origin/Destination so ties with the 0. Airport and this should be all of the changes you requested |
This works locally
There was a problem hiding this comment.
Pull request overview
Implements an event stand reservation plan workflow (submission, approval, activation, and assignment syncing) with JSON-schema validation, new VAA role support, and admin/Filament UI for reviewing plans—addressing the need to upload external stand plans ahead of events.
Changes:
- Added
StandReservationPlanmodel + migrations, new API endpoints, and Filament UI to submit/review/approve plans. - Added a lightweight JSON Schema validator and canonical schemas/docs for stand plan payloads.
- Extended stand reservation importing/activation and introduced scheduled syncing of active reservation-based stand assignments.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/app/Services/Stand/ArrivalAllocationServiceTest.php | Updates allocator preference + reservation fixtures to include CID. |
| tests/app/Services/JsonSchema/StandReservationPlanSchemaValidatorTest.php | Adds unit tests for schema validation error cases. |
| tests/app/Imports/Stand/StandReservationsImportTest.php | Adds coverage for associative (JSON-style) reservation rows. |
| tests/app/Http/Controllers/StandReservationPlanApprovalControllerTest.php | Adds API tests for listing/approving/auto-denying plans. |
| tests/app/Http/Controllers/StandControllerTest.php | Adds tests for VAA-only plan upload + CID-based reservation override for auto assignment. |
| tests/app/Filament/Pages/StandReservationPlansTest.php | Adds Filament page tests for role access + submit/approve/reject/expire behaviour. |
| tests/app/Console/Commands/SyncStandReservationAssignmentsTest.php | Adds coverage for reservation-driven assignment sync behaviour. |
| tests/app/Console/Commands/StandReservationsImportTest.php | Adds JSON import tests + return-code assertions. |
| tests/app/Console/Commands/ActivateStandReservationPlansTest.php | Adds tests for plan activation/skip/auto-deny behaviour. |
| tests/app/Allocator/Stand/CidReservedArrivalStandAllocatorTest.php | Updates allocator tests to reflect CID-only matching and CID-missing case. |
| tests/app/Allocator/Stand/CallsignFlightplanReservedArrivalStandAllocatorTest.php | Updates callsign allocator tests to ignore route matching (origin/dest). |
| routes/api.php | Adds POST upload endpoint and admin GET/PATCH endpoints for plan approvals. |
| resources/views/livewire/stand/recently-processed-plans-table.blade.php | Adds Livewire view for a “recently processed plans” table. |
| resources/views/filament/pages/stand-reservation-plans.blade.php | Adds Filament page layout for submission + review/history UI. |
| docs/schemas/stand-reservation-plan.schema.json | Introduces canonical JSON Schema for plan payloads. |
| docs/schemas/stand-reservation-plan-request.schema.json | Introduces JSON Schema for API submission body. |
| docs/schemas/stand-reservation-plan-format.md | Adds normative markdown spec for the plan JSON format. |
| docs/guides/StandAllocation.md | Updates allocator docs + adds event plan format section and example. |
| database/migrations/2026_03_02_000001_add_denied_reason_to_stand_reservation_plans_table.php | Adds denied_reason column to plans. |
| database/migrations/2026_02_15_000003_add_denied_fields_to_stand_reservation_plans_table.php | Adds denied metadata fields and FK. |
| database/migrations/2026_02_15_000002_create_stand_reservation_plans_table.php | Creates stand_reservation_plans table. |
| database/migrations/2026_02_15_000001_add_vaa_role.php | Creates vaa role if missing. |
| app/Services/Stand/StandReservationPayloadRowsBuilder.php | Normalises payloads (reservations/stand_slots) into importer-friendly rows. |
| app/Services/JsonSchema/StructuredSchemaNodeValidator.php | Adds structured object/array validation helpers for schemas. |
| app/Services/JsonSchema/StandReservationPlanSchemaValidator.php | Adds schema loading + validation (refs, allOf/anyOf/if-then, etc.). |
| app/Providers/StandServiceProvider.php | Removes callsign-based allocator from the arrival allocator chain. |
| app/Models/User/RoleKeys.php | Adds new RoleKeys::VAA. |
| app/Models/Stand/StandReservationPlan.php | Adds plan model with status scopes and event start parsing. |
| app/Imports/Stand/StandReservationsImport.php | Refactors import logic to support associative JSON rows + returns created count. |
| app/Http/Livewire/Stand/RecentlyProcessedPlansTable.php | Adds Livewire table showing processed plans with role-based visibility. |
| app/Http/Controllers/StandController.php | Adds plan upload/list/approve endpoints + CID-based reservation override for auto assignment. |
| app/Filament/Pages/StandReservationPlans.php | Adds Filament page: submit plans + review actions + auto-expiry logic. |
| app/Console/Kernel.php | Schedules activation and assignment sync commands. |
| app/Console/Commands/SyncStandReservationAssignments.php | Adds scheduled sync of active reservation slots into stand assignments. |
| app/Console/Commands/StandReservationsImport.php | Adds JSON import path using the payload row builder. |
| app/Console/Commands/ActivateStandReservationPlans.php | Adds scheduled command to activate approved plans and auto-deny stale pending plans. |
| app/Allocator/Stand/CidReservedArrivalStandAllocator.php | Switches allocator to CID-only matching (ignores destination) and guards missing CID. |
| app/Allocator/Stand/CallsignFlightplanReservedArrivalStandAllocator.php | Simplifies callsign allocator to ignore origin/destination. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
app/Services/JsonSchema/StandReservationPlanSchemaValidator.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Implements an event stand reservation planning workflow: VAA users can submit JSON stand plans, admins can review/approve them, and approved plans can be imported into stand reservations and used for CID-based stand allocation/assignment syncing.
Changes:
- Added
StandReservationPlanpersistence (migrations + model), JSON schemas, and a lightweight schema validator for plan submissions. - Added API endpoints + Filament UI to submit/review/approve/reject plans, plus scheduled commands to activate plans and sync reservation-managed assignments.
- Updated stand allocation logic/tests to prioritise CID-based reservations (and removed callsign/route-based reservation matching from the arrival allocator chain).
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/app/Services/Stand/ArrivalAllocationServiceTest.php | Updates allocator preference expectations and fixtures for CID-based reservations. |
| tests/app/Services/JsonSchema/StandReservationPlanSchemaValidatorTest.php | Adds unit tests for schema validation error cases. |
| tests/app/Imports/Stand/StandReservationsImportTest.php | Adds coverage for associative (JSON-style) reservation rows and CID persistence. |
| tests/app/Http/Controllers/StandReservationPlanApprovalControllerTest.php | Adds API tests for listing pending plans and approving/auto-expiring. |
| tests/app/Http/Controllers/StandControllerTest.php | Adds API tests for plan upload/validation/authorisation and reservation-priority assignment. |
| tests/app/Filament/Pages/StandReservationPlansTest.php | Adds Filament page tests for role access, submit, approve/reject, and expiry behaviour. |
| tests/app/Console/Commands/SyncStandReservationAssignmentsTest.php | Adds functional tests for syncing stand assignments from active CID reservations. |
| tests/app/Console/Commands/StandReservationsImportTest.php | Extends import command tests for JSON (payload + stand_slots) support and return code. |
| tests/app/Console/Commands/ActivateStandReservationPlansTest.php | Adds functional tests for activating/importing approved plans and auto-expiring pending ones. |
| tests/app/Allocator/Stand/CidReservedArrivalStandAllocatorTest.php | Updates allocator tests for CID-only behaviour and missing-CID handling. |
| tests/app/Allocator/Stand/CallsignFlightplanReservedArrivalStandAllocatorTest.php | Updates tests to reflect relaxed callsign reservation matching semantics. |
| routes/api.php | Adds POST upload route (plugin scope) and admin routes for pending/approve actions. |
| resources/views/livewire/stand/recently-processed-plans-table.blade.php | Adds Livewire wrapper view for the processed-plans table. |
| resources/views/filament/pages/stand-reservation-plans.blade.php | Adds Filament page view for submission + review/history table and processed-plans widget. |
| docs/schemas/stand-reservation-plan.schema.json | Defines canonical plan payload schema (reservations and/or stand_slots). |
| docs/schemas/stand-reservation-plan-request.schema.json | Defines API request schema for plan submission endpoint. |
| docs/schemas/stand-reservation-plan-format.md | Adds normative markdown spec and examples for the plan JSON format. |
| docs/guides/StandAllocation.md | Updates stand allocation guide for reservation-plan format and removes callsign reservation matching docs. |
| database/migrations/2026_03_02_000001_add_denied_reason_to_stand_reservation_plans_table.php | Adds denied_reason field to plan table. |
| database/migrations/2026_02_15_000003_add_denied_fields_to_stand_reservation_plans_table.php | Adds denied_at/denied_by + FK for plan denial tracking. |
| database/migrations/2026_02_15_000002_create_stand_reservation_plans_table.php | Creates stand_reservation_plans table with payload + approval metadata. |
| database/migrations/2026_02_15_000001_add_vaa_role.php | Creates the VAA role if missing. |
| app/Services/Stand/StandReservationPayloadRowsBuilder.php | Normalises plan payload into importer-friendly row collections. |
| app/Services/JsonSchema/StructuredSchemaNodeValidator.php | Adds structured validation helpers (object/array/type checks) for schemas. |
| app/Services/JsonSchema/StandReservationPlanSchemaValidator.php | Implements schema loading, $ref resolution, and node validation. |
| app/Providers/StandServiceProvider.php | Removes callsign-flightplan reservation allocator from arrival allocation chain. |
| app/Models/User/RoleKeys.php | Adds RoleKeys::VAA. |
| app/Models/Stand/StandReservationPlan.php | Introduces plan model, casts, scopes, and event start parsing helper. |
| app/Imports/Stand/StandReservationsImport.php | Refactors importer to support associative JSON rows, CID extraction, and returns created count. |
| app/Http/Livewire/Stand/RecentlyProcessedPlansTable.php | Adds a Filament Table component for approved/denied/expired plan history. |
| app/Http/Controllers/StandController.php | Adds upload/pending/approve plan endpoints and prioritises active reservations in auto-assignment. |
| app/Filament/Pages/StandReservationPlans.php | Adds Filament submission + review flow with approve/reject/auto-expiry behaviour. |
| app/Console/Kernel.php | Registers/schedules plan activation and reservation assignment sync commands. |
| app/Console/Commands/SyncStandReservationAssignments.php | Adds scheduled command to enforce reservation-managed stand assignments by CID. |
| app/Console/Commands/StandReservationsImport.php | Extends import command to support JSON payloads and root-level arrays. |
| app/Console/Commands/ActivateStandReservationPlans.php | Adds scheduled command to auto-expire stale pending plans and import due approved plans. |
| app/Allocator/Stand/CidReservedArrivalStandAllocator.php | Updates allocator to match by CID only and handle missing CID. |
| app/Allocator/Stand/CallsignFlightplanReservedArrivalStandAllocator.php | Updates allocator to match by callsign only (no route matching). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
tests/app/Http/Controllers/StandReservationPlanApprovalControllerTest.php
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|





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.