tariffsDG fix type

This commit is contained in:
ArtChaos189 2023-06-06 17:14:42 +03:00
parent 96cca5c3e6
commit 9747e18c0a

@ -55,7 +55,7 @@ export default function TariffsDG({ handleSelectionChange }: Props) {
findPrivilegeById(tariff.privilegeId)?.description ?? "Привилегия не найдена" findPrivilegeById(tariff.privilegeId)?.description ?? "Привилегия не найдена"
}`, }`,
amount: tariff.amount, amount: tariff.amount,
type: console.log(tariff.id), type: findPrivilegeById(tariff.privilegeId)?.type === "count" ? "день" : "шт.",
pricePerUnit: tariff.customPricePerUnit ?? findPrivilegeById(tariff.privilegeId)?.price, pricePerUnit: tariff.customPricePerUnit ?? findPrivilegeById(tariff.privilegeId)?.price,
isCustomPrice: tariff.customPricePerUnit === undefined ? "Нет" : "Да", isCustomPrice: tariff.customPricePerUnit === undefined ? "Нет" : "Да",
total: tariff.amount * (tariff.customPricePerUnit ?? findPrivilegeById(tariff.privilegeId)?.price ?? 0), total: tariff.amount * (tariff.customPricePerUnit ?? findPrivilegeById(tariff.privilegeId)?.price ?? 0),