meemup-library 1.2.4 → 1.2.5
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/PrintContentController.js +268 -268
- package/dist/enums/EnumPointOfSaleTask.d.ts +14 -0
- package/dist/enums/EnumPointOfSaleTask.js +15 -0
- package/dist/enums/EnumPointOfSaleTaskPariority.d.ts +8 -0
- package/dist/enums/EnumPointOfSaleTaskPariority.js +9 -0
- package/dist/enums/EnumPointOfSaleTaskSource.d.ts +6 -0
- package/dist/enums/EnumPointOfSaleTaskSource.js +9 -0
- package/dist/interfaces/pos/IPointOfSaleTask.d.ts +9 -0
- package/dist/interfaces/pos/IPointOfSaleTask.js +1 -0
- package/package.json +29 -29
|
@@ -208,290 +208,290 @@ export default new class {
|
|
|
208
208
|
const { order, company, customer, products, paymentInfo } = detail;
|
|
209
209
|
const { printOnlyCertainCategoriesList, printOnlyCertainCategories, printOnlyCertainProductsList, printOnlyCertainProducts, customerAddressFontSize, showCustomerInfo, orderInfo, showPrices, textAfterAddress, textAfterAddressCenter, nameAddressShow, nameAddressCenter, font, fontSize, marginBottom, marginLeft, marginRight, marginTop, logoAvailable, logoCenter, logoUrl, sortProducts, textBeforeProducts, textBeforeProductsCenter, customerOnlinePaymentAgrementSection, id, promotionCodeNote, promotionId, qrCodeOrderDetails, showCategoryTitle, showProductKitchenName, textEnd, textEndCenter, width, paper } = template;
|
|
210
210
|
const address = this.createAddressText(customer);
|
|
211
|
-
return (`
|
|
212
|
-
<div style="font-family: ${font}; font-weight: 500; font-size: ${fontSize + "px"}; min-width: ${this.calculatePaperSize(paper, width)}; width: ${this.calculatePaperSize(paper, width)}; padding : ${marginTop + "mm"} ${marginRight + "mm"} ${marginBottom + "mm"} ${marginLeft + "mm"};">
|
|
213
|
-
<img alt="" style=" display : ${logoAvailable ? "block" : "none"}; margin : ${logoCenter ? "auto" : "0"}; width: 200px; min-height : 50px;" src="${rootUrl}${company.id}/${logoUrl}" />
|
|
214
|
-
<p style=" margin: 5px 0; line-height: 1; display: ${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
215
|
-
${company.title}
|
|
216
|
-
</p>
|
|
217
|
-
<p style="margin:5px 0; display:${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
218
|
-
${company.address}
|
|
219
|
-
</p>
|
|
220
|
-
<p style="margin: 5px 0; line-height: 1; display: ${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
221
|
-
${PhoneController.formatPhoneNumber(company.phone)}
|
|
222
|
-
</p>
|
|
223
|
-
<p style="margin: 5px 0; line-height: 1; display: ${textAfterAddress ? "block" : "none"}; text-align:${textAfterAddressCenter ? "center" : "start"};">
|
|
224
|
-
${textAfterAddress}
|
|
225
|
-
</p>
|
|
226
|
-
|
|
227
|
-
<div style=" display:${order.orderTypeString ? "flex" : "none"}; flex-direction: column; align-items: center; justify-content: center; margin: 8px 0;" >
|
|
228
|
-
|
|
229
|
-
<p style=" font-size: x-large; font-weight: bold; text-align: center;line-height: 0.7; margin: 5px 0;"> #${order.orderNumber} ${order.orderTypeString} </p>
|
|
230
|
-
|
|
231
|
-
<strong style="font-size: x-large; text-align: center;">
|
|
232
|
-
⏱${order.asSoonAsPossible && "ASAP"} ${this.formatDateTime(order.desiredDate, "time")}
|
|
233
|
-
</strong>
|
|
234
|
-
|
|
235
|
-
${order.estimatedTime ? `<strong style="display:block; font-size:x-large; text-align:center;">Est. Time ${this.substring(order.estimatedTime, 0, order.estimatedTime.length - 3)}</strong>` : ""}
|
|
236
|
-
</div>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
<div style="display: ${showPrices ? "block" : "none"}; border-top: 1px solid black;">
|
|
240
|
-
<strong style="display : block; margin: 5px 0; line-height: 1;">PAY INFORMATION: </strong>
|
|
241
|
-
<strong style="font-size: large; margin: 0 0 16px 0; line-height: 1.5;">${order.paymentTypeString + (order.paymentType === 2 ? `: ${this.ccyFormat(order.totalAmount, symbol)} ` : " ") + " - " + order.paymentStateString}</strong>
|
|
242
|
-
|
|
243
|
-
<p style="margin: 5px 0; line-height: 1; display: ${order.paymentType === 1 ? "block" : "none"};">Credit Card : <strong>**** **** **** ${order.lastFourDigits}</strong></p>
|
|
244
|
-
|
|
245
|
-
</div>
|
|
246
|
-
|
|
247
|
-
<p style="display:${orderInfo ? "block" : "none"}; margin: 5px 0; line-height: 1;"> Order number : <strong>#${order.orderNumber}</strong> </p>
|
|
248
|
-
<p style="display:${orderInfo ? "block" : "none"}; margin: 5px 0; line-height: 1;">
|
|
249
|
-
${order.orderTypeString}:<span style="font-size: x-large;">⏱</span><strong>on ${this.formatDateTime(order.desiredDate)}</strong>
|
|
250
|
-
</p>
|
|
251
|
-
|
|
252
|
-
${order.estimatedTime ? `<p style="display: block; margin: 5px 0; line-height: 1;">Estimated Time : <strong>${(_a = order.estimatedTime) === null || _a === void 0 ? void 0 : _a.substring(0, order.estimatedTime.length - 3)}</strong></p>` : ""}
|
|
253
|
-
|
|
254
|
-
<p style="display:block; margin: 5px 0; line-height: 1;">Reg. Date:<strong>${this.formatDateTime(order.registrationDate)}</strong> </p>
|
|
255
|
-
|
|
256
|
-
<div style="border-top: 1px solid black;">
|
|
257
|
-
|
|
258
|
-
<div style="display:${showCustomerInfo ? "block" : "none"}">
|
|
259
|
-
|
|
260
|
-
<strong style="display:block; margin: 5px 0; line-height: 1;"> CUSTOMER DATA : </strong>
|
|
261
|
-
<p style="display:${customer.fullName ? "block" : "none"}; margin: 5px 0; line-height: 1;">${customer.fullName}</p>
|
|
262
|
-
<p style="display:${customer.phoneNumber ? "block" : "none"}; margin: 5px 0; line-height: 1;">${PhoneController.formatPhoneNumber(customer.phoneNumber)}</p>
|
|
263
|
-
<p style="display:${address ? "block" : "none"}; font-size: ${customerAddressFontSize + "px"}; margin: 5px 0; line-height: 1;">
|
|
264
|
-
${address !== null ? address[0] : null}
|
|
265
|
-
<br/>
|
|
266
|
-
${address !== null ? address[1] : null}
|
|
267
|
-
</p>
|
|
268
|
-
<p style="display:${customer.email ? "block" : "none"}; margin: 5px 0; line-height: 1;">${customer.email}</p>
|
|
269
|
-
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
<strong style="display:block; font-size: ${(fontSize * 1.2).toFixed(0) + "px"}; margin: 10px 0; line-height: 1;">
|
|
273
|
-
${this.sum(this.filterByCategoryList(this.sortProduct(products, sortProducts), printOnlyCertainCategoriesList, printOnlyCertainCategories, printOnlyCertainProductsList, printOnlyCertainProducts).map((row) => row.quantity))} ITEM
|
|
274
|
-
</strong>
|
|
275
|
-
|
|
276
|
-
<p style="display:${textBeforeProducts ? "block" : "none"}; margin: 5px 0; padding-left : 15px; text-align : ${textBeforeProductsCenter ? "center" : "start"}; line-height: 1;"> ${textBeforeProducts} </p>
|
|
277
|
-
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
<div style="border-top : 1px solid black;">
|
|
281
|
-
|
|
282
|
-
<div style="padding : 4px 1px; display : flex; flex-direction : row; border-bottom : 1px solid black; font-weight : bold;">
|
|
283
|
-
|
|
284
|
-
<div style="width : 40px; min-width : 40px; max-width : 40px;">#</div>
|
|
285
|
-
<div style="flex-wrap : wrap; word-wrap : break-word;">Products</div>
|
|
286
|
-
<div style="flex-grow : 1; text-align: end;">Price</div>
|
|
287
|
-
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
${this.filterByCategoryList(this.sortProduct(products, sortProducts), printOnlyCertainCategoriesList, printOnlyCertainCategories, printOnlyCertainProductsList, printOnlyCertainProducts).map((row) => (`<div style="border-bottom : 1px solid black; padding : 0 1px; display : flex; flex-direction : row; justify-content : flex-end;">
|
|
292
|
-
|
|
293
|
-
<div style="width : 40px; min-width : 40px; max-width : 40px">${row.quantity}X</div>
|
|
294
|
-
|
|
295
|
-
<div style="flex-wrap : wrap; word-wrap : break-word; text-align : left;">
|
|
296
|
-
|
|
297
|
-
${(showCategoryTitle && row.categoryTitle !== "" && row.categoryTitle !== null) ? "[" + row.categoryTitle + "]" : ""} ${showProductKitchenName && row.kitchenReceiptName !== "" ? row.kitchenReceiptName : row.title}
|
|
298
|
-
${row.extrasNames ? row.extrasNames.split(" , ").map(i => `<div>+${i}</div>`).join("") : ""}
|
|
299
|
-
${row.note ? `<div><span style="font-size: x-large;">🗨</span>{note}</div>` : ""}
|
|
300
|
-
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
<div style="flex-grow : 1; text-align : right;">${this.ccyFormat(row.totalAmount, symbol)}</div>
|
|
304
|
-
</div>`)).join("")}
|
|
305
|
-
|
|
306
|
-
<div style="display : ${showPrices ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
307
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Order Amount :</div>
|
|
308
|
-
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.orderAmount, symbol)}</div>
|
|
309
|
-
</div>
|
|
310
|
-
|
|
311
|
-
<div style="display : ${order.orderType === 1 && order.deliveryCost > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
312
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Delivery costs : </div>
|
|
313
|
-
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.deliveryCost, symbol)}</div>
|
|
314
|
-
</div>
|
|
315
|
-
|
|
316
|
-
<div style="display : ${order.discountAmount > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
317
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Discount : </div>
|
|
318
|
-
<div style="min-width : 100px; text-align: end;">${(order.discountAmount > 0 ? "- " : "") + this.ccyFormat(order.discountAmount, symbol)}</div>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<div style="display : flex; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
322
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Subtotal : </div>
|
|
323
|
-
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.subtotalAmount, symbol)}</div>
|
|
324
|
-
</div>
|
|
325
|
-
|
|
326
|
-
<div style="display : ${order.hstAmount > 0 && order.serviceFee < 1 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
327
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">HST(${this.ccyFormat(order.hstPercentage)}%) : </div>
|
|
328
|
-
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.hstAmount, symbol)}</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
<div style="display : ${order.tipAmount > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
332
|
-
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Tip : </div>
|
|
333
|
-
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.tipAmount, symbol)}</div>
|
|
334
|
-
</div>
|
|
335
|
-
|
|
336
|
-
<div style="display : flex; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px solid black;">
|
|
337
|
-
<strong style="min-width : 150px; flex-grow : 1; font-size: larger; text-align: end;">${order.paymentType === 1 ? "Total" : "Total & Still to pay"} : </strong>
|
|
338
|
-
<strong style="min-width : 100px; font-size: larger; text-align: end;">${this.ccyFormat(order.totalAmount, symbol)}</strong>
|
|
339
|
-
</div>
|
|
340
|
-
|
|
341
|
-
</div>
|
|
342
|
-
|
|
343
|
-
<div class="border-top : 1px solid black;">
|
|
344
|
-
<div style="margin : 5px 0; line-height: 1;">
|
|
345
|
-
<strong>Remarks customer:</strong>
|
|
346
|
-
<em style="display : ${!order.remarks ? "initial" : "none"}">There are no remarks</em>
|
|
347
|
-
</div>
|
|
348
|
-
<strong style="display : ${order.remarks ? "block" : "none"};">${order.remarks}</strong>
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
<div style="display : ${order.paymentType === 1 && customerOnlinePaymentAgrementSection ? "block" : "none"}; border-top : 1px solid black; text-align : center;">
|
|
352
|
-
|
|
353
|
-
<p style="margin : 5px 0; line-height: 1;"><strong>CREDIT CARD : </strong>**** **** **** ${order.lastFourDigits}</p>
|
|
354
|
-
|
|
355
|
-
<strong style="margin : 5px 0; line-height: 1;">
|
|
356
|
-
I agree to pay above total amount according to card issuer agreement
|
|
357
|
-
</strong>
|
|
358
|
-
<br/>
|
|
359
|
-
<br/>
|
|
360
|
-
<strong style="margin : 5px 0; line-height: 1;">SIGNATURE</strong>
|
|
361
|
-
</div>
|
|
362
|
-
|
|
363
|
-
<div style="display : ${promotionId ? "block" : "none"}; border-top : 1px solid black; margin : 5px 0; line-height: 1; text-align : ${textEndCenter ? "center" : "start"}">
|
|
364
|
-
${promotionCodeNote}
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
<div style="margin : 0 16px; display : ${(paymentInfo !== null && order.paymentType === 8 && ((_b = paymentInfo === null || paymentInfo === void 0 ? void 0 : paymentInfo.metadata) === null || _b === void 0 ? void 0 : _b.length) > 0) ? "block" : "none"};">
|
|
368
|
-
${paymentInfo === null || paymentInfo === void 0 ? void 0 : paymentInfo.metadata.map((item) => (`<div style="display : flex; flex-direction : row; align-items : center; justify-content : flex-start; margin-bottom : 8px;">
|
|
369
|
-
<strong style="margin : 0 16px 0 0; line-height: 1;"> ${item.text} </strong>
|
|
370
|
-
<strong style="margin : 0 16px 0 0; line-height: 1;" > ${item.value}</strong>
|
|
371
|
-
</div>`))}
|
|
372
|
-
</div>
|
|
373
|
-
|
|
374
|
-
<div style="display : ${qrCodeOrderDetails ? "flex" : "none"}; justify-content: center; align-items: center; border-top : 1px solid black; border-bottom : 1px solid black;">
|
|
375
|
-
<img alt="" style="width: 100px; height: 100px; margin: auto;" src="${order.qrCodeDetailUrl}" />
|
|
376
|
-
</div>
|
|
377
|
-
|
|
378
|
-
<p style="display : ${textEnd ? "block" : "none"}; text-align : ${textEndCenter ? "center" : "start"}; line-height: 1; margin-top: 4px;">${textEnd}</p>
|
|
379
|
-
|
|
380
|
-
<strong style="display: block; font-size : x-small; text-align : center; margin-top: 4px; ">fs-${company.id}-${order.id}-${id}</strong>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
</div>
|
|
211
|
+
return (`
|
|
212
|
+
<div style="font-family: ${font}; font-weight: 500; font-size: ${fontSize + "px"}; min-width: ${this.calculatePaperSize(paper, width)}; width: ${this.calculatePaperSize(paper, width)}; padding : ${marginTop + "mm"} ${marginRight + "mm"} ${marginBottom + "mm"} ${marginLeft + "mm"};">
|
|
213
|
+
<img alt="" style=" display : ${logoAvailable ? "block" : "none"}; margin : ${logoCenter ? "auto" : "0"}; width: 200px; min-height : 50px;" src="${rootUrl}${company.id}/${logoUrl}" />
|
|
214
|
+
<p style=" margin: 5px 0; line-height: 1; display: ${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
215
|
+
${company.title}
|
|
216
|
+
</p>
|
|
217
|
+
<p style="margin:5px 0; display:${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
218
|
+
${company.address}
|
|
219
|
+
</p>
|
|
220
|
+
<p style="margin: 5px 0; line-height: 1; display: ${nameAddressShow ? "block" : "none"}; text-align:${nameAddressCenter ? "center" : "start"};">
|
|
221
|
+
${PhoneController.formatPhoneNumber(company.phone)}
|
|
222
|
+
</p>
|
|
223
|
+
<p style="margin: 5px 0; line-height: 1; display: ${textAfterAddress ? "block" : "none"}; text-align:${textAfterAddressCenter ? "center" : "start"};">
|
|
224
|
+
${textAfterAddress}
|
|
225
|
+
</p>
|
|
226
|
+
|
|
227
|
+
<div style=" display:${order.orderTypeString ? "flex" : "none"}; flex-direction: column; align-items: center; justify-content: center; margin: 8px 0;" >
|
|
228
|
+
|
|
229
|
+
<p style=" font-size: x-large; font-weight: bold; text-align: center;line-height: 0.7; margin: 5px 0;"> #${order.orderNumber} ${order.orderTypeString} </p>
|
|
230
|
+
|
|
231
|
+
<strong style="font-size: x-large; text-align: center;">
|
|
232
|
+
⏱${order.asSoonAsPossible && "ASAP"} ${this.formatDateTime(order.desiredDate, "time")}
|
|
233
|
+
</strong>
|
|
234
|
+
|
|
235
|
+
${order.estimatedTime ? `<strong style="display:block; font-size:x-large; text-align:center;">Est. Time ${this.substring(order.estimatedTime, 0, order.estimatedTime.length - 3)}</strong>` : ""}
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
<div style="display: ${showPrices ? "block" : "none"}; border-top: 1px solid black;">
|
|
240
|
+
<strong style="display : block; margin: 5px 0; line-height: 1;">PAY INFORMATION: </strong>
|
|
241
|
+
<strong style="font-size: large; margin: 0 0 16px 0; line-height: 1.5;">${order.paymentTypeString + (order.paymentType === 2 ? `: ${this.ccyFormat(order.totalAmount, symbol)} ` : " ") + " - " + order.paymentStateString}</strong>
|
|
242
|
+
|
|
243
|
+
<p style="margin: 5px 0; line-height: 1; display: ${order.paymentType === 1 ? "block" : "none"};">Credit Card : <strong>**** **** **** ${order.lastFourDigits}</strong></p>
|
|
244
|
+
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<p style="display:${orderInfo ? "block" : "none"}; margin: 5px 0; line-height: 1;"> Order number : <strong>#${order.orderNumber}</strong> </p>
|
|
248
|
+
<p style="display:${orderInfo ? "block" : "none"}; margin: 5px 0; line-height: 1;">
|
|
249
|
+
${order.orderTypeString}:<span style="font-size: x-large;">⏱</span><strong>on ${this.formatDateTime(order.desiredDate)}</strong>
|
|
250
|
+
</p>
|
|
251
|
+
|
|
252
|
+
${order.estimatedTime ? `<p style="display: block; margin: 5px 0; line-height: 1;">Estimated Time : <strong>${(_a = order.estimatedTime) === null || _a === void 0 ? void 0 : _a.substring(0, order.estimatedTime.length - 3)}</strong></p>` : ""}
|
|
253
|
+
|
|
254
|
+
<p style="display:block; margin: 5px 0; line-height: 1;">Reg. Date:<strong>${this.formatDateTime(order.registrationDate)}</strong> </p>
|
|
255
|
+
|
|
256
|
+
<div style="border-top: 1px solid black;">
|
|
257
|
+
|
|
258
|
+
<div style="display:${showCustomerInfo ? "block" : "none"}">
|
|
259
|
+
|
|
260
|
+
<strong style="display:block; margin: 5px 0; line-height: 1;"> CUSTOMER DATA : </strong>
|
|
261
|
+
<p style="display:${customer.fullName ? "block" : "none"}; margin: 5px 0; line-height: 1;">${customer.fullName}</p>
|
|
262
|
+
<p style="display:${customer.phoneNumber ? "block" : "none"}; margin: 5px 0; line-height: 1;">${PhoneController.formatPhoneNumber(customer.phoneNumber)}</p>
|
|
263
|
+
<p style="display:${address ? "block" : "none"}; font-size: ${customerAddressFontSize + "px"}; margin: 5px 0; line-height: 1;">
|
|
264
|
+
${address !== null ? address[0] : null}
|
|
265
|
+
<br/>
|
|
266
|
+
${address !== null ? address[1] : null}
|
|
267
|
+
</p>
|
|
268
|
+
<p style="display:${customer.email ? "block" : "none"}; margin: 5px 0; line-height: 1;">${customer.email}</p>
|
|
269
|
+
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<strong style="display:block; font-size: ${(fontSize * 1.2).toFixed(0) + "px"}; margin: 10px 0; line-height: 1;">
|
|
273
|
+
${this.sum(this.filterByCategoryList(this.sortProduct(products, sortProducts), printOnlyCertainCategoriesList, printOnlyCertainCategories, printOnlyCertainProductsList, printOnlyCertainProducts).map((row) => row.quantity))} ITEM
|
|
274
|
+
</strong>
|
|
275
|
+
|
|
276
|
+
<p style="display:${textBeforeProducts ? "block" : "none"}; margin: 5px 0; padding-left : 15px; text-align : ${textBeforeProductsCenter ? "center" : "start"}; line-height: 1;"> ${textBeforeProducts} </p>
|
|
277
|
+
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<div style="border-top : 1px solid black;">
|
|
281
|
+
|
|
282
|
+
<div style="padding : 4px 1px; display : flex; flex-direction : row; border-bottom : 1px solid black; font-weight : bold;">
|
|
283
|
+
|
|
284
|
+
<div style="width : 40px; min-width : 40px; max-width : 40px;">#</div>
|
|
285
|
+
<div style="flex-wrap : wrap; word-wrap : break-word;">Products</div>
|
|
286
|
+
<div style="flex-grow : 1; text-align: end;">Price</div>
|
|
287
|
+
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
${this.filterByCategoryList(this.sortProduct(products, sortProducts), printOnlyCertainCategoriesList, printOnlyCertainCategories, printOnlyCertainProductsList, printOnlyCertainProducts).map((row) => (`<div style="border-bottom : 1px solid black; padding : 0 1px; display : flex; flex-direction : row; justify-content : flex-end;">
|
|
292
|
+
|
|
293
|
+
<div style="width : 40px; min-width : 40px; max-width : 40px">${row.quantity}X</div>
|
|
294
|
+
|
|
295
|
+
<div style="flex-wrap : wrap; word-wrap : break-word; text-align : left;">
|
|
296
|
+
|
|
297
|
+
${(showCategoryTitle && row.categoryTitle !== "" && row.categoryTitle !== null) ? "[" + row.categoryTitle + "]" : ""} ${showProductKitchenName && row.kitchenReceiptName !== "" ? row.kitchenReceiptName : row.title}
|
|
298
|
+
${row.extrasNames ? row.extrasNames.split(" , ").map(i => `<div>+${i}</div>`).join("") : ""}
|
|
299
|
+
${row.note ? `<div><span style="font-size: x-large;">🗨</span>{note}</div>` : ""}
|
|
300
|
+
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div style="flex-grow : 1; text-align : right;">${this.ccyFormat(row.totalAmount, symbol)}</div>
|
|
304
|
+
</div>`)).join("")}
|
|
305
|
+
|
|
306
|
+
<div style="display : ${showPrices ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
307
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Order Amount :</div>
|
|
308
|
+
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.orderAmount, symbol)}</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div style="display : ${order.orderType === 1 && order.deliveryCost > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
312
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Delivery costs : </div>
|
|
313
|
+
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.deliveryCost, symbol)}</div>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
<div style="display : ${order.discountAmount > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
317
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Discount : </div>
|
|
318
|
+
<div style="min-width : 100px; text-align: end;">${(order.discountAmount > 0 ? "- " : "") + this.ccyFormat(order.discountAmount, symbol)}</div>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div style="display : flex; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
322
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Subtotal : </div>
|
|
323
|
+
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.subtotalAmount, symbol)}</div>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div style="display : ${order.hstAmount > 0 && order.serviceFee < 1 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
327
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">HST(${this.ccyFormat(order.hstPercentage)}%) : </div>
|
|
328
|
+
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.hstAmount, symbol)}</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div style="display : ${order.tipAmount > 0 ? "flex" : "none"}; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px dotted black;">
|
|
332
|
+
<div style="min-width : 150px; flex-grow : 1; text-align: end;">Tip : </div>
|
|
333
|
+
<div style="min-width : 100px; text-align: end;">${this.ccyFormat(order.tipAmount, symbol)}</div>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<div style="display : flex; padding : 1px; flex-direction : row; justify-content : flex-end; border-bottom: 1px solid black;">
|
|
337
|
+
<strong style="min-width : 150px; flex-grow : 1; font-size: larger; text-align: end;">${order.paymentType === 1 ? "Total" : "Total & Still to pay"} : </strong>
|
|
338
|
+
<strong style="min-width : 100px; font-size: larger; text-align: end;">${this.ccyFormat(order.totalAmount, symbol)}</strong>
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
<div class="border-top : 1px solid black;">
|
|
344
|
+
<div style="margin : 5px 0; line-height: 1;">
|
|
345
|
+
<strong>Remarks customer:</strong>
|
|
346
|
+
<em style="display : ${!order.remarks ? "initial" : "none"}">There are no remarks</em>
|
|
347
|
+
</div>
|
|
348
|
+
<strong style="display : ${order.remarks ? "block" : "none"};">${order.remarks}</strong>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
<div style="display : ${order.paymentType === 1 && customerOnlinePaymentAgrementSection ? "block" : "none"}; border-top : 1px solid black; text-align : center;">
|
|
352
|
+
|
|
353
|
+
<p style="margin : 5px 0; line-height: 1;"><strong>CREDIT CARD : </strong>**** **** **** ${order.lastFourDigits}</p>
|
|
354
|
+
|
|
355
|
+
<strong style="margin : 5px 0; line-height: 1;">
|
|
356
|
+
I agree to pay above total amount according to card issuer agreement
|
|
357
|
+
</strong>
|
|
358
|
+
<br/>
|
|
359
|
+
<br/>
|
|
360
|
+
<strong style="margin : 5px 0; line-height: 1;">SIGNATURE</strong>
|
|
361
|
+
</div>
|
|
362
|
+
|
|
363
|
+
<div style="display : ${promotionId ? "block" : "none"}; border-top : 1px solid black; margin : 5px 0; line-height: 1; text-align : ${textEndCenter ? "center" : "start"}">
|
|
364
|
+
${promotionCodeNote}
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div style="margin : 0 16px; display : ${(paymentInfo !== null && order.paymentType === 8 && ((_b = paymentInfo === null || paymentInfo === void 0 ? void 0 : paymentInfo.metadata) === null || _b === void 0 ? void 0 : _b.length) > 0) ? "block" : "none"};">
|
|
368
|
+
${paymentInfo === null || paymentInfo === void 0 ? void 0 : paymentInfo.metadata.map((item) => (`<div style="display : flex; flex-direction : row; align-items : center; justify-content : flex-start; margin-bottom : 8px;">
|
|
369
|
+
<strong style="margin : 0 16px 0 0; line-height: 1;"> ${item.text} </strong>
|
|
370
|
+
<strong style="margin : 0 16px 0 0; line-height: 1;" > ${item.value}</strong>
|
|
371
|
+
</div>`))}
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
<div style="display : ${qrCodeOrderDetails ? "flex" : "none"}; justify-content: center; align-items: center; border-top : 1px solid black; border-bottom : 1px solid black;">
|
|
375
|
+
<img alt="" style="width: 100px; height: 100px; margin: auto;" src="${order.qrCodeDetailUrl}" />
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<p style="display : ${textEnd ? "block" : "none"}; text-align : ${textEndCenter ? "center" : "start"}; line-height: 1; margin-top: 4px;">${textEnd}</p>
|
|
379
|
+
|
|
380
|
+
<strong style="display: block; font-size : x-small; text-align : center; margin-top: 4px; ">fs-${company.id}-${order.id}-${id}</strong>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
</div>
|
|
384
384
|
`);
|
|
385
385
|
}
|
|
386
386
|
labelLayout(detail, template) {
|
|
387
387
|
const { products, customer, order } = detail;
|
|
388
388
|
const { orderSummary } = template;
|
|
389
389
|
const { font, fontSize, marginBottom, marginLeft, marginRight, marginTop, showCategoryTitle, showProductKitchenName, width, paper } = template;
|
|
390
|
-
return (`
|
|
391
|
-
<div style="font-family : ${font};font-weight : normal;">
|
|
392
|
-
${products.map((row) => (`<div>
|
|
393
|
-
<div
|
|
394
|
-
style="
|
|
395
|
-
display: block;
|
|
396
|
-
min-width: ${this.calculatePaperSize(paper, width)};
|
|
397
|
-
width: ${this.calculatePaperSize(paper, width)};
|
|
398
|
-
padding : ${marginTop + "mm"} ${marginRight + "mm"} ${marginBottom + "mm"} ${marginLeft + "mm"};">
|
|
399
|
-
|
|
390
|
+
return (`
|
|
391
|
+
<div style="font-family : ${font};font-weight : normal;">
|
|
392
|
+
${products.map((row) => (`<div>
|
|
393
|
+
<div
|
|
394
|
+
style="
|
|
395
|
+
display: block;
|
|
396
|
+
min-width: ${this.calculatePaperSize(paper, width)};
|
|
397
|
+
width: ${this.calculatePaperSize(paper, width)};
|
|
398
|
+
padding : ${marginTop + "mm"} ${marginRight + "mm"} ${marginBottom + "mm"} ${marginLeft + "mm"};">
|
|
399
|
+
|
|
400
400
|
${orderSummary ?
|
|
401
|
-
`<p style="font-size:${fontSize - 2};">
|
|
402
|
-
#${order.orderNumber} -
|
|
403
|
-
${order.orderTypeString}
|
|
404
|
-
</p>` : ""}
|
|
405
|
-
|
|
401
|
+
`<p style="font-size:${fontSize - 2};">
|
|
402
|
+
#${order.orderNumber} -
|
|
403
|
+
${order.orderTypeString}
|
|
404
|
+
</p>` : ""}
|
|
405
|
+
|
|
406
406
|
${orderSummary ?
|
|
407
|
-
`<p style="font-size:${fontSize - 4};">
|
|
408
|
-
${this.weekDayName(order.desiredDate)},
|
|
409
|
-
${this.formatDate(order.desiredDate)}
|
|
410
|
-
|
|
411
|
-
${this.formatAMPMDate(order.desiredDate)}
|
|
412
|
-
</p>` : ""}
|
|
413
|
-
|
|
414
|
-
<p style="font-size:${fontSize - 2}; border-bottom : ${orderSummary ? "2px" : "0px"} dotted black; padding-bottom : 5px margin-bottom : 5px;">
|
|
415
|
-
${customer.fullName}
|
|
416
|
-
</p>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
<p style="margin-bottom: 5px; padding-bottom: 5px; border-bottom: 2px solid black;">
|
|
420
|
-
${row.quantity}X
|
|
421
|
-
${showCategoryTitle && row.categoryTitle ? "[" + row.categoryTitle.toUpperCase() + "]" : ""}
|
|
422
|
-
${showProductKitchenName && row.kitchenReceiptName !== "" ? row.kitchenReceiptName : row.title}
|
|
423
|
-
${row.extrasNames !== "" && `<div>${row.extrasNames}</div>`}
|
|
424
|
-
</p>
|
|
425
|
-
|
|
426
|
-
|
|
407
|
+
`<p style="font-size:${fontSize - 4};">
|
|
408
|
+
${this.weekDayName(order.desiredDate)},
|
|
409
|
+
${this.formatDate(order.desiredDate)}
|
|
410
|
+
|
|
411
|
+
${this.formatAMPMDate(order.desiredDate)}
|
|
412
|
+
</p>` : ""}
|
|
413
|
+
|
|
414
|
+
<p style="font-size:${fontSize - 2}; border-bottom : ${orderSummary ? "2px" : "0px"} dotted black; padding-bottom : 5px margin-bottom : 5px;">
|
|
415
|
+
${customer.fullName}
|
|
416
|
+
</p>
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<p style="margin-bottom: 5px; padding-bottom: 5px; border-bottom: 2px solid black;">
|
|
420
|
+
${row.quantity}X
|
|
421
|
+
${showCategoryTitle && row.categoryTitle ? "[" + row.categoryTitle.toUpperCase() + "]" : ""}
|
|
422
|
+
${showProductKitchenName && row.kitchenReceiptName !== "" ? row.kitchenReceiptName : row.title}
|
|
423
|
+
${row.extrasNames !== "" && `<div>${row.extrasNames}</div>`}
|
|
424
|
+
</p>
|
|
425
|
+
|
|
426
|
+
|
|
427
427
|
${row.note !== "" ?
|
|
428
|
-
`<p style="margin-bottom: 5px; padding-bottom: 5px; border-bottom: 2px solid black;">
|
|
429
|
-
${row.note}
|
|
430
|
-
</p>` : ""}
|
|
431
|
-
|
|
432
|
-
</div>
|
|
433
|
-
|
|
434
|
-
<div style="clear: both; page-break-after: always;" ></div>
|
|
435
|
-
</div>
|
|
436
|
-
`)).join("")}
|
|
437
|
-
</div>
|
|
438
|
-
|
|
428
|
+
`<p style="margin-bottom: 5px; padding-bottom: 5px; border-bottom: 2px solid black;">
|
|
429
|
+
${row.note}
|
|
430
|
+
</p>` : ""}
|
|
431
|
+
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
<div style="clear: both; page-break-after: always;" ></div>
|
|
435
|
+
</div>
|
|
436
|
+
`)).join("")}
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
439
|
`);
|
|
440
440
|
}
|
|
441
441
|
paymentFailed(detail, currency) {
|
|
442
442
|
var _a, _b, _c;
|
|
443
|
-
return `<div style="padding-top: 16px; padding-bottom: 16px;">
|
|
444
|
-
<div style="display: flex; flex-direction: row; align-items: center; justify-content: center;">
|
|
445
|
-
<img alt="" src="https://beta.meemup.com/api/shop/logo/${detail.company.id}"
|
|
446
|
-
style="width: 100px; min-width: 100px; max-width: 100px; aspect-ratio: auto;">
|
|
447
|
-
</div>
|
|
448
|
-
<div
|
|
449
|
-
style="display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-left: 10%; margin-right: 10%; margin-top: 16px; padding-left: 16px; padding-right: 16px;">
|
|
450
|
-
<strong style="font-size: 18px;">AMOUNT</strong>
|
|
451
|
-
<strong style="font-size: 18px;">${currency} ${detail.order.totalAmount}</strong>
|
|
452
|
-
</div>
|
|
453
|
-
<div
|
|
454
|
-
style="display: flex; flex-direction: row; align-items: center; justify-content: center; border-bottom: 2px solid black; margin-left: 10%; margin-right: 10%; padding: 16px;">
|
|
455
|
-
<strong style="font-size: 18px; padding-right: 16px;"></strong>
|
|
456
|
-
<strong style="font-size: 18px;">#0</strong>
|
|
457
|
-
</div>
|
|
458
|
-
<div
|
|
459
|
-
style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 16px 10%; border-bottom: 2px solid black;">
|
|
460
|
-
<strong style="font-size: 18px;">${(_a = detail.paymentInfo) === null || _a === void 0 ? void 0 : _a.state}</strong>
|
|
461
|
-
<p style="font-size: 12px; font-weight: bold; margin-top: 8px; padding-bottom: 16px;">${(_b = detail.paymentInfo) === null || _b === void 0 ? void 0 : _b.message}</p>
|
|
462
|
-
</div>
|
|
463
|
-
<div style="margin-left: 16px; margin-right: 16px;">
|
|
464
|
-
${(_c = detail.paymentInfo) === null || _c === void 0 ? void 0 : _c.metadata.map(i => (`<div style="display: flex; flex-direction: row; align-items: center; justify-content: flex-start; margin-bottom: 8px;">
|
|
465
|
-
<strong style="font-size: 12px; margin-right: 16px;">${i.text}</strong>
|
|
466
|
-
<strong style="font-size: 12px;">${i.value}</strong>
|
|
467
|
-
</div>`))}
|
|
468
|
-
|
|
469
|
-
</div>
|
|
443
|
+
return `<div style="padding-top: 16px; padding-bottom: 16px;">
|
|
444
|
+
<div style="display: flex; flex-direction: row; align-items: center; justify-content: center;">
|
|
445
|
+
<img alt="" src="https://beta.meemup.com/api/shop/logo/${detail.company.id}"
|
|
446
|
+
style="width: 100px; min-width: 100px; max-width: 100px; aspect-ratio: auto;">
|
|
447
|
+
</div>
|
|
448
|
+
<div
|
|
449
|
+
style="display: flex; flex-direction: row; align-items: center; justify-content: space-between; margin-left: 10%; margin-right: 10%; margin-top: 16px; padding-left: 16px; padding-right: 16px;">
|
|
450
|
+
<strong style="font-size: 18px;">AMOUNT</strong>
|
|
451
|
+
<strong style="font-size: 18px;">${currency} ${detail.order.totalAmount}</strong>
|
|
452
|
+
</div>
|
|
453
|
+
<div
|
|
454
|
+
style="display: flex; flex-direction: row; align-items: center; justify-content: center; border-bottom: 2px solid black; margin-left: 10%; margin-right: 10%; padding: 16px;">
|
|
455
|
+
<strong style="font-size: 18px; padding-right: 16px;"></strong>
|
|
456
|
+
<strong style="font-size: 18px;">#0</strong>
|
|
457
|
+
</div>
|
|
458
|
+
<div
|
|
459
|
+
style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 16px 10%; border-bottom: 2px solid black;">
|
|
460
|
+
<strong style="font-size: 18px;">${(_a = detail.paymentInfo) === null || _a === void 0 ? void 0 : _a.state}</strong>
|
|
461
|
+
<p style="font-size: 12px; font-weight: bold; margin-top: 8px; padding-bottom: 16px;">${(_b = detail.paymentInfo) === null || _b === void 0 ? void 0 : _b.message}</p>
|
|
462
|
+
</div>
|
|
463
|
+
<div style="margin-left: 16px; margin-right: 16px;">
|
|
464
|
+
${(_c = detail.paymentInfo) === null || _c === void 0 ? void 0 : _c.metadata.map(i => (`<div style="display: flex; flex-direction: row; align-items: center; justify-content: flex-start; margin-bottom: 8px;">
|
|
465
|
+
<strong style="font-size: 12px; margin-right: 16px;">${i.text}</strong>
|
|
466
|
+
<strong style="font-size: 12px;">${i.value}</strong>
|
|
467
|
+
</div>`))}
|
|
468
|
+
|
|
469
|
+
</div>
|
|
470
470
|
</div>`;
|
|
471
471
|
}
|
|
472
472
|
packageLabel(detail) {
|
|
473
|
-
return `<div style="padding: 16px;">
|
|
474
|
-
<div
|
|
475
|
-
style="display: flex; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 2px solid black;">
|
|
476
|
-
<strong style="font-size: 22px;">${detail.order.orderTypeString}</strong>
|
|
477
|
-
<strong style="font-size: 22px;">${detail.order.orderNumber}</strong>
|
|
478
|
-
</div>
|
|
479
|
-
<div style="border-bottom: 2px solid black; padding-top: 8px; padding-bottom: 8px;">
|
|
480
|
-
${detail.products.map((i) => (`<strong style="font-size: 16px; padding-top: 2px; padding-bottom: 2px;">${i.quantity}X ${i.title}</strong>`))}
|
|
481
|
-
</div>
|
|
482
|
-
<div
|
|
483
|
-
style="margin-top: 16px; margin-bottom: 16px; padding-bottom: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 2px solid black;">
|
|
484
|
-
<strong style="font-size: 22px;">${detail.order.orderTypeString}</strong>
|
|
485
|
-
<strong style="font-size: 42px;">${detail.order.orderNumber}</strong>
|
|
486
|
-
<strong style="font-size: 16px;">${detail.customer.fullName}</strong>
|
|
487
|
-
</div>
|
|
488
|
-
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 16px; margin-left: 10%; margin-right: 10%;">
|
|
489
|
-
<strong style="font-size: 16px;">${detail.order.desiredDate}</strong>
|
|
490
|
-
<div style="display: flex; flex-direction: row; align-items: center; justify-content: center; margin-top: 16px;">
|
|
491
|
-
<img alt="" src="https://beta.meemup.com/api/ordering/${detail.order.id}/${detail.company.id}/QR"
|
|
492
|
-
style="width: 100px; min-width: 100px; max-width: 100px; aspect-ratio: auto;">
|
|
493
|
-
</div>
|
|
494
|
-
</div>
|
|
473
|
+
return `<div style="padding: 16px;">
|
|
474
|
+
<div
|
|
475
|
+
style="display: flex; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 2px solid black;">
|
|
476
|
+
<strong style="font-size: 22px;">${detail.order.orderTypeString}</strong>
|
|
477
|
+
<strong style="font-size: 22px;">${detail.order.orderNumber}</strong>
|
|
478
|
+
</div>
|
|
479
|
+
<div style="border-bottom: 2px solid black; padding-top: 8px; padding-bottom: 8px;">
|
|
480
|
+
${detail.products.map((i) => (`<strong style="font-size: 16px; padding-top: 2px; padding-bottom: 2px;">${i.quantity}X ${i.title}</strong>`))}
|
|
481
|
+
</div>
|
|
482
|
+
<div
|
|
483
|
+
style="margin-top: 16px; margin-bottom: 16px; padding-bottom: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 2px solid black;">
|
|
484
|
+
<strong style="font-size: 22px;">${detail.order.orderTypeString}</strong>
|
|
485
|
+
<strong style="font-size: 42px;">${detail.order.orderNumber}</strong>
|
|
486
|
+
<strong style="font-size: 16px;">${detail.customer.fullName}</strong>
|
|
487
|
+
</div>
|
|
488
|
+
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 16px; margin-left: 10%; margin-right: 10%;">
|
|
489
|
+
<strong style="font-size: 16px;">${detail.order.desiredDate}</strong>
|
|
490
|
+
<div style="display: flex; flex-direction: row; align-items: center; justify-content: center; margin-top: 16px;">
|
|
491
|
+
<img alt="" src="https://beta.meemup.com/api/ordering/${detail.order.id}/${detail.company.id}/QR"
|
|
492
|
+
style="width: 100px; min-width: 100px; max-width: 100px; aspect-ratio: auto;">
|
|
493
|
+
</div>
|
|
494
|
+
</div>
|
|
495
495
|
</div>`;
|
|
496
496
|
}
|
|
497
497
|
preview(account, detail, template, symbol = "$") {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare enum EnumPointOfSaleTask {
|
|
2
|
+
None = 0,
|
|
3
|
+
RefreshToken = 1,
|
|
4
|
+
LoadSoftwareData = 2,
|
|
5
|
+
LoadOrders = 3,
|
|
6
|
+
LoadCancelRequests = 4,
|
|
7
|
+
LoadMembers = 5,
|
|
8
|
+
FetchOrderDetail = 6,
|
|
9
|
+
FetchOrderSummary = 7,
|
|
10
|
+
DownloadImage = 8,
|
|
11
|
+
SaveOrder = 9,
|
|
12
|
+
PayOnTerminal = 10
|
|
13
|
+
}
|
|
14
|
+
export default EnumPointOfSaleTask;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var EnumPointOfSaleTask;
|
|
2
|
+
(function (EnumPointOfSaleTask) {
|
|
3
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["None"] = 0] = "None";
|
|
4
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["RefreshToken"] = 1] = "RefreshToken";
|
|
5
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["LoadSoftwareData"] = 2] = "LoadSoftwareData";
|
|
6
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["LoadOrders"] = 3] = "LoadOrders";
|
|
7
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["LoadCancelRequests"] = 4] = "LoadCancelRequests";
|
|
8
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["LoadMembers"] = 5] = "LoadMembers";
|
|
9
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["FetchOrderDetail"] = 6] = "FetchOrderDetail";
|
|
10
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["FetchOrderSummary"] = 7] = "FetchOrderSummary";
|
|
11
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["DownloadImage"] = 8] = "DownloadImage";
|
|
12
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["SaveOrder"] = 9] = "SaveOrder";
|
|
13
|
+
EnumPointOfSaleTask[EnumPointOfSaleTask["PayOnTerminal"] = 10] = "PayOnTerminal";
|
|
14
|
+
})(EnumPointOfSaleTask || (EnumPointOfSaleTask = {}));
|
|
15
|
+
export default EnumPointOfSaleTask;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var EnumPointOfSaleTaskPariority;
|
|
2
|
+
(function (EnumPointOfSaleTaskPariority) {
|
|
3
|
+
EnumPointOfSaleTaskPariority[EnumPointOfSaleTaskPariority["lowest"] = 0] = "lowest";
|
|
4
|
+
EnumPointOfSaleTaskPariority[EnumPointOfSaleTaskPariority["low"] = 1] = "low";
|
|
5
|
+
EnumPointOfSaleTaskPariority[EnumPointOfSaleTaskPariority["normal"] = 2] = "normal";
|
|
6
|
+
EnumPointOfSaleTaskPariority[EnumPointOfSaleTaskPariority["high"] = 3] = "high";
|
|
7
|
+
EnumPointOfSaleTaskPariority[EnumPointOfSaleTaskPariority["highest"] = 4] = "highest";
|
|
8
|
+
})(EnumPointOfSaleTaskPariority || (EnumPointOfSaleTaskPariority = {}));
|
|
9
|
+
export default EnumPointOfSaleTaskPariority;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var EnumPointOfSaleTaskSource;
|
|
2
|
+
(function (EnumPointOfSaleTaskSource) {
|
|
3
|
+
EnumPointOfSaleTaskSource[EnumPointOfSaleTaskSource["software"] = 0] = "software";
|
|
4
|
+
EnumPointOfSaleTaskSource[EnumPointOfSaleTaskSource["signal"] = 1] = "signal";
|
|
5
|
+
EnumPointOfSaleTaskSource[EnumPointOfSaleTaskSource["server"] = 2] = "server";
|
|
6
|
+
// user,
|
|
7
|
+
// unknown
|
|
8
|
+
})(EnumPointOfSaleTaskSource || (EnumPointOfSaleTaskSource = {}));
|
|
9
|
+
export default EnumPointOfSaleTaskSource;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import EnumPointOfSaleTask from "../../enums/EnumPointOfSaleTask";
|
|
2
|
+
import EnumPointOfSaleTaskPariority from "../../enums/EnumPointOfSaleTaskPariority";
|
|
3
|
+
import EnumPointOfSaleTaskSource from "../../enums/EnumPointOfSaleTaskSource";
|
|
4
|
+
export default interface IPointOfSaleTask {
|
|
5
|
+
type: EnumPointOfSaleTask;
|
|
6
|
+
pariority: EnumPointOfSaleTaskPariority;
|
|
7
|
+
source: EnumPointOfSaleTaskSource;
|
|
8
|
+
data: any;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "meemup-library",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "yarn remove:one && yarn remove:two && yarn build:esm && yarn build:cjs",
|
|
9
|
-
"build:esm": "tsc",
|
|
10
|
-
"build:cjs": "tsc --module commonjs --outDir src/dist",
|
|
11
|
-
"remove:one": "rimraf dist",
|
|
12
|
-
"remove:two": "rimraf ./src/dist",
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.2.
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"/dist"
|
|
18
|
-
],
|
|
19
|
-
"keywords": [],
|
|
20
|
-
"author": "",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"rimraf": "^5.0.5",
|
|
24
|
-
"typescript": "^5.2.2"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"axios": "^1.7.2"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "meemup-library",
|
|
3
|
+
"version": "1.2.5",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "yarn remove:one && yarn remove:two && yarn build:esm && yarn build:cjs",
|
|
9
|
+
"build:esm": "tsc",
|
|
10
|
+
"build:cjs": "tsc --module commonjs --outDir src/dist",
|
|
11
|
+
"remove:one": "rimraf dist",
|
|
12
|
+
"remove:two": "rimraf ./src/dist",
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.2.5\" && git push origin "
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"/dist"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"rimraf": "^5.0.5",
|
|
24
|
+
"typescript": "^5.2.2"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"axios": "^1.7.2"
|
|
28
|
+
}
|
|
29
|
+
}
|