# Purchase Request Form Upgrade — Design Spec
**Date:** 2026-05-24
## Overview
Upgrade the New Purchase Request form (`/purchase/requests/create`) with three improvements:
1. **Urgency picker** — replace the free-text "Required Date / Urgency" field with an interactive popup using icon cards (no typing required).
2. **Dropdowns from DB** — "Project / Site Name" and "Location / Site" become searchable dropdowns backed by database tables.
3. **Settings admin section** — a new "Settings" sidebar entry where Admins manage the Locations, Projects, and Urgency Levels lists.
---
## 1. Database Tables
Three new lookup tables, each managed by Admins via Settings pages.
### `settings_locations`
| column | type | notes |
|---|---|---|
| id | bigint PK | |
| name | string(255) | e.g. "BaFa - Hidd", "Sitra" |
| is_active | boolean | default true |
| timestamps | | |
### `settings_projects`
| column | type | notes |
|---|---|---|
| id | bigint PK | |
| name | string(255) | e.g. "Steel Tech Co WLL" |
| is_active | boolean | default true |
| timestamps | | |
### `settings_urgency_levels`
| column | type | notes |
|---|---|---|
| id | bigint PK | |
| label | string(100) | e.g. "Critical", "Urgent" |
| emoji | string(10) | e.g. "🚨", "⚡" |
| color_bg | string(20) | Tailwind/hex bg, e.g. "#fee2e2" |
| color_text | string(20) | e.g. "#dc2626" |
| subtitle | string(100) | e.g. "Today", "1–3 days" |
| sort_order | integer | display order |
| is_active | boolean | default true |
| timestamps | | |
**Seeded defaults for urgency levels:**
| label | emoji | bg | text | subtitle | order |
|---|---|---|---|---|---|
| Critical | 🚨 | #fee2e2 | #dc2626 | Today | 1 |
| Urgent | ⚡ | #ffedd5 | #ea580c | 1–3 days | 2 |
| Normal | 📋 | #fef9c3 | #ca8a04 | This week | 3 |
| Planned | 🗓️ | #f0fdf4 | #16a34a | Pick date | 4 |
---
## 2. Purchase Request Form Changes
### "Project / Site Name" field
- Changed from `` to a `