meemup-library 1.4.47 → 1.4.49

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.
@@ -335,6 +335,7 @@ class OrderToolController {
335
335
  extras: item.extras.map(i => this.convertOrderExtraItemToOrderDetailProductsExtra(i)),
336
336
  kitchenReceiptName: item.title,
337
337
  additionalText: item.additionalText,
338
+ productName: item.productName
338
339
  };
339
340
  }
340
341
  createExtraNames(item, currency) {
@@ -315,18 +315,56 @@ export default new class PreviewContentController {
315
315
  switch (template.layout) {
316
316
  case EnumPrintLayout.SIMPLE:
317
317
  content = this.simpleLayout(account, detail, template);
318
+ break;
318
319
  case EnumPrintLayout.LARGE:
319
320
  content = this.largeLayout(account, detail, template);
321
+ break;
320
322
  case EnumPrintLayout.LABEL:
321
323
  const products = this.filterByCategoryList(this.sortProduct(detail.products, template.sortProducts), template.printOnlyCertainCategoriesList, template.printOnlyCertainCategories, template.printOnlyCertainProductsList, template.printOnlyCertainProducts);
322
324
  if (products.length === 0)
323
325
  return `<div>no product </div>`;
324
326
  content = this.labelLayout(detail, template);
327
+ break;
325
328
  case EnumPrintLayout.PACKAGE_LABEL:
326
329
  content = this.packageLabel(detail, template);
330
+ break;
327
331
  default:
328
332
  content = `<div> template.layout : ${template.layout}</div>`;
333
+ break;
329
334
  }
330
- return `<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"></head><body style="all: unset; padding: 0; margin: 0; background-color: #ffffff; width: 576px; font-size: 14px; font-family: Arial, sans-serif;">${content}</body></html>`;
335
+ return `<!DOCTYPE html>
336
+ <html>
337
+ <head>
338
+ <meta charset="UTF-8">
339
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
340
+ <style>
341
+
342
+ html {
343
+ font-size: 14px;
344
+ }
345
+
346
+ * {
347
+ padding: 0;
348
+ margin: 0;
349
+ background-color: #ffffff;
350
+ }
351
+
352
+ body {
353
+ width : 100%;
354
+ margin: 0;
355
+ padding: 0;
356
+ font-family: -apple-system, BlinkMacSystemFont, 'Arial', "Arial Black", "Comic Sans MS", "Georgia", "Impact", "Lucida Console", "Lucida Sans Unicode", 'Segoe UI', 'Roboto', 'Oxygen',
357
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
358
+ sans-serif;
359
+ -webkit-font-smoothing: antialiased;
360
+ -moz-osx-font-smoothing: grayscale;
361
+ }
362
+
363
+ </style>
364
+ </head>
365
+ <body>
366
+ ${content}
367
+ </body>
368
+ </html>`;
331
369
  }
332
370
  }();
@@ -151,7 +151,8 @@ export default new class ProductModalController {
151
151
  relatedProductId: null,
152
152
  additionalText: "",
153
153
  stampCardBonusItem: false,
154
- taxable: product.taxable
154
+ taxable: product.taxable,
155
+ productName: product.name
155
156
  };
156
157
  }
157
158
  productName(product) {
@@ -20,5 +20,6 @@ interface IPointOfSaleOrderItem {
20
20
  promotionId: number;
21
21
  stampCardBonusItem: boolean;
22
22
  taxable: boolean | null;
23
+ productName: string;
23
24
  }
24
25
  export default IPointOfSaleOrderItem;
@@ -16,4 +16,5 @@ export default interface IPointOfSalePrintAction {
16
16
  order?: IPointOfSaleOrder;
17
17
  cashDrawer?: IPointOfSaleActionFormCashDrawer;
18
18
  mode: "OrderSaved" | "OrderPaid" | "UserAcceptNewOrder" | "NewOrderArrived" | "UserPrintOrder" | "UserRefundOrder" | "UserUpdateOrder" | "UserPartialRefundOrder" | "OpenCashDrawer" | "CashDrawerPaidInOut" | "Markup";
19
+ printInformationInPhotoFormat: boolean;
19
20
  }
@@ -14,5 +14,6 @@ interface IOrderDetailProduct {
14
14
  extras: IOrderDetailProductsExtra[];
15
15
  kitchenReceiptName: string;
16
16
  additionalText: string;
17
+ productName: string;
17
18
  }
18
19
  export default IOrderDetailProduct;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.47",
3
+ "version": "1.4.49",
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.4.47 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.49\" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"