meemup-library 1.9.6 → 1.9.8
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.
|
@@ -221,13 +221,6 @@ class SimplePreviewController {
|
|
|
221
221
|
<span style="font-size:${fontSize}px; flex: 1; width: 100%; text-align: left; font-weight: bold;">${productName}</span>
|
|
222
222
|
<span style="font-size:${fontSize}px; max-width: 90px; text-align: right;">${price}</span>
|
|
223
223
|
</div>`;
|
|
224
|
-
if (row.discount !== 0) {
|
|
225
|
-
let discountText = `${MoneyController.format(row.discount, detail.company.currencySymbol)} discount`;
|
|
226
|
-
content += `<div style="display:flex; flex-direction:row; align-items:center; justify-content: flex-start; gap: 8px;">
|
|
227
|
-
<span style="font-size:${fontSize}px; min-width:40px; width: 40px; text-align: left;"></span>
|
|
228
|
-
<span style="font-size:${fontSize}px; flex: 1; width: 100%; text-align: left; column-span: 2; padding-left: 24px;">${discountText}</span>
|
|
229
|
-
</div>`;
|
|
230
|
-
}
|
|
231
224
|
if (row.extrasNames) {
|
|
232
225
|
row.extras
|
|
233
226
|
.filter(item => !item.doNotPrintOnReceipt)
|
|
@@ -240,6 +233,13 @@ class SimplePreviewController {
|
|
|
240
233
|
</div>`;
|
|
241
234
|
});
|
|
242
235
|
}
|
|
236
|
+
if (row.discount !== 0) {
|
|
237
|
+
let discountText = MoneyController.format(row.discount, detail.company.currencySymbol, "Discount: -");
|
|
238
|
+
content += `<div style="display:flex; flex-direction:row; align-items:center; justify-content: flex-start; gap: 8px;">
|
|
239
|
+
<span style="font-size:${fontSize}px; min-width:40px; width: 40px; text-align: left;"></span>
|
|
240
|
+
<span style="font-size:${fontSize}px; flex: 1; width: 100%; text-align: left; column-span: 2; padding-left: 24px;">${discountText}</span>
|
|
241
|
+
</div>`;
|
|
242
|
+
}
|
|
243
243
|
const note = PrintToolController.productNote(row);
|
|
244
244
|
if (note !== '') {
|
|
245
245
|
content += `<div style="display:flex; flex-direction:row; align-items:center; justify-content: flex-start; gap: 8px;">
|
|
@@ -407,7 +407,7 @@ class SimplePreviewController {
|
|
|
407
407
|
var _a, _b, _c, _d;
|
|
408
408
|
const TagController = TagToolController.getInstance();
|
|
409
409
|
const seats = TagController.allSeatInOrderDetail(detail.products);
|
|
410
|
-
if (template.printProductsBySeat && detail.order.orderType === EnumOrderType.dining && detail.order.tableId !== null && seats.length > 0) {
|
|
410
|
+
if ((template.printProductsBySeat && detail.order.orderType === EnumOrderType.dining && detail.order.tableId !== null && seats.length > 0) || (detail.order.orderType === EnumOrderType.dining && detail.order.tableId !== null && seats.length > 0)) {
|
|
411
411
|
return this.printProductInDineIn(template, detail);
|
|
412
412
|
}
|
|
413
413
|
let flag = true;
|
|
@@ -416,7 +416,7 @@ class SimplePreviewController {
|
|
|
416
416
|
<thead style="border-bottom: 1px solid #000000;">
|
|
417
417
|
<tr style="${isLarge ? '' : 'height: 28px;'}">
|
|
418
418
|
<th style="font-size:${template.fontSize}px;min-width:40px; width: 40px; text-align: left; font-weight: bold;">#</th>
|
|
419
|
-
<th style="font-size:${template.fontSize}px;flex: 1; width: 100%; text-align: left; font-weight: bold; ">
|
|
419
|
+
<th style="font-size:${template.fontSize}px;flex: 1; width: 100%; text-align: left; font-weight: bold; ">Items</th>
|
|
420
420
|
<th style="font-size:${template.fontSize}px;max-width: 90px; text-align: right; font-weight: bold;">Price</th>
|
|
421
421
|
</tr>
|
|
422
422
|
</thead>
|
|
@@ -461,13 +461,6 @@ class SimplePreviewController {
|
|
|
461
461
|
<td style="font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;">${isLarge ? ' ' : ''}</td>
|
|
462
462
|
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left; column-span: 2;">${product}</td>
|
|
463
463
|
</tr>`;
|
|
464
|
-
if (row.discount !== 0) {
|
|
465
|
-
let discountText = `${MoneyController.format(row.discount, detail.company.currencySymbol)} discount`;
|
|
466
|
-
content += `<tr>
|
|
467
|
-
<td style="${isLarge ? 'min-width:40px; width: 40px;' : `font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;`}">${isLarge ? ' ' : ''}</td>
|
|
468
|
-
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left; column-span: 2; padding-left: 24px;">${discountText}</td>
|
|
469
|
-
</tr>`;
|
|
470
|
-
}
|
|
471
464
|
if (row.extrasNames) {
|
|
472
465
|
row.extras
|
|
473
466
|
.filter(item => !item.doNotPrintOnReceipt)
|
|
@@ -480,6 +473,13 @@ class SimplePreviewController {
|
|
|
480
473
|
</tr>`;
|
|
481
474
|
});
|
|
482
475
|
}
|
|
476
|
+
if (row.discount !== 0) {
|
|
477
|
+
let discountText = MoneyController.format(row.discount, detail.company.currencySymbol, "Discount: -");
|
|
478
|
+
content += `<tr>
|
|
479
|
+
<td style="${isLarge ? 'min-width:40px; width: 40px;' : `font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;`}">${isLarge ? ' ' : ''}</td>
|
|
480
|
+
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left; column-span: 2; padding-left: 24px;">${discountText}</td>
|
|
481
|
+
</tr>`;
|
|
482
|
+
}
|
|
483
483
|
const note = PrintToolController.productNote(row);
|
|
484
484
|
if (note !== '') {
|
|
485
485
|
content += `<tr>
|
|
@@ -508,14 +508,6 @@ class SimplePreviewController {
|
|
|
508
508
|
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left; font-weight: bold;">${productName}</td>
|
|
509
509
|
<td style="font-size:${activeFontSize}px; max-width: 90px; text-align: right;">${amount}</td>
|
|
510
510
|
</tr>`;
|
|
511
|
-
if (row.discount !== 0) {
|
|
512
|
-
let discountText = `${MoneyController.format(row.discount, detail.company.currencySymbol)} discount`;
|
|
513
|
-
content += `<tr>
|
|
514
|
-
<td style="font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;">${isLarge ? ' ' : ''}</td>
|
|
515
|
-
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left;">${discountText}</td>
|
|
516
|
-
<td style="font-size:${activeFontSize}px; max-width: 90px; text-align: right;"></td>
|
|
517
|
-
</tr>`;
|
|
518
|
-
}
|
|
519
511
|
row.extras.filter(i => !i.doNotPrintOnReceipt).forEach(element => {
|
|
520
512
|
const side = this.pizzaSideText(element.pizzaSide, template.skipWholePizzaToppingText);
|
|
521
513
|
const extraText = `${side}${element.quantity}${isLarge ? '× ' : 'x '}${element.extraItemTitle}`.trim();
|
|
@@ -526,6 +518,14 @@ class SimplePreviewController {
|
|
|
526
518
|
<td style="font-size:${activeFontSize}px; max-width: 90px; text-align: right;">${extraAmount}</td>
|
|
527
519
|
</tr>`;
|
|
528
520
|
});
|
|
521
|
+
if (row.discount !== 0) {
|
|
522
|
+
let discountText = MoneyController.format(row.discount, detail.company.currencySymbol, "Discount: -");
|
|
523
|
+
content += `<tr>
|
|
524
|
+
<td style="font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;">${isLarge ? ' ' : ''}</td>
|
|
525
|
+
<td style="font-size:${activeFontSize}px; flex: 1; width: 100%; text-align: left;">${discountText}</td>
|
|
526
|
+
<td style="font-size:${activeFontSize}px; max-width: 90px; text-align: right;"></td>
|
|
527
|
+
</tr>`;
|
|
528
|
+
}
|
|
529
529
|
if (row.note && row.note.trim().length > 0) {
|
|
530
530
|
content += `<tr>
|
|
531
531
|
<td style="font-size:${activeFontSize}px; min-width:40px; width: 40px; text-align: left;">Note:</td>
|
|
@@ -556,6 +556,22 @@ class SimplePreviewController {
|
|
|
556
556
|
show: detail.order.thirdPartyDriverTipAmount > 0
|
|
557
557
|
}
|
|
558
558
|
];
|
|
559
|
+
(detail.order.items || [])
|
|
560
|
+
.filter(i => i.amount > 0 && i.type !== EnumFeeType.BundleProduct)
|
|
561
|
+
.forEach(item => {
|
|
562
|
+
rowsConfig.push({
|
|
563
|
+
label: item.text,
|
|
564
|
+
val: item.amount,
|
|
565
|
+
show: item.amount > 0
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
if (detail.order.roundedAmount > 0) {
|
|
569
|
+
rowsConfig.push({
|
|
570
|
+
label: "Round cash amount",
|
|
571
|
+
val: detail.order.roundedAmount,
|
|
572
|
+
show: true
|
|
573
|
+
});
|
|
574
|
+
}
|
|
559
575
|
rowsConfig.forEach(row => {
|
|
560
576
|
if (row.show) {
|
|
561
577
|
content += `<tr style="border-top: 1px dashed #000000; ${isLarge ? 'margin: 4px 0;' : 'padding: 4px 0;'}">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
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.9.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.9.8\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|