feat(dashboard): drop the category filter
The category filter is not used: remove it end to end — the toolbar's category combobox (desktop + mobile drawer), its option list, the active-filter count and the filterQuotes() clause it drove, plus the now-unused `category` field in the Filters type. Supplier and status filters are unchanged. The backend's own quote filtering by category is untouched (it filters on the quote's supplier category when ?category_id= is passed), so the API keeps its contract; only the dashboard UI stops offering the filter.
This commit is contained in:
@@ -336,9 +336,8 @@ export function termsheetSummary(store: Store, q: Quote): { title: string; sub:
|
||||
// فیلترهای دفتر
|
||||
export function filterQuotes(
|
||||
store: Store,
|
||||
filters: { category: string; supplier: string; status: string; search: string },
|
||||
filters: { supplier: string; status: string; search: string },
|
||||
): Quote[] {
|
||||
const catVal = filters.category.trim();
|
||||
const supVal = filters.supplier.trim();
|
||||
const stVal = filters.status.trim();
|
||||
const q = filters.search.trim().toLowerCase();
|
||||
@@ -361,10 +360,6 @@ export function filterQuotes(
|
||||
if (stKey && quote.status !== stKey) return false;
|
||||
|
||||
const matInfo = activeItems(quote).map((li) => materialById(store.materials, li.material_id));
|
||||
// v2.7: دسته روی تأمینکننده است و بکاند هم پیشنهادها را با دستهی
|
||||
// تأمینکننده فیلتر میکند — همین قاعده اینجا هم اعمال میشود تا لیست و
|
||||
// فیلتر یک رفتار داشته باشند.
|
||||
if (catVal && !(supObj.categories || []).includes(catVal)) return false;
|
||||
|
||||
if (q) {
|
||||
const hay =
|
||||
|
||||
Reference in New Issue
Block a user