Service Feature Enhancements
This document outlines the enhancements made to the Service management features, including backend schema updates, frontend management forms, and public display on item detail pages.
Overview
We have expanded the capabilities of Services to support more complex booking and scheduling scenarios. This includes support for service locations, add-ons, and detailed availability settings.
Key Features
1. Delivery Mode & Location
- Remote Services: Services can be marked as
isRemote. - On-site Services: Non-remote services include detailed
Locationdata (address,city,country). - Management:
LocationPickercomponent added. - Display: Remote services are badged as "Remote". On-site services display their physical location.
2. Availability
- Days & Times: Malet Owners can specify
availableDays(e.g., Mon, Tue) andopenTime/closeTimewindows. - Management:
DayPickerand time input fields integrated into management forms. - Display: An "Availability" card on the item page shows operating hours.
3. Add-ons
- Description: Optional extras that Visitors can book alongside the main service.
- Schema:
ServiceAddOntype withid,name,price, andduration. - Management:
AddOnManagercomponent allows adding multiple add-ons. - Display: Listed in an "Available Add-ons" section on the item page.
4. Booking Settings
- Requires Booking: Boolean flag to indicate if the service needs a reservation.
- Tags: Categorization tags for better discovery.
Technical Implementation
Components
New reusable Svelte components were created:
LocationPicker.svelte: Simple address input for services.AddOnManager.svelte: CRUD interface for service add-ons.DayPicker.svelte: Multi-select for days of the week.TagInput.svelte: Generic tag management.MediaUploader.svelte: Handles image upload with drag-and-drop, preview, and reordering.
GraphQL Updates
- Queries:
GET_ITEM_DETAILSfetch all new nested fields forservices. - Mutations:
UPDATE_SERVICEupdated to accept the full range of input fields matching the new logical capabilities. - Interfaces: TypeScript interfaces (
ServiceNode) updated to reflect the schema changes.
Related
- Experiences โ Event Ticketing and other cross-vertical feature modules that extend Services
- Search โ How services are indexed and discovered through the Universal Search