mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 00:24:03 +00:00
feat(payments): add transparent balance guidance
This commit is contained in:
@@ -345,6 +345,7 @@ function App() {
|
||||
const [addingPayment, setAddingPayment] = createSignal(false)
|
||||
const [billingForm, setBillingForm] = createSignal({
|
||||
settlementCurrency: 'GEL' as 'USD' | 'GEL',
|
||||
paymentBalanceAdjustmentPolicy: 'utilities' as 'utilities' | 'rent' | 'separate',
|
||||
rentAmountMajor: '',
|
||||
rentCurrency: 'USD' as 'USD' | 'GEL',
|
||||
rentDueDay: 20,
|
||||
@@ -530,6 +531,7 @@ function App() {
|
||||
}))
|
||||
setBillingForm({
|
||||
settlementCurrency: payload.settings.settlementCurrency,
|
||||
paymentBalanceAdjustmentPolicy: payload.settings.paymentBalanceAdjustmentPolicy,
|
||||
rentAmountMajor: payload.settings.rentAmountMinor
|
||||
? (Number(payload.settings.rentAmountMinor) / 100).toFixed(2)
|
||||
: '',
|
||||
@@ -2273,6 +2275,29 @@ function App() {
|
||||
<option value="USD">USD</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="settings-field settings-field--wide">
|
||||
<span>{copy().paymentBalanceAdjustmentPolicy}</span>
|
||||
<select
|
||||
value={billingForm().paymentBalanceAdjustmentPolicy}
|
||||
onChange={(event) =>
|
||||
setBillingForm((current) => ({
|
||||
...current,
|
||||
paymentBalanceAdjustmentPolicy: event.currentTarget.value as
|
||||
| 'utilities'
|
||||
| 'rent'
|
||||
| 'separate'
|
||||
}))
|
||||
}
|
||||
>
|
||||
<option value="utilities">
|
||||
{copy().paymentBalanceAdjustmentUtilities}
|
||||
</option>
|
||||
<option value="rent">{copy().paymentBalanceAdjustmentRent}</option>
|
||||
<option value="separate">
|
||||
{copy().paymentBalanceAdjustmentSeparate}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="settings-field">
|
||||
<span>{copy().rentAmount}</span>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user