@harbortouch/skytab-analytics-report-utils 0.38.1 → 0.40.0

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.
@@ -252,355 +252,6 @@ var salesSummaryConfig = {
252
252
  hasFooter: true
253
253
  };
254
254
 
255
- // src/reports/ticketSummary.ts
256
- var FIELDS3 = {
257
- ticketId: { type: "string", filteringAvailable: false },
258
- locationId: { type: "number", filteringAvailable: false },
259
- orderName: { type: "string", filteringAvailable: false },
260
- revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
261
- daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
262
- inclusiveTaxesAmount: {
263
- type: "money",
264
- columnKey: "inclusiveTax",
265
- footerCalculation: { type: "sum" },
266
- filteringAvailable: false
267
- },
268
- locationName: { type: "string", size: 240, columnKey: "locationName", filteringAvailable: false },
269
- orderNumber: {
270
- type: "string",
271
- columnKey: "ticketNumber",
272
- footerCalculation: { type: "label", label: "table.total" },
273
- filteringAvailable: false
274
- },
275
- businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
276
- ticketOpenedAt: { type: "time", columnKey: "ticketOpen", filteringAvailable: false },
277
- ticketClosedAt: { type: "time", columnKey: "ticketClosed", filteringAvailable: false },
278
- ticketTime: { type: "number", columnKey: "timeOpenMins", enableSorting: false, filteringAvailable: false },
279
- ticketSubtotal: {
280
- type: "money",
281
- columnKey: "subtotal",
282
- footerCalculation: { type: "sum" },
283
- filteringAvailable: false
284
- },
285
- discountsAmount: {
286
- type: "money",
287
- columnKey: "discountAmount",
288
- footerCalculation: { type: "sum" },
289
- filteringAvailable: false
290
- },
291
- surchargesAmount: {
292
- type: "money",
293
- columnKey: "ticketFee",
294
- footerCalculation: { type: "sum" },
295
- filteringAvailable: false
296
- },
297
- taxesAmount: {
298
- type: "money",
299
- columnKey: "taxCollected",
300
- footerCalculation: { type: "sum" },
301
- filteringAvailable: false
302
- },
303
- ticketGrandTotal: {
304
- type: "money",
305
- columnKey: "grandTotal",
306
- footerCalculation: { type: "sum" },
307
- filteringAvailable: false
308
- },
309
- gratuitiesAmount: {
310
- type: "money",
311
- columnKey: "autoGratuity",
312
- footerCalculation: { type: "sum" },
313
- filteringAvailable: false
314
- },
315
- tipAmount: {
316
- type: "money",
317
- columnKey: "tips",
318
- footerCalculation: { type: "sum" },
319
- filteringAvailable: false
320
- },
321
- paymentsAmount: {
322
- type: "money",
323
- columnKey: "totalCollected",
324
- footerCalculation: { type: "sum" },
325
- filteringAvailable: false
326
- },
327
- paymentTypeName: { type: "string", columnKey: "paymentType", filteringAvailable: false },
328
- guestsCount: {
329
- type: "number",
330
- columnKey: "guestCount",
331
- footerCalculation: { type: "sum" },
332
- filteringAvailable: false
333
- },
334
- employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
335
- orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false }
336
- };
337
- var TICKET_SUMMARY_VISIBLE_COLUMNS = [
338
- "locationName",
339
- "businessDate",
340
- "ticketOpenedAt",
341
- "ticketClosedAt",
342
- "ticketTime",
343
- "ticketSubtotal",
344
- "discountsAmount",
345
- "surchargesAmount",
346
- "taxesAmount",
347
- "ticketGrandTotal",
348
- "gratuitiesAmount",
349
- "tipAmount",
350
- "paymentsAmount",
351
- "paymentTypeName",
352
- "guestsCount",
353
- "employeeName",
354
- "orderTypeName"
355
- ];
356
- var TICKET_SUMMARY_AVAILABLE_COLUMNS = ["orderNumber", ...TICKET_SUMMARY_VISIBLE_COLUMNS];
357
- var ticketSummaryConfig = {
358
- fields: FIELDS3,
359
- availableColumns: TICKET_SUMMARY_AVAILABLE_COLUMNS,
360
- defaultVisibleColumns: TICKET_SUMMARY_VISIBLE_COLUMNS,
361
- hasFooter: true
362
- };
363
-
364
- // src/reports/ticketLive.ts
365
- var FIELDS4 = {
366
- locationName: { type: "string", columnKey: "locationName" },
367
- orderNumber: {
368
- type: "string",
369
- columnKey: "ticketNumber",
370
- footerCalculation: { type: "label", label: "table.total" }
371
- },
372
- dateOpen: { type: "string", columnKey: "date" },
373
- timeOpen: { type: "string", columnKey: "ticketOpen" },
374
- dateClose: { type: "string", columnKey: "dateClose" },
375
- timeClose: { type: "string", columnKey: "ticketClosed" },
376
- durationMinutes: { type: "number", columnKey: "timeOpenMins" },
377
- subtotal: { type: "money", columnKey: "subtotal" },
378
- discountTotal: { type: "money", columnKey: "discountAmount" },
379
- surchargeTotal: { type: "money", columnKey: "ticketFee" },
380
- taxTotal: { type: "money", columnKey: "taxCollected" },
381
- grandTotal: { type: "money", columnKey: "grandTotal" },
382
- gratuityTotal: { type: "money", columnKey: "autoGratuity" },
383
- totalTips: { type: "money", columnKey: "totalTips" },
384
- paymentsReceived: { type: "money", columnKey: "totalCollected" },
385
- paymentTypeName: { type: "string", columnKey: "paymentType" },
386
- guestCount: {
387
- type: "number",
388
- columnKey: "guestCount",
389
- footerCalculation: { type: "sum" }
390
- },
391
- customerName: { type: "string", columnKey: "customerName" },
392
- employeeName: { type: "string", columnKey: "employeeName" },
393
- orderType: { type: "string", columnKey: "orderType" }
394
- };
395
- var TICKET_LIVE_VISIBLE_COLUMNS = [
396
- "locationName",
397
- "dateOpen",
398
- "timeOpen",
399
- "timeClose",
400
- "durationMinutes",
401
- "subtotal",
402
- "discountTotal",
403
- "surchargeTotal",
404
- "taxTotal",
405
- "grandTotal",
406
- "gratuityTotal",
407
- "totalTips",
408
- "paymentsReceived",
409
- "paymentTypeName",
410
- "guestCount",
411
- "employeeName",
412
- "orderType"
413
- ];
414
- var TICKET_LIVE_AVAILABLE_COLUMNS = ["orderNumber", ...TICKET_LIVE_VISIBLE_COLUMNS];
415
- var ticketLiveConfig = {
416
- fields: FIELDS4,
417
- availableColumns: TICKET_LIVE_AVAILABLE_COLUMNS,
418
- defaultVisibleColumns: TICKET_LIVE_VISIBLE_COLUMNS,
419
- hasFooter: true
420
- };
421
-
422
- // src/reports/productMix.ts
423
- var FIELDS5 = {
424
- groupById: { type: "string" },
425
- groupByName: { type: "string", size: FIRST_COLUMN_WIDTH, footerCalculation: { type: "label", label: "table.total" } },
426
- salesAmountGross: { type: "money", columnKey: "grossSales" },
427
- discountsAmount: { type: "money", columnKey: "discountAmount" },
428
- inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
429
- salesAmountNet: { type: "money", columnKey: "netSales" },
430
- itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
431
- avgPrice: {
432
- type: "money",
433
- columnKey: "averageGrossPrice",
434
- footerCalculation: {
435
- type: "average",
436
- numeratorField: "salesAmountGross",
437
- denominatorField: "itemsQuantity"
438
- }
439
- },
440
- salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
441
- };
442
- var PRODUCT_MIX_VISIBLE_COLUMNS = [
443
- "salesAmountGross",
444
- "itemsQuantity",
445
- "avgPrice",
446
- "discountsAmount",
447
- "inclusiveTaxesAmount",
448
- "salesAmountNet",
449
- "salesMixPct"
450
- ];
451
- var PRODUCT_MIX_AVAILABLE_COLUMNS = ["groupByName", ...PRODUCT_MIX_VISIBLE_COLUMNS];
452
- var productMixConfig = {
453
- fields: FIELDS5,
454
- availableColumns: PRODUCT_MIX_AVAILABLE_COLUMNS,
455
- defaultVisibleColumns: PRODUCT_MIX_VISIBLE_COLUMNS,
456
- chartFields: PRODUCT_MIX_VISIBLE_COLUMNS,
457
- hasFooter: true
458
- };
459
-
460
- // src/reports/modifierMix.ts
461
- var FIELDS6 = {
462
- groupById: { type: "string", filteringAvailable: false },
463
- groupByName: {
464
- type: "string",
465
- size: FIRST_COLUMN_WIDTH,
466
- filteringAvailable: false,
467
- footerCalculation: { type: "label", label: "table.total" }
468
- },
469
- groupById2: { type: "string", filteringAvailable: false },
470
- groupByName2: {
471
- type: "string",
472
- size: FIRST_COLUMN_WIDTH,
473
- filteringAvailable: false,
474
- footerCalculation: { type: "none" }
475
- },
476
- modifiersSales: { type: "money", columnKey: "totalModifierSales" },
477
- modifiersQuantity: { type: "number", columnKey: "modifierQuantity" },
478
- itemsQuantity: {
479
- type: "number",
480
- columnKey: "quantity",
481
- filteringAvailable: false
482
- },
483
- avgGross: {
484
- type: "money",
485
- columnKey: "averageGrossPrice",
486
- footerCalculation: {
487
- type: "average",
488
- numeratorField: "modifiersSales",
489
- denominatorField: "modifiersQuantity"
490
- }
491
- },
492
- attachRate: {
493
- type: "percent",
494
- columnKey: "attachRate",
495
- footerCalculation: {
496
- type: "average",
497
- numeratorField: "modifiersQuantity",
498
- denominatorField: "itemsQuantity"
499
- }
500
- },
501
- modifiersSalesComp: { type: "money", filteringAvailable: false },
502
- modifiersQuantityComp: { type: "number", filteringAvailable: false },
503
- itemsQuantityComp: { type: "number", filteringAvailable: false },
504
- attachRateComp: { type: "percent", filteringAvailable: false },
505
- modifiersSalesVar: { type: "money", filteringAvailable: false },
506
- modifiersSalesVarPct: {
507
- type: "percent",
508
- filteringAvailable: false,
509
- footerCalculation: {
510
- type: "percentChange",
511
- numeratorField: "modifiersSales",
512
- denominatorField: "modifiersSalesComp"
513
- }
514
- },
515
- modifiersQuantityVar: { type: "number", filteringAvailable: false },
516
- modifiersQuantityVarPct: {
517
- type: "percent",
518
- filteringAvailable: false,
519
- footerCalculation: {
520
- type: "percentChange",
521
- numeratorField: "modifiersQuantity",
522
- denominatorField: "modifiersQuantityComp"
523
- }
524
- },
525
- attachRateVar: { type: "percent", filteringAvailable: false },
526
- attachRateVarPct: {
527
- type: "percent",
528
- filteringAvailable: false,
529
- footerCalculation: {
530
- type: "percentChange",
531
- numeratorField: "attachRate",
532
- denominatorField: "attachRateComp"
533
- }
534
- }
535
- };
536
- var MODIFIER_MIX_VISIBLE_COLUMNS = ["modifiersSales", "modifiersQuantity", "avgGross"];
537
- var MODIFIER_MIX_AVAILABLE_COLUMNS = [
538
- "groupByName",
539
- "groupByName2",
540
- ...MODIFIER_MIX_VISIBLE_COLUMNS
541
- ];
542
- var modifierMixConfig = {
543
- fields: FIELDS6,
544
- chartFields: MODIFIER_MIX_VISIBLE_COLUMNS,
545
- availableColumns: MODIFIER_MIX_AVAILABLE_COLUMNS,
546
- defaultVisibleColumns: MODIFIER_MIX_VISIBLE_COLUMNS,
547
- hasFooter: true
548
- };
549
-
550
- // src/reports/itemTax.ts
551
- var FIELDS7 = {
552
- locationId: { type: "number", filteringAvailable: false },
553
- taxIsFlat: { type: "boolean", filteringAvailable: false },
554
- merchantId: { type: "string", columnKey: "locationMid", filteringAvailable: false },
555
- locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
556
- locationCity: { type: "string", columnKey: "locationCity", filteringAvailable: false },
557
- locationState: { type: "string", columnKey: "locationState", filteringAvailable: false },
558
- itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
559
- itemPrice: { type: "money", columnKey: "itemPrice" },
560
- departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
561
- revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
562
- orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
563
- taxName: { type: "string", columnKey: "taxName", filteringAvailable: false },
564
- taxValue: { type: "money", columnKey: "taxableSales" },
565
- taxRate: {
566
- type: "conditional",
567
- columnKey: "taxRate",
568
- conditionalConfiguration: {
569
- conditionalField: "taxIsFlat",
570
- conditionalFormat: (field) => {
571
- return field ? "money" : "percent";
572
- }
573
- }
574
- },
575
- recordsCount: { type: "number", columnKey: "quantity" },
576
- taxableSales: { type: "money", columnKey: "taxableSales" },
577
- totalCollected: { type: "money", columnKey: "totalCollected" },
578
- itemTax: { type: "money", columnKey: "taxCollected" },
579
- taxCollected: { type: "money", columnKey: "taxCollected" }
580
- };
581
- var ITEM_TAX_AVAILABLE_COLUMNS = [
582
- "merchantId",
583
- "locationName",
584
- "locationCity",
585
- "locationState",
586
- "itemName",
587
- "departmentName",
588
- "revenueClassName",
589
- "orderTypeName",
590
- "recordsCount",
591
- "itemPrice",
592
- "taxName",
593
- "taxRate",
594
- "taxableSales",
595
- "taxCollected"
596
- ];
597
- var itemTaxConfig = {
598
- fields: FIELDS7,
599
- availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
600
- defaultVisibleColumns: ITEM_TAX_AVAILABLE_COLUMNS,
601
- hasFooter: false
602
- };
603
-
604
255
  // src/translations/crowdin/skytab-analytics-report-utils/en-GB.ts
