37 Commits

Author SHA1 Message Date
m7amedez5511
17dc53fcfe build dashboard home page and dashboard layer 2026-07-27 17:54:43 +03:00
m7amedez5511
0befda9690 Replace SVGs with icons, restructure the table for CRUD operations across the project, standardize the application's display, and build a new template for the table's action buttons. 2026-07-26 20:11:31 +03:00
m7amedez5511
a1a34cb251 Replace SVGs with icons, restructure the table for CRUD operations across the project, standardize the application's display, and build a new template for the table's action buttons. 2026-07-26 20:10:12 +03:00
m7amedez5511
b2dcb45606 The trip files have been reorganized. Errors related to vehicle and driver editing have been resolved, archive display issues fixed, and model data display standardized across the project; order and trip-related issues have also been addressed. 2026-07-23 15:49:24 +03:00
m7amedez511
b6dc2c709e update رAddressDetailModal 2026-07-23 13:52:30 +03:00
m7amedez511
e42252db47 cheange inlien code to block code and using tamplet 2026-07-22 17:09:15 +03:00
m7amedez511
fa49ba8817 The client files, client address files, and order files have been modified to implement all CRUD operations and endpoints related to the archive. 2026-07-22 16:30:20 +03:00
m7amedez5511
b87d81100f The trip files have been reorganized. Errors related to vehicle and driver editing have been resolved, archive display issues fixed, and model data display standardized across the project; order and trip-related issues have also been addressed. 2026-07-22 14:19:32 +03:00
m7amedez5511
f1a521dd5a refactor(forms): migrate form modals to react-hook-form + yupResolver, and adopt shared UI kit components across Role/Order/User/Trip modals and tables
Replace manual useState + validate() wiring with react-hook-form and
yupResolver across CarFormModal, DriverFormModal, Tripformmodal,
OrderFormModal, BranchFormModal, CarMaintananceFormModal, RoleFormModal,
and UserFormModal, following the existing pattern in Addressformmodal.

- Pin yupResolver's generic explicitly (yupResolver<FormValues>(schema as any))
  since create/update schemas differ structurally and yup can't unify them
  into a single inferred type on its own.
- Replace manual ref-based autofocus (useRef + ref={firstRef}) with
  autoFocus/setFocus to avoid ref collisions with register()'s own ref.
- DriverFormModal: bind photo/nationalPhoto/driverCardPhoto file fields via
  Controller instead of register.
- Tripformmodal: convert startTime/endTime to ISO-8601 via setValueAs while
  keeping the datetime-local input display unaffected.
- OrderFormModal: register nested deliveryAddress/pickupAddress fields via
  dot-path syntax; keep pickupMode as local state; preserve conditional
  address payload assembly.
- CarMaintananceFormModal: keep toNumberOrUndefined cost coercion and
  ISO-8601 date conversion at submit time.
- RoleFormModal: bind permissionIds checkbox group via Controller.
- UserFormModal: add a custom resolver wrapper to preserve the
  empty-password-on-edit behavior (skip password validation when editing
  with a blank password field).

Also replace raw HTML elements with the shared UI kit components
(Modal, Input, Textarea, Select, Button, Alert, Badge, EmptyState) across
form modals, detail modals, and tables:

- RoleFormModal: Modal, Input, Textarea, Button
- OrderFormModal: Modal, Input, Select, Button
- UserDetailModal / Archiveduserdetailmodal: Modal, Alert, Button
- UserTable / Archivedusertable: Badge, Button, EmptyState
- RoleDetailModal / ArchivedRoleDetailModal: Modal, Alert, Select, Button
- RoleTable / ArchivedRoleTable: Button, EmptyState
- Tripreportpanel: Button with built-in loading state instead of manual
  Spinner/disabled/color wiring

StatusBadge, IconBtn, and other per-action custom chips/checkboxes are kept
as-is in every file — the shared Badge/Button components don't support dot
indicators or per-action color-coding, so forcing them in would misshape or
strip semantics from these controls.

Archivedusersmodal, ArchivedRolesModal, and ArchivedTripList required no
changes — already fully compliant with the shared UI kit.

No changes to visual layout, CSS, or Arabic labels/section headings beyond
what's required by the component swaps above.
2026-07-21 13:15:22 +03:00
m7amedez5511
55f76005c9 update page to using same tamplet in all project not using inline code 2026-07-20 16:03:07 +03:00
m7amedez5511
d23866d7fc make header one in all page 2026-07-19 16:20:11 +03:00
m7amedez5511
538111d726 fix: resolve permission fallback bug, remove debug code, and cleanup duplication
Logic Errors
------------
- Sidebar: fix permissions fallback so a user with no permissions gets
  zero access instead of falling back to the full nav list
  (user?.permissions ?? [] instead of ?? navSections.flatMap(...))
