diff --git a/app/lib/db-types.ts b/app/lib/db-types.ts index a61f0a9..4dedcc8 100644 --- a/app/lib/db-types.ts +++ b/app/lib/db-types.ts @@ -55,6 +55,9 @@ export interface BillingLocation { /** (optional) method for showing payment instructions to tenant */ tenantPaymentMethod?: "none" | "iban" | "revolut" | null; + /** (optional) type of proof of payment attachment */ + proofOfPaymentAttachmentType: "combined" | "per-bill"; + /** (optional) tenant name */ tenantName?: string | null; /** (optional) tenant street */ diff --git a/app/ui/LocationEditForm.tsx b/app/ui/LocationEditForm.tsx index d63c4cb..45d89f5 100644 --- a/app/ui/LocationEditForm.tsx +++ b/app/ui/LocationEditForm.tsx @@ -42,6 +42,7 @@ export const LocationEditForm: FC = ({ location, yearMont tenantTown: location?.tenantTown ?? "", tenantEmail: location?.tenantEmail ?? "", tenantPaymentMethod: location?.tenantPaymentMethod ?? "none", + proofOfPaymentAttachmentType: location?.proofOfPaymentAttachmentType ?? "combined", autoBillFwd: location?.autoBillFwd ?? false, billFwdStrategy: location?.billFwdStrategy ?? "when-payed", rentDueNotification: location?.rentDueNotification ?? false, @@ -87,6 +88,33 @@ export const LocationEditForm: FC = ({ location, yearMont + + + +
+ {t("proof-of-payment-attachment-type--legend")} + + {t("proof-of-payment-attachment-type--info")} + +
+ +

+ {formValues.proofOfPaymentAttachmentType === "combined" ? + t("proof-of-payment-attachment-type--option--combined--tooltip") : + t("proof-of-payment-attachment-type--option--per-bill--tooltip") + } +

+
+
+
{t("tenant-payment-instructions-legend")} diff --git a/messages/en.json b/messages/en.json index 91739cb..f4f4370 100644 --- a/messages/en.json +++ b/messages/en.json @@ -150,6 +150,13 @@ "location-name-placeholder": "enter realestate name", "notes-placeholder": "notes", + "proof-of-payment-attachment-type--legend": "Proof of Payment", + "proof-of-payment-attachment-type--info": "Here you can choose how the tenant can provide proof of payment for utilities.", + "proof-of-payment-attachment-type--option--combined": "a single proof for all bills", + "proof-of-payment-attachment-type--option--combined--tooltip": "The tenant provides one proof of payment along with the monthly statement", + "proof-of-payment-attachment-type--option--per-bill": "separate proof for each bill", + "proof-of-payment-attachment-type--option--per-bill--tooltip": "The tenant provides proof of payment separately for each bill", + "tenant-payment-instructions-legend": "PAYMENT INSTRUCTIONS", "tenant-payment-instructions-code-info": "When the tenant opens the link to the statement for the given month, the application can show payment instructions for utility costs to your IBAN, as well as a 2D code they can scan.", diff --git a/messages/hr.json b/messages/hr.json index 79f1d03..2d3be80 100644 --- a/messages/hr.json +++ b/messages/hr.json @@ -149,7 +149,14 @@ "location-name-placeholder": "unesite naziv nekretnine", "notes-placeholder": "bilješke", - "tenant-payment-instructions-legend": "UPUTE ZA UPLATU", + "proof-of-payment-attachment-type--legend": "Potvrda o uplati", + "proof-of-payment-attachment-type--info": "Ovdje možete odabrati na koji način na koji podstanar može priložiti potvrdu o uplati režija.", + "proof-of-payment-attachment-type--option--combined": "jedinstvenu potvrdu za sve račune", + "proof-of-payment-attachment-type--option--combined--tooltip": "Podstanar uz mjesečni obračun prilaže jedinstvenu potvrdu o uplati", + "proof-of-payment-attachment-type--option--per-bill": "zasebna potvrda za svaki račun", + "proof-of-payment-attachment-type--option--per-bill--tooltip": "Podstanar potvrdu o uplati prilaže zasebno za svaki račun", + + "tenant-payment-instructions-legend": "Upute za uplatu", "tenant-payment-instructions-code-info": "Kada podstanar otvori poveznicu na obračun za zadani mjesec aplikacija mu može prikazati upute za uplatu troškova režija na vaš IBAN ili Revolut.", "tenant-payment-instructions-method--legend": "Podstanaru prikaži upute za uplatu:",