meemup-library 1.6.2 → 1.6.4
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/PreviewContentController.js +10 -2
- package/dist/controllers/SimplePreviewController.js +14 -0
- package/dist/interfaces/pos/IPointOfSaleOrderItem.d.ts +2 -0
- package/dist/interfaces/pos/IPointOfSaleOrderItem.js +2 -1
- package/dist/interfaces/pos/IPointOfSaleProductScreenState.d.ts +2 -1
- package/dist/interfaces/pos/point-of-sale-order-item-seat.d.ts +4 -0
- package/dist/interfaces/pos/point-of-sale-order-item-seat.js +1 -0
- package/package.json +2 -2
|
@@ -222,7 +222,11 @@ class _PreviewContentController {
|
|
|
222
222
|
content += SimplePreviewController.printCustomerInformation(template, detail);
|
|
223
223
|
content += SimplePreviewController.printProductCount(template, detail);
|
|
224
224
|
content += SimplePreviewController.printTextBeforeProducts(template);
|
|
225
|
-
|
|
225
|
+
let value = SimplePreviewController.printProducts(template, detail);
|
|
226
|
+
if (value !== "")
|
|
227
|
+
content += value;
|
|
228
|
+
else
|
|
229
|
+
return "";
|
|
226
230
|
content += SimplePreviewController.printCustomerRemark(template, detail);
|
|
227
231
|
content += SimplePreviewController.printDeliveryInstructionsRemarks(template, detail);
|
|
228
232
|
content += SimplePreviewController.printCustomerSignature(template, detail);
|
|
@@ -261,7 +265,11 @@ class _PreviewContentController {
|
|
|
261
265
|
content += SimplePreviewController.printCustomerInformation(template, detail);
|
|
262
266
|
content += SimplePreviewController.printProductCount(template, detail);
|
|
263
267
|
content += SimplePreviewController.printTextBeforeProducts(template);
|
|
264
|
-
|
|
268
|
+
let value = SimplePreviewController.printLargeProducts(template, detail);
|
|
269
|
+
if (value !== "")
|
|
270
|
+
content += value;
|
|
271
|
+
else
|
|
272
|
+
return "";
|
|
265
273
|
content += SimplePreviewController.printCustomerRemark(template, detail);
|
|
266
274
|
content += SimplePreviewController.printDeliveryInstructionsRemarks(template, detail);
|
|
267
275
|
content += SimplePreviewController.printCustomerSignature(template, detail);
|
|
@@ -229,6 +229,7 @@ class SimplePreviewController {
|
|
|
229
229
|
}
|
|
230
230
|
printProducts(template, detail) {
|
|
231
231
|
var _a, _b, _c;
|
|
232
|
+
let flag = true;
|
|
232
233
|
let content = this.createDivContainer(template);
|
|
233
234
|
content += `<table style="width: 100%; border-collapse: collapse;">
|
|
234
235
|
<thead style="border-bottom: 1px solid #000000;">
|
|
@@ -242,6 +243,7 @@ class SimplePreviewController {
|
|
|
242
243
|
`;
|
|
243
244
|
const bundledProducts = detail.products.filter(i => Array.isArray(i.tags) && i.tags.findIndex(tag => tag.startsWith(BundleIdPreName)) !== -1);
|
|
244
245
|
if (bundledProducts.length > 0) {
|
|
246
|
+
flag = false;
|
|
245
247
|
const bundleGroups = [];
|
|
246
248
|
bundledProducts.forEach(pro => {
|
|
247
249
|
var _a;
|
|
@@ -317,6 +319,11 @@ class SimplePreviewController {
|
|
|
317
319
|
}
|
|
318
320
|
const unBundledProducts = detail.products.filter(i => !(Array.isArray(i.tags) && i.tags.findIndex(tag => tag.startsWith(BundleIdPreName)) !== -1));
|
|
319
321
|
const list = this.filterByCategoryList(this.sortProduct(unBundledProducts, template.sortProducts), template.printOnlyCertainCategoriesList, template.printOnlyCertainCategories, template.printOnlyCertainProductsList, template.printOnlyCertainProducts);
|
|
322
|
+
if (list.length > 0) {
|
|
323
|
+
flag = false;
|
|
324
|
+
}
|
|
325
|
+
if (flag)
|
|
326
|
+
return "";
|
|
320
327
|
list.forEach((row) => {
|
|
321
328
|
let cat;
|
|
322
329
|
if (!template.showCategoryTitle || !row.categoryTitle || row.categoryTitle.trim().length === 0)
|
|
@@ -453,6 +460,7 @@ class SimplePreviewController {
|
|
|
453
460
|
}
|
|
454
461
|
printLargeProducts(template, detail) {
|
|
455
462
|
var _a, _b, _c;
|
|
463
|
+
let flag = true;
|
|
456
464
|
let content = this.createDivContainer(template);
|
|
457
465
|
const largeFontSize = template.printer === 5 ? 22 : parseInt((template.fontSize + 10) + "");
|
|
458
466
|
content += `<table style="width: 100%; border-collapse: collapse;">
|
|
@@ -467,6 +475,7 @@ class SimplePreviewController {
|
|
|
467
475
|
`;
|
|
468
476
|
const bundledProducts = detail.products.filter(i => Array.isArray(i.tags) && i.tags.findIndex(tag => tag.startsWith(BundleIdPreName)) !== -1);
|
|
469
477
|
if (bundledProducts.length > 0) {
|
|
478
|
+
flag = false;
|
|
470
479
|
const bundleGroups = [];
|
|
471
480
|
bundledProducts.forEach(pro => {
|
|
472
481
|
var _a;
|
|
@@ -540,6 +549,11 @@ class SimplePreviewController {
|
|
|
540
549
|
}
|
|
541
550
|
const unBundledProducts = detail.products.filter(i => !(Array.isArray(i.tags) && i.tags.findIndex(tag => tag.startsWith(BundleIdPreName)) !== -1));
|
|
542
551
|
const list = this.filterByCategoryList(this.sortProduct(unBundledProducts, template.sortProducts), template.printOnlyCertainCategoriesList, template.printOnlyCertainCategories, template.printOnlyCertainProductsList, template.printOnlyCertainProducts);
|
|
552
|
+
if (list.length > 0) {
|
|
553
|
+
flag = false;
|
|
554
|
+
}
|
|
555
|
+
if (flag)
|
|
556
|
+
return "";
|
|
543
557
|
list.forEach((row) => {
|
|
544
558
|
const productName = (template.showCategoryTitle ? `[${row.categoryTitle}] ` : "") + ((template.showProductKitchenName && typeof row.kitchenReceiptName === "string" && row.kitchenReceiptName.trim().length > 0) ? row.kitchenReceiptName : row.title).trim();
|
|
545
559
|
const amount = template.showPrices ? MoneyController.format(row.totalAmount, detail.company.currencySymbol) : "";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import IPointOfSaleOrderExtraItem from "./IPointOfSaleOrderExtraItem";
|
|
2
|
+
import PointOfSaleOrderItemSeat from "./point-of-sale-order-item-seat";
|
|
2
3
|
interface IPointOfSaleOrderItem {
|
|
3
4
|
id: number;
|
|
4
5
|
categoryId: number;
|
|
@@ -25,6 +26,7 @@ interface IPointOfSaleOrderItem {
|
|
|
25
26
|
taxable: boolean | null;
|
|
26
27
|
productName: string;
|
|
27
28
|
tags: string[] | null;
|
|
29
|
+
seats: PointOfSaleOrderItemSeat[];
|
|
28
30
|
_id?: string;
|
|
29
31
|
discount?: number;
|
|
30
32
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TBaseExtra from "../../types/TBaseExtra";
|
|
2
2
|
import ISelectedProductExtra from "../ISelectedProductExtra";
|
|
3
|
+
import PointOfSaleOrderItemSeat from "./point-of-sale-order-item-seat";
|
|
3
4
|
export default interface IPointOfSaleProductScreenState {
|
|
4
5
|
id: number;
|
|
5
6
|
count: number;
|
|
@@ -10,6 +11,6 @@ export default interface IPointOfSaleProductScreenState {
|
|
|
10
11
|
problems: number[];
|
|
11
12
|
check: boolean;
|
|
12
13
|
base: TBaseExtra;
|
|
13
|
-
seats:
|
|
14
|
+
seats: PointOfSaleOrderItemSeat[];
|
|
14
15
|
}
|
|
15
16
|
export declare const initPointOfSaleProductScreenState: IPointOfSaleProductScreenState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
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.6.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.6.4\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|