feat(frontend): add React UI — procurement office, wizard, suppliers, inventory panel (dash port), role-based login

This commit is contained in:
ali_mohaghegh
2026-08-25 19:08:15 +03:30
parent 170aed66ea
commit 4e105c5cd5
103 changed files with 16352 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// ============================================================
// نرمال‌سازی متن برای جستجو/مقایسه‌ی بخشنده
// ============================================================
const FA_DIGITS = ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"];
function toEn(s: string): string {
return String(s).replace(/[۰-۹]/g, (d) => String(FA_DIGITS.indexOf(d)));
}
// trim, lowercase, یکسان‌سازی ی/ک فارسی و عربی، حذف zero-width non-joiner
export function normalize(s: unknown): string {
return toEn(String(s == null ? "" : s))
.replace(/\u200c/g, "")
.trim()
.toLowerCase()
.replace(/ي/g, "ی")
.replace(/ك/g, "ک");
}