Stays and the stay editor
What a stay holds, how the team adds and edits one in the dashboard, its photographs and prices, and how publishing decides what the website shows.
For the Full Stack package
What a stay holds
| Part | Values |
|---|---|
| Texts, in English and Arabic | Title (160 characters), short description (500), description (5000), the location hint guests read in place of an address (500), and up to 20 house rules. English is required for the title. |
| Type | villa, apartment, cabin, chalet, loft or cottage, each with its own icon on the website |
| Destination | One of the company's destinations |
| Capacity | Bedrooms, beds, bathrooms, the most guests it sleeps, and an optional area in square metres |
| Pricing | A nightly rate and a cleaning fee, whole US dollars, and the minimum number of nights |
| Arrival | Check-in and check-out times, 15:00 and 11:00 by default, from the company settings |
| Amenities | Any of the 18 the seed creates: Wi-Fi, kitchen, pool, hot tub, parking, air conditioning, heating, washer, workspace, fireplace, sea view, mountain view, garden, barbecue, pet friendly, EV charger, gym, crib |
| Photographs | Up to 30, in the order the website shows them; the first is the card and cover photograph |
| Status | draft or published |
| Internal | A reference given in order (S001, S002 and on), an address slug made from the title, a homepage feature flag and notes the website never shows |
There is one nightly rate per stay: no seasonal or weekend rates, taxes or service fees. A quote is the nightly rate times the nights plus the cleaning fee once, and the booking keeps the figures it was made with, so a later rate change never alters what a guest agreed to pay.
Publishing and what the website shows
| Status | On the website |
|---|---|
| Draft | Hidden, and answers as not found on every public route. Every new stay starts here. |
| Published | Listed, searchable, bookable, in the sitemap, and selectable for the home page. The first publish sets its publication date, which a later re-publish keeps. |
- Publishing is refused until the stay has three photographs ("Add three photographs before publishing this stay.") and its title, short description, description and location hint in both languages.
- To take a stay off the website, return it to draft: it disappears from every public page and keeps its bookings, reviews and history. The dashboard has no delete button. The API's delete route removes a stay only while none of its bookings holds nights; any booking that is not cancelled, a completed one included, keeps it ("This stay still has bookings that are not cancelled, so it cannot be deleted.").
- The home page's hero and featured stays are chosen under Settings, Homepage, among published stays.
The stay list
- Counts of all, published and draft stays, a search by stay name or reference, and filters for status, type and destination, with the most recently updated first.
- Each row's Open button opens the stay editor, and Add stay starts a new one.
- The dashboard has no delete button: a stay leaves the website by going back to draft. The API's delete route is there for a developer's own tools.
The stay editor
/en/dashboard/stays/new adds a stay, saved as a draft, and /en/dashboard/stays/<id> changes one. The editor holds its parts on one page, with a publishing card beside them.
| Part | What it holds |
|---|---|
| Content | The title, short description and description in both languages, and the address slug |
| Type and destination | The kind of place, its destination, and the location hint in both languages |
| Capacity | Guests, bedrooms, beds, bathrooms and area |
| Pricing and arrival | Nightly rate, cleaning fee, minimum nights, check-in and check-out times |
| Amenities | A checklist of the amenities |
| House rules | A list of rules, each in both languages, added and removed with the Add and Remove buttons |
| Photographs | Uploaded from the computer and ordered with Move earlier and Move later; position one is the cover |
| Publishing | Save, Publish or Unpublish, the homepage feature flag, and View stay once it is published |
Photographs are uploaded as they are added and re-encoded by the API as JPEG, at most 1920 pixels wide, with a smaller copy for stay cards.
The editor checks the capacity as the API does: bedrooms 0 or more, for a studio; beds, bathrooms and guests 1 or more; and the area, which may be left empty, 1 or more when it is given. It has no fields for the map position or the SEO title and description and never sends them, so a save keeps the values the stay already holds.
Who can do what
| Permission | Allows |
|---|---|
stays.view | Seeing every stay, drafts included |
stays.create | Adding stays |
stays.edit | Changing details, prices and photographs |
stays.publish | Publishing and unpublishing |
stays.delete | Deleting stays through the API's delete route (the dashboard has no delete button) |
Both seeded roles, Super Admin and Manager, hold all five.
What the API checks
- The type, the destination and every amenity key are validated against their lists, and a count or an amount below its minimum is refused with the field named: bedrooms may be 0, and every other count starts at 1 (at least one bed, one bathroom, one guest and one night, and a nightly rate of one dollar). The area is optional, and one square metre at least when it is given; the cleaning fee may be 0.
- A slug is made unique from the title when it is not given, a slug already in use is refused, and a reference is never handed out twice.
- The API also takes a stay's map position (
latitude,longitude), its SEO title and description in both languages and photograph captions; the seed fills them for the demo stays, and the stay page draws its map only when a position is set. The stay editor never sends the map position or the SEO texts, so they are set through the API, and a save from the editor leaves them as they are. - The website's list takes
destination(slug),checkInandcheckOut(YYYY-MM-DD, both or neither),guests,type,sort(recommended,price_asc,price_desc,rating), and pages withpageandpage_size(6 by default, at most 24). An unknown value in one of them is refused rather than ignored.