31 Commits

Author SHA1 Message Date
m7amedez5511
1e4d9c5b59 update dashboard home 2026-08-30 16:18:54 +03:00
m7amedez5511
0658e59d9b edit location info 2026-08-23 15:34:18 +03:00
m7amedez5511
b27da3f6e8 solve middleware problem and navigation problem 2026-08-23 11:34:42 +03:00
m7amedez5511
2d05d3446c solve problem tree rerender 2026-08-19 18:00:55 +03:00
m7amedez5511
55b03ad6f4 update user page and logo to be link also update profile page 2026-08-17 16:24:58 +03:00
m7amedez5511
17dc53fcfe build dashboard home page and dashboard layer 2026-07-27 17:54:43 +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
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
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