Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Admin-Pana/llms.txt

Use this file to discover all available pages before exploring further.

The Bakeries page is where administrators manage every bakery registered on the Panahashi platform. It provides a full listing of all bakeries along with their current status, ratings, and operating details. From this page you can create new bakery listings, update existing ones, and remove bakeries that are no longer active.

Bakery list

When the Bakeries page loads, the admin panel fetches all bakeries from GET /api/v1/bakeries/all. Each row in the table displays the bakery’s name, status badge, phone number, rating, total review count, and whether the bakery is currently open (isOpen flag).

Bakery statuses

Every bakery has a status that controls its visibility and availability to customers.
StatusBadge colorMeaning
ACTIVEGreenThe bakery is operational and visible to customers.
INACTIVEGrayThe bakery is not currently operating. Hidden or unavailable to customers.
SUSPENDEDRedThe bakery has been suspended by an administrator, typically due to a policy violation.

How to create a bakery

1

Open the create form

Click the + Nueva panadería button at the top right of the Bakeries page. A modal opens with the creation form.
2

Fill in required fields

The following fields are required before the bakery can be saved:
  • Name — the display name of the bakery
  • Address — the full street address
  • Latitude — decimal latitude for the map pin (e.g. 37.7749)
  • Longitude — decimal longitude for the map pin (e.g. -122.4194)
  • Owner — select a user with the BAKER role from the dropdown
3

Fill in optional fields

The following fields are optional. Default values are applied if left blank:
  • Description — a short summary shown on the bakery’s public profile
  • Phone — contact phone number for the bakery
  • Open time — defaults to 07:00 if not set
  • Close time — defaults to 14:00 if not set
4

Submit the form

Click Crear panadería. The admin panel sends a POST /api/v1/bakeries request with the following body:
{
  "name": "Morning Crust",
  "description": "Artisan sourdough and pastries.",
  "address": "12 Baker Street",
  "lat": 37.7749,
  "lng": -122.4194,
  "phone": "+1-555-0100",
  "openTime": "07:00",
  "closeTime": "14:00",
  "ownerId": "uid_of_baker_user"
}
The new bakery appears in the table immediately after a successful response.
The owner dropdown only shows users whose role is set to BAKER. If the person you want to assign is not listed, go to the Users page and update their role to BAKER first.

How to edit a bakery

Click the Editar button on a bakery row to open the edit modal. You can update the following fields:
  • Status (ACTIVE, INACTIVE, or SUSPENDED)
  • Name
  • Phone
  • Open time
  • Close time
Click Guardar cambios to save. The admin panel sends a PATCH /api/v1/bakeries/:id request with only the editable fields in the body:
{
  "status": "INACTIVE",
  "name": "Morning Crust Bakery",
  "phone": "+1-555-0101",
  "openTime": "08:00",
  "closeTime": "15:00"
}

How to delete a bakery

Deleting a bakery is permanent and cannot be undone. All data associated with the listing will be removed. A confirmation prompt appears before the action is submitted to prevent accidental deletion.
To delete a bakery, click the Eliminar button on its row. A browser confirmation prompt asks you to verify before proceeding. The admin panel sends DELETE /api/v1/bakeries/:id. On success, the bakery is removed from the list.

Build docs developers (and LLMs) love