Delete a layout with default replacement
Remove a non-default floor plan from a location. If the layout is assigned to services, Antylogic asks for a second confirmation, moves those service references to the location's current default layout, and keeps the historical layout data needed for past service records.
In this article
Layout deletion is a guarded operation because floor plans can be connected to live and historical service records. Antylogic lets managers retire a non-default layout without leaving assigned services without a usable floor plan.
When the target layout is still used by services, the operator confirms twice. The second confirmation is explicit about replacement: Antylogic does not offer a manual selector, it uses the active default layout for the same location.
Before you start
- You are signed in to Antylogic and working in Harbor Demo Group > Harbor Soho.
- Your role can view layouts; deleting requires `layout:manage` for the location.
- The target layout is active, belongs to Harbor Soho, and is not marked Default. For the GB demo, use `Demo floor plan 1`.
- Harbor Soho has another active layout marked Default, because Antylogic uses it as the automatic replacement.
- To show the replacement confirmation, `Demo floor plan 1` must still be assigned to an existing service such as Soho lunch service.
Instructions
- 1.
Open the Layouts list
Open Harbor Soho and go to Layouts. For the GB demo, filter the list by `Demo floor plan 1` so the row being removed is easy to verify.
- 2.
Check the target row
Confirm the row is visible, belongs to the current location, and is not marked Default. The Delete row action is only available to users with layout management permission.
- 3.
Open the delete confirmation
Select Delete on the `Demo floor plan 1` row. The first `Delete layout` confirmation is still reversible; cancelling here leaves layouts and services unchanged.
- 4.
Confirm the initial delete
Select Delete. If the layout is not assigned to services, deletion completes here. If it is assigned, Antylogic switches to `Replace and delete layout` and explains that service references will move to the default layout.
- 5.
Accept the default replacement
Select Replace and delete. The request is repeated with `confirm_replacement=true`; the operator does not choose a replacement layout.
- 6.
Confirm the refreshed list
After success, Antylogic refreshes the Layouts list and shows `Layout deleted`. With the `Demo floor plan 1` filter still applied, the active list no longer shows the removed layout.
- 7.
Handle blocked deletes
If the delete fails, leave the layout unchanged and check the target: default layouts cannot be deleted, the layout must belong to the current location, the user must have layout management permission, and a different active default layout must exist.
Validations and limits
- The initial list shows the Layouts table with Name, Default, Tables, Max guests, and Updated columns.
- Default layouts cannot be deleted.
- A layout assigned to services cannot be deleted unless the second `Replace and delete` confirmation is accepted.
- The replacement layout is not chosen by the user; Antylogic uses the active default layout in the same location.
- The confirmed delete endpoint responds with `204 No Content` when the operation succeeds.
- Deleted layouts and historical snapshots stay out of the normal active Layouts list.
- If the replacement modal does not appear in the demo runtime, the target layout is not currently assigned to services.
Expected result
The non-default layout is soft-deleted, active service references move to Harbor Soho's default layout, and any historical layout data needed for past service records remains readable through the preserved history.