@harbortouch/skytab-analytics-report-utils 0.4.5 → 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' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net';
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
@@ -33,6 +33,8 @@ __export(index_exports, {
33
33
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS: () => DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
34
34
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
35
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,
36
38
  ITEM_TAX_AVAILABLE_COLUMNS: () => ITEM_TAX_AVAILABLE_COLUMNS,
37
39
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: () => ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
38
40
  MODIFIER_MIX_AVAILABLE_COLUMNS: () => MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -53,6 +55,7 @@ __export(index_exports, {
53
55
  dailySalesRefundsVoidsConfig: () => dailySalesRefundsVoidsConfig,
54
56
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
55
57
  dailySalesTrendsConfig: () => dailySalesTrendsConfig,
58
+ employeeTimecardConfig: () => employeeTimecardConfig,
56
59
  getColumnAlignment: () => getColumnAlignment,
57
60
  getColumnMetadata: () => getColumnMetadata,
58
61
  isNumericType: () => isNumericType,
@@ -497,6 +500,11 @@ var COLUMN_REGISTRY = {
497
500
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
498
501
  infoTextKey: "common.report-col.shift-duration-hrs.info"
499
502
  },
503
+ status: {
504
+ titleKey: "common.report-col.status",
505
+ shortTitleKey: "common.report-col.status.short",
506
+ infoTextKey: "common.report-col.status.info"
507
+ },
500
508
  subtotal: {
501
509
  titleKey: "common.report-col.subtotal",
502
510
  shortTitleKey: "common.report-col.subtotal.short",
@@ -1394,6 +1402,95 @@ var dailySalesTaxesConfig = {
1394
1402
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1395
1403
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
1396
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
+ };
1397
1494
  // Annotate the CommonJS export names for ESM import in node:
1398
1495
  0 && (module.exports = {
1399
1496
  COLUMN_REGISTRY,
@@ -1409,6 +1506,8 @@ var dailySalesTaxesConfig = {
1409
1506
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1410
1507
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1411
1508
  DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1509
+ EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1510
+ EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1412
1511
  ITEM_TAX_AVAILABLE_COLUMNS,
1413
1512
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1414
1513
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1429,6 +1528,7 @@ var dailySalesTaxesConfig = {
1429
1528
  dailySalesRefundsVoidsConfig,
1430
1529
  dailySalesTaxesConfig,
1431
1530
  dailySalesTrendsConfig,
1531
+ employeeTimecardConfig,
1432
1532
  getColumnAlignment,
1433
1533
  getColumnMetadata,
1434
1534
  isNumericType,
package/dist/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY
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",
@@ -1327,6 +1332,95 @@ var dailySalesTaxesConfig = {
1327
1332
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1328
1333
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
1329
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
+ };
1330
1424
  export {
1331
1425
  COLUMN_REGISTRY,
1332
1426
  DAILY_SALES_AVAILABLE_COLUMNS,
@@ -1341,6 +1435,8 @@ export {
1341
1435
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1342
1436
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1343
1437
  DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1438
+ EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1439
+ EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1344
1440
  ITEM_TAX_AVAILABLE_COLUMNS,
1345
1441
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1346
1442
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1361,6 +1457,7 @@ export {
1361
1457
  dailySalesRefundsVoidsConfig,
1362
1458
  dailySalesTaxesConfig,
1363
1459
  dailySalesTrendsConfig,
1460
+ employeeTimecardConfig,
1364
1461
  getColumnAlignment,
1365
1462
  getColumnMetadata,
1366
1463
  isNumericType,
@@ -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;
@@ -7,3 +7,4 @@ export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COL
7
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.5",
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",