feat: widget additional services — sourced from rental objects module

- Additional services in widget are now derived from rental_objects (not a separate list)
- Settings page shows rental objects with enable/disable toggle; link to rental module
- Saves only {id, enabled}[] to widget_services — rental objects manage name/price/icon
- Standalone widget also derives additionalServices from config.rentalObjects
- Widget config API includes services[] in widgetSettings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 12:13:13 +03:00
parent c8ff5ad0ed
commit c153e12543
4 changed files with 73 additions and 126 deletions

View File

@@ -78,6 +78,7 @@ const publicWidget: FastifyPluginAsync = async (fastify) => {
allowChildren: (ws.widget_children as boolean) ?? true,
hotelName: (ws.widget_hotel_name as string) ?? hotel.name,
bankDetails: (ws.widget_bank_details as string) ?? '',
services: Array.isArray(ws.widget_services) ? ws.widget_services as { id: string; enabled: boolean }[] : null,
},
rooms: rooms.map(r => ({
id: r.id,