diff --git a/public/logos/dinheiro.png b/public/logos/dinheiro.png new file mode 100644 index 0000000..3e54461 Binary files /dev/null and b/public/logos/dinheiro.png differ diff --git a/src/features/accounts/components/account-dialog.tsx b/src/features/accounts/components/account-dialog.tsx index 8e02ac2..1e302d5 100644 --- a/src/features/accounts/components/account-dialog.tsx +++ b/src/features/accounts/components/account-dialog.tsx @@ -37,7 +37,9 @@ const DEFAULT_ACCOUNT_TYPES = [ "Conta Poupança", "Carteira Digital", "Conta Investimento", + "Dinheiro", "Pré-Pago | VR/VA", + "Outros", ] as const; const DEFAULT_ACCOUNT_STATUS = ["Ativa", "Inativa"] as const; diff --git a/src/features/accounts/components/account-form-fields.tsx b/src/features/accounts/components/account-form-fields.tsx index 6d3ff48..bbd846c 100644 --- a/src/features/accounts/components/account-form-fields.tsx +++ b/src/features/accounts/components/account-form-fields.tsx @@ -12,7 +12,10 @@ import { SelectValue, } from "@/shared/components/ui/select"; import { Textarea } from "@/shared/components/ui/textarea"; -import { StatusSelectContent } from "./account-select-items"; +import { + AccountTypeSelectContent, + StatusSelectContent, +} from "./account-select-items"; import type { AccountFormValues } from "./types"; @@ -54,12 +57,16 @@ export function AccountFormFields({ onValueChange={(value) => onChange("accountType", value)} > - + + {values.accountType && ( + + )} + {accountTypes.map((type) => ( - {type} + ))} diff --git a/src/features/accounts/components/account-select-items.tsx b/src/features/accounts/components/account-select-items.tsx index 72262ca..6abd3a9 100644 --- a/src/features/accounts/components/account-select-items.tsx +++ b/src/features/accounts/components/account-select-items.tsx @@ -1,6 +1,18 @@ "use client"; import StatusDot from "@/shared/components/status-dot"; +import { getAccountTypeIcon } from "@/shared/utils/icons"; + +export function AccountTypeSelectContent({ label }: { label: string }) { + const icon = getAccountTypeIcon(label); + + return ( + + {icon} + {label} + + ); +} export function StatusSelectContent({ label }: { label: string }) { const isActive = label === "Ativa"; diff --git a/src/shared/utils/icons.tsx b/src/shared/utils/icons.tsx index 03f03ff..c192b5b 100644 --- a/src/shared/utils/icons.tsx +++ b/src/shared/utils/icons.tsx @@ -36,13 +36,37 @@ export const getConditionIcon = (condition: string): ReactNode => { return registry[key] ?? null; }; +export const getAccountTypeIcon = (accountType: string): ReactNode => { + const key = normalizeKey(accountType); + + const registry: Record = { + contacorrente: , + contapoupanca: ( + + ), + carteiradigital: ( + + ), + containvestimento: ( + + ), + prepagovrva: , + dinheiro: , + outros: , + }; + + return ( + registry[key] ?? ( + + ) + ); +}; + export const getPaymentMethodIcon = (paymentMethod: string): ReactNode => { const key = normalizeKey(paymentMethod); const registry: Record = { - dinheiro: ( - - ), + dinheiro: , pix: , boleto: , credito: (