feat: dynamic UI texts system + admin panel editor + Vazirmatn local font + bug fixes

- Add getText() system for all homepage sections (Header, Hero, FeaturedProducts, SmartAdvisor, VetGallery, Footer)
- Add UITexts admin page in frontend/admin-panel with search, group collapse, per-key save
- Add seed-ui-texts.ts with 102 texts in 9 groups
- Add local VazirmatnVariable.woff2 font, remove CDN + Inter references
- Fix hero image path, productService return type { data, meta }
- Fix ArchivePage pagination + CATEGORIES list + breadcrumbs
- Fix BlogPage/Wiki page links + brightness-0 invert removal
- Fix IngredientWiki search + product links + placeholder
- Fix all getProducts() callers for { data } destructuring
- Fix sitemap.ts, CartDrawer, B2BPortal, CheckoutPage type issues
- Add .gitignore for /fonts/ and /backend/uploads/
This commit is contained in:
parsa aghaei committed 2026-07-11 17:19:55 +03:30
1 parent ab7ed279c8
commit 1a0c98a34e
26 files changed
+653 -132

No files matched your search

@@ -77,18 +77,25 @@ export class ProductService {
category?: string;
petType?: PetType | "all";
query?: string;
}): Promise<Product[]> {
page?: number;
limit?: number;
}): Promise<{ data: Product[]; meta: { total: number; page: number; lastPage: number; limit: number } }> {
const params = new URLSearchParams();
if (filters?.category && filters.category !== "all") params.append('category', filters.category);
if (filters?.petType && filters.petType !== "all") params.append('petType', filters.petType);
if (filters?.query) params.append('search', filters.query);
params.append('page', String(filters?.page || 1));
params.append('limit', String(filters?.limit || 12));
try {
const response = await api.get(`/products?${params.toString()}`);
return response.data.data.map((item: any) => this.mapBackendToFrontend(item));
return {
data: response.data.data.map((item: any) => this.mapBackendToFrontend(item)),
meta: response.data.meta,
};
} catch (error) {
console.error("[ProductService] Failed to fetch products:", error);
return [];
return { data: [], meta: { total: 0, page: 1, lastPage: 0, limit: 12 } };
}
}