@harbortouch/skytab-analytics-report-utils 0.4.4 → 0.4.6

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,4 +1,4 @@
1
- export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName';
1
+ export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'status';
2
2
  export interface ColumnMetadata {
3
3
  titleKey: string;
4
4
  shortTitleKey: string;
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  COLUMN_REGISTRY: () => COLUMN_REGISTRY,
24
24
  DAILY_SALES_AVAILABLE_COLUMNS: () => DAILY_SALES_AVAILABLE_COLUMNS,
25
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: () => DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
25
26
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
26
27
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
27
28
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -31,6 +32,9 @@ __export(index_exports, {
31
32
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
32
33
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS: () => DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
33
34
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
35
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: () => DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
36
+ EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS: () => EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
37
+ EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS: () => EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
34
38
  ITEM_TAX_AVAILABLE_COLUMNS: () => ITEM_TAX_AVAILABLE_COLUMNS,
35
39
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: () => ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
36
40
  MODIFIER_MIX_AVAILABLE_COLUMNS: () => MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -50,6 +54,8 @@ __export(index_exports, {
50
54
  dailySalesPaymentsConfig: () => dailySalesPaymentsConfig,
51
55
  dailySalesRefundsVoidsConfig: () => dailySalesRefundsVoidsConfig,
52
56
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
57
+ dailySalesTrendsConfig: () => dailySalesTrendsConfig,
58
+ employeeTimecardConfig: () => employeeTimecardConfig,
53
59
  getColumnAlignment: () => getColumnAlignment,
54
60
  getColumnMetadata: () => getColumnMetadata,
55
61
  isNumericType: () => isNumericType,
@@ -494,6 +500,11 @@ var COLUMN_REGISTRY = {
494
500
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
495
501
  infoTextKey: "common.report-col.shift-duration-hrs.info"
496
502
  },
503
+ status: {
504
+ titleKey: "common.report-col.status",
505
+ shortTitleKey: "common.report-col.status.short",
506
+ infoTextKey: "common.report-col.status.info"
507
+ },
497
508
  subtotal: {
498
509
  titleKey: "common.report-col.subtotal",
499
510
  shortTitleKey: "common.report-col.subtotal.short",
@@ -668,6 +679,31 @@ var COLUMN_REGISTRY = {
668
679
  titleKey: "common.report-col.discount-name",
669
680
  shortTitleKey: "common.report-col.discount-name.short",
670
681
  infoTextKey: "common.report-col.discount-name.info"
682
+ },
683
+ tickets: {
684
+ titleKey: "common.report-col.tickets",
685
+ shortTitleKey: "common.report-col.tickets.short",
686
+ infoTextKey: "common.report-col.tickets.info"
687
+ },
688
+ guests: {
689
+ titleKey: "common.report-col.guests",
690
+ shortTitleKey: "common.report-col.guests.short",
691
+ infoTextKey: "common.report-col.guests.info"
692
+ },
693
+ ticketAverage: {
694
+ titleKey: "common.report-col.ticket-average",
695
+ shortTitleKey: "common.report-col.ticket-average.short",
696
+ infoTextKey: "common.report-col.ticket-average.info"
697
+ },
698
+ guestAverage: {
699
+ titleKey: "common.report-col.guest-average",
700
+ shortTitleKey: "common.report-col.guest-average.short",
701
+ infoTextKey: "common.report-col.guest-average.info"
702
+ },
703
+ net: {
704
+ titleKey: "common.report-col.net",
705
+ shortTitleKey: "common.report-col.net.short",
706
+ infoTextKey: "common.report-col.net.info"
671
707
  }
672
708
  };
673
709
  function getColumnMetadata(key) {
@@ -1214,6 +1250,44 @@ var FIELDS7 = {
1214
1250
  numeratorField: "salesAmountGross",
1215
1251
  denominatorField: "itemsQuantity"
1216
1252
  }
1253
+ },
1254
+ ticketsCount: { type: "number", columnKey: "tickets" },
1255
+ guestsCount: { type: "number", columnKey: "guests" },
1256
+ ticketAverage: {
1257
+ type: "money",
1258
+ columnKey: "ticketAverage",
1259
+ footerCalculation: {
1260
+ type: "average",
1261
+ numeratorField: "salesAmountNet",
1262
+ denominatorField: "ticketsCount"
1263
+ }
1264
+ },
1265
+ guestAverage: {
1266
+ type: "money",
1267
+ columnKey: "guestAverage",
1268
+ footerCalculation: {
1269
+ type: "average",
1270
+ numeratorField: "salesAmountNet",
1271
+ denominatorField: "guestsCount"
1272
+ }
1273
+ },
1274
+ ticketAvg: {
1275
+ type: "money",
1276
+ columnKey: "ticketAverage",
1277
+ footerCalculation: {
1278
+ type: "average",
1279
+ numeratorField: "salesAmountNet",
1280
+ denominatorField: "ticketsCount"
1281
+ }
1282
+ },
1283
+ guestAvg: {
1284
+ type: "money",
1285
+ columnKey: "guestAverage",
1286
+ footerCalculation: {
1287
+ type: "average",
1288
+ numeratorField: "salesAmountNet",
1289
+ denominatorField: "guestsCount"
1290
+ }
1217
1291
  }
1218
1292
  };
1219
1293
  var DAILY_SALES_AVAILABLE_COLUMNS = [
@@ -1223,12 +1297,31 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
1223
1297
  "salesAmountNet",
1224
1298
  "salesMixPct"
1225
1299
  ];
1300
+ var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
1301
+ "ticketsCount",
1302
+ "guestsCount",
1303
+ "ticketAverage",
1304
+ "guestAverage",
1305
+ "salesAmountNet"
1306
+ ];
1226
1307
  var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
1227
1308
  var dailySalesConfig = {
1228
1309
  fields: FIELDS7,
1229
1310
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
1230
1311
  defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
1231
1312
  };
1313
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
1314
+ "ticketsCount",
1315
+ "guestsCount",
1316
+ "ticketAvg",
1317
+ "guestAvg",
1318
+ "salesAmountNet"
1319
+ ];
1320
+ var dailySalesTrendsConfig = {
1321
+ fields: FIELDS7,
1322
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1323
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
1324
+ };
1232
1325
 
1233
1326
  // src/reports/dailySalesPayments.ts
1234
1327
  var FIRST_COLUMN_WIDTH5 = 240;
@@ -1309,10 +1402,100 @@ var dailySalesTaxesConfig = {
1309
1402
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1310
1403
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
1311
1404
  };
1405
+
1406
+ // src/reports/employeeTimecard.ts
1407
+ var FIRST_COLUMN_WIDTH9 = 240;
1408
+ var EMPLOYEE_NAME_WIDTH = 220;
1409
+ var STATUS_WIDTH = 140;
1410
+ var LOOKUP_WIDTH = 160;
1411
+ var PAYROLL_WIDTH = 160;
1412
+ var JOB_WIDTH = 200;
1413
+ var FIELDS12 = {
1414
+ locationId: {
1415
+ type: "number",
1416
+ enableSorting: false,
1417
+ filteringAvailable: false
1418
+ },
1419
+ locationName: {
1420
+ type: "string",
1421
+ size: FIRST_COLUMN_WIDTH9,
1422
+ columnKey: "locationName"
1423
+ },
1424
+ businessDate: {
1425
+ type: "date",
1426
+ columnKey: "date"
1427
+ },
1428
+ employeeName: {
1429
+ type: "string",
1430
+ size: EMPLOYEE_NAME_WIDTH,
1431
+ columnKey: "employeeName"
1432
+ },
1433
+ isActive: {
1434
+ type: "string",
1435
+ size: STATUS_WIDTH,
1436
+ columnKey: "status",
1437
+ enableSorting: false,
1438
+ filteringAvailable: false
1439
+ },
1440
+ lookup: {
1441
+ type: "string",
1442
+ size: LOOKUP_WIDTH,
1443
+ columnKey: "employeeId"
1444
+ },
1445
+ payrollCode: {
1446
+ type: "string",
1447
+ size: PAYROLL_WIDTH,
1448
+ columnKey: "payrollId"
1449
+ },
1450
+ jobName: {
1451
+ type: "string",
1452
+ size: JOB_WIDTH,
1453
+ columnKey: "employeeJob"
1454
+ },
1455
+ isBreak: {
1456
+ type: "string",
1457
+ enableSorting: false,
1458
+ filteringAvailable: false
1459
+ },
1460
+ startTime: {
1461
+ type: "string",
1462
+ columnKey: "clockInTime"
1463
+ },
1464
+ endTime: {
1465
+ type: "string",
1466
+ columnKey: "clockOutTime"
1467
+ },
1468
+ shiftHours: {
1469
+ type: "fixedNumber",
1470
+ columnKey: "shiftDurationHrs",
1471
+ filteringAvailable: false
1472
+ }
1473
+ };
1474
+ var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
1475
+ "locationName",
1476
+ "businessDate",
1477
+ "employeeName",
1478
+ "isActive",
1479
+ "lookup",
1480
+ "payrollCode",
1481
+ "jobName",
1482
+ "startTime",
1483
+ "endTime",
1484
+ "shiftHours"
1485
+ ];
1486
+ var EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS = EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS;
1487
+ var employeeTimecardConfig = {
1488
+ fields: FIELDS12,
1489
+ availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1490
+ defaultVisibleColumns: EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1491
+ columnGroups: []
1492
+ // No column groups for this report
1493
+ };
1312
1494
  // Annotate the CommonJS export names for ESM import in node:
1313
1495
  0 && (module.exports = {
1314
1496
  COLUMN_REGISTRY,
1315
1497
  DAILY_SALES_AVAILABLE_COLUMNS,
1498
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
1316
1499
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
1317
1500
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1318
1501
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -1322,6 +1505,9 @@ var dailySalesTaxesConfig = {
1322
1505
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
1323
1506
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1324
1507
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1508
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1509
+ EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1510
+ EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1325
1511
  ITEM_TAX_AVAILABLE_COLUMNS,
1326
1512
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1327
1513
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1341,6 +1527,8 @@ var dailySalesTaxesConfig = {
1341
1527
  dailySalesPaymentsConfig,
1342
1528
  dailySalesRefundsVoidsConfig,
1343
1529
  dailySalesTaxesConfig,
1530
+ dailySalesTrendsConfig,
1531
+ employeeTimecardConfig,
1344
1532
  getColumnAlignment,
1345
1533
  getColumnMetadata,
1346
1534
  isNumericType,
package/dist/index.d.ts CHANGED
@@ -10,8 +10,9 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
10
10
  export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './reports/productMix';
11
11
  export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS, } from './reports/modifierMix';
12
12
  export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './reports/itemTax';
13
- export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySales';
13
+ export { dailySalesConfig, dailySalesTrendsConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, } from './reports/dailySales';
14
14
  export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesPayments';
15
15
  export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesDiscounts';
16
16
  export { dailySalesRefundsVoidsConfig, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesRefundsVoids';
17
17
  export { dailySalesTaxesConfig, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesTaxes';
18
+ export { employeeTimecardConfig, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, } from './reports/employeeTimecard';
package/dist/index.js CHANGED
@@ -430,6 +430,11 @@ var COLUMN_REGISTRY = {
430
430
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
431
431
  infoTextKey: "common.report-col.shift-duration-hrs.info"
432
432
  },
433
+ status: {
434
+ titleKey: "common.report-col.status",
435
+ shortTitleKey: "common.report-col.status.short",
436
+ infoTextKey: "common.report-col.status.info"
437
+ },
433
438
  subtotal: {
434
439
  titleKey: "common.report-col.subtotal",
435
440
  shortTitleKey: "common.report-col.subtotal.short",
@@ -604,6 +609,31 @@ var COLUMN_REGISTRY = {
604
609
  titleKey: "common.report-col.discount-name",
605
610
  shortTitleKey: "common.report-col.discount-name.short",
606
611
  infoTextKey: "common.report-col.discount-name.info"
612
+ },
613
+ tickets: {
614
+ titleKey: "common.report-col.tickets",
615
+ shortTitleKey: "common.report-col.tickets.short",
616
+ infoTextKey: "common.report-col.tickets.info"
617
+ },
618
+ guests: {
619
+ titleKey: "common.report-col.guests",
620
+ shortTitleKey: "common.report-col.guests.short",
621
+ infoTextKey: "common.report-col.guests.info"
622
+ },
623
+ ticketAverage: {
624
+ titleKey: "common.report-col.ticket-average",
625
+ shortTitleKey: "common.report-col.ticket-average.short",
626
+ infoTextKey: "common.report-col.ticket-average.info"
627
+ },
628
+ guestAverage: {
629
+ titleKey: "common.report-col.guest-average",
630
+ shortTitleKey: "common.report-col.guest-average.short",
631
+ infoTextKey: "common.report-col.guest-average.info"
632
+ },
633
+ net: {
634
+ titleKey: "common.report-col.net",
635
+ shortTitleKey: "common.report-col.net.short",
636
+ infoTextKey: "common.report-col.net.info"
607
637
  }
608
638
  };
609
639
  function getColumnMetadata(key) {
@@ -1150,6 +1180,44 @@ var FIELDS7 = {
1150
1180
  numeratorField: "salesAmountGross",
1151
1181
  denominatorField: "itemsQuantity"
1152
1182
  }
1183
+ },
1184
+ ticketsCount: { type: "number", columnKey: "tickets" },
1185
+ guestsCount: { type: "number", columnKey: "guests" },
1186
+ ticketAverage: {
1187
+ type: "money",
1188
+ columnKey: "ticketAverage",
1189
+ footerCalculation: {
1190
+ type: "average",
1191
+ numeratorField: "salesAmountNet",
1192
+ denominatorField: "ticketsCount"
1193
+ }
1194
+ },
1195
+ guestAverage: {
1196
+ type: "money",
1197
+ columnKey: "guestAverage",
1198
+ footerCalculation: {
1199
+ type: "average",
1200
+ numeratorField: "salesAmountNet",
1201
+ denominatorField: "guestsCount"
1202
+ }
1203
+ },
1204
+ ticketAvg: {
1205
+ type: "money",
1206
+ columnKey: "ticketAverage",
1207
+ footerCalculation: {
1208
+ type: "average",
1209
+ numeratorField: "salesAmountNet",
1210
+ denominatorField: "ticketsCount"
1211
+ }
1212
+ },
1213
+ guestAvg: {
1214
+ type: "money",
1215
+ columnKey: "guestAverage",
1216
+ footerCalculation: {
1217
+ type: "average",
1218
+ numeratorField: "salesAmountNet",
1219
+ denominatorField: "guestsCount"
1220
+ }
1153
1221
  }
1154
1222
  };
1155
1223
  var DAILY_SALES_AVAILABLE_COLUMNS = [
@@ -1159,12 +1227,31 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
1159
1227
  "salesAmountNet",
1160
1228
  "salesMixPct"
1161
1229
  ];
1230
+ var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
1231
+ "ticketsCount",
1232
+ "guestsCount",
1233
+ "ticketAverage",
1234
+ "guestAverage",
1235
+ "salesAmountNet"
1236
+ ];
1162
1237
  var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
1163
1238
  var dailySalesConfig = {
1164
1239
  fields: FIELDS7,
1165
1240
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
1166
1241
  defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
1167
1242
  };
1243
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
1244
+ "ticketsCount",
1245
+ "guestsCount",
1246
+ "ticketAvg",
1247
+ "guestAvg",
1248
+ "salesAmountNet"
1249
+ ];
1250
+ var dailySalesTrendsConfig = {
1251
+ fields: FIELDS7,
1252
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1253
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
1254
+ };
1168
1255
 
1169
1256
  // src/reports/dailySalesPayments.ts
1170
1257
  var FIRST_COLUMN_WIDTH5 = 240;
@@ -1245,9 +1332,99 @@ var dailySalesTaxesConfig = {
1245
1332
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1246
1333
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
1247
1334
  };
1335
+
1336
+ // src/reports/employeeTimecard.ts
1337
+ var FIRST_COLUMN_WIDTH9 = 240;
1338
+ var EMPLOYEE_NAME_WIDTH = 220;
1339
+ var STATUS_WIDTH = 140;
1340
+ var LOOKUP_WIDTH = 160;
1341
+ var PAYROLL_WIDTH = 160;
1342
+ var JOB_WIDTH = 200;
1343
+ var FIELDS12 = {
1344
+ locationId: {
1345
+ type: "number",
1346
+ enableSorting: false,
1347
+ filteringAvailable: false
1348
+ },
1349
+ locationName: {
1350
+ type: "string",
1351
+ size: FIRST_COLUMN_WIDTH9,
1352
+ columnKey: "locationName"
1353
+ },
1354
+ businessDate: {
1355
+ type: "date",
1356
+ columnKey: "date"
1357
+ },
1358
+ employeeName: {
1359
+ type: "string",
1360
+ size: EMPLOYEE_NAME_WIDTH,
1361
+ columnKey: "employeeName"
1362
+ },
1363
+ isActive: {
1364
+ type: "string",
1365
+ size: STATUS_WIDTH,
1366
+ columnKey: "status",
1367
+ enableSorting: false,
1368
+ filteringAvailable: false
1369
+ },
1370
+ lookup: {
1371
+ type: "string",
1372
+ size: LOOKUP_WIDTH,
1373
+ columnKey: "employeeId"
1374
+ },
1375
+ payrollCode: {
1376
+ type: "string",
1377
+ size: PAYROLL_WIDTH,
1378
+ columnKey: "payrollId"
1379
+ },
1380
+ jobName: {
1381
+ type: "string",
1382
+ size: JOB_WIDTH,
1383
+ columnKey: "employeeJob"
1384
+ },
1385
+ isBreak: {
1386
+ type: "string",
1387
+ enableSorting: false,
1388
+ filteringAvailable: false
1389
+ },
1390
+ startTime: {
1391
+ type: "string",
1392
+ columnKey: "clockInTime"
1393
+ },
1394
+ endTime: {
1395
+ type: "string",
1396
+ columnKey: "clockOutTime"
1397
+ },
1398
+ shiftHours: {
1399
+ type: "fixedNumber",
1400
+ columnKey: "shiftDurationHrs",
1401
+ filteringAvailable: false
1402
+ }
1403
+ };
1404
+ var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
1405
+ "locationName",
1406
+ "businessDate",
1407
+ "employeeName",
1408
+ "isActive",
1409
+ "lookup",
1410
+ "payrollCode",
1411
+ "jobName",
1412
+ "startTime",
1413
+ "endTime",
1414
+ "shiftHours"
1415
+ ];
1416
+ var EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS = EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS;
1417
+ var employeeTimecardConfig = {
1418
+ fields: FIELDS12,
1419
+ availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1420
+ defaultVisibleColumns: EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1421
+ columnGroups: []
1422
+ // No column groups for this report
1423
+ };
1248
1424
  export {
1249
1425
  COLUMN_REGISTRY,
1250
1426
  DAILY_SALES_AVAILABLE_COLUMNS,
1427
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
1251
1428
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
1252
1429
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1253
1430
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -1257,6 +1434,9 @@ export {
1257
1434
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
1258
1435
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1259
1436
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1437
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1438
+ EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1439
+ EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1260
1440
  ITEM_TAX_AVAILABLE_COLUMNS,
1261
1441
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1262
1442
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1276,6 +1456,8 @@ export {
1276
1456
  dailySalesPaymentsConfig,
1277
1457
  dailySalesRefundsVoidsConfig,
1278
1458
  dailySalesTaxesConfig,
1459
+ dailySalesTrendsConfig,
1460
+ employeeTimecardConfig,
1279
1461
  getColumnAlignment,
1280
1462
  getColumnMetadata,
1281
1463
  isNumericType,
@@ -1,6 +1,9 @@
1
1
  import { type ReportConfig } from '../types';
2
- type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice';
2
+ type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice' | 'ticketsCount' | 'guestsCount' | 'ticketAverage' | 'guestAverage' | 'ticketAvg' | 'guestAvg';
3
3
  export declare const DAILY_SALES_AVAILABLE_COLUMNS: DailySalesField[];
4
+ export declare const DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: DailySalesField[];
4
5
  export declare const DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: DailySalesField[];
5
6
  export declare const dailySalesConfig: ReportConfig<DailySalesField>;
7
+ export declare const DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: DailySalesField[];
8
+ export declare const dailySalesTrendsConfig: ReportConfig<DailySalesField>;
6
9
  export {};
@@ -0,0 +1,4 @@
1
+ import { type ReportConfig } from '../types';
2
+ export declare const EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS: string[];
3
+ export declare const EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS: string[];
4
+ export declare const employeeTimecardConfig: ReportConfig;
@@ -4,6 +4,7 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
4
4
  export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './productMix';
5
5
  export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS } from './modifierMix';
6
6
  export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './itemTax';
7
- export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS } from './dailySales';
7
+ export { dailySalesConfig, dailySalesTrendsConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, } from './dailySales';
8
8
  export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesPayments';
9
9
  export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesDiscounts';
10
+ export { employeeTimecardConfig, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, } from './employeeTimecard';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",