Adicionado aba de estabelecimentos e feita ajuste de interface. Detalhes adicionados no CHANGELOG.md
This commit is contained in:
committed by
Felipe Coutinho
parent
ffde55f589
commit
9b78f839bf
@@ -37,6 +37,7 @@ export type LancamentoSearchFilters = {
|
||||
categoriaFilter: string | null;
|
||||
contaCartaoFilter: string | null;
|
||||
searchFilter: string | null;
|
||||
estabelecimentoFilter: string | null;
|
||||
};
|
||||
|
||||
type BaseSluggedOption = {
|
||||
@@ -122,6 +123,7 @@ export const extractLancamentoSearchFilters = (
|
||||
categoriaFilter: getSingleParam(params, "categoria"),
|
||||
contaCartaoFilter: getSingleParam(params, "contaCartao"),
|
||||
searchFilter: getSingleParam(params, "q"),
|
||||
estabelecimentoFilter: getSingleParam(params, "estabelecimento"),
|
||||
});
|
||||
|
||||
const normalizeLabel = (value: string | null | undefined) =>
|
||||
@@ -368,6 +370,10 @@ export const buildLancamentoWhere = ({
|
||||
}
|
||||
}
|
||||
|
||||
if (filters.estabelecimentoFilter?.trim()) {
|
||||
where.push(eq(lancamentos.name, filters.estabelecimentoFilter.trim()));
|
||||
}
|
||||
|
||||
const searchPattern = buildSearchPattern(filters.searchFilter);
|
||||
if (searchPattern) {
|
||||
where.push(
|
||||
|
||||
Reference in New Issue
Block a user