# TODO

## Frontend: Component Refactor + Order Date Uniqueness

- [x] Create `frontend/src/components/` folder
- [x] Split `frontend/src/App.jsx` into tab/components:
  - [x] `components/AuthView.jsx`
  - [x] `components/Sidebar.jsx`
  - [x] `components/tabs/DashboardTab.jsx`
  - [x] `components/tabs/ProductsTab.jsx`
  - [x] `components/tabs/OrdersTab.jsx`
  - [x] `components/tabs/CustomersTab.jsx`
  - [x] `components/tabs/ReportsTab.jsx`
- [x] Update `frontend/src/App.jsx` to orchestrate state + API calls and pass props to components


- [x] Enforce “same order date can’t be added twice” in `saveOrder` using existing loaded `orders` data

- [ ] Keep existing CSS class names/structure to avoid UI break
- [x] Verify customers form submit payload normalization (IDs only) and add defensive errors

- [ ] Run frontend dev/build to validate no runtime errors

