Developer Docs

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 Location data (address, city, country).
  • Management: LocationPicker component 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) and openTime/closeTime windows.
  • Management: DayPicker and 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: ServiceAddOn type with id, name, price, and duration.
  • Management: AddOnManager component 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_DETAILS fetch all new nested fields for services.
  • Mutations: UPDATE_SERVICE updated to accept the full range of input fields matching the new logical capabilities.
  • Interfaces: TypeScript interfaces (ServiceNode) updated to reflect the schema changes.

  • Experiences โ€” Event Ticketing and other cross-vertical feature modules that extend Services
  • Search โ€” How services are indexed and discovered through the Universal Search