CluPilotCloud/app/Livewire/Admin
nexxo f6ddf45dc0 feat(admin): a console for creating, pricing and scheduling plans
The owner can now do from the console what only a config edit could do before:
create a plan line, draft a version, price it, publish it into a window, and
pull a plan out of the shop.

Two pages and one modal, because the catalogue has exactly two levels. The
plan list is a name, a rank and a kill switch. Everything that can be got
wrong — capabilities, prices, windows — lives on the versions, where the page
is built around the one rule that matters: a draft is freely editable, a
published version is not touchable at all. So drafting and publishing are
separate acts, and publishing says plainly that it is final.

The console refuses everything the catalogue refuses, on the form rather than
as a stack trace: an overlapping window, a window that ends before it starts,
a version with no price for a term we sell on, and — new here — a version with
no VM template, which would be bought and then fail provisioning every time.
Numbers are bounded on both sides, because a mistyped price otherwise
overflows the column and answers with a 500 instead of saying which field was
wrong. Performance class and features are picked from the keys we have labels
for; free text would be frozen at publication and shown to customers as a raw
translation key forever.

Concurrency, since two admins share one catalogue: draft numbers are allocated
under a lock on the family, publication is an atomic conditional claim, and
discarding a draft is one statement conditional on it still being a draft —
otherwise a draft published in the meantime could be deleted out from under
the customers now contracted to it.

`plans.manage` (Owner and Admin) guards the pages themselves, not only the
buttons, and the modal authorises itself — prices, drafts and unreleased plans
are not something to leave readable to anyone who types the URL.

Also fixes the shared checkbox, which ticked in the browser's own blue on
every page that used one: a native checkbox ignores text colour and needs
accent-color.

Verified in the browser: withdrawing a plan in the console removes it from the
customer's billing page immediately, and restoring it brings it back. The
public landing page carries no catalogue-driven plan list, so there is nothing
there to hide.

421 tests green. Codex review clean after six rounds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 12:41:51 +02:00
..
ConfirmDeleteDatacenter.php fix(admin): authorize datacenter modal mounts; stale threshold uses step maxDuration 2026-07-25 18:23:44 +02:00
ConfirmDeletePlanDraft.php feat(admin): a console for creating, pricing and scheduling plans 2026-07-26 12:41:51 +02:00
ConfirmDeleteVpnPeer.php feat(vpn): ownership, a Developer role, and password-gated config retrieval 2026-07-25 22:31:54 +02:00
ConfirmRemoveHost.php feat(admin): staff RBAC (spatie) + admin settings page 2026-07-25 15:47:42 +02:00
Customers.php feat(billing): the plan catalogue becomes three tables, and config stops selling 2026-07-26 12:05:56 +02:00
Datacenters.php fix(datacenters): a code becomes a DNS label, so validate it as one 2026-07-25 23:56:50 +02:00
EditDatacenter.php fix(auth/admin): atomic user+customer signup; Rule::in for country validation (comma-safe) 2026-07-25 18:33:09 +02:00
HostCreate.php feat(admin): staff RBAC (spatie) + admin settings page 2026-07-25 15:47:42 +02:00
HostDetail.php feat(admin): staff RBAC (spatie) + admin settings page 2026-07-25 15:47:42 +02:00
Hosts.php feat(admin): scalable host list (search/filter/health) + host detail redesign 2026-07-25 14:27:53 +02:00
InstanceAdminAccess.php fix(admin): the admin password is shown once, and means it 2026-07-26 05:34:57 +02:00
Instances.php feat(admin): dark Tactical-Terminal operator console 2026-07-25 08:35:03 +02:00
Maintenance.php fix(maintenance): make the window form usable 2026-07-25 23:05:33 +02:00
Overview.php feat(admin): datacenter edit+delete (guarded); MRR chart fills card; host-load as meters 2026-07-25 14:22:15 +02:00
PlanVersions.php feat(admin): a console for creating, pricing and scheduling plans 2026-07-26 12:41:51 +02:00
Plans.php feat(admin): a console for creating, pricing and scheduling plans 2026-07-26 12:41:51 +02:00
Provisioning.php fix(admin): authorize datacenter modal mounts; stale threshold uses step maxDuration 2026-07-25 18:23:44 +02:00
Revenue.php feat(admin): dark Tactical-Terminal operator console 2026-07-25 08:35:03 +02:00
Settings.php feat(site): switch the public website and portal off from the console 2026-07-25 23:10:27 +02:00
Vpn.php fix(vpn): a late revocation must not disconnect whoever holds the key now 2026-07-26 01:24:55 +02:00
VpnConfigAccess.php fix(vpn): count downloads in the database; repair the race test 2026-07-25 22:48:38 +02:00