add deprecation marks
This commit is contained in:
parent
a49382443a
commit
912f730949
@ -2,6 +2,7 @@ import { CartSummary, Discount, Promocode } from "../../../../model/cart";
|
|||||||
import { ArrayProps, Tariff } from "../../../../model/tariff";
|
import { ArrayProps, Tariff } from "../../../../model/tariff";
|
||||||
|
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
export function calcFitDiscounts(discountsArray: Discount[], discountsActiveArray: number[], cartSummary: { [key: string]: CartSummary; }, fieldAddedValue: string) {
|
export function calcFitDiscounts(discountsArray: Discount[], discountsActiveArray: number[], cartSummary: { [key: string]: CartSummary; }, fieldAddedValue: string) {
|
||||||
const result = discountsActiveArray.filter(e => {
|
const result = discountsActiveArray.filter(e => {
|
||||||
const discount = discountsArray[e];
|
const discount = discountsArray[e];
|
||||||
@ -32,6 +33,7 @@ export function calcFitDiscounts(discountsArray: Discount[], discountsActiveArra
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
export function separator(amount: number) {
|
export function separator(amount: number) {
|
||||||
if (String(amount).length < 4) { return amount; }
|
if (String(amount).length < 4) { return amount; }
|
||||||
|
|
||||||
@ -52,6 +54,7 @@ export function formatPromocodePriveleges(promocode: Promocode) {
|
|||||||
return promocode.privileges.map(privelege => `${privelege.good} - ${Math.round(privelege.discount * 100)}%`).join(", ");
|
return promocode.privileges.map(privelege => `${privelege.good} - ${Math.round(privelege.discount * 100)}%`).join(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
export function calcTotalAndRowData(
|
export function calcTotalAndRowData(
|
||||||
cartRowsData: ArrayProps[],
|
cartRowsData: ArrayProps[],
|
||||||
isNonCommercial: boolean,
|
isNonCommercial: boolean,
|
||||||
@ -191,6 +194,7 @@ export function calcTotalAndRowData(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
function applyActiveDiscounts(
|
function applyActiveDiscounts(
|
||||||
percents: number,
|
percents: number,
|
||||||
tariff: Tariff,
|
tariff: Tariff,
|
||||||
@ -234,6 +238,7 @@ function applyActiveDiscounts(
|
|||||||
return percents;
|
return percents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
export function convertTariffs(tariffsArray: ArrayProps[]) {
|
export function convertTariffs(tariffsArray: ArrayProps[]) {
|
||||||
return tariffsArray.map((item) => {
|
return tariffsArray.map((item) => {
|
||||||
if (item.type === "package" && item.tariffs) {
|
if (item.type === "package" && item.tariffs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user