{{--
Edit Booking — docs/wireframes-v12/edit-booking.html.
## Shape
v12's layout, top to bottom:
1. a top bar: the status pill and the `code · customer · unit` meta line on
the left, a View button on the right;
2. a card carrying the three-tab strip (Basic Details / Documents /
History) with no bottom margin, so the panel below reads as attached;
3. one `.tab-content-panel` per tab.
The tabs are real links to the panels they reveal, not buttons with an
inline `onclick` the way v12 writes them: nrems-tabs.js upgrades them in
place, and with no Javascript at all all three panels render one under the
other — every field, every document and the whole history still on the page,
which is the right way for this screen to fail. Avoiding the inline handler
is a step toward the planned strict CSP, not arrival at it.
**The form wraps the Basic panel only.** The Documents panel carries delete
forms of its own, and a form inside a form is invalid HTML that browsers
resolve by silently dropping the inner one — which would have made every
document's Delete button submit the booking instead.
## The twin rule (recipe §9)
This file and bookings/create.blade.php are twins. Every field is written out
in both, and neither includes a shared form partial. **A field added,
removed or renamed here must be mirrored in create.blade.php in the same
commit.** The one thing they share is
bookings/partials/co-owner-block.blade.php, whose header says why a repeater
row is the exception; the documents and history panels are reads rather than
fields and are shared with the show screen for the same reason.
### What this screen has that its twin does not
* it PUTs to `bookings.update` and therefore carries a `_method` field;
* the tab strip and its two extra panels;
* Booking Information is ordered date / inquiry / entity type, which is
this wireframe's order (the twin's is the other one's);
* its footer depends on the booking's status (CR-8 §3.1) — see the note
there;
* every control is prefilled, the unit select can draw a unit that is
`booked` because THIS booking holds it, and the Co-Owner Details section
renders one block per stored co-owner.
## Deliberate differences from the wireframe
* The wireframe has a **stray duplicated Occupation block** at lines
275-288, outside the co-owner block it belongs to and with a mismatched
``. It is a wireframe bug and is not reproduced.
* Its trailing script is broken in the same way new-booking.html's is
(lines 402-414: an unbalanced `);` and a dangling function body).
* The "WhatsApp Number" label on line 212 is the inquiry form's wording
leaking in; this field is `customers.mobile_number` and every other
screen calls it Mobile Number, so it is Mobile Number here.
* Occupation is a select and an Assigned Sales Person row is rendered on
both twins — decisions D5 and D6, argued in create.blade.php's header.
## No lang file (CR-8 §0.1)
Every string on this screen is written here, on the client's instruction.
--}}
@extends('layouts.app')
@section('title', 'Edit Booking')
@section('breadcrumbs')