Feature: business hours and amenities editable by the owner (replace hard-coded placeholders)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 19m
- Merged PRs (30d)
- 30
Description
## Summary
Listed under "Future Functionalities" in the README. Today every restaurant displays the same fake data:
- Card: "**Open** until 9:30PM", "Outdoor seating", "Delivery", "Takeout" (`Restaurant/index.tsx:35-44`).
- Detail page: "Claimed", "**Open** until 9:30PM", "Takes Reservations / Offers Delivery / Offers Takeout / Accepts Credit Cards" (`SingleRestaurant/index.tsx:100-101,141-146`).
Also, `{restaurant.id}. {restaurant.name}` on the card uses the database id as a list number, which reads 1, 2, 5, 9 after deletions.
## Proposal
- Models: `restaurant_hours` (restaurant_id, weekday, opens, closes, closed flag) and either an `amenities` JSON column or a small `amenities` table with a fixed vocabulary (reservations, delivery, takeout, outdoor seating, credit cards, wheelchair accessible, ...).
- API: include `hours`, `amenities` and a computed `is_open_now` in restaurant payloads; owner-only PUT.
- UI: hours table and amenity checklist in the edit modal; "Open now / Closed / Opens at 11:00" derived on the client from local time; drop the placeholders and the id prefix.
- Seed realistic hours for the 10 demo restaurants.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Future Functionalities section in README, then inspect Restaurant/index.tsx lines 35-44 and SingleRestaurant/index.tsx lines 100-101 and 141-146. Trace the restaurant models and API payloads before choosing the hours and amenities representation. Done means owner editing works, payloads expose hours, amenities, and open status, placeholders and the database-id prefix are gone, and the 10 demo restaurants have realistic seeded hours.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, databases, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100