@feedmepos/mf-transaction 0.0.73 → 0.0.75

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.
@@ -1,7 +1,7 @@
1
- import { i18nMessages as s } from "@feedmepos/mf-kitchen";
2
- import { ref as p, watch as c, nextTick as d, onMounted as m, onBeforeUnmount as h, defineComponent as f, computed as y, createElementBlock as v, openBlock as u, normalizeStyle as g, renderSlot as P, resolveComponent as b, createBlock as x, withCtx as D, createElementVNode as w, createVNode as F, defineAsyncComponent as I } from "vue";
1
+ import { i18nMessages as a } from "@feedmepos/mf-kitchen";
2
+ import { ref as p, watch as c, nextTick as d, onMounted as m, onBeforeUnmount as h, defineComponent as f, computed as v, createElementBlock as y, openBlock as u, normalizeStyle as g, renderSlot as P, resolveComponent as b, createBlock as I, withCtx as x, createElementVNode as D, createVNode as w, defineAsyncComponent as F } from "vue";
3
3
  import { useBreakpoints as R } from "@feedmepos/ui-library";
4
- function k(e, a) {
4
+ function k(e, s) {
5
5
  const o = p({ top: 0, bottom: 0, left: 0, right: 0 });
6
6
  function t() {
7
7
  if (e.value) {
@@ -14,7 +14,7 @@ function k(e, a) {
14
14
  };
15
15
  }
16
16
  }
17
- return c(a, async () => {
17
+ return c(s, async () => {
18
18
  await d(), t();
19
19
  }), c(e, async (r) => {
20
20
  r && (await d(), t());
@@ -27,14 +27,14 @@ function k(e, a) {
27
27
  const S = /* @__PURE__ */ f({
28
28
  __name: "FullWrapper",
29
29
  setup(e) {
30
- const a = R(), o = p(null), t = k(o), r = y(() => {
30
+ const s = R(), o = p(null), t = k(o), r = v(() => {
31
31
  var l;
32
- const n = a.isAtMost("sm") ? 56 : 0;
32
+ const n = s.isAtMost("sm") ? 56 : 0;
33
33
  return {
34
34
  height: `calc(100dvh - ${((l = t.value) == null ? void 0 : l.top) + 24 + n}px)`
35
35
  };
36
36
  });
37
- return (i, n) => (u(), v("div", {
37
+ return (i, n) => (u(), y("div", {
38
38
  ref_key: "wrapper",
39
39
  ref: o,
40
40
  style: g(r.value)
@@ -42,25 +42,25 @@ const S = /* @__PURE__ */ f({
42
42
  P(i.$slots, "default")
43
43
  ], 4));
44
44
  }
45
- }), M = { class: "flex justify-center items-center h-full w-full" }, N = /* @__PURE__ */ f({
45
+ }), N = { class: "flex justify-center items-center h-full w-full" }, _ = /* @__PURE__ */ f({
46
46
  __name: "PageLoading",
47
47
  setup(e) {
48
- return (a, o) => {
48
+ return (s, o) => {
49
49
  const t = b("FmCircularProgress");
50
- return u(), x(S, null, {
51
- default: D(() => [
52
- w("div", M, [
53
- F(t, { size: "xl" })
50
+ return u(), I(S, null, {
51
+ default: x(() => [
52
+ D("div", N, [
53
+ w(t, { size: "xl" })
54
54
  ])
55
55
  ]),
56
56
  _: 1
57
57
  });
58
58
  };
59
59
  }
60
- }), _ = (e) => I({
60
+ }), E = (e) => F({
61
61
  loader: e,
62
- loadingComponent: N
63
- }), E = {
62
+ loadingComponent: _
63
+ }), M = {
64
64
  title: "Transaction",
65
65
  receipt: {
66
66
  title: "Receipt",
@@ -83,11 +83,12 @@ const S = /* @__PURE__ */ f({
83
83
  columns: {
84
84
  receipt: "Receipt",
85
85
  table: "Table",
86
- paymentMethod: "Payment method",
87
86
  createdAt: "Created at",
88
87
  completed: "Completed",
89
88
  status: "Status",
90
- total: "Total"
89
+ total: "Total",
90
+ billId: "Bill ID",
91
+ payments: "Payments"
91
92
  },
92
93
  search: {
93
94
  placeholder: "Search receipts"
@@ -121,7 +122,12 @@ const S = /* @__PURE__ */ f({
121
122
  date: "Date",
122
123
  cashier: "Cashier",
123
124
  tablePax: "Table pax",
124
- total: "Total"
125
+ total: "Total",
126
+ payments: "Payments",
127
+ totalPaid: "Total paid",
128
+ tenders: "{count} tenders",
129
+ received: "Received {amount}",
130
+ changeGiven: "Change given"
125
131
  },
126
132
  preview: {
127
133
  fullSizePreview: "Full size preview"
@@ -142,7 +148,7 @@ const S = /* @__PURE__ */ f({
142
148
  }
143
149
  }
144
150
  }, z = {
145
- transaction: E
151
+ transaction: M
146
152
  }, C = {
147
153
  title: "取引",
148
154
  receipt: {
@@ -166,11 +172,12 @@ const S = /* @__PURE__ */ f({
166
172
  columns: {
167
173
  receipt: "レシート",
168
174
  table: "テーブル",
169
- paymentMethod: "支払い方法",
170
175
  createdAt: "作成日時",
171
176
  completed: "完了",
172
177
  status: "ステータス",
173
- total: "合計"
178
+ total: "合計",
179
+ billId: "伝票ID",
180
+ payments: "支払い"
174
181
  },
175
182
  search: {
176
183
  placeholder: "レシートを検索"
@@ -204,7 +211,12 @@ const S = /* @__PURE__ */ f({
204
211
  date: "日付",
205
212
  cashier: "レジ担当者",
206
213
  tablePax: "テーブル人数",
207
- total: "合計"
214
+ total: "合計",
215
+ payments: "支払い",
216
+ totalPaid: "支払い合計",
217
+ tenders: "{count}件の支払い",
218
+ received: "預かり {amount}",
219
+ changeGiven: "お釣り"
208
220
  },
209
221
  preview: {
210
222
  fullSizePreview: "フルサイズプレビュー"
@@ -249,11 +261,12 @@ const S = /* @__PURE__ */ f({
249
261
  columns: {
250
262
  receipt: "ใบเสร็จ",
251
263
  table: "ตาราง",
252
- paymentMethod: "วิธีการชำระเงิน",
253
264
  createdAt: "สร้างเมื่อ",
254
265
  completed: "เสร็จสมบูรณ์",
255
266
  status: "สถานะ",
256
- total: "รวม"
267
+ total: "รวม",
268
+ billId: "รหัสบิล",
269
+ payments: "การชำระเงิน"
257
270
  },
258
271
  search: {
259
272
  placeholder: "ค้นหาใบเสร็จ"
@@ -287,7 +300,12 @@ const S = /* @__PURE__ */ f({
287
300
  date: "วันที่",
288
301
  cashier: "แคชเชียร์",
289
302
  tablePax: "จำนวนลูกค้าที่โต๊ะ",
290
- total: "รวม"
303
+ total: "รวม",
304
+ payments: "การชำระเงิน",
305
+ totalPaid: "ยอดชำระรวม",
306
+ tenders: "{count} รายการชำระ",
307
+ received: "รับมา {amount}",
308
+ changeGiven: "เงินทอน"
291
309
  },
292
310
  preview: {
293
311
  fullSizePreview: "ตรวจสอบขนาดเต็ม"
@@ -309,7 +327,7 @@ const S = /* @__PURE__ */ f({
309
327
  }
310
328
  }, A = {
311
329
  transaction: W
312
- }, $ = {
330
+ }, B = {
313
331
  title: "交易",
314
332
  receipt: {
315
333
  title: "收据",
@@ -332,11 +350,12 @@ const S = /* @__PURE__ */ f({
332
350
  columns: {
333
351
  receipt: "收据",
334
352
  table: "桌号",
335
- paymentMethod: "支付方式",
336
353
  createdAt: "创建时间",
337
354
  completed: "完成",
338
355
  status: "状态",
339
- total: "总计"
356
+ total: "总计",
357
+ billId: "账单 ID",
358
+ payments: "付款"
340
359
  },
341
360
  search: {
342
361
  placeholder: "搜索收据"
@@ -370,7 +389,12 @@ const S = /* @__PURE__ */ f({
370
389
  date: "日期",
371
390
  cashier: "收银员",
372
391
  tablePax: "人数",
373
- total: "总计"
392
+ total: "总计",
393
+ payments: "付款",
394
+ totalPaid: "已付总额",
395
+ tenders: "{count} 笔付款",
396
+ received: "收取 {amount}",
397
+ changeGiven: "找零"
374
398
  },
375
399
  preview: {
376
400
  fullSizePreview: "全屏预览"
@@ -390,8 +414,8 @@ const S = /* @__PURE__ */ f({
390
414
  lastMonth: "上月"
391
415
  }
392
416
  }
393
- }, B = {
394
- transaction: $
417
+ }, $ = {
418
+ transaction: B
395
419
  }, L = {
396
420
  title: "交易",
397
421
  receipt: {
@@ -415,11 +439,12 @@ const S = /* @__PURE__ */ f({
415
439
  columns: {
416
440
  receipt: "收據",
417
441
  table: "桌號",
418
- paymentMethod: "支付方式",
419
442
  createdAt: "創建時間",
420
443
  completed: "完成",
421
444
  status: "狀態",
422
- total: "總計"
445
+ total: "總計",
446
+ billId: "帳單 ID",
447
+ payments: "付款"
423
448
  },
424
449
  search: {
425
450
  placeholder: "搜索收據"
@@ -453,7 +478,12 @@ const S = /* @__PURE__ */ f({
453
478
  date: "日期",
454
479
  cashier: "收銀員",
455
480
  tablePax: "人數",
456
- total: "總計"
481
+ total: "總計",
482
+ payments: "付款",
483
+ totalPaid: "已付總額",
484
+ tenders: "{count} 筆付款",
485
+ received: "收取 {amount}",
486
+ changeGiven: "找零"
457
487
  },
458
488
  preview: {
459
489
  fullSizePreview: "全屏預覽"
@@ -475,30 +505,30 @@ const S = /* @__PURE__ */ f({
475
505
  }
476
506
  }, O = {
477
507
  transaction: L
478
- }, U = {
508
+ }, j = {
479
509
  "en-US": {
480
510
  ...z,
481
- ...s["en-US"]
511
+ ...a["en-US"]
482
512
  },
483
513
  "zh-CN": {
484
- ...B,
485
- ...s["zh-CN"]
514
+ ...$,
515
+ ...a["zh-CN"]
486
516
  },
487
517
  "th-TH": {
488
518
  ...A,
489
- ...s["th-TH"]
519
+ ...a["th-TH"]
490
520
  },
491
521
  "zh-Hant": {
492
522
  ...O,
493
- ...s["zh-Hant"] || {}
523
+ ...a["zh-Hant"] || {}
494
524
  },
495
525
  "ja-JP": {
496
526
  ...T,
497
- ...s["ja-JP"] || {}
527
+ ...a["ja-JP"] || {}
498
528
  }
499
- }, J = _(() => import("./App-CBnuRUbn.js").then((e) => e.A));
529
+ }, U = E(() => import("./App-CPNrhFbn.js").then((e) => e.A));
500
530
  export {
501
- J as F,
531
+ U as F,
502
532
  S as _,
503
- U as i
533
+ j as i
504
534
  };
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "@feedmepos/mf-kitchen";
2
- import { F as e, i } from "./app-D59lg-Tb.js";
2
+ import { F as e, i } from "./app-GLMGBM9A.js";
3
3
  export {
4
4
  e as FmApp,
5
5
  i as i18nMessages
@@ -237,11 +237,12 @@ export declare const i18nMessages: {
237
237
  columns: {
238
238
  receipt: string;
239
239
  table: string;
240
- paymentMethod: string;
241
240
  createdAt: string;
242
241
  completed: string;
243
242
  status: string;
244
243
  total: string;
244
+ billId: string;
245
+ payments: string;
245
246
  };
246
247
  search: {
247
248
  placeholder: string;
@@ -276,6 +277,11 @@ export declare const i18nMessages: {
276
277
  cashier: string;
277
278
  tablePax: string;
278
279
  total: string;
280
+ payments: string;
281
+ totalPaid: string;
282
+ tenders: string;
283
+ received: string;
284
+ changeGiven: string;
279
285
  };
280
286
  preview: {
281
287
  fullSizePreview: string;
@@ -534,11 +540,12 @@ export declare const i18nMessages: {
534
540
  columns: {
535
541
  receipt: string;
536
542
  table: string;
537
- paymentMethod: string;
538
543
  createdAt: string;
539
544
  completed: string;
540
545
  status: string;
541
546
  total: string;
547
+ billId: string;
548
+ payments: string;
542
549
  };
543
550
  search: {
544
551
  placeholder: string;
@@ -573,6 +580,11 @@ export declare const i18nMessages: {
573
580
  cashier: string;
574
581
  tablePax: string;
575
582
  total: string;
583
+ payments: string;
584
+ totalPaid: string;
585
+ tenders: string;
586
+ received: string;
587
+ changeGiven: string;
576
588
  };
577
589
  preview: {
578
590
  fullSizePreview: string;
@@ -831,11 +843,12 @@ export declare const i18nMessages: {
831
843
  columns: {
832
844
  receipt: string;
833
845
  table: string;
834
- paymentMethod: string;
835
846
  createdAt: string;
836
847
  completed: string;
837
848
  status: string;
838
849
  total: string;
850
+ billId: string;
851
+ payments: string;
839
852
  };
840
853
  search: {
841
854
  placeholder: string;
@@ -870,6 +883,11 @@ export declare const i18nMessages: {
870
883
  cashier: string;
871
884
  tablePax: string;
872
885
  total: string;
886
+ payments: string;
887
+ totalPaid: string;
888
+ tenders: string;
889
+ received: string;
890
+ changeGiven: string;
873
891
  };
874
892
  preview: {
875
893
  fullSizePreview: string;
@@ -21,7 +21,9 @@ export interface Receipt extends Bill {
21
21
  name: string;
22
22
  value?: string;
23
23
  }[];
24
- _payments: ReceiptInfo[];
24
+ _payments: ReceiptPayment[];
25
+ _totalPaid: string;
26
+ _totalChange: string;
25
27
  _nettTotal: string;
26
28
  credit: ReceiptInfo[];
27
29
  member: ReceiptInfo[];
@@ -52,6 +54,13 @@ interface ReceiptInfo {
52
54
  name: string;
53
55
  value: string;
54
56
  }
57
+ export interface ReceiptPayment extends ReceiptInfo {
58
+ id: string;
59
+ paidAt: string;
60
+ reference: string;
61
+ received: string;
62
+ hasChange: boolean;
63
+ }
55
64
  export declare function billToReceipt(bill: Bill, restaurant: ExtendedRestaurant, refundedFromBill?: Bill): Receipt;
56
65
  export declare function transformTemplateVariable(bill: Bill, restaurant: ExtendedRestaurant): OrderReceiptTemplateVariable;
57
66
  export declare function receiptStatus(bill: Bill, refundedFromBill?: Bill): {
@@ -77,7 +86,9 @@ export declare function transformReceiptInfo({ label, amount }: {
77
86
  name: string;
78
87
  value: string;
79
88
  };
80
- export declare function formatPaymentName(payment: Bill["payments"][0]): string;
89
+ /** The value type of the bill's `payments` map — one tender on the bill. */
90
+ type BillPayment = Bill["payments"][string];
91
+ export declare function formatPaymentName(payment: BillPayment): string;
81
92
  export declare function transformMember({ membership }: BillVariable): {
82
93
  name: string;
83
94
  value: string;