meemup-library 1.5.9 → 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>`;
@@ -233,7 +233,7 @@ class _PreviewContentController {
233
233
  //
234
234
  // records.forEach(record => {
235
235
  //
236
- // //moment(record.dateTime).format(Formats.printedAt)
236
+ // //dayjs(record.dateTime).format(Formats.printedAt)
237
237
  // content += SimplePreviewController.createTextValueSpaceBetween(formatDate(record.dateTime), MoneyController.format(record.amount, currency));
238
238
  // content += SimplePreviewController.createText(record.reason, 'left', false);
239
239
  // content += SimplePreviewController.printSpace(16);
@@ -147,14 +147,6 @@ class SimplePreviewController {
147
147
  if (!template.orderInfo)
148
148
  return "";
149
149
  let content = this.createDivContainer(template, 8, 8);
150
- // content += this.printSimpleDashLine();
151
- // content += `<p style="display:block; font-size: ${template.fontSize}px; text-align: left;">Order number:&emsp;${detail.order.orderNumber}</p>`;
152
- // content += `<p style="display:block; font-size: ${template.fontSize}px; text-align: left;">
153
- // Reference:&emsp;${detail.order.via}, #${detail.order.id}
154
- // </p>`;
155
- // content += `<p style="display:block; font-size: ${template.fontSize}px; text-align: left;">${detail.order.orderTypeString}:&emsp;on ${dayjs(detail.order.desiredDate).format(Formats.displayTime)}</p>`;
156
- // if (typeof detail.order.estimatedTime === "string" && detail.order.estimatedTime.length > 0)
157
- // content += `<p style="display: block; font-size: ${template.fontSize}px; text-align:left;">Est. Time:&nbsp;&ensp;&emsp;${detail.order.estimatedTime?.substring(0, 5)}</p>`;
158
150
  content += this.createTextValue('Order number:', detail.order.orderNumber.toString(), 110, template);
159
151
  content += this.createTextValue('Reference:', `${detail.order.via}, #${detail.order.id}`, 110, template);
160
152
  content += this.createTextValue(`${detail.order.orderTypeString}:`, dayjs(detail.order.desiredDate).format(Formats.displayDateTime), 110, template);
@@ -570,8 +562,8 @@ class SimplePreviewController {
570
562
  }
571
563
  createTextValue(text, value, textLength, template) {
572
564
  return `<div style="display: grid; grid-template-columns: ${textLength}px auto;">
573
- <div style=" font-size: ${template.fontSize}px; text-align: left; font-family: ${template.font}; color: black;">${text}</div>
574
- <div style=" font-size: ${template.fontSize}px; text-align: left; font-family: ${template.font}; color: black;">${value}</div>
565
+ <div style=" font-size: ${template.fontSize}px; text-align: left; font-family: ${template.font};">${text}</div>
566
+ <div style=" font-size: ${template.fontSize}px; text-align: left; font-family: ${template.font};">${value}</div>
575
567
  </div>`;
576
568
  }
577
569
  // public createTextValueSpaceBetween
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
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.5.9\" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.5.10\" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"
@@ -24,7 +24,6 @@
24
24
  "typescript": "^5.7.2"
25
25
  },
26
26
  "dependencies": {
27
- "dayjs": "^1.11.13",
28
- "moment": "^2.30.1"
27
+ "dayjs": "^1.11.13"
29
28
  }
30
29
  }