mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-07 16:18:53 +00:00
17 lines
389 B
TypeScript
17 lines
389 B
TypeScript
export type InvoiceFilterState = {
|
|
action: string | null;
|
|
vendorQuery: string;
|
|
};
|
|
|
|
export function countActiveFilters(filters: InvoiceFilterState): number {
|
|
let count = 0;
|
|
if (filters.action) {
|
|
count += 1;
|
|
}
|
|
if (filters.vendorQuery.trim()) {
|
|
count += 1;
|
|
}
|
|
return count;
|
|
}
|
|
|
|
export const EMPTY_INVOICE_FILTERS: InvoiceFilterState = { action: null, vendorQuery: "" };
|