meemup-library 1.3.85 → 1.3.86
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/dist/controllers/OrderToolController.js +31 -27
- package/dist/controllers/SimplePreviewController.js +6 -6
- package/dist/enums/EnumChannels.d.ts +1 -1
- package/dist/enums/EnumChannels.js +41 -1
- package/dist/enums/EnumOrderState.d.ts +12 -10
- package/dist/enums/EnumOrderState.js +75 -10
- package/dist/enums/EnumPaymentState.d.ts +5 -3
- package/dist/enums/EnumPaymentState.js +5 -3
- package/dist/enums/EnumPaymentType.d.ts +11 -11
- package/dist/enums/EnumPaymentType.js +53 -11
- package/dist/interfaces/ISetting.js +1 -1
- package/dist/interfaces/cfds/ICustomerFacingDisplayPacket.js +2 -2
- package/dist/interfaces/kds/IKitchenOrderDetail.js +1 -1
- package/dist/interfaces/kds/IKitchenScreenSetting.js +1 -1
- package/dist/interfaces/pos/IPointOfSaleLocalSetting.js +3 -3
- package/dist/interfaces/pos/IPointOfSaleOrder.d.ts +1 -0
- package/dist/interfaces/pos/IPointOfSaleOrder.js +4 -3
- package/dist/interfaces/pos/IPointOfSaleSetting.js +1 -1
- package/dist/interfaces/print/IOrderDetailOrder.js +1 -1
- package/package.json +2 -2
|
@@ -36,17 +36,17 @@ class OrderToolController {
|
|
|
36
36
|
}
|
|
37
37
|
paymentTypeText(order = initOrder) {
|
|
38
38
|
switch (order.paymentType) {
|
|
39
|
-
case EnumPaymentType.
|
|
39
|
+
case EnumPaymentType.Online:
|
|
40
40
|
return "Online";
|
|
41
|
-
case EnumPaymentType.
|
|
41
|
+
case EnumPaymentType.Cash:
|
|
42
42
|
return "Cash";
|
|
43
|
-
case EnumPaymentType.
|
|
43
|
+
case EnumPaymentType.DebitAt:
|
|
44
44
|
return "Debit machine";
|
|
45
|
-
case EnumPaymentType.
|
|
45
|
+
case EnumPaymentType.DebitMachine:
|
|
46
46
|
return "Debit machine";
|
|
47
|
-
case EnumPaymentType.
|
|
47
|
+
case EnumPaymentType.StripeTerminal:
|
|
48
48
|
return "Terminal";
|
|
49
|
-
case EnumPaymentType.
|
|
49
|
+
case EnumPaymentType.MultipleMethods:
|
|
50
50
|
return "Multi payment";
|
|
51
51
|
default:
|
|
52
52
|
return "None";
|
|
@@ -54,17 +54,17 @@ class OrderToolController {
|
|
|
54
54
|
}
|
|
55
55
|
getPaymentTypeText(paymentType, orderType) {
|
|
56
56
|
switch (paymentType) {
|
|
57
|
-
case EnumPaymentType.
|
|
57
|
+
case EnumPaymentType.Online:
|
|
58
58
|
return "Online";
|
|
59
|
-
case EnumPaymentType.
|
|
59
|
+
case EnumPaymentType.Cash:
|
|
60
60
|
return "Cash";
|
|
61
|
-
case EnumPaymentType.
|
|
61
|
+
case EnumPaymentType.DebitAt:
|
|
62
62
|
return orderType === EnumOrderType.delivery ? "Credit at door" : "In-store";
|
|
63
|
-
case EnumPaymentType.
|
|
63
|
+
case EnumPaymentType.DebitMachine:
|
|
64
64
|
return "Debit machine";
|
|
65
|
-
case EnumPaymentType.
|
|
65
|
+
case EnumPaymentType.StripeTerminal:
|
|
66
66
|
return "Terminal";
|
|
67
|
-
case EnumPaymentType.
|
|
67
|
+
case EnumPaymentType.MultipleMethods:
|
|
68
68
|
return "Multi payment";
|
|
69
69
|
default:
|
|
70
70
|
return "None";
|
|
@@ -72,12 +72,16 @@ class OrderToolController {
|
|
|
72
72
|
}
|
|
73
73
|
getPaymentStateText(order = initOrder) {
|
|
74
74
|
switch (order.paymentState) {
|
|
75
|
-
case EnumPaymentState.
|
|
75
|
+
case EnumPaymentState.Paid:
|
|
76
76
|
return "Paid";
|
|
77
|
-
case EnumPaymentState.
|
|
77
|
+
case EnumPaymentState.NotPaid:
|
|
78
78
|
return "Not paid";
|
|
79
|
-
case EnumPaymentState.
|
|
79
|
+
case EnumPaymentState.Pending:
|
|
80
80
|
return "Pending";
|
|
81
|
+
case EnumPaymentState.Canceled:
|
|
82
|
+
return "Canceled";
|
|
83
|
+
case EnumPaymentState.Failed:
|
|
84
|
+
return "Failed";
|
|
81
85
|
default:
|
|
82
86
|
return "";
|
|
83
87
|
}
|
|
@@ -102,7 +106,7 @@ class OrderToolController {
|
|
|
102
106
|
return "Google";
|
|
103
107
|
case EnumChannels.POS:
|
|
104
108
|
return "POS";
|
|
105
|
-
case EnumChannels.
|
|
109
|
+
case EnumChannels.Shop:
|
|
106
110
|
return "Online store";
|
|
107
111
|
case EnumChannels.App:
|
|
108
112
|
return "APP";
|
|
@@ -504,18 +508,18 @@ class OrderToolController {
|
|
|
504
508
|
return result;
|
|
505
509
|
if (paymentType == EnumPaymentType.none)
|
|
506
510
|
return result;
|
|
507
|
-
let notOnOnlinePay = paymentType == EnumPaymentType.
|
|
508
|
-
let notOnCashPay = paymentType == EnumPaymentType.
|
|
509
|
-
let notOnDebitAt = paymentType == EnumPaymentType.
|
|
510
|
-
let notOnApplePay = paymentType == EnumPaymentType.
|
|
511
|
-
let notOnGooglePay = paymentType == EnumPaymentType.
|
|
512
|
-
let notOnStripeTerminal = paymentType == EnumPaymentType.
|
|
513
|
-
let notOnWallet = paymentType == EnumPaymentType.
|
|
514
|
-
let notOnGiftCards = paymentType == EnumPaymentType.
|
|
511
|
+
let notOnOnlinePay = paymentType == EnumPaymentType.Online && !ToolController.find_number_to_2(paymentTypes, 1);
|
|
512
|
+
let notOnCashPay = paymentType == EnumPaymentType.Cash && !ToolController.find_number_to_2(paymentTypes, 2);
|
|
513
|
+
let notOnDebitAt = paymentType == EnumPaymentType.DebitAt && !ToolController.find_number_to_2(paymentTypes, 4);
|
|
514
|
+
let notOnApplePay = paymentType == EnumPaymentType.ApplePay && !ToolController.find_number_to_2(paymentTypes, 8);
|
|
515
|
+
let notOnGooglePay = paymentType == EnumPaymentType.GooglePay && !ToolController.find_number_to_2(paymentTypes, 16);
|
|
516
|
+
let notOnStripeTerminal = paymentType == EnumPaymentType.StripeTerminal && !ToolController.find_number_to_2(paymentTypes, 32);
|
|
517
|
+
let notOnWallet = paymentType == EnumPaymentType.Wallet && !ToolController.find_number_to_2(paymentTypes, 64);
|
|
518
|
+
let notOnGiftCards = paymentType == EnumPaymentType.GiftCards && !ToolController.find_number_to_2(paymentTypes, 128);
|
|
515
519
|
//TODO need test and fix
|
|
516
|
-
let notOnElvanPayment = paymentType == EnumPaymentType.
|
|
517
|
-
let notOnSplitPayment = paymentType == EnumPaymentType.
|
|
518
|
-
// let notOnNone = paymentType == EnumPaymentType.
|
|
520
|
+
let notOnElvanPayment = paymentType == EnumPaymentType.DebitMachine && !ToolController.find_number_to_2(paymentTypes, 256);
|
|
521
|
+
let notOnSplitPayment = paymentType == EnumPaymentType.MultipleMethods && !ToolController.find_number_to_2(paymentTypes, 512);
|
|
522
|
+
// let notOnNone = paymentType == EnumPaymentType.StripeTerminal && !ToolController.find_number_to_2(paymentTypes, 0);
|
|
519
523
|
if (notOnOnlinePay || notOnCashPay || notOnDebitAt || notOnGooglePay || notOnApplePay || notOnWallet || notOnGiftCards || notOnStripeTerminal || notOnElvanPayment || notOnSplitPayment)
|
|
520
524
|
return result;
|
|
521
525
|
if (minimumOrderAmount != 0 && orderAmount < minimumOrderAmount)
|
|
@@ -122,8 +122,8 @@ class SimplePreviewController {
|
|
|
122
122
|
let content = this.createDivContainer(template);
|
|
123
123
|
content += this.printDashLine();
|
|
124
124
|
content += `<p style="display : block; font-size: ${template.fontSize}px; text-align: left;">Payment information</p>`;
|
|
125
|
-
content += `<strong style="font-size: ${template.fontSize * 1.6};">${detail.order.paymentTypeString + (detail.order.paymentType === EnumPaymentType.
|
|
126
|
-
if (detail.order.paymentType === EnumPaymentType.
|
|
125
|
+
content += `<strong style="font-size: ${template.fontSize * 1.6};">${detail.order.paymentTypeString + (detail.order.paymentType === EnumPaymentType.Cash ? `: ${MoneyController.format(detail.order.totalAmount, detail.company.currencySymbol)} ` : " ") + " - " + detail.order.paymentStateString}</strong>`;
|
|
126
|
+
if (detail.order.paymentType === EnumPaymentType.Online)
|
|
127
127
|
content += `<p style="display:block;">Credit Card: **** **** **** ${detail.order.lastFourDigits}</p>`;
|
|
128
128
|
content += `</div>`;
|
|
129
129
|
return content;
|
|
@@ -298,7 +298,7 @@ class SimplePreviewController {
|
|
|
298
298
|
//total amount
|
|
299
299
|
content += `<div style="display: flex; flex-direction: row; align-items: center; border-top: 1px dashed #000000; margin: 4px 0;">
|
|
300
300
|
<div style="font-size:${template.fontSize + 6}px; flex: 1; text-align: right; padding-right: 8px;">
|
|
301
|
-
${detail.order.paymentState !== EnumPaymentState.
|
|
301
|
+
${detail.order.paymentState !== EnumPaymentState.Paid ? "Total & Still to pay" : "Total"}:
|
|
302
302
|
</div>
|
|
303
303
|
<div style="font-size:${(template.fontSize + 10) + "px"}; width: 90px; text-align: right;">
|
|
304
304
|
${MoneyController.format(detail.order.totalAmount, detail.company.currencySymbol)}
|
|
@@ -420,7 +420,7 @@ class SimplePreviewController {
|
|
|
420
420
|
//total amount
|
|
421
421
|
content += `<div style="display: flex; flex-direction: row; align-items: center; border-top: 1px dashed #000000; margin: 4px 0;">
|
|
422
422
|
<div style="font-size:${template.fontSize + 6}px; flex: 1; text-align: right; padding-right: 8px;">
|
|
423
|
-
${detail.order.paymentState !== EnumPaymentState.
|
|
423
|
+
${detail.order.paymentState !== EnumPaymentState.Paid ? "Total & Still to pay" : "Total"}:
|
|
424
424
|
</div>
|
|
425
425
|
<div style="font-size:${(template.fontSize + 10) + "px"}; width: 90px; text-align: right;">
|
|
426
426
|
${MoneyController.format(detail.order.totalAmount, detail.company.currencySymbol)}
|
|
@@ -449,7 +449,7 @@ class SimplePreviewController {
|
|
|
449
449
|
return content;
|
|
450
450
|
}
|
|
451
451
|
printCustomerSignature(template, detail) {
|
|
452
|
-
if (detail.order.paymentType !== EnumPaymentType.
|
|
452
|
+
if (detail.order.paymentType !== EnumPaymentType.Online || !template.customerOnlinePaymentAgrementSection)
|
|
453
453
|
return "";
|
|
454
454
|
let content = this.createDivContainer(template);
|
|
455
455
|
content += `<p style="display: block; text-align: center; font-size: ${template.fontSize}px;">CREDIT CARD: **** **** **** ${detail.order.lastFourDigits}</p>`;
|
|
@@ -471,7 +471,7 @@ class SimplePreviewController {
|
|
|
471
471
|
}
|
|
472
472
|
printMetaData(template, detail) {
|
|
473
473
|
var _a, _b, _c;
|
|
474
|
-
if (detail.paymentInfo !== null && detail.order.paymentType === EnumPaymentType.
|
|
474
|
+
if (detail.paymentInfo !== null && detail.order.paymentType === EnumPaymentType.StripeTerminal && Array.isArray((_a = detail.paymentInfo) === null || _a === void 0 ? void 0 : _a.metadata) && ((_c = (_b = detail.paymentInfo) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
475
475
|
let content = this.createDivContainer(template);
|
|
476
476
|
content += this.printSolidLine();
|
|
477
477
|
detail.paymentInfo.metadata.forEach(item => {
|
|
@@ -1,10 +1,50 @@
|
|
|
1
1
|
var EnumChannels;
|
|
2
2
|
(function (EnumChannels) {
|
|
3
3
|
EnumChannels[EnumChannels["None"] = 0] = "None";
|
|
4
|
-
EnumChannels[EnumChannels["
|
|
4
|
+
EnumChannels[EnumChannels["Shop"] = 1] = "Shop";
|
|
5
5
|
EnumChannels[EnumChannels["App"] = 2] = "App";
|
|
6
6
|
EnumChannels[EnumChannels["DigitalMenu"] = 4] = "DigitalMenu";
|
|
7
7
|
EnumChannels[EnumChannels["POS"] = 8] = "POS";
|
|
8
8
|
EnumChannels[EnumChannels["GoogleOrdering"] = 16] = "GoogleOrdering";
|
|
9
9
|
})(EnumChannels || (EnumChannels = {}));
|
|
10
10
|
export default EnumChannels;
|
|
11
|
+
/*
|
|
12
|
+
public enum ChannelType : short
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// don't show
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Description("(don't show)")]
|
|
18
|
+
None = 0,
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// Online store , Webshop
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Description("Online store")]
|
|
24
|
+
Shop = 1,
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
/// App / Central Shop
|
|
28
|
+
/// </summary>
|
|
29
|
+
[Description("App")]
|
|
30
|
+
App = 2,
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// Digital menu
|
|
34
|
+
/// </summary>
|
|
35
|
+
[Description("Digital menu")]
|
|
36
|
+
DigitalMenu = 4,
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Google Ordering
|
|
40
|
+
/// </summary>
|
|
41
|
+
[Description("Google ordering")]
|
|
42
|
+
GoogleOrdering = 16,
|
|
43
|
+
|
|
44
|
+
/// <summary>
|
|
45
|
+
/// Show Everywhere
|
|
46
|
+
/// </summary>
|
|
47
|
+
[Description("Everywhere")]
|
|
48
|
+
EveryWhere = ~None
|
|
49
|
+
}
|
|
50
|
+
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
declare enum EnumOrderState {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
All = -1,
|
|
3
|
+
Advance = 0,
|
|
4
|
+
New = 1,
|
|
5
|
+
Accepted = 2,
|
|
6
|
+
Kitchen = 3,
|
|
7
|
+
Ready = 4,
|
|
8
|
+
PickedUp = 5,
|
|
9
|
+
OnTheWay = 6,
|
|
10
|
+
Delivered = 7,
|
|
11
|
+
Canceled = 8,
|
|
12
|
+
Rejected = 9,
|
|
13
|
+
Deleted = 10
|
|
12
14
|
}
|
|
13
15
|
export default EnumOrderState;
|
|
@@ -1,14 +1,79 @@
|
|
|
1
1
|
var EnumOrderState;
|
|
2
2
|
(function (EnumOrderState) {
|
|
3
|
-
EnumOrderState[EnumOrderState["
|
|
4
|
-
EnumOrderState[EnumOrderState["
|
|
5
|
-
EnumOrderState[EnumOrderState["
|
|
6
|
-
EnumOrderState[EnumOrderState["
|
|
7
|
-
EnumOrderState[EnumOrderState["
|
|
8
|
-
EnumOrderState[EnumOrderState["
|
|
9
|
-
EnumOrderState[EnumOrderState["
|
|
10
|
-
EnumOrderState[EnumOrderState["
|
|
11
|
-
EnumOrderState[EnumOrderState["
|
|
12
|
-
EnumOrderState[EnumOrderState["
|
|
3
|
+
EnumOrderState[EnumOrderState["All"] = -1] = "All";
|
|
4
|
+
EnumOrderState[EnumOrderState["Advance"] = 0] = "Advance";
|
|
5
|
+
EnumOrderState[EnumOrderState["New"] = 1] = "New";
|
|
6
|
+
EnumOrderState[EnumOrderState["Accepted"] = 2] = "Accepted";
|
|
7
|
+
EnumOrderState[EnumOrderState["Kitchen"] = 3] = "Kitchen";
|
|
8
|
+
EnumOrderState[EnumOrderState["Ready"] = 4] = "Ready";
|
|
9
|
+
EnumOrderState[EnumOrderState["PickedUp"] = 5] = "PickedUp";
|
|
10
|
+
EnumOrderState[EnumOrderState["OnTheWay"] = 6] = "OnTheWay";
|
|
11
|
+
EnumOrderState[EnumOrderState["Delivered"] = 7] = "Delivered";
|
|
12
|
+
EnumOrderState[EnumOrderState["Canceled"] = 8] = "Canceled";
|
|
13
|
+
EnumOrderState[EnumOrderState["Rejected"] = 9] = "Rejected";
|
|
14
|
+
EnumOrderState[EnumOrderState["Deleted"] = 10] = "Deleted";
|
|
13
15
|
})(EnumOrderState || (EnumOrderState = {}));
|
|
14
16
|
export default EnumOrderState;
|
|
17
|
+
/*
|
|
18
|
+
public enum OrderState : byte
|
|
19
|
+
{
|
|
20
|
+
[Description("Draft")]
|
|
21
|
+
Draft = 0,
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// when the order is registered by the customer
|
|
25
|
+
/// </summary>
|
|
26
|
+
[Description("New")]
|
|
27
|
+
New = 1,
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
/// when the order is accepted by the restaurant
|
|
31
|
+
/// </summary>
|
|
32
|
+
[Description("Accepted")]
|
|
33
|
+
Accepted = 2,
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
/// when the order preparing in the kitchen
|
|
37
|
+
/// </summary>
|
|
38
|
+
[Description("Kitchen")]
|
|
39
|
+
Kitchen = 3,
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// when the order preparing is finished
|
|
43
|
+
/// </summary>
|
|
44
|
+
[Description("Ready")]
|
|
45
|
+
Ready = 4,
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
/// when the order is picked up by the customer
|
|
49
|
+
/// </summary>
|
|
50
|
+
[Description("Picked up")]
|
|
51
|
+
PickedUp = 5,
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
/// when ordering is on the way to deliver to the customer
|
|
55
|
+
/// </summary>
|
|
56
|
+
[Description("On the way")]
|
|
57
|
+
OnTheWay = 6,
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
/// when the order is delivered to the customer
|
|
61
|
+
/// </summary>
|
|
62
|
+
[Description("Delivered")]
|
|
63
|
+
Delivered = 7,
|
|
64
|
+
|
|
65
|
+
/// <summary>
|
|
66
|
+
/// when the order is canceled by the customer
|
|
67
|
+
/// </summary>
|
|
68
|
+
[Description("Canceled")]
|
|
69
|
+
Canceled = 8,
|
|
70
|
+
|
|
71
|
+
/// <summary>
|
|
72
|
+
/// when the order is not accepted by the restaurant
|
|
73
|
+
/// </summary>
|
|
74
|
+
[Description("Rejected")]
|
|
75
|
+
Rejected = 9,
|
|
76
|
+
|
|
77
|
+
Deleted = 10
|
|
78
|
+
}
|
|
79
|
+
*/
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
var EnumPaymentState;
|
|
2
2
|
(function (EnumPaymentState) {
|
|
3
|
-
EnumPaymentState[EnumPaymentState["
|
|
4
|
-
EnumPaymentState[EnumPaymentState["
|
|
5
|
-
EnumPaymentState[EnumPaymentState["
|
|
3
|
+
EnumPaymentState[EnumPaymentState["Paid"] = 1] = "Paid";
|
|
4
|
+
EnumPaymentState[EnumPaymentState["NotPaid"] = 2] = "NotPaid";
|
|
5
|
+
EnumPaymentState[EnumPaymentState["Pending"] = 3] = "Pending";
|
|
6
|
+
EnumPaymentState[EnumPaymentState["Failed"] = 4] = "Failed";
|
|
7
|
+
EnumPaymentState[EnumPaymentState["Canceled"] = 5] = "Canceled";
|
|
6
8
|
})(EnumPaymentState || (EnumPaymentState = {}));
|
|
7
9
|
export default EnumPaymentState;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
declare enum EnumPaymentType {
|
|
2
2
|
none = 0,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
Online = 1,
|
|
4
|
+
Cash = 2,
|
|
5
|
+
DebitAt = 3,
|
|
6
|
+
ApplePay = 4,
|
|
7
|
+
GooglePay = 5,
|
|
8
|
+
Wallet = 6,
|
|
9
|
+
GiftCards = 7,
|
|
10
|
+
StripeTerminal = 8,
|
|
11
|
+
TapToPay = 9,
|
|
12
|
+
DebitMachine = 10,
|
|
13
|
+
MultipleMethods = 11
|
|
14
14
|
}
|
|
15
15
|
export default EnumPaymentType;
|
|
@@ -1,16 +1,58 @@
|
|
|
1
1
|
var EnumPaymentType;
|
|
2
2
|
(function (EnumPaymentType) {
|
|
3
3
|
EnumPaymentType[EnumPaymentType["none"] = 0] = "none";
|
|
4
|
-
EnumPaymentType[EnumPaymentType["
|
|
5
|
-
EnumPaymentType[EnumPaymentType["
|
|
6
|
-
EnumPaymentType[EnumPaymentType["
|
|
7
|
-
EnumPaymentType[EnumPaymentType["
|
|
8
|
-
EnumPaymentType[EnumPaymentType["
|
|
9
|
-
EnumPaymentType[EnumPaymentType["
|
|
10
|
-
EnumPaymentType[EnumPaymentType["
|
|
11
|
-
EnumPaymentType[EnumPaymentType["
|
|
12
|
-
EnumPaymentType[EnumPaymentType["
|
|
13
|
-
EnumPaymentType[EnumPaymentType["
|
|
14
|
-
EnumPaymentType[EnumPaymentType["
|
|
4
|
+
EnumPaymentType[EnumPaymentType["Online"] = 1] = "Online";
|
|
5
|
+
EnumPaymentType[EnumPaymentType["Cash"] = 2] = "Cash";
|
|
6
|
+
EnumPaymentType[EnumPaymentType["DebitAt"] = 3] = "DebitAt";
|
|
7
|
+
EnumPaymentType[EnumPaymentType["ApplePay"] = 4] = "ApplePay";
|
|
8
|
+
EnumPaymentType[EnumPaymentType["GooglePay"] = 5] = "GooglePay";
|
|
9
|
+
EnumPaymentType[EnumPaymentType["Wallet"] = 6] = "Wallet";
|
|
10
|
+
EnumPaymentType[EnumPaymentType["GiftCards"] = 7] = "GiftCards";
|
|
11
|
+
EnumPaymentType[EnumPaymentType["StripeTerminal"] = 8] = "StripeTerminal";
|
|
12
|
+
EnumPaymentType[EnumPaymentType["TapToPay"] = 9] = "TapToPay";
|
|
13
|
+
EnumPaymentType[EnumPaymentType["DebitMachine"] = 10] = "DebitMachine";
|
|
14
|
+
EnumPaymentType[EnumPaymentType["MultipleMethods"] = 11] = "MultipleMethods";
|
|
15
15
|
})(EnumPaymentType || (EnumPaymentType = {}));
|
|
16
16
|
export default EnumPaymentType;
|
|
17
|
+
/*
|
|
18
|
+
public enum PaymentType : byte
|
|
19
|
+
{
|
|
20
|
+
None = 0,
|
|
21
|
+
|
|
22
|
+
[Description("Online")]
|
|
23
|
+
Online = 1,
|
|
24
|
+
|
|
25
|
+
[Description("Cash")]
|
|
26
|
+
Cash = 2,
|
|
27
|
+
|
|
28
|
+
[Description("Card at Door/In-Store")]
|
|
29
|
+
DebitAt = 3,
|
|
30
|
+
|
|
31
|
+
[Description("Apple Pay")]
|
|
32
|
+
ApplePay = 4,
|
|
33
|
+
|
|
34
|
+
[Description("Google Pay")]
|
|
35
|
+
GooglePay = 5,
|
|
36
|
+
|
|
37
|
+
[Description("Wallet")]
|
|
38
|
+
Wallet = 6,
|
|
39
|
+
|
|
40
|
+
[Description("Gift cards")]
|
|
41
|
+
GiftCards = 7,
|
|
42
|
+
|
|
43
|
+
[Description("Terminal")]
|
|
44
|
+
StripeTerminal = 8,
|
|
45
|
+
|
|
46
|
+
[Description("Tap to pay")]
|
|
47
|
+
TapToPay = 9,
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
/// Elavon terminal
|
|
51
|
+
/// </summary>
|
|
52
|
+
[Description("Elavon terminal")]
|
|
53
|
+
DebitMachine = 10,
|
|
54
|
+
|
|
55
|
+
[Description("Split payments")]
|
|
56
|
+
MultipleMethods = 11,
|
|
57
|
+
}
|
|
58
|
+
*/
|
|
@@ -6,7 +6,7 @@ export const initSetting = {
|
|
|
6
6
|
sendOrderNotificationViaEmailToCustomer: false,
|
|
7
7
|
autoPrintOnNewOrder: false,
|
|
8
8
|
autoPrintOnNewOrderWhen: 1,
|
|
9
|
-
defaultPaymentMethod: EnumPaymentType.
|
|
9
|
+
defaultPaymentMethod: EnumPaymentType.Cash,
|
|
10
10
|
defaultOrderType: EnumOrderType.dining,
|
|
11
11
|
customerMandatory: false,
|
|
12
12
|
checkDeliveryCoverageArea: false,
|
|
@@ -24,7 +24,7 @@ export const initKitchenScreenSetting = {
|
|
|
24
24
|
headerFontSize: 24,
|
|
25
25
|
orderNumberColor: "#000",
|
|
26
26
|
flashWhenExpire: true,
|
|
27
|
-
showOrdersViaStatus: [EnumOrderState.
|
|
27
|
+
showOrdersViaStatus: [EnumOrderState.New, EnumOrderState.Accepted, EnumOrderState.Kitchen],
|
|
28
28
|
// pickupPreprationTime: 15,
|
|
29
29
|
// diningPreprationTime: 15,
|
|
30
30
|
// deliveryPreprationTime: 15,
|
|
@@ -25,9 +25,9 @@ export const initPointOfSaleLocalSetting = {
|
|
|
25
25
|
timeoutAfterOnePeriodOfSyncLocalOrders: 300,
|
|
26
26
|
timeoutAfterFailSyncOneLocalOrder: 15,
|
|
27
27
|
actionForOnlineStoreNewOrder: EnumNotifyOnlineStoreNewOrder.ONLY_NOTIFY,
|
|
28
|
-
defaultCashPaymentState: EnumPaymentState.
|
|
29
|
-
defaultDebitMachinePaymentState: EnumPaymentState.
|
|
30
|
-
defaultTerminalPaymentState: EnumPaymentState.
|
|
28
|
+
defaultCashPaymentState: EnumPaymentState.NotPaid,
|
|
29
|
+
defaultDebitMachinePaymentState: EnumPaymentState.NotPaid,
|
|
30
|
+
defaultTerminalPaymentState: EnumPaymentState.NotPaid,
|
|
31
31
|
closeOrderDetailAfterSaveOrAccept: true,
|
|
32
32
|
saveDefaultAction: EnumPointOfSaleDefaultSaveState.CashNotPaid,
|
|
33
33
|
displayKitchenCheckBox: true,
|
|
@@ -86,6 +86,7 @@ interface IPointOfSaleOrder {
|
|
|
86
86
|
paymentTransactions: IPointOfSaleOrderTransaction[];
|
|
87
87
|
elavonDevice: IPointOfSaleElavonTerminalDevice;
|
|
88
88
|
elavonTransaction: object | null;
|
|
89
|
+
via: "Pos" | "Online store" | string;
|
|
89
90
|
}
|
|
90
91
|
export default IPointOfSaleOrder;
|
|
91
92
|
export declare const initOrder: IPointOfSaleOrder;
|
|
@@ -57,8 +57,8 @@ export const initOrder = {
|
|
|
57
57
|
zoneId: -1,
|
|
58
58
|
deliveryCost: 0,
|
|
59
59
|
duration: 0,
|
|
60
|
-
paymentType: EnumPaymentType.
|
|
61
|
-
paymentState: EnumPaymentState.
|
|
60
|
+
paymentType: EnumPaymentType.Cash,
|
|
61
|
+
paymentState: EnumPaymentState.NotPaid,
|
|
62
62
|
displaySubTotal: 0,
|
|
63
63
|
displayTotalAmount: 0,
|
|
64
64
|
displayTip: 0,
|
|
@@ -90,5 +90,6 @@ export const initOrder = {
|
|
|
90
90
|
points: 0,
|
|
91
91
|
paymentTransactions: [],
|
|
92
92
|
elavonDevice: initPointOfSaleElavonTerminalDevice,
|
|
93
|
-
elavonTransaction: null
|
|
93
|
+
elavonTransaction: null,
|
|
94
|
+
via: "Pos"
|
|
94
95
|
};
|
|
@@ -13,7 +13,7 @@ export const initPointOfSaleSetting = {
|
|
|
13
13
|
sendOrderNotificationViaEmailToCustomer: false,
|
|
14
14
|
autoPrintOnNewOrder: false,
|
|
15
15
|
autoPrintOnNewOrderWhen: 1,
|
|
16
|
-
defaultPaymentMethod: EnumPaymentType.
|
|
16
|
+
defaultPaymentMethod: EnumPaymentType.Cash,
|
|
17
17
|
defaultOrderType: EnumOrderType.dining,
|
|
18
18
|
customerMandatory: false,
|
|
19
19
|
checkDeliveryCoverageArea: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.86",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"remove:one": "rimraf dist",
|
|
12
12
|
"remove:two": "rimraf ./src/dist",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.3.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.3.86 \" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|