mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
feat: endurece mutações financeiras e permite zerar conta
This commit is contained in:
@@ -20,7 +20,10 @@ interface AccountFormFieldsProps {
|
||||
values: AccountFormValues;
|
||||
accountTypes: string[];
|
||||
accountStatuses: string[];
|
||||
onChange: (field: keyof AccountFormValues, value: string) => void;
|
||||
onChange: <K extends keyof AccountFormValues>(
|
||||
field: K,
|
||||
value: AccountFormValues[K],
|
||||
) => void;
|
||||
showInitialBalance?: boolean;
|
||||
}
|
||||
|
||||
@@ -112,7 +115,7 @@ export function AccountFormFields({
|
||||
id="exclude-from-balance"
|
||||
checked={Boolean(values.excludeFromBalance)}
|
||||
onCheckedChange={(checked) =>
|
||||
onChange("excludeFromBalance", checked ? "true" : "false")
|
||||
onChange("excludeFromBalance", checked === true)
|
||||
}
|
||||
/>
|
||||
<Label
|
||||
@@ -129,10 +132,7 @@ export function AccountFormFields({
|
||||
id="exclude-initial-balance-from-income"
|
||||
checked={Boolean(values.excludeInitialBalanceFromIncome)}
|
||||
onCheckedChange={(checked) =>
|
||||
onChange(
|
||||
"excludeInitialBalanceFromIncome",
|
||||
checked ? "true" : "false",
|
||||
)
|
||||
onChange("excludeInitialBalanceFromIncome", checked === true)
|
||||
}
|
||||
/>
|
||||
<Label
|
||||
|
||||
Reference in New Issue
Block a user