meemup-library 1.5.8 → 1.5.10

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.
@@ -133,7 +133,7 @@ export default new class KitchenController {
133
133
  return tik - ((kitchenTime + travelTime + 5) * 60) > 0; //5 min teloranse
134
134
  }
135
135
  // isAddvanceOrder(detail: IKitchenOrderDetail) {
136
- // let current = moment().format("YYYY-MM-DDTHH:mm:ss")
136
+ // let current = dayjs().format("YYYY-MM-DDTHH:mm:ss")
137
137
  // return detail.orderPreparationStartTime > current;
138
138
  // }
139
139
  sortOrders(orders, setting) {
@@ -1,4 +1,4 @@
1
- import moment from "moment";
1
+ import dayjs from "../utils/dayjs";
2
2
  import EnumShowCustomer from "../enums/EnumShowCustomer";
3
3
  import EnumOrderType from "../enums/EnumOrderType";
4
4
  import MoneyController from "../controllers/MoneyController";
@@ -37,26 +37,26 @@ class LabelPreviewController {
37
37
  content += summary;
38
38
  // if (template.orderDesiredDateTimeVisibility) {
39
39
  //
40
- // content += `<p style="display:block; font-size: ${template.fontSize}px; text-align: center;">${moment(order.desiredDate).format("LLLL")}</p>`;
40
+ // content += `<p style="display:block; font-size: ${template.fontSize}px; text-align: center;">${dayjs(order.desiredDate).format("LLLL")}</p>`;
41
41
  //
42
42
  // }
43
43
  if (template.orderDesiredDateTimeVisibility) {
44
44
  let formated = "";
45
45
  switch (template.orderDateTimeMode) {
46
46
  case EnumOrderDateTimePrintModeType.RegistrationDate:
47
- formated = moment(order.registrationDate).format(template.orderDateTimeFormat); // order.registrationDate;
47
+ formated = dayjs(order.registrationDate).format(template.orderDateTimeFormat); // order.registrationDate;
48
48
  break;
49
49
  case EnumOrderDateTimePrintModeType.ReadyTime:
50
- formated = moment(order.orderReadyTime).format(template.orderDateTimeFormat);
50
+ formated = dayjs(order.orderReadyTime).format(template.orderDateTimeFormat);
51
51
  break;
52
52
  case EnumOrderDateTimePrintModeType.WishTime:
53
- formated = moment(order.desiredDate).format(template.orderDateTimeFormat); // order.desiredDate;
53
+ formated = dayjs(order.desiredDate).format(template.orderDateTimeFormat); // order.desiredDate;
54
54
  break;
55
55
  case EnumOrderDateTimePrintModeType.PreparationStartTime:
56
- formated = moment(order.orderPreparationStartTime).format(template.orderDateTimeFormat);
56
+ formated = dayjs(order.orderPreparationStartTime).format(template.orderDateTimeFormat);
57
57
  break;
58
58
  default:
59
- formated = moment(order.desiredDate).format(template.orderDateTimeFormat); // order.desiredDate;
59
+ formated = dayjs(order.desiredDate).format(template.orderDateTimeFormat); // order.desiredDate;
60
60
  break;
61
61
  }
62
62
  content += `<strong style="display:block; font-size: ${template.fontSize}px; text-align: center;">${formated}</strong>`;
@@ -113,7 +113,7 @@ class LabelPreviewController {
113
113
  if (row.extras.length === 0)
114
114
  return "";
115
115
  let content = this.createDivContainer(template);
116
- row.extras.forEach(element => {
116
+ row.extras.filter(i => !i.doNotPrintOnReceipt).forEach(element => {
117
117
  let extraText = this.pizzaSideText(element.pizzaSide) + element.quantity + "X " + element.extraItemTitle;
118
118
  let extraAmount = template.showPrices ? MoneyController.format(element.totalAmount, currencySymbol) : "";
119
119
  content += `<div style="display: flex; flex-direction: row; justify-content: flex-start; padding-left: 16px">
@@ -2,16 +2,7 @@ import IAccount from "../interfaces/IAccount";
2
2
  import IPrintTemplate from "../interfaces/IPrintTemplate";
3
3
  import IOrderDetails from "../interfaces/print/IOrderDetails";
4
4
  import IOrderDetailProduct from "../interfaces/print/IOrderDetailProduct";
5
- import ITurnover from "../interfaces/turnover/ITurnover";
6
- import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
7
- import IPointOfSalePrintParts from "../interfaces/pos/IPointOfSalePrintParts";
8
- import IPointOfSaleActionFormCashDrawer from "../interfaces/pos/IPointOfSaleActionFormCashDrawer";
9
- import IPointOfSaleTeamMember from "../interfaces/pos/IPointOfSaleTeamMember";
10
- import IPointOfSaleApiClosingWorkDay from "../interfaces/pos/IPointOfSaleApiClosingWorkDay";
11
- import IPointOfSaleCashDrawer from "../interfaces/pos/IPointOfSaleCashDrawer";
12
- import IPointOfSaleCashDrawerReportForm from "../interfaces/pos/IPointOfSaleCashDrawerReportForm";
13
- import IPointOfSaleCashDrawerReportRecord from "../interfaces/pos/IPointOfSaleCashDrawerReportRecord";
14
- declare const _default: {
5
+ declare class _PreviewContentController {
15
6
  calculatePaperSize: (paper: number, width: string | number) => string;
16
7
  sortProduct: (products: IOrderDetailProduct[], sortType: number) => IOrderDetailProduct[];
17
8
  filterByCategoryList: (products: IOrderDetailProduct[], catList: number[], onlyListCategory: boolean, productList: number[], onlyListProduct: boolean) => IOrderDetailProduct[];
@@ -23,13 +14,8 @@ declare const _default: {
23
14
  labelLayout(detail: IOrderDetails, template: IPrintTemplate): string;
24
15
  paymentFailed(detail: IOrderDetails, currency: string): string;
25
16
  packageLabel(detail: IOrderDetails, template: IPrintTemplate): string;
26
- preview(account: IAccount, detail: IOrderDetails, template: IPrintTemplate): string;
27
17
  previewForPos(account: IAccount, detail: IOrderDetails, template: IPrintTemplate): string;
28
- createPrintFromTurnoverDetail(data: ITurnover, currency: string, printParts: IPointOfSalePrintParts): Promise<string>;
29
- createCashDrawerPaidInOutMarkup(device: IPointOfSaleActionFormCashDrawer, setting: IPointOfSaleSetting, member: IPointOfSaleTeamMember): Promise<string>;
30
- openCashDrawerMarkup(label?: string): Promise<string>;
31
18
  standardHtmlContainer(strHtml: string): string;
32
- createClosingWorkDay(data: IPointOfSaleApiClosingWorkDay, companyTitle: string): Promise<string>;
33
- createCashDrawerReport(device: IPointOfSaleCashDrawer, form: IPointOfSaleCashDrawerReportForm, records: IPointOfSaleCashDrawerReportRecord[], company: string, currency: string, member: IPointOfSaleTeamMember, formatDate: (value: string) => string): Promise<string>;
34
- };
35
- export default _default;
19
+ }
20
+ declare const PreviewContentController: _PreviewContentController;
21
+ export default PreviewContentController;