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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user