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

This commit is contained in:
m7amedez1122
2026-07-06 17:41:12 +03:00
parent 25f3468d74
commit a7e53f2047
56 changed files with 3864 additions and 147 deletions

View File

@@ -1,17 +1,12 @@
"use client";
import { useEffect, useMemo, useState } from "react";
import { useCallback, useEffect, useMemo, useState } from "react";
import { getStoredToken } from "@/src/lib/auth";
import { carService } from "@/src/services/car.service";
import type { Car } from "@/src/types/car";
const PAGE_SIZE = 12;
// ── useArchivedCars ───────────────────────────────────────────────────────────
// GET /cars/archived returns the full archived list at once (no page/search
// params on the backend), so pagination + search are done client-side here —
// mirrors the page/search/pages contract of useCars for a consistent UI.
export function useArchivedCars() {
const [allCars, setAllCars] = useState<Car[]>([]);
const [loading, setLoading] = useState(true);