- carMaintanance.service / UseCarsMaintanance: add pagination to the
  maintenance records fetch instead of loading the entire list at once
- api.ts: redact sensitive fields (password, token) before logging the
  request body in console.debug, to avoid leaking credentials/PII

Code Flow Problems
-------------------
- OrderFormModal: remove leftover console.log/debug statements and the
  redundant onClick handler on the submit button
- auth: remove the unused src/service/auth.service.ts (axios) and keep
  only src/services/auth.service.ts (fetch); fix useAuth.ts import path
  from
2026-07-19 14:57:48 +03:00
m7amedez5511
bbde177f4a fixed auth cycle and upadet indes fail to all model to update style solve pagination in car maintenanc
-delete link step back from home page and change live color in dashboard page
2026-07-15 18:44:16 +03:00
m7amedez5511
0eebef3ba7 update client address add primary address and update client address , fixed profile page and update user layer 2026-07-13 17:21:42 +03:00
m7amedez5511
5707521b92 update laye out and update home page also create footer page 2026-07-08 17:49:08 +03:00
m7amedez5511
c814c5b97c add home pages and update app page laye out and navebar 2026-07-07 17:27:05 +03:00
m7amedez5511
45f5a1dade update auth layer and update driver photo loading
also return just active car in create tripe and update tripe
2026-07-07 14:51:14 +03:00
m7amedez1122
a7e53f2047 add archive featcher to role , brtanch , car_mainte also update client and clien_addres create car mainte fails and update car fails delete car_maint from saidbar and but it in car model also update car image display 2026-07-06 17:41:12 +03:00
m7amedez5511
25f3468d74 chore: phase 1 lint/type fixes — commit all changes 2026-07-02 20:07:38 +03:00
m7amedez5511
d225291b70 add archive endpoint to user , driver , car ,order ,trip and update trip fails also update saidecar 2026-07-02 19:04:51 +03:00
m7amedez5511
c33778012a add archive layout pages to user car driver trip order 2026-06-30 17:35:18 +03:00
m7amedez5511
f5882f3791 add assign permission to role pages 2026-06-30 14:17:50 +03:00
m7amedez5511
eaae6810bd update client and client adresses pages also create branch pages and role pages and update some pages to be batter 2026-06-30 11:18:49 +03:00
m7amedez5511
0847bd23ee update order pages and create client pages also client adresses pages 2026-06-25 21:34:31 +03:00
m7amedez5511
a18ed59ac1 update saidebar layout build order crud 2026-06-24 18:01:01 +03:00
m7amedez5511
db64b79fe3 first action update user pages .
2-update driver pages [fixed image display and notyfi]
3-update car pages [fixed image]
4-build tripe pages crud
5-build some role pages
6-build audit page
7-update ui compounants
8-update saidebar and topbar
9-cheange view to be ar view
10-cheange stractcher to be app,src
11-add validation layer by yup
12-add api image-proxy to broke image corse bloken
2026-06-23 15:54:07 +03:00
m7amedez5511
c1b77f89cd finsh user,car,driver pages also add validator layer to app build trip page 2026-06-18 16:51:31 +03:00
m7amedez5511
a23d21f222 create middleware block and update proxy file also make token stored in cookes and up date user page to can show user details also fixed delete user error and delete car error and broken corse inginx image block now we can uplode image to server and but it in my app 2026-06-17 17:01:53 +03:00
6ca2cc08d1 Update docs/FINDINGS.md 2026-06-14 21:35:08 +00:00
9b73badb73 docs: add full frontend code review findings
Multi-angle review of the entire client (services/hooks, pages/routing,
components/utils, core auth/proxy): 21 ranked findings (5 Critical,
4 High, 12 Medium) plus low/cleanup, with a summary table, per-finding
failure scenarios and fixes, and a suggested fix order.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2001-01-01 00:00:00 +00:00
m7amedez5511
bcc4baf28a create driver page and client page also create oll driver , client layer 2026-06-14 16:25:56 +03:00
m7amedez5511
68bfce4345 create car page and update user page 2026-06-13 17:49:48 +03:00
m7amedez5511
e0e38dc87a create user pages crud also update pages ui build order and car ,driver first page interfase create model layer to componants 2026-06-10 16:58:17 +03:00
m7amedez5511
53c03e9867 finshing architecture for project now we have all layers to build profitionl project app,components ,hooks ,lib,services,styel ,types 2026-06-08 23:05:19 +03:00
m7amedez5511
70853958f5 handel login page and logout alson andel create order page to client and build spinner page and complet project structuer , create logo tamplet 2026-06-08 17:24:53 +03:00
m7amedez5511
5554f5238c create all proj components also build main screen ui also create sambil dashbord 2026-06-04 21:24:01 +03:00
m7amedez5511
54e57ff32a Initial commit 2026-06-03 13:23:41 +03:00