feat(12.2-03): add hasMany relation contracts, relation forms and child create

- RelationContract gains Kind (empty is belongsToMany) and ForeignKey, with kind-aware boot checks
- manage.form, view.form and pivot.form compile against the related or pivot model; $/ paths resolve inside the plugin
- view toolbarButtons accept create|update|delete|link|unlink, each the capability of its routes
- POST .../relations/{name}/records creates a child through the manage form; the server sets the hasMany key
- relation schema carries kind, deferrable and the localized forms; 17 new relation message keys in en and pl
This commit is contained in:
Jakub Zych
2026-10-02 18:37:13 +02:00
parent 0b4ef9c311
commit 48a5b8045a
23 changed files with 1621 additions and 100 deletions

View File

@@ -136,3 +136,22 @@ messages:
one: "Unlinked :count record"
other: "Unlinked :count records"
empty: No linked records.
create: New record
create_title: New record
update_title: Edit record
preview_title: Record preview
created: Record created
updated: Record saved
delete_selected: Delete selected
delete_confirm: "Delete the selected (:count)? This cannot be undone."
delete_one_confirm: Delete this record? This cannot be undone.
deleted:
one: "Deleted :count record"
other: "Deleted :count records"
pivot_title: Link details
pivot_saved: Link details saved
edit_pivot: "Edit link details: :name"
create_submit: Create record
update_submit: Save record
pivot_submit: Save link details
link_submit: Add link

View File

@@ -152,3 +152,24 @@ messages:
many: "Odłączono :count rekordów"
other: "Odłączono :count rekordu"
empty: Brak powiązanych rekordów.
create: Nowy rekord
create_title: Nowy rekord
update_title: Edycja rekordu
preview_title: Podgląd rekordu
created: Utworzono rekord
updated: Zapisano rekord
delete_selected: Usuń zaznaczone
delete_confirm: "Usunąć zaznaczone (:count)? Tej operacji nie można cofnąć."
delete_one_confirm: Usunąć ten rekord? Tej operacji nie można cofnąć.
deleted:
one: "Usunięto :count rekord"
few: "Usunięto :count rekordy"
many: "Usunięto :count rekordów"
other: "Usunięto :count rekordu"
pivot_title: Szczegóły powiązania
pivot_saved: Zapisano szczegóły powiązania
edit_pivot: "Edytuj szczegóły powiązania: :name"
create_submit: Utwórz rekord
update_submit: Zapisz rekord
pivot_submit: Zapisz szczegóły powiązania
link_submit: Dodaj powiązanie