meemup-library 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/cjs/controllers/ApiController.d.ts +19 -0
- package/lib/cjs/controllers/ApiController.js +98 -0
- package/lib/cjs/controllers/DashboardController.d.ts +20 -0
- package/lib/cjs/controllers/DashboardController.js +155 -0
- package/lib/cjs/controllers/DateTimeController.d.ts +20 -0
- package/lib/cjs/controllers/DateTimeController.js +303 -0
- package/lib/cjs/controllers/LogController.d.ts +14 -0
- package/lib/cjs/controllers/LogController.js +105 -0
- package/lib/cjs/controllers/LogScreenController.d.ts +10 -0
- package/lib/cjs/controllers/LogScreenController.js +68 -0
- package/lib/cjs/controllers/MoneyController.d.ts +10 -0
- package/lib/cjs/controllers/MoneyController.js +42 -0
- package/lib/cjs/controllers/OrderScreenController.d.ts +14 -0
- package/lib/cjs/controllers/OrderScreenController.js +72 -0
- package/lib/cjs/controllers/PhoneController.d.ts +6 -0
- package/lib/cjs/controllers/PhoneController.js +37 -0
- package/lib/cjs/controllers/PrintContentController.d.ts +25 -0
- package/lib/cjs/controllers/PrintContentController.js +515 -0
- package/lib/cjs/controllers/ProductModalController.d.ts +36 -0
- package/lib/cjs/controllers/ProductModalController.js +445 -0
- package/lib/cjs/controllers/ToolController.d.ts +6 -0
- package/lib/cjs/controllers/ToolController.js +24 -0
- package/lib/cjs/controllers/ZoneController.d.ts +13 -0
- package/lib/cjs/controllers/ZoneController.js +24 -0
- package/lib/cjs/enums/EnumBasketStep.d.ts +5 -0
- package/lib/cjs/enums/EnumBasketStep.js +8 -0
- package/lib/cjs/enums/EnumCategoryAvailableIn.d.ts +7 -0
- package/lib/cjs/enums/EnumCategoryAvailableIn.js +10 -0
- package/lib/cjs/enums/EnumChannels.d.ts +9 -0
- package/lib/cjs/enums/EnumChannels.js +12 -0
- package/lib/cjs/enums/EnumDashboardSort.d.ts +7 -0
- package/lib/cjs/enums/EnumDashboardSort.js +10 -0
- package/lib/cjs/enums/EnumDiscountType.d.ts +6 -0
- package/lib/cjs/enums/EnumDiscountType.js +9 -0
- package/lib/cjs/enums/EnumFeeCalculationMode.d.ts +7 -0
- package/lib/cjs/enums/EnumFeeCalculationMode.js +10 -0
- package/lib/cjs/enums/EnumFeeType.d.ts +5 -0
- package/lib/cjs/enums/EnumFeeType.js +8 -0
- package/lib/cjs/enums/EnumGender.d.ts +6 -0
- package/lib/cjs/enums/EnumGender.js +9 -0
- package/lib/cjs/enums/EnumLogType.d.ts +7 -0
- package/lib/cjs/enums/EnumLogType.js +10 -0
- package/lib/cjs/enums/EnumNewOrderWarning.d.ts +6 -0
- package/lib/cjs/enums/EnumNewOrderWarning.js +9 -0
- package/lib/cjs/enums/EnumOpenCashDrawer.d.ts +5 -0
- package/lib/cjs/enums/EnumOpenCashDrawer.js +8 -0
- package/lib/cjs/enums/EnumOrderScreenTab.d.ts +6 -0
- package/lib/cjs/enums/EnumOrderScreenTab.js +9 -0
- package/lib/cjs/enums/EnumOrderState.d.ts +12 -0
- package/lib/cjs/enums/EnumOrderState.js +15 -0
- package/lib/cjs/enums/EnumOrderType.d.ts +6 -0
- package/lib/cjs/enums/EnumOrderType.js +9 -0
- package/lib/cjs/enums/EnumPaymentState.d.ts +6 -0
- package/lib/cjs/enums/EnumPaymentState.js +9 -0
- package/lib/cjs/enums/EnumPaymentType.d.ts +12 -0
- package/lib/cjs/enums/EnumPaymentType.js +15 -0
- package/lib/cjs/enums/EnumPizzaSide.d.ts +7 -0
- package/lib/cjs/enums/EnumPizzaSide.js +10 -0
- package/lib/cjs/enums/EnumPriceMidpointRounding.d.ts +13 -0
- package/lib/cjs/enums/EnumPriceMidpointRounding.js +58 -0
- package/lib/cjs/enums/EnumPrintCommand.d.ts +6 -0
- package/lib/cjs/enums/EnumPrintCommand.js +9 -0
- package/lib/cjs/enums/EnumProductAvailableMode.d.ts +8 -0
- package/lib/cjs/enums/EnumProductAvailableMode.js +11 -0
- package/lib/cjs/enums/EnumShowOrderMode.d.ts +6 -0
- package/lib/cjs/enums/EnumShowOrderMode.js +9 -0
- package/lib/cjs/enums/EnumSortMode.d.ts +5 -0
- package/lib/cjs/enums/EnumSortMode.js +8 -0
- package/lib/cjs/enums/EnumTipType.d.ts +6 -0
- package/lib/cjs/enums/EnumTipType.js +9 -0
- package/lib/cjs/interfaces/IAccount.d.ts +12 -0
- package/lib/cjs/interfaces/IAccount.js +13 -0
- package/lib/cjs/interfaces/IAction.d.ts +6 -0
- package/lib/cjs/interfaces/IAction.js +2 -0
- package/lib/cjs/interfaces/IAllergicStuffs.d.ts +7 -0
- package/lib/cjs/interfaces/IAllergicStuffs.js +2 -0
- package/lib/cjs/interfaces/IAnswer.d.ts +9 -0
- package/lib/cjs/interfaces/IAnswer.js +10 -0
- package/lib/cjs/interfaces/IApiAllOrder.d.ts +7 -0
- package/lib/cjs/interfaces/IApiAllOrder.js +7 -0
- package/lib/cjs/interfaces/IApiEstimatedTimeBody.d.ts +6 -0
- package/lib/cjs/interfaces/IApiEstimatedTimeBody.js +2 -0
- package/lib/cjs/interfaces/IApiPayOnTerminalBody.d.ts +7 -0
- package/lib/cjs/interfaces/IApiPayOnTerminalBody.js +8 -0
- package/lib/cjs/interfaces/IApiShop.d.ts +31 -0
- package/lib/cjs/interfaces/IApiShop.js +25 -0
- package/lib/cjs/interfaces/ICalculateFeeResult.d.ts +6 -0
- package/lib/cjs/interfaces/ICalculateFeeResult.js +2 -0
- package/lib/cjs/interfaces/ICard.d.ts +9 -0
- package/lib/cjs/interfaces/ICard.js +2 -0
- package/lib/cjs/interfaces/ICategory.d.ts +31 -0
- package/lib/cjs/interfaces/ICategory.js +31 -0
- package/lib/cjs/interfaces/ICheckoutOption.d.ts +39 -0
- package/lib/cjs/interfaces/ICheckoutOption.js +39 -0
- package/lib/cjs/interfaces/ICompanyFee.d.ts +21 -0
- package/lib/cjs/interfaces/ICompanyFee.js +2 -0
- package/lib/cjs/interfaces/ICompanyInvoiceDetail.d.ts +14 -0
- package/lib/cjs/interfaces/ICompanyInvoiceDetail.js +2 -0
- package/lib/cjs/interfaces/IConfigTodayReport.d.ts +11 -0
- package/lib/cjs/interfaces/IConfigTodayReport.js +12 -0
- package/lib/cjs/interfaces/ICustomer.d.ts +12 -0
- package/lib/cjs/interfaces/ICustomer.js +16 -0
- package/lib/cjs/interfaces/ICustomerAddress.d.ts +17 -0
- package/lib/cjs/interfaces/ICustomerAddress.js +2 -0
- package/lib/cjs/interfaces/IDailyReportOtherData.d.ts +16 -0
- package/lib/cjs/interfaces/IDailyReportOtherData.js +2 -0
- package/lib/cjs/interfaces/IDashboardScreenState.d.ts +6 -0
- package/lib/cjs/interfaces/IDashboardScreenState.js +13 -0
- package/lib/cjs/interfaces/IExtra.d.ts +29 -0
- package/lib/cjs/interfaces/IExtra.js +2 -0
- package/lib/cjs/interfaces/IExtraItem.d.ts +18 -0
- package/lib/cjs/interfaces/IExtraItem.js +19 -0
- package/lib/cjs/interfaces/IGeneralInformation.d.ts +33 -0
- package/lib/cjs/interfaces/IGeneralInformation.js +46 -0
- package/lib/cjs/interfaces/IGeneralItems.d.ts +36 -0
- package/lib/cjs/interfaces/IGeneralItems.js +37 -0
- package/lib/cjs/interfaces/IKitchenScreenSetting.d.ts +8 -0
- package/lib/cjs/interfaces/IKitchenScreenSetting.js +9 -0
- package/lib/cjs/interfaces/ILocalSetting.d.ts +18 -0
- package/lib/cjs/interfaces/ILocalSetting.js +22 -0
- package/lib/cjs/interfaces/ILocation.d.ts +6 -0
- package/lib/cjs/interfaces/ILocation.js +7 -0
- package/lib/cjs/interfaces/ILog.d.ts +11 -0
- package/lib/cjs/interfaces/ILog.js +15 -0
- package/lib/cjs/interfaces/ILogin.d.ts +5 -0
- package/lib/cjs/interfaces/ILogin.js +2 -0
- package/lib/cjs/interfaces/IOnlineOrderItem.d.ts +33 -0
- package/lib/cjs/interfaces/IOnlineOrderItem.js +2 -0
- package/lib/cjs/interfaces/IOrderDetailOrderItem.d.ts +6 -0
- package/lib/cjs/interfaces/IOrderDetailOrderItem.js +2 -0
- package/lib/cjs/interfaces/IOrderScreenState.d.ts +11 -0
- package/lib/cjs/interfaces/IOrderScreenState.js +15 -0
- package/lib/cjs/interfaces/IOrderState.d.ts +6 -0
- package/lib/cjs/interfaces/IOrderState.js +2 -0
- package/lib/cjs/interfaces/IOrderTypeModal.d.ts +19 -0
- package/lib/cjs/interfaces/IOrderTypeModal.js +2 -0
- package/lib/cjs/interfaces/IPaymentStatusChanged.d.ts +8 -0
- package/lib/cjs/interfaces/IPaymentStatusChanged.js +8 -0
- package/lib/cjs/interfaces/IPreviuosOrder.d.ts +30 -0
- package/lib/cjs/interfaces/IPreviuosOrder.js +2 -0
- package/lib/cjs/interfaces/IPrintTemplate.d.ts +54 -0
- package/lib/cjs/interfaces/IPrintTemplate.js +56 -0
- package/lib/cjs/interfaces/IPrinterAndPrintCount.d.ts +5 -0
- package/lib/cjs/interfaces/IPrinterAndPrintCount.js +2 -0
- package/lib/cjs/interfaces/IProduct.d.ts +47 -0
- package/lib/cjs/interfaces/IProduct.js +2 -0
- package/lib/cjs/interfaces/IProductExtra.d.ts +16 -0
- package/lib/cjs/interfaces/IProductExtra.js +2 -0
- package/lib/cjs/interfaces/IProductModalState.d.ts +14 -0
- package/lib/cjs/interfaces/IProductModalState.js +13 -0
- package/lib/cjs/interfaces/ISaveOrder.d.ts +74 -0
- package/lib/cjs/interfaces/ISaveOrder.js +2 -0
- package/lib/cjs/interfaces/ISearchAddressDetail.d.ts +11 -0
- package/lib/cjs/interfaces/ISearchAddressDetail.js +2 -0
- package/lib/cjs/interfaces/ISelectedExtraItem.d.ts +7 -0
- package/lib/cjs/interfaces/ISelectedExtraItem.js +7 -0
- package/lib/cjs/interfaces/ISelectedProductExtra.d.ts +7 -0
- package/lib/cjs/interfaces/ISelectedProductExtra.js +7 -0
- package/lib/cjs/interfaces/ISetting.d.ts +31 -0
- package/lib/cjs/interfaces/ISetting.js +37 -0
- package/lib/cjs/interfaces/ISignalOrderChanged.d.ts +5 -0
- package/lib/cjs/interfaces/ISignalOrderChanged.js +2 -0
- package/lib/cjs/interfaces/ISpecificPayment.d.ts +8 -0
- package/lib/cjs/interfaces/ISpecificPayment.js +9 -0
- package/lib/cjs/interfaces/IStarMicronicPrintTask.d.ts +11 -0
- package/lib/cjs/interfaces/IStarMicronicPrintTask.js +2 -0
- package/lib/cjs/interfaces/IStarMicronicPrinter.d.ts +6 -0
- package/lib/cjs/interfaces/IStarMicronicPrinter.js +0 -0
- package/lib/cjs/interfaces/IStorageControler.d.ts +6 -0
- package/lib/cjs/interfaces/IStorageControler.js +2 -0
- package/lib/cjs/interfaces/IStore.d.ts +53 -0
- package/lib/cjs/interfaces/IStore.js +2 -0
- package/lib/cjs/interfaces/ISystem.d.ts +64 -0
- package/lib/cjs/interfaces/ISystem.js +61 -0
- package/lib/cjs/interfaces/ITask.d.ts +8 -0
- package/lib/cjs/interfaces/ITask.js +9 -0
- package/lib/cjs/interfaces/ITextValue.d.ts +5 -0
- package/lib/cjs/interfaces/ITextValue.js +2 -0
- package/lib/cjs/interfaces/ITodayOrderCount.d.ts +5 -0
- package/lib/cjs/interfaces/ITodayOrderCount.js +2 -0
- package/lib/cjs/interfaces/IUdpPacket.d.ts +7 -0
- package/lib/cjs/interfaces/IUdpPacket.js +8 -0
- package/lib/cjs/interfaces/IWebMessage.d.ts +5 -0
- package/lib/cjs/interfaces/IWebMessage.js +2 -0
- package/lib/cjs/interfaces/IWorkScreen.d.ts +10 -0
- package/lib/cjs/interfaces/IWorkScreen.js +10 -0
- package/lib/cjs/interfaces/IZone.d.ts +13 -0
- package/lib/cjs/interfaces/IZone.js +2 -0
- package/lib/cjs/interfaces/IZoneCost.d.ts +6 -0
- package/lib/cjs/interfaces/IZoneCost.js +2 -0
- package/lib/cjs/interfaces/agent/IPrintOrder.d.ts +10 -0
- package/lib/cjs/interfaces/agent/IPrintOrder.js +0 -0
- package/lib/cjs/interfaces/database/IDExtra.d.ts +14 -0
- package/lib/cjs/interfaces/database/IDExtra.js +2 -0
- package/lib/cjs/interfaces/database/IDExtraItem.d.ts +17 -0
- package/lib/cjs/interfaces/database/IDExtraItem.js +2 -0
- package/lib/cjs/interfaces/database/IDProduct.d.ts +48 -0
- package/lib/cjs/interfaces/database/IDProduct.js +2 -0
- package/lib/cjs/interfaces/database/IDProductDefaultExtra.d.ts +6 -0
- package/lib/cjs/interfaces/database/IDProductDefaultExtra.js +2 -0
- package/lib/cjs/interfaces/database/IDProductDefaultExtraItem.d.ts +7 -0
- package/lib/cjs/interfaces/database/IDProductDefaultExtraItem.js +2 -0
- package/lib/cjs/interfaces/database/IDProductExtra.d.ts +12 -0
- package/lib/cjs/interfaces/database/IDProductExtra.js +13 -0
- package/lib/cjs/interfaces/order/IOrder.d.ts +75 -0
- package/lib/cjs/interfaces/order/IOrder.js +88 -0
- package/lib/cjs/interfaces/order/IOrderExtraItem.d.ts +14 -0
- package/lib/cjs/interfaces/order/IOrderExtraItem.js +2 -0
- package/lib/cjs/interfaces/order/IOrderItem.d.ts +22 -0
- package/lib/cjs/interfaces/order/IOrderItem.js +2 -0
- package/lib/cjs/interfaces/print/IModifiedDetails.d.ts +7 -0
- package/lib/cjs/interfaces/print/IModifiedDetails.js +2 -0
- package/lib/cjs/interfaces/print/IModifiedDetailsItem.d.ts +6 -0
- package/lib/cjs/interfaces/print/IModifiedDetailsItem.js +2 -0
- package/lib/cjs/interfaces/print/IOrderDetailCustomer.d.ts +16 -0
- package/lib/cjs/interfaces/print/IOrderDetailCustomer.js +17 -0
- package/lib/cjs/interfaces/print/IOrderDetailDriver.d.ts +4 -0
- package/lib/cjs/interfaces/print/IOrderDetailDriver.js +2 -0
- package/lib/cjs/interfaces/print/IOrderDetailOrder.d.ts +50 -0
- package/lib/cjs/interfaces/print/IOrderDetailOrder.js +55 -0
- package/lib/cjs/interfaces/print/IOrderDetailPaymentInfo.d.ts +7 -0
- package/lib/cjs/interfaces/print/IOrderDetailPaymentInfo.js +2 -0
- package/lib/cjs/interfaces/print/IOrderDetailProduct.d.ts +17 -0
- package/lib/cjs/interfaces/print/IOrderDetailProduct.js +2 -0
- package/lib/cjs/interfaces/print/IOrderDetailProductsExtra.d.ts +14 -0
- package/lib/cjs/interfaces/print/IOrderDetailProductsExtra.js +2 -0
- package/lib/cjs/interfaces/print/IOrderDetails.d.ts +22 -0
- package/lib/cjs/interfaces/print/IOrderDetails.js +18 -0
- package/lib/cjs/regx/CreditCardRegx.d.ts +2 -0
- package/lib/cjs/regx/CreditCardRegx.js +5 -0
- package/lib/cjs/regx/DomainRegx.d.ts +2 -0
- package/lib/cjs/regx/DomainRegx.js +4 -0
- package/lib/cjs/regx/EmailRegx.d.ts +2 -0
- package/lib/cjs/regx/EmailRegx.js +4 -0
- package/lib/cjs/regx/MoneyRegx.d.ts +2 -0
- package/lib/cjs/regx/MoneyRegx.js +4 -0
- package/lib/cjs/regx/PhoneRegx.d.ts +2 -0
- package/lib/cjs/regx/PhoneRegx.js +5 -0
- package/lib/cjs/regx/PostalCodeRegx.d.ts +2 -0
- package/lib/cjs/regx/PostalCodeRegx.js +4 -0
- package/lib/cjs/statics.d.ts +6 -0
- package/lib/cjs/statics.js +11 -0
- package/lib/cjs/types/IOrderPayStatus.d.ts +1 -0
- package/lib/cjs/types/IOrderPayStatus.js +2 -0
- package/lib/cjs/types/TAnswer.d.ts +2 -0
- package/lib/cjs/types/TAnswer.js +2 -0
- package/lib/cjs/types/TBaseExtra.d.ts +3 -0
- package/lib/cjs/types/TBaseExtra.js +2 -0
- package/package.json +28 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const EnumOrderType_1 = __importDefault(require("../enums/EnumOrderType"));
|
|
7
|
+
const EnumSortMode_1 = __importDefault(require("../enums/EnumSortMode"));
|
|
8
|
+
const EnumPizzaSide_1 = __importDefault(require("../enums/EnumPizzaSide"));
|
|
9
|
+
const MoneyController_1 = __importDefault(require("./MoneyController"));
|
|
10
|
+
exports.default = new class ProductModalController {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.singleSelectExtraItemPrice = (extra, base, item) => {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
let p = item.price;
|
|
15
|
+
if (extra.numberOfFreeItems > 0)
|
|
16
|
+
return 0;
|
|
17
|
+
if (base[1] && ((_a = base[1]) === null || _a === void 0 ? void 0 : _a.increasingOtherExtraItemsPrice)) {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
if (+((_b = base[0]) === null || _b === void 0 ? void 0 : _b.extraId) === +extra.id)
|
|
20
|
+
return item.price;
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const { increasingPriceType, increasingAmount, increasingPercentage } = (_c = base[0]) === null || _c === void 0 ? void 0 : _c.selected[0];
|
|
23
|
+
switch (increasingPriceType) {
|
|
24
|
+
case 1:
|
|
25
|
+
p += (item.price * increasingPercentage) / 100;
|
|
26
|
+
break;
|
|
27
|
+
case 2:
|
|
28
|
+
p += increasingAmount;
|
|
29
|
+
if (p < 0)
|
|
30
|
+
p = 0;
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return p;
|
|
37
|
+
};
|
|
38
|
+
this.multiSelectExtraPrice = (extra, base, item, selectedList = []) => {
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
let _item = selectedList.find(i => i.id === item.id);
|
|
41
|
+
if (_item !== undefined) {
|
|
42
|
+
let p = +item.price;
|
|
43
|
+
if (base[1] && ((_a = base[1]) === null || _a === void 0 ? void 0 : _a.increasingOtherExtraItemsPrice)) {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
if (+((_b = base[0]) === null || _b === void 0 ? void 0 : _b.extraId) === +extra.id)
|
|
46
|
+
return p;
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
const { increasingPriceType, increasingAmount, increasingPercentage } = (_c = base[0]) === null || _c === void 0 ? void 0 : _c.selected[0];
|
|
49
|
+
switch (increasingPriceType) {
|
|
50
|
+
case 1:
|
|
51
|
+
p += (item.price * increasingPercentage) / 100;
|
|
52
|
+
break;
|
|
53
|
+
case 2:
|
|
54
|
+
p += increasingAmount;
|
|
55
|
+
if (p < 0)
|
|
56
|
+
p = 0;
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (extra.choosablePizzaToppingsSides) {
|
|
63
|
+
if (this.scaleSum(selectedList) <= extra.numberOfFreeItems)
|
|
64
|
+
return 0;
|
|
65
|
+
let index = selectedList.findIndex((element) => +element.id === +item.id);
|
|
66
|
+
if (index === -1)
|
|
67
|
+
return p;
|
|
68
|
+
let sliceArray = selectedList.slice(0, index + 1);
|
|
69
|
+
if (this.scaleSum(sliceArray) <= extra.numberOfFreeItems)
|
|
70
|
+
return 0;
|
|
71
|
+
}
|
|
72
|
+
p = (+p) * _item.quantity;
|
|
73
|
+
if (_item.pizzaSide === EnumPizzaSide_1.default.left || _item.pizzaSide === EnumPizzaSide_1.default.right)
|
|
74
|
+
return MoneyController_1.default.round(p / 2);
|
|
75
|
+
return p;
|
|
76
|
+
}
|
|
77
|
+
return 0;
|
|
78
|
+
};
|
|
79
|
+
this.extraItemsSortAction = (a, b) => {
|
|
80
|
+
if (a.priority == b.priority)
|
|
81
|
+
return 0;
|
|
82
|
+
else if (a.priority > b.priority)
|
|
83
|
+
return 1;
|
|
84
|
+
else
|
|
85
|
+
return -1;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
getExtraSelectedItems(list, extraId) {
|
|
89
|
+
let item = list.find(i => +i.extraId === extraId);
|
|
90
|
+
if (item)
|
|
91
|
+
return item.selected;
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
canAddToBasket(product, selected, extras) {
|
|
95
|
+
let flag = true;
|
|
96
|
+
product.extras.forEach((item) => {
|
|
97
|
+
let extra = extras.find(i => i.id === item.extraId);
|
|
98
|
+
if (extra && extra.required && (item.secondExtraId === null || selected.find(i => i.extraId === item.secondExtraId))) {
|
|
99
|
+
if (item.secondExtraId === null ||
|
|
100
|
+
selected.find((i) => i.extraId === item.secondExtraId &&
|
|
101
|
+
i.selected.find((j) => j.id === item.secondExtraItemId))) {
|
|
102
|
+
if (selected.find((i) => i.extraId === item.extraId) === undefined) {
|
|
103
|
+
flag = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return flag;
|
|
109
|
+
}
|
|
110
|
+
productModalToBasketItem(product, selectedExtraList, extras, count, price, note) {
|
|
111
|
+
let list = this.sortByKey(selectedExtraList, "priority", product.chosenExtraItemsMode === EnumSortMode_1.default.BASED_ON_EXTRA_ITEMS_LIST)
|
|
112
|
+
.map((item) => {
|
|
113
|
+
if (product.chosenExtraItemsMode === EnumSortMode_1.default.BASED_ON_EXTRA_ITEMS_LIST)
|
|
114
|
+
item.selected = this.sortByKey(item.selected, "priority");
|
|
115
|
+
return item;
|
|
116
|
+
});
|
|
117
|
+
let extraItemList = [];
|
|
118
|
+
let itemIndex = 0;
|
|
119
|
+
list.forEach((extra) => {
|
|
120
|
+
extra.selected.forEach((extraItem) => {
|
|
121
|
+
var _a;
|
|
122
|
+
extraItemList.push({
|
|
123
|
+
id: itemIndex++,
|
|
124
|
+
extraId: extra.extraId,
|
|
125
|
+
extraItemId: extraItem.id,
|
|
126
|
+
totalAmount: extraItem.quantity * extraItem.price,
|
|
127
|
+
quantity: extraItem.quantity,
|
|
128
|
+
price: extraItem.price,
|
|
129
|
+
pizzaSide: extraItem.pizzaSide,
|
|
130
|
+
text: `${extraItem.quantity}x ${extraItem.title}`,
|
|
131
|
+
cartItemId: -1,
|
|
132
|
+
extraItemTitle: extraItem.title,
|
|
133
|
+
extraTitle: ((_a = extras.find(i => i.id === extra.extraId)) === null || _a === void 0 ? void 0 : _a.title) + ""
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
id: -1,
|
|
139
|
+
productId: product.id,
|
|
140
|
+
title: this.productName(product),
|
|
141
|
+
imageUrl: this.productImage(product),
|
|
142
|
+
price: MoneyController_1.default.round(price),
|
|
143
|
+
extras: extraItemList,
|
|
144
|
+
quantity: count,
|
|
145
|
+
totalAmount: MoneyController_1.default.round(count * price),
|
|
146
|
+
note: note,
|
|
147
|
+
maxOrderQuantity: product.maxOrderQuantity,
|
|
148
|
+
minOrderQuantity: product.minOrderQuantity,
|
|
149
|
+
extrasNames: extraItemList.map(i => i.text).join(", "),
|
|
150
|
+
promotionId: -1,
|
|
151
|
+
promotionItem: false,
|
|
152
|
+
relatedItemId: null,
|
|
153
|
+
relatedProductId: null,
|
|
154
|
+
additionalText: "",
|
|
155
|
+
stampCardBonusItem: false
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
productName(product) {
|
|
159
|
+
return product.posName === "" ? product.name : product.posName;
|
|
160
|
+
}
|
|
161
|
+
productImage(product) {
|
|
162
|
+
return product.imageName === null ? "" : product.imageName;
|
|
163
|
+
}
|
|
164
|
+
productPrice(product, orderType) {
|
|
165
|
+
switch (orderType) {
|
|
166
|
+
case EnumOrderType_1.default.delivery:
|
|
167
|
+
return product.deliveryPrice;
|
|
168
|
+
case EnumOrderType_1.default.pickup:
|
|
169
|
+
return product.pickupPrice;
|
|
170
|
+
case EnumOrderType_1.default.dining:
|
|
171
|
+
return product.diningPrice;
|
|
172
|
+
default:
|
|
173
|
+
return 0;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
baseItem(list, extraList) {
|
|
177
|
+
let idList = list.map(i => i.extraId);
|
|
178
|
+
let productExtraList = extraList.filter(i => idList.includes(i.id) && i.increasingOtherExtraItemsPrice);
|
|
179
|
+
if (productExtraList.length > 0)
|
|
180
|
+
return [list.find(i => { var _a; return i.extraId === ((_a = productExtraList[0]) === null || _a === void 0 ? void 0 : _a.id); }), productExtraList[0]];
|
|
181
|
+
return [undefined, undefined];
|
|
182
|
+
}
|
|
183
|
+
defaultExtraOfProductToSelectedExtras(product, extras) {
|
|
184
|
+
let list = [];
|
|
185
|
+
let productDefaultExtraModel = product.defaultExtraItems;
|
|
186
|
+
let productExtraModelList = product.extras;
|
|
187
|
+
productDefaultExtraModel.forEach((value) => {
|
|
188
|
+
let item = productExtraModelList.find(i => i.extraId === value.extraId);
|
|
189
|
+
if (item) {
|
|
190
|
+
let extraModel = extras.find(i => i.id === (item === null || item === void 0 ? void 0 : item.extraId));
|
|
191
|
+
let selectedList = [];
|
|
192
|
+
if (extraModel !== undefined) {
|
|
193
|
+
value.items.forEach(it => {
|
|
194
|
+
let extraItemModel = extraModel.items.find((i) => i.id === it.extraItemId);
|
|
195
|
+
if (extraItemModel !== undefined) {
|
|
196
|
+
selectedList.push({
|
|
197
|
+
priority: it.priority,
|
|
198
|
+
quantity: it.quantity,
|
|
199
|
+
pizzaSide: it.side,
|
|
200
|
+
id: it.extraItemId,
|
|
201
|
+
min: extraItemModel.min,
|
|
202
|
+
increasingPriceType: extraItemModel.increasingPriceType,
|
|
203
|
+
scale: extraItemModel.scale,
|
|
204
|
+
isDefaultSelected: extraItemModel.isDefaultSelected,
|
|
205
|
+
title: extraItemModel.title,
|
|
206
|
+
max: extraItemModel.max,
|
|
207
|
+
calories: extraItemModel.calories,
|
|
208
|
+
price: extraItemModel.price,
|
|
209
|
+
available: extraItemModel.available,
|
|
210
|
+
receiptTitle: extraItemModel.receiptTitle,
|
|
211
|
+
increasingAmount: extraItemModel.increasingAmount,
|
|
212
|
+
increasingPercentage: extraItemModel.increasingPercentage
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
let newItem = {
|
|
218
|
+
extraId: item.extraId,
|
|
219
|
+
selected: selectedList,
|
|
220
|
+
showTypeText: item.showTypeText,
|
|
221
|
+
secondExtraId: item.secondExtraId,
|
|
222
|
+
priority: item.priority,
|
|
223
|
+
showType: item.showType,
|
|
224
|
+
availableTypeText: item.availableTypeText,
|
|
225
|
+
secondExtraItemId: item.secondExtraItemId,
|
|
226
|
+
availableType: item.availableType
|
|
227
|
+
};
|
|
228
|
+
list.push(newItem);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
return list;
|
|
232
|
+
}
|
|
233
|
+
defaultExtraOfProductToBasketItem(product, extras, orderType) {
|
|
234
|
+
let list = this.defaultExtraOfProductToSelectedExtras(product, extras);
|
|
235
|
+
let base = [undefined, undefined];
|
|
236
|
+
let count = product.minOrderQuantity;
|
|
237
|
+
let price = this.calculatePrice(orderType, product, list, base, extras);
|
|
238
|
+
return this.productModalToBasketItem(product, list, extras, count, price, "");
|
|
239
|
+
}
|
|
240
|
+
multiSelectExtraItemOptions(item, max, selectedList) {
|
|
241
|
+
let currentCount = this.quantitySum(selectedList.filter(i => i.id !== item.id));
|
|
242
|
+
let remind = max - currentCount;
|
|
243
|
+
let maxOption = remind < item.max ? remind : item.max;
|
|
244
|
+
let list = [];
|
|
245
|
+
for (let index = item.min; index <= maxOption; index++) {
|
|
246
|
+
list.push({
|
|
247
|
+
text: index + "X",
|
|
248
|
+
value: index
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
return list;
|
|
252
|
+
}
|
|
253
|
+
// pizzaSelectExtraPrice = (extra: IDExtra, base: TBaseExtra, item: IDExtraItem, selectedList: ISelectedExtraItem[] = []) => {
|
|
254
|
+
//
|
|
255
|
+
// let _item: ISelectedExtraItem | undefined = selectedList.find(i => i.id === item.id);
|
|
256
|
+
//
|
|
257
|
+
// if (_item !== undefined) {
|
|
258
|
+
//
|
|
259
|
+
// let p: number = +item.price;
|
|
260
|
+
//
|
|
261
|
+
// if (base[1] && base[1]?.increasingOtherExtraItemsPrice) {
|
|
262
|
+
// // @ts-ignore
|
|
263
|
+
// if (+base[0]?.extraId === +extra.id) return p;
|
|
264
|
+
//
|
|
265
|
+
// // @ts-ignore
|
|
266
|
+
// const { increasingPriceType, increasingAmount, increasingPercentage } = base[0]?.selected[0];
|
|
267
|
+
//
|
|
268
|
+
// switch (increasingPriceType) {
|
|
269
|
+
// case 1:
|
|
270
|
+
// p += (item.price * increasingPercentage) / 100;
|
|
271
|
+
// break;
|
|
272
|
+
// case 2:
|
|
273
|
+
// p += increasingAmount;
|
|
274
|
+
// if (p < 0) p = 0;
|
|
275
|
+
// break;
|
|
276
|
+
// default:
|
|
277
|
+
// break;
|
|
278
|
+
// }
|
|
279
|
+
// }
|
|
280
|
+
//
|
|
281
|
+
// if (extra.choosablePizzaToppingsSides) {
|
|
282
|
+
// if (this.scaleSum(selectedList) <= extra.numberOfFreeItems)
|
|
283
|
+
// return 0;
|
|
284
|
+
//
|
|
285
|
+
// let index = selectedList.findIndex((element) => +element.id === +item.id);
|
|
286
|
+
//
|
|
287
|
+
// if (index === -1)
|
|
288
|
+
// return p;
|
|
289
|
+
//
|
|
290
|
+
// let sliceArray = selectedList.slice(0, index + 1);
|
|
291
|
+
//
|
|
292
|
+
// if (this.scaleSum(sliceArray) <= extra.numberOfFreeItems)
|
|
293
|
+
// return 0;
|
|
294
|
+
//
|
|
295
|
+
// }
|
|
296
|
+
//
|
|
297
|
+
// return +p;
|
|
298
|
+
// }
|
|
299
|
+
// return 0;
|
|
300
|
+
// };
|
|
301
|
+
// scalePizzaSum(array: ISelectedExtraItem[] = []) {
|
|
302
|
+
// let s = 0;
|
|
303
|
+
// array.forEach((item) => {
|
|
304
|
+
// s += item["quantity"] * item["scale"];
|
|
305
|
+
// if (item.pizzaSide === EnumPizzaSide.right || item.pizzaSide === EnumPizzaSide.left)
|
|
306
|
+
// s = parseInt((s / 2) + "");
|
|
307
|
+
//
|
|
308
|
+
// });
|
|
309
|
+
// return s;
|
|
310
|
+
// }
|
|
311
|
+
scaleSum(array = []) {
|
|
312
|
+
let s = 0;
|
|
313
|
+
array.forEach((item) => {
|
|
314
|
+
let weight = item["quantity"] * item["scale"];
|
|
315
|
+
if (item.pizzaSide === EnumPizzaSide_1.default.right || item.pizzaSide === EnumPizzaSide_1.default.left)
|
|
316
|
+
weight = parseInt((weight / 2) + "");
|
|
317
|
+
s += weight;
|
|
318
|
+
});
|
|
319
|
+
return s;
|
|
320
|
+
}
|
|
321
|
+
calculatePrice(orderType, product, list, base, extraList) {
|
|
322
|
+
var _a, _b;
|
|
323
|
+
let p = 0;
|
|
324
|
+
for (let i = 0; i < list.length; i++) {
|
|
325
|
+
const { selected, extraId } = list[i];
|
|
326
|
+
let _extra = extraList.find(i => i.id === extraId);
|
|
327
|
+
let free = 0;
|
|
328
|
+
for (let j = 0; j < selected.length; j++) {
|
|
329
|
+
const { price, quantity, scale, pizzaSide } = selected[j];
|
|
330
|
+
let pep = 0;
|
|
331
|
+
for (let k = 0; k < quantity; k++) {
|
|
332
|
+
// @ts-ignore
|
|
333
|
+
if (free < (_extra === null || _extra === void 0 ? void 0 : _extra.numberOfFreeItems)) {
|
|
334
|
+
free += scale;
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
let ep = 0;
|
|
338
|
+
switch (pizzaSide) {
|
|
339
|
+
case EnumPizzaSide_1.default.left:
|
|
340
|
+
//left
|
|
341
|
+
ep = price / 2;
|
|
342
|
+
break;
|
|
343
|
+
case EnumPizzaSide_1.default.right:
|
|
344
|
+
//right
|
|
345
|
+
ep = price / 2;
|
|
346
|
+
break;
|
|
347
|
+
case EnumPizzaSide_1.default.all:
|
|
348
|
+
//all
|
|
349
|
+
ep = price;
|
|
350
|
+
break;
|
|
351
|
+
default:
|
|
352
|
+
//unknown
|
|
353
|
+
ep = price;
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
if (base[0] && +((_a = base[0]) === null || _a === void 0 ? void 0 : _a.extraId) !== +extraId) {
|
|
357
|
+
const { increasingPriceType, increasingAmount, increasingPercentage } = (_b = base[0]) === null || _b === void 0 ? void 0 : _b.selected[0];
|
|
358
|
+
switch (increasingPriceType) {
|
|
359
|
+
case 1:
|
|
360
|
+
ep += ep * (increasingPercentage / 100);
|
|
361
|
+
break;
|
|
362
|
+
case 2:
|
|
363
|
+
ep += increasingAmount;
|
|
364
|
+
if (ep < 0)
|
|
365
|
+
ep = 0;
|
|
366
|
+
break;
|
|
367
|
+
default:
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
pep += ep;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
p += MoneyController_1.default.round(pep);
|
|
375
|
+
// console.log(selected[j].title, " : ", pep, " ==> ", MoneyController.round(pep));
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return MoneyController_1.default.round(p + this.productPrice(product, +orderType));
|
|
379
|
+
}
|
|
380
|
+
plusString(first, second) {
|
|
381
|
+
return `${first} ${second}`;
|
|
382
|
+
}
|
|
383
|
+
getValidateExtras(extras, extraSelected) {
|
|
384
|
+
let result = [];
|
|
385
|
+
extras.forEach(item => {
|
|
386
|
+
if (item.secondExtraId === null ||
|
|
387
|
+
(extraSelected.filter((i) => i.extraId === item.secondExtraId).length === 1 &&
|
|
388
|
+
extraSelected
|
|
389
|
+
.filter((i) => i.extraId === item.secondExtraId)[0]
|
|
390
|
+
.selected.filter((i) => i.id === item.secondExtraItemId).length === 1)) {
|
|
391
|
+
result.push(item);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
return result;
|
|
395
|
+
}
|
|
396
|
+
getProductExtras(pExtras, sExtras, extras) {
|
|
397
|
+
let se = this.sortByKey(sExtras, "priority", true);
|
|
398
|
+
let pe = this.sortByKey(pExtras, "priority", true);
|
|
399
|
+
let itemsIdList = this.getValidateExtras(pe, se).map(i => i.extraId);
|
|
400
|
+
// let list: IDExtra[] = extras.filter(i => itemsIdList.includes(+i.id));
|
|
401
|
+
let result = [];
|
|
402
|
+
itemsIdList.forEach((id) => {
|
|
403
|
+
let ext = extras.find(i => i.id === id);
|
|
404
|
+
if (ext)
|
|
405
|
+
result.push(ext);
|
|
406
|
+
});
|
|
407
|
+
return result;
|
|
408
|
+
}
|
|
409
|
+
quantitySum(array = []) {
|
|
410
|
+
let s = 0;
|
|
411
|
+
array.forEach((item) => {
|
|
412
|
+
s += item.quantity;
|
|
413
|
+
});
|
|
414
|
+
return s;
|
|
415
|
+
}
|
|
416
|
+
// createSubtitle(items: ISelectedExtraItem[] = []): string {
|
|
417
|
+
// if (items.length === 1) {
|
|
418
|
+
// let { title, quantity } = items[0];
|
|
419
|
+
// return (quantity > 1 ? quantity + "x " : "") + title;
|
|
420
|
+
// } else if (items.length > 1) {
|
|
421
|
+
// return this.quantitySum(items) + " Item selected";
|
|
422
|
+
// } else {
|
|
423
|
+
// return "";
|
|
424
|
+
// }
|
|
425
|
+
// };
|
|
426
|
+
productMinAndMaxOptions(product) {
|
|
427
|
+
let list = [];
|
|
428
|
+
for (let index = product.minOrderQuantity; index <= product.maxOrderQuantity; index++) {
|
|
429
|
+
list.push({
|
|
430
|
+
text: index + "X",
|
|
431
|
+
value: index
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
return list;
|
|
435
|
+
}
|
|
436
|
+
sortByKey(array, key, conditionForSort = true) {
|
|
437
|
+
if (conditionForSort && Array.isArray(array))
|
|
438
|
+
return array.sort((a, b) => {
|
|
439
|
+
let x = a[key];
|
|
440
|
+
let y = b[key];
|
|
441
|
+
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
|
442
|
+
});
|
|
443
|
+
return array;
|
|
444
|
+
}
|
|
445
|
+
}();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = new class ToolController {
|
|
4
|
+
createOption(start, length, step = 1) {
|
|
5
|
+
let list = [];
|
|
6
|
+
for (let index = start; index < start + length; index += step)
|
|
7
|
+
list.push(index);
|
|
8
|
+
return list;
|
|
9
|
+
}
|
|
10
|
+
convert_10_to_2(source) {
|
|
11
|
+
let result = "";
|
|
12
|
+
if (source > 1)
|
|
13
|
+
result += this.convert_10_to_2(parseInt((source / 2) + ""));
|
|
14
|
+
result += parseInt((source % 2) + "") + "";
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
;
|
|
18
|
+
find_number_to_2(source, value) {
|
|
19
|
+
let list = this.convert_10_to_2(source).split("").reverse(); //[1,0,0,1,0,1,0,1]
|
|
20
|
+
let result = list.findIndex((i, index) => i === "1" && Math.pow(2, index) === value);
|
|
21
|
+
// console.log(`source : ${source} \t value : ${value} \t result : ${result} \t mabna : ${list}`);
|
|
22
|
+
return result !== -1;
|
|
23
|
+
}
|
|
24
|
+
}();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ILocation from "../interfaces/ILocation";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
/**
|
|
4
|
+
* Performs the even-odd-rule Algorithm (a raycasting algorithm) to find out whether a point is in a given polygon.
|
|
5
|
+
* This runs in O(n) where n is the number of edges of the polygon.
|
|
6
|
+
*
|
|
7
|
+
* @param {Array} polygon an array representation of the polygon where polygon[i][0] is the x Value of the i-th point and polygon[i][1] is the y Value.
|
|
8
|
+
* @param {Array} point an array representation of the point where point[0] is its x Value and point[1] is its y Value
|
|
9
|
+
* @return {boolean} whether the point is in the polygon (not on the edge, just turn < into <= and > into >= for that)
|
|
10
|
+
*/
|
|
11
|
+
pointInPolygon(polygon: ILocation[], point: ILocation): boolean;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = new class ZoneController {
|
|
4
|
+
/**
|
|
5
|
+
* Performs the even-odd-rule Algorithm (a raycasting algorithm) to find out whether a point is in a given polygon.
|
|
6
|
+
* This runs in O(n) where n is the number of edges of the polygon.
|
|
7
|
+
*
|
|
8
|
+
* @param {Array} polygon an array representation of the polygon where polygon[i][0] is the x Value of the i-th point and polygon[i][1] is the y Value.
|
|
9
|
+
* @param {Array} point an array representation of the point where point[0] is its x Value and point[1] is its y Value
|
|
10
|
+
* @return {boolean} whether the point is in the polygon (not on the edge, just turn < into <= and > into >= for that)
|
|
11
|
+
*/
|
|
12
|
+
pointInPolygon(polygon, point) {
|
|
13
|
+
let odd = false;
|
|
14
|
+
for (let i = 0, j = polygon.length - 1; i < polygon.length; i++) {
|
|
15
|
+
if ((((+polygon[i].longitude) > point.longitude) !== ((+polygon[j].longitude) > point.longitude))
|
|
16
|
+
&& (point.latitude < (((+polygon[j].latitude) - (+polygon[i].latitude)) * (point.longitude - (+polygon[i].longitude)) / ((+polygon[j].longitude) - (+polygon[i].longitude)) + (+polygon[i].latitude)))) {
|
|
17
|
+
odd = !odd;
|
|
18
|
+
}
|
|
19
|
+
j = i;
|
|
20
|
+
}
|
|
21
|
+
return odd;
|
|
22
|
+
}
|
|
23
|
+
;
|
|
24
|
+
}();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumBasketStep;
|
|
4
|
+
(function (EnumBasketStep) {
|
|
5
|
+
EnumBasketStep[EnumBasketStep["item"] = 0] = "item";
|
|
6
|
+
EnumBasketStep[EnumBasketStep["config"] = 1] = "config";
|
|
7
|
+
})(EnumBasketStep || (EnumBasketStep = {}));
|
|
8
|
+
exports.default = EnumBasketStep;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumCategoryAvailableIn;
|
|
4
|
+
(function (EnumCategoryAvailableIn) {
|
|
5
|
+
EnumCategoryAvailableIn[EnumCategoryAvailableIn["EVERY_WHERE"] = 1] = "EVERY_WHERE";
|
|
6
|
+
EnumCategoryAvailableIn[EnumCategoryAvailableIn["SHOP_APP_ONLY"] = 2] = "SHOP_APP_ONLY";
|
|
7
|
+
EnumCategoryAvailableIn[EnumCategoryAvailableIn["POS_ONLY"] = 3] = "POS_ONLY";
|
|
8
|
+
EnumCategoryAvailableIn[EnumCategoryAvailableIn["GOOGLE_ORDERING"] = 4] = "GOOGLE_ORDERING";
|
|
9
|
+
})(EnumCategoryAvailableIn || (EnumCategoryAvailableIn = {}));
|
|
10
|
+
exports.default = EnumCategoryAvailableIn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumChannels;
|
|
4
|
+
(function (EnumChannels) {
|
|
5
|
+
EnumChannels[EnumChannels["None"] = 0] = "None";
|
|
6
|
+
EnumChannels[EnumChannels["WebShop"] = 1] = "WebShop";
|
|
7
|
+
EnumChannels[EnumChannels["App"] = 2] = "App";
|
|
8
|
+
EnumChannels[EnumChannels["DigitalMenu"] = 4] = "DigitalMenu";
|
|
9
|
+
EnumChannels[EnumChannels["POS"] = 8] = "POS";
|
|
10
|
+
EnumChannels[EnumChannels["GoogleOrdering"] = 16] = "GoogleOrdering";
|
|
11
|
+
})(EnumChannels || (EnumChannels = {}));
|
|
12
|
+
exports.default = EnumChannels;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumDashboardSort;
|
|
4
|
+
(function (EnumDashboardSort) {
|
|
5
|
+
EnumDashboardSort[EnumDashboardSort["date"] = 0] = "date";
|
|
6
|
+
EnumDashboardSort[EnumDashboardSort["amount"] = 1] = "amount";
|
|
7
|
+
EnumDashboardSort[EnumDashboardSort["discount"] = 2] = "discount";
|
|
8
|
+
EnumDashboardSort[EnumDashboardSort["tip"] = 3] = "tip";
|
|
9
|
+
})(EnumDashboardSort || (EnumDashboardSort = {}));
|
|
10
|
+
exports.default = EnumDashboardSort;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumDiscountType;
|
|
4
|
+
(function (EnumDiscountType) {
|
|
5
|
+
EnumDiscountType[EnumDiscountType["none"] = 0] = "none";
|
|
6
|
+
EnumDiscountType[EnumDiscountType["percent"] = 1] = "percent";
|
|
7
|
+
EnumDiscountType[EnumDiscountType["amount"] = 2] = "amount";
|
|
8
|
+
})(EnumDiscountType || (EnumDiscountType = {}));
|
|
9
|
+
exports.default = EnumDiscountType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumFeeCalculationMode;
|
|
4
|
+
(function (EnumFeeCalculationMode) {
|
|
5
|
+
EnumFeeCalculationMode[EnumFeeCalculationMode["NONE"] = 0] = "NONE";
|
|
6
|
+
EnumFeeCalculationMode[EnumFeeCalculationMode["FIXED"] = 1] = "FIXED";
|
|
7
|
+
EnumFeeCalculationMode[EnumFeeCalculationMode["MIXED"] = 2] = "MIXED";
|
|
8
|
+
EnumFeeCalculationMode[EnumFeeCalculationMode["BOTH"] = 3] = "BOTH";
|
|
9
|
+
})(EnumFeeCalculationMode || (EnumFeeCalculationMode = {}));
|
|
10
|
+
exports.default = EnumFeeCalculationMode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var EnumFeeType;
|
|
4
|
+
(function (EnumFeeType) {
|
|
5
|
+
EnumFeeType[EnumFeeType["SERVICE"] = 1] = "SERVICE";
|
|
6
|
+
EnumFeeType[EnumFeeType["COMPANY"] = 2] = "COMPANY";
|
|
7
|
+
})(EnumFeeType || (EnumFeeType = {}));
|
|
8
|
+
exports.default = EnumFeeType;
|