fix: format IBAN in payment info on ViewLocationCard
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
import { FC, useEffect, useMemo, useState } from "react";
|
import { FC, useEffect, useMemo, useState } from "react";
|
||||||
import { BillAttachment, BilledTo, BillingLocation, UserSettings } from "../lib/db-types";
|
import { BillAttachment, BilledTo, BillingLocation, UserSettings } from "../lib/db-types";
|
||||||
import { formatYearMonth } from "../lib/format";
|
import { formatYearMonth } from "../lib/format";
|
||||||
import { formatCurrency } from "../lib/formatStrings";
|
import { formatCurrency, formatIban } from "../lib/formatStrings";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { ViewBillBadge } from "./ViewBillBadge";
|
import { ViewBillBadge } from "./ViewBillBadge";
|
||||||
import { Pdf417Barcode } from "./Pdf417Barcode";
|
import { Pdf417Barcode } from "./Pdf417Barcode";
|
||||||
@@ -130,7 +130,7 @@ export const ViewLocationCard:FC<ViewLocationCardProps> = ({location, userSettin
|
|||||||
<>
|
<>
|
||||||
<p className="max-w-[25em] ml-1 mt-1 mb-1">{t("payment-info-header")}</p>
|
<p className="max-w-[25em] ml-1 mt-1 mb-1">{t("payment-info-header")}</p>
|
||||||
<ul className="ml-4 mb-3">
|
<ul className="ml-4 mb-3">
|
||||||
<li><strong>{t("payment-iban-label")}</strong><pre className="inline pl-1">{paymentParams.IBAN}</pre></li>
|
<li><strong>{t("payment-iban-label")}</strong><pre className="inline pl-1">{ formatIban(paymentParams.IBAN) }</pre></li>
|
||||||
<li><strong>{t("payment-recipient-label")}</strong> <pre className="inline pl-1">{paymentParams.Primatelj}</pre></li>
|
<li><strong>{t("payment-recipient-label")}</strong> <pre className="inline pl-1">{paymentParams.Primatelj}</pre></li>
|
||||||
<li><strong>{t("payment-recipient-address-label")}</strong><pre className="inline pl-1">{paymentParams.AdresaPrimatelja}</pre></li>
|
<li><strong>{t("payment-recipient-address-label")}</strong><pre className="inline pl-1">{paymentParams.AdresaPrimatelja}</pre></li>
|
||||||
<li><strong>{t("payment-recipient-city-label")}</strong><pre className="inline pl-1">{paymentParams.SjedistePrimatelja}</pre></li>
|
<li><strong>{t("payment-recipient-city-label")}</strong><pre className="inline pl-1">{paymentParams.SjedistePrimatelja}</pre></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user