605
256
  var enUS = {
606
257
  "common.report-col.fifteen-min-interval": false,
@@ -1071,6 +722,9 @@ var enUS = {
1071
722
  "common.report-col.total-pay": false,
1072
723
  "common.report-col.total-pay.short": false,
1073
724
  "common.report-col.total-pay.info": false,
725
+ "common.report-col.table-name": false,
726
+ "common.report-col.table-name.short": false,
727
+ "common.report-col.table-name.info": false,
1074
728
  "common.report-section.revenue-class": false,
1075
729
  "common.report-section.payments": false,
1076
730
  "common.report-section.cash": false,
@@ -1090,12 +744,16 @@ var enUS = {
1090
744
  "common.report-section.rev-class-footer.non-sales-revenue": false,
1091
745
  "common.report-section.rev-class-footer.house-account": false,
1092
746
  "common.report-section.rev-class-footer.total-accountable": false,
747
+ "scheduled-reports.report-name": false,
1093
748
  "scheduled-reports.period": false,
749
+ "scheduled-reports.generated-at": false,
750
+ "scheduled-reports.generated-by": false,
1094
751
  "components.form.field.group-by": false,
1095
752
  "components.form.field.last-week": false,
1096
753
  "components.form.field.last-year": false,
1097
754
  "common.labels.locations": false,
1098
755
  "common.labels.yes": false,
756
+ "common.labels.unassigned": false,
1099
757
  // Analytic fields
1100
758
  "analytics.field.location_id": false,
1101
759
  "analytics.field.order_type_id": false,
@@ -1595,6 +1253,9 @@ var enUS2 = {
1595
1253
  "common.report-col.total-pay": false,
1596
1254
  "common.report-col.total-pay.short": false,
1597
1255
  "common.report-col.total-pay.info": false,
1256
+ "common.report-col.table-name": false,
1257
+ "common.report-col.table-name.short": false,
1258
+ "common.report-col.table-name.info": false,
1598
1259
  "common.report-section.revenue-class": false,
1599
1260
  "common.report-section.payments": false,
1600
1261
  "common.report-section.cash": false,
@@ -1614,12 +1275,16 @@ var enUS2 = {
1614
1275
  "common.report-section.rev-class-footer.non-sales-revenue": false,
1615
1276
  "common.report-section.rev-class-footer.house-account": false,
1616
1277
  "common.report-section.rev-class-footer.total-accountable": false,
1278
+ "scheduled-reports.report-name": false,
1617
1279
  "scheduled-reports.period": false,
1280
+ "scheduled-reports.generated-at": false,
1281
+ "scheduled-reports.generated-by": false,
1618
1282
  "components.form.field.group-by": false,
1619
1283
  "components.form.field.last-week": false,
1620
1284
  "components.form.field.last-year": false,
1621
1285
  "common.labels.locations": false,
1622
1286
  "common.labels.yes": false,
1287
+ "common.labels.unassigned": false,
1623
1288
  // Analytic fields
1624
1289
  "analytics.field.location_id": false,
1625
1290
  "analytics.field.order_type_id": false,
@@ -2119,6 +1784,9 @@ var enUS3 = {
2119
1784
  "common.report-col.total-pay": "Total Pay",
2120
1785
  "common.report-col.total-pay.short": "Total Pay",
2121
1786
  "common.report-col.total-pay.info": "Total compensation including wages, overtime, and adjustments",
1787
+ "common.report-col.table-name": "Table Name",
1788
+ "common.report-col.table-name.short": "Table Name",
1789
+ "common.report-col.table-name.info": "Table Name if assigned",
2122
1790
  "common.report-section.revenue-class": "Sales by Revenue Class",
2123
1791
  "common.report-section.payments": "Payments",
2124
1792
  "common.report-section.cash": "Expected Closeout Cash",
@@ -2138,12 +1806,16 @@ var enUS3 = {
2138
1806
  "common.report-section.rev-class-footer.non-sales-revenue": "Non-Sales Revenue",
2139
1807
  "common.report-section.rev-class-footer.house-account": "House Account",
2140
1808
  "common.report-section.rev-class-footer.total-accountable": "Total Accountable",
1809
+ "scheduled-reports.report-name": "Report",
2141
1810
  "scheduled-reports.period": "Period",
1811
+ "scheduled-reports.generated-at": "Generated at",
1812
+ "scheduled-reports.generated-by": "Generated by",
2142
1813
  "components.form.field.group-by": "Group By",
2143
1814
  "components.form.field.last-week": "Compare to Last Week",
2144
1815
  "components.form.field.last-year": "Compare to Last Year",
2145
1816
  "common.labels.locations": "Locations",
2146
1817
  "common.labels.yes": "Yes",
1818
+ "common.labels.unassigned": "Unassigned",
2147
1819
  // Analytic fields
2148
1820
  "analytics.field.location_id": "Location",
2149
1821
  "analytics.field.order_type_id": "Order Types",
@@ -2171,26 +1843,399 @@ var enUS3 = {
2171
1843
  "employee-timecard.status.inactive": "Inactive",
2172
1844
  "employee-timecard.job.break-suffix": " * break"
2173
1845
  };
2174
- var en_US_default = enUS3;
1846
+ var en_US_default = enUS3;
1847
+
1848
+ // src/translations/index.ts
1849
+ var filterCrowdin = (messages) => Object.fromEntries(
1850
+ Object.entries(messages).filter((entry) => typeof entry[1] === "string")
1851
+ );
1852
+ var LOCALE_OVERRIDES = {
1853
+ "en-GB": filterCrowdin(en_GB_default),
1854
+ "es-ES": filterCrowdin(es_ES_default)
1855
+ };
1856
+ function resolveTranslate(key, locale) {
1857
+ const overrides = LOCALE_OVERRIDES[locale];
1858
+ if (overrides) {
1859
+ const override = overrides[key];
1860
+ if (override !== void 0) {
1861
+ return override;
1862
+ }
1863
+ }
1864
+ return en_US_default[key] ?? key;
1865
+ }
1866
+
1867
+ // src/reports/ticketSummary.ts
1868
+ var FIELDS3 = {
1869
+ ticketId: { type: "string", filteringAvailable: false },
1870
+ locationId: { type: "number", filteringAvailable: false },
1871
+ orderName: { type: "string", filteringAvailable: false },
1872
+ revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
1873
+ daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
1874
+ inclusiveTaxesAmount: {
1875
+ type: "money",
1876
+ columnKey: "inclusiveTax",
1877
+ footerCalculation: { type: "sum" },
1878
+ filteringAvailable: false
1879
+ },
1880
+ locationName: { type: "string", size: 240, columnKey: "locationName", filteringAvailable: false },
1881
+ orderNumber: {
1882
+ type: "string",
1883
+ columnKey: "ticketNumber",
1884
+ footerCalculation: { type: "label", label: "table.total" },
1885
+ filteringAvailable: false
1886
+ },
1887
+ businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1888
+ ticketOpenedAt: { type: "time", columnKey: "ticketOpen", filteringAvailable: false },
1889
+ ticketClosedAt: { type: "time", columnKey: "ticketClosed", filteringAvailable: false },
1890
+ ticketTime: { type: "number", columnKey: "timeOpenMins", enableSorting: false, filteringAvailable: false },
1891
+ ticketSubtotal: {
1892
+ type: "money",
1893
+ columnKey: "subtotal",
1894
+ footerCalculation: { type: "sum" },
1895
+ filteringAvailable: false
1896
+ },
1897
+ discountsAmount: {
1898
+ type: "money",
1899
+ columnKey: "discountAmount",
1900
+ footerCalculation: { type: "sum" },
1901
+ filteringAvailable: false
1902
+ },
1903
+ surchargesAmount: {
1904
+ type: "money",
1905
+ columnKey: "ticketFee",
1906
+ footerCalculation: { type: "sum" },
1907
+ filteringAvailable: false
1908
+ },
1909
+ taxesAmount: {
1910
+ type: "money",
1911
+ columnKey: "taxCollected",
1912
+ footerCalculation: { type: "sum" },
1913
+ filteringAvailable: false
1914
+ },
1915
+ ticketGrandTotal: {
1916
+ type: "money",
1917
+ columnKey: "grandTotal",
1918
+ footerCalculation: { type: "sum" },
1919
+ filteringAvailable: false
1920
+ },
1921
+ gratuitiesAmount: {
1922
+ type: "money",
1923
+ columnKey: "autoGratuity",
1924
+ footerCalculation: { type: "sum" },
1925
+ filteringAvailable: false
1926
+ },
1927
+ tipAmount: {
1928
+ type: "money",
1929
+ columnKey: "tips",
1930
+ footerCalculation: { type: "sum" },
1931
+ filteringAvailable: false
1932
+ },
1933
+ paymentsAmount: {
1934
+ type: "money",
1935
+ columnKey: "totalCollected",
1936
+ footerCalculation: { type: "sum" },
1937
+ filteringAvailable: false
1938
+ },
1939
+ paymentTypeName: { type: "string", columnKey: "paymentType", filteringAvailable: false },
1940
+ guestsCount: {
1941
+ type: "number",
1942
+ columnKey: "guestCount",
1943
+ footerCalculation: { type: "sum" },
1944
+ filteringAvailable: false
1945
+ },
1946
+ employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1947
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1948
+ tableName: {
1949
+ type: "custom",
1950
+ columnKey: "tableName",
1951
+ enableSorting: false,
1952
+ filteringAvailable: false,
1953
+ customConfiguration: {
1954
+ customFormat: (value, _full, locale) => {
1955
+ return typeof value === "string" && value !== "" ? value : resolveTranslate("common.labels.unassigned", locale);
1956
+ }
1957
+ }
1958
+ }
1959
+ };
1960
+ var TICKET_SUMMARY_VISIBLE_COLUMNS = [
1961
+ "locationName",
1962
+ "businessDate",
1963
+ "ticketOpenedAt",
1964
+ "ticketClosedAt",
1965
+ "ticketTime",
1966
+ "ticketSubtotal",
1967
+ "discountsAmount",
1968
+ "surchargesAmount",
1969
+ "taxesAmount",
1970
+ "ticketGrandTotal",
1971
+ "gratuitiesAmount",
1972
+ "tipAmount",
1973
+ "paymentsAmount",
1974
+ "paymentTypeName",
1975
+ "guestsCount",
1976
+ "employeeName",
1977
+ "orderTypeName",
1978
+ "tableName"
1979
+ ];
1980
+ var TICKET_SUMMARY_AVAILABLE_COLUMNS = ["orderNumber", ...TICKET_SUMMARY_VISIBLE_COLUMNS];
1981
+ var ticketSummaryConfig = {
1982
+ fields: FIELDS3,
1983
+ availableColumns: TICKET_SUMMARY_AVAILABLE_COLUMNS,
1984
+ defaultVisibleColumns: TICKET_SUMMARY_VISIBLE_COLUMNS,
1985
+ hasFooter: true
1986
+ };
1987
+
1988
+ // src/reports/ticketLive.ts
1989
+ var FIELDS4 = {
1990
+ locationName: { type: "string", columnKey: "locationName" },
1991
+ orderNumber: {
1992
+ type: "string",
1993
+ columnKey: "ticketNumber",
1994
+ footerCalculation: { type: "label", label: "table.total" }
1995
+ },
1996
+ dateOpen: { type: "string", columnKey: "date" },
1997
+ timeOpen: { type: "string", columnKey: "ticketOpen" },
1998
+ dateClose: { type: "string", columnKey: "dateClose" },
1999
+ timeClose: { type: "string", columnKey: "ticketClosed" },
2000
+ durationMinutes: { type: "number", columnKey: "timeOpenMins" },
2001
+ subtotal: { type: "money", columnKey: "subtotal" },
2002
+ discountTotal: { type: "money", columnKey: "discountAmount" },
2003
+ surchargeTotal: { type: "money", columnKey: "ticketFee" },
2004
+ taxTotal: { type: "money", columnKey: "taxCollected" },
2005
+ grandTotal: { type: "money", columnKey: "grandTotal" },
2006
+ gratuityTotal: { type: "money", columnKey: "autoGratuity" },
2007
+ totalTips: { type: "money", columnKey: "totalTips" },
2008
+ paymentsReceived: { type: "money", columnKey: "totalCollected" },
2009
+ paymentTypeName: { type: "string", columnKey: "paymentType" },
2010
+ guestCount: {
2011
+ type: "number",
2012
+ columnKey: "guestCount",
2013
+ footerCalculation: { type: "sum" }
2014
+ },
2015
+ customerName: { type: "string", columnKey: "customerName" },
2016
+ employeeName: { type: "string", columnKey: "employeeName" },
2017
+ orderType: { type: "string", columnKey: "orderType" },
2018
+ tableName: {
2019
+ type: "custom",
2020
+ columnKey: "tableName",
2021
+ enableSorting: false,
2022
+ filteringAvailable: false,
2023
+ customConfiguration: {
2024
+ customFormat: (value, _full, locale) => {
2025
+ return typeof value === "string" && value !== "" ? value : resolveTranslate("common.labels.unassigned", locale);
2026
+ }
2027
+ }
2028
+ }
2029
+ };
2030
+ var TICKET_LIVE_VISIBLE_COLUMNS = [
2031
+ "locationName",
2032
+ "dateOpen",
2033
+ "timeOpen",
2034
+ "timeClose",
2035
+ "durationMinutes",
2036
+ "subtotal",
2037
+ "discountTotal",
2038
+ "surchargeTotal",
2039
+ "taxTotal",
2040
+ "grandTotal",
2041
+ "gratuityTotal",
2042
+ "totalTips",
2043
+ "paymentsReceived",
2044
+ "paymentTypeName",
2045
+ "guestCount",
2046
+ "employeeName",
2047
+ "orderType",
2048
+ "tableName"
2049
+ ];
2050
+ var TICKET_LIVE_AVAILABLE_COLUMNS = ["orderNumber", ...TICKET_LIVE_VISIBLE_COLUMNS];
2051
+ var ticketLiveConfig = {
2052
+ fields: FIELDS4,
2053
+ availableColumns: TICKET_LIVE_AVAILABLE_COLUMNS,
2054
+ defaultVisibleColumns: TICKET_LIVE_VISIBLE_COLUMNS,
2055
+ hasFooter: true
2056
+ };
2175
2057
 
2176
- // src/translations/index.ts
2177
- var filterCrowdin = (messages) => Object.fromEntries(
2178
- Object.entries(messages).filter((entry) => typeof entry[1] === "string")
2179
- );
2180
- var LOCALE_OVERRIDES = {
2181
- "en-GB": filterCrowdin(en_GB_default),
2182
- "es-ES": filterCrowdin(es_ES_default)
2058
+ // src/reports/productMix.ts
2059
+ var FIELDS5 = {
2060
+ groupById: { type: "string" },
2061
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH, footerCalculation: { type: "label", label: "table.total" } },
2062
+ salesAmountGross: { type: "money", columnKey: "grossSales" },
2063
+ discountsAmount: { type: "money", columnKey: "discountAmount" },
2064
+ inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
2065
+ salesAmountNet: { type: "money", columnKey: "netSales" },
2066
+ itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
2067
+ avgPrice: {
2068
+ type: "money",
2069
+ columnKey: "averageGrossPrice",
2070
+ footerCalculation: {
2071
+ type: "average",
2072
+ numeratorField: "salesAmountGross",
2073
+ denominatorField: "itemsQuantity"
2074
+ }
2075
+ },
2076
+ salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
2183
2077
  };
2184
- function resolveTranslate(key, locale) {
2185
- const overrides = LOCALE_OVERRIDES[locale];
2186
- if (overrides) {
2187
- const override = overrides[key];
2188
- if (override !== void 0) {
2189
- return override;
2078
+ var PRODUCT_MIX_VISIBLE_COLUMNS = [
2079
+ "salesAmountGross",
2080
+ "itemsQuantity",
2081
+ "avgPrice",
2082
+ "discountsAmount",
2083
+ "inclusiveTaxesAmount",
2084
+ "salesAmountNet",
2085
+ "salesMixPct"
2086
+ ];
2087
+ var PRODUCT_MIX_AVAILABLE_COLUMNS = ["groupByName", ...PRODUCT_MIX_VISIBLE_COLUMNS];
2088
+ var productMixConfig = {
2089
+ fields: FIELDS5,
2090
+ availableColumns: PRODUCT_MIX_AVAILABLE_COLUMNS,
2091
+ defaultVisibleColumns: PRODUCT_MIX_VISIBLE_COLUMNS,
2092
+ chartFields: PRODUCT_MIX_VISIBLE_COLUMNS,
2093
+ hasFooter: true
2094
+ };
2095
+
2096
+ // src/reports/modifierMix.ts
2097
+ var FIELDS6 = {
2098
+ groupById: { type: "string", filteringAvailable: false },
2099
+ groupByName: {
2100
+ type: "string",
2101
+ size: FIRST_COLUMN_WIDTH,
2102
+ filteringAvailable: false,
2103
+ footerCalculation: { type: "label", label: "table.total" }
2104
+ },
2105
+ groupById2: { type: "string", filteringAvailable: false },
2106
+ groupByName2: {
2107
+ type: "string",
2108
+ size: FIRST_COLUMN_WIDTH,
2109
+ filteringAvailable: false,
2110
+ footerCalculation: { type: "none" }
2111
+ },
2112
+ modifiersSales: { type: "money", columnKey: "totalModifierSales" },
2113
+ modifiersQuantity: { type: "number", columnKey: "modifierQuantity" },
2114
+ itemsQuantity: {
2115
+ type: "number",
2116
+ columnKey: "quantity",
2117
+ filteringAvailable: false
2118
+ },
2119
+ avgGross: {
2120
+ type: "money",
2121
+ columnKey: "averageGrossPrice",
2122
+ footerCalculation: {
2123
+ type: "average",
2124
+ numeratorField: "modifiersSales",
2125
+ denominatorField: "modifiersQuantity"
2126
+ }
2127
+ },
2128
+ attachRate: {
2129
+ type: "percent",
2130
+ columnKey: "attachRate",
2131
+ footerCalculation: {
2132
+ type: "average",
2133
+ numeratorField: "modifiersQuantity",
2134
+ denominatorField: "itemsQuantity"
2135
+ }
2136
+ },
2137
+ modifiersSalesComp: { type: "money", filteringAvailable: false },
2138
+ modifiersQuantityComp: { type: "number", filteringAvailable: false },
2139
+ itemsQuantityComp: { type: "number", filteringAvailable: false },
2140
+ attachRateComp: { type: "percent", filteringAvailable: false },
2141
+ modifiersSalesVar: { type: "money", filteringAvailable: false },
2142
+ modifiersSalesVarPct: {
2143
+ type: "percent",
2144
+ filteringAvailable: false,
2145
+ footerCalculation: {
2146
+ type: "percentChange",
2147
+ numeratorField: "modifiersSales",
2148
+ denominatorField: "modifiersSalesComp"
2149
+ }
2150
+ },
2151
+ modifiersQuantityVar: { type: "number", filteringAvailable: false },
2152
+ modifiersQuantityVarPct: {
2153
+ type: "percent",
2154
+ filteringAvailable: false,
2155
+ footerCalculation: {
2156
+ type: "percentChange",
2157
+ numeratorField: "modifiersQuantity",
2158
+ denominatorField: "modifiersQuantityComp"
2159
+ }
2160
+ },
2161
+ attachRateVar: { type: "percent", filteringAvailable: false },
2162
+ attachRateVarPct: {
2163
+ type: "percent",
2164
+ filteringAvailable: false,
2165
+ footerCalculation: {
2166
+ type: "percentChange",
2167
+ numeratorField: "attachRate",
2168
+ denominatorField: "attachRateComp"
2190
2169
  }
2191
2170
  }
2192
- return en_US_default[key] ?? key;
2193
- }
2171
+ };
2172
+ var MODIFIER_MIX_VISIBLE_COLUMNS = ["modifiersSales", "modifiersQuantity", "avgGross"];
2173
+ var MODIFIER_MIX_AVAILABLE_COLUMNS = [
2174
+ "groupByName",
2175
+ "groupByName2",
2176
+ ...MODIFIER_MIX_VISIBLE_COLUMNS
2177
+ ];
2178
+ var modifierMixConfig = {
2179
+ fields: FIELDS6,
2180
+ chartFields: MODIFIER_MIX_VISIBLE_COLUMNS,
2181
+ availableColumns: MODIFIER_MIX_AVAILABLE_COLUMNS,
2182
+ defaultVisibleColumns: MODIFIER_MIX_VISIBLE_COLUMNS,
2183
+ hasFooter: true
2184
+ };
2185
+
2186
+ // src/reports/itemTax.ts
2187
+ var FIELDS7 = {
2188
+ locationId: { type: "number", filteringAvailable: false },
2189
+ taxIsFlat: { type: "boolean", filteringAvailable: false },
2190
+ merchantId: { type: "string", columnKey: "locationMid", filteringAvailable: false },
2191
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
2192
+ locationCity: { type: "string", columnKey: "locationCity", filteringAvailable: false },
2193
+ locationState: { type: "string", columnKey: "locationState", filteringAvailable: false },
2194
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
2195
+ itemPrice: { type: "money", columnKey: "itemPrice" },
2196
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
2197
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
2198
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
2199
+ taxName: { type: "string", columnKey: "taxName", filteringAvailable: false },
2200
+ taxValue: { type: "money", columnKey: "taxableSales" },
2201
+ taxRate: {
2202
+ type: "conditional",
2203
+ columnKey: "taxRate",
2204
+ conditionalConfiguration: {
2205
+ conditionalField: "taxIsFlat",
2206
+ conditionalFormat: (field) => {
2207
+ return field ? "money" : "percent";
2208
+ }
2209
+ }
2210
+ },
2211
+ recordsCount: { type: "number", columnKey: "quantity" },
2212
+ taxableSales: { type: "money", columnKey: "taxableSales" },
2213
+ totalCollected: { type: "money", columnKey: "totalCollected" },
2214
+ itemTax: { type: "money", columnKey: "taxCollected" },
2215
+ taxCollected: { type: "money", columnKey: "taxCollected" }
2216
+ };
2217
+ var ITEM_TAX_AVAILABLE_COLUMNS = [
2218
+ "merchantId",
2219
+ "locationName",
2220
+ "locationCity",
2221
+ "locationState",
2222
+ "itemName",
2223
+ "departmentName",
2224
+ "revenueClassName",
2225
+ "orderTypeName",
2226
+ "recordsCount",
2227
+ "itemPrice",
2228
+ "taxName",
2229
+ "taxRate",
2230
+ "taxableSales",
2231
+ "taxCollected"
2232
+ ];
2233
+ var itemTaxConfig = {
2234
+ fields: FIELDS7,
2235
+ availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
2236
+ defaultVisibleColumns: ITEM_TAX_AVAILABLE_COLUMNS,
2237
+ hasFooter: false
2238
+ };
2194
2239
 
2195
2240
  // src/reports/employeeTimecard.ts
2196
2241
  var EMPLOYEE_NAME_WIDTH = 220;
@@ -3577,6 +3622,11 @@ var COLUMN_REGISTRY = {
3577
3622
  titleKey: "common.report-col.total-pay",
3578
3623
  shortTitleKey: "common.report-col.total-pay.short",
3579
3624
  infoTextKey: "common.report-col.total-pay.info"
3625
+ },
3626
+ tableName: {
3627
+ titleKey: "common.report-col.table-name",
3628
+ shortTitleKey: "common.report-col.table-name.short",
3629
+ infoTextKey: "common.report-col.table-name.info"
3580
3630
  }
3581
3631
  };
3582
3632
  function getColumnMetadata(key) {
@@ -3807,12 +3857,12 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
3807
3857
  export {
3808
3858
  salesByItemDetailConfig,
3809
3859
  salesSummaryConfig,
3860
+ resolveTranslate,
3810
3861
  ticketSummaryConfig,
3811
3862
  ticketLiveConfig,
3812
3863
  productMixConfig,
3813
3864
  modifierMixConfig,
3814
3865
  itemTaxConfig,
3815
- resolveTranslate,
3816
3866
  employeeTimecardConfig,
3817
3867
  employeeTipConfig,
3818
3868
  tipCashoutReconciliationConfig,