@managesome/eposmatic-toolkit 0.4.59 → 0.4.61
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/esm/constants/MATERIALIZED_REPORTS.js +177 -8
- package/esm/helpers/materialized-reports/index.js +7 -0
- package/esm/helpers/materialized-reports/materialized-day-readiness.js +2 -2
- package/esm/helpers/materialized-reports/materialized-dinein-accumulator-helpers.js +557 -0
- package/esm/helpers/materialized-reports/materialized-dinein-classification-helpers.js +447 -0
- package/esm/helpers/materialized-reports/materialized-dinein-close-day-helpers.js +372 -0
- package/esm/helpers/materialized-reports/materialized-dinein-compile-helpers.js +500 -0
- package/esm/helpers/materialized-reports/materialized-dinein-entry-pages.js +218 -0
- package/esm/helpers/materialized-reports/materialized-dinein-key-helpers.js +87 -0
- package/esm/helpers/materialized-reports/materialized-index-bootstrap.js +4 -0
- package/esm/helpers/materialized-reports/materialized-report-drilldown-rows.js +8 -0
- package/esm/helpers/materialized-reports/report-platform/definition.js +93 -1
- package/esm/helpers/materialized-reports/tenant-dinein-formatter.js +240 -0
- package/esm/helpers/reporting-contract/report-contract.js +3 -0
- package/esm/schemas/models/index.js +2 -0
- package/esm/schemas/models/materialized_tenant_dinein_entries.js +57 -0
- package/esm/schemas/models/materialized_tenant_dinein_reports.js +73 -0
- package/esm/schemas/types/index.js +2 -0
- package/esm/schemas/types/materialized_report_drilldown_rows.js +1 -0
- package/esm/schemas/types/materialized_tenant_dinein_entries.js +1 -0
- package/esm/schemas/types/materialized_tenant_dinein_reports.js +6 -0
- package/lib/constants/MATERIALIZED_REPORTS.d.ts +160 -8
- package/lib/constants/MATERIALIZED_REPORTS.js +178 -9
- package/lib/helpers/materialized-reports/index.d.ts +7 -0
- package/lib/helpers/materialized-reports/index.js +7 -0
- package/lib/helpers/materialized-reports/materialized-day-readiness.d.ts +1 -1
- package/lib/helpers/materialized-reports/materialized-day-readiness.js +2 -2
- package/lib/helpers/materialized-reports/materialized-dinein-accumulator-helpers.d.ts +67 -0
- package/lib/helpers/materialized-reports/materialized-dinein-accumulator-helpers.js +582 -0
- package/lib/helpers/materialized-reports/materialized-dinein-classification-helpers.d.ts +245 -0
- package/lib/helpers/materialized-reports/materialized-dinein-classification-helpers.js +469 -0
- package/lib/helpers/materialized-reports/materialized-dinein-close-day-helpers.d.ts +110 -0
- package/lib/helpers/materialized-reports/materialized-dinein-close-day-helpers.js +384 -0
- package/lib/helpers/materialized-reports/materialized-dinein-compile-helpers.d.ts +73 -0
- package/lib/helpers/materialized-reports/materialized-dinein-compile-helpers.js +504 -0
- package/lib/helpers/materialized-reports/materialized-dinein-entry-pages.d.ts +69 -0
- package/lib/helpers/materialized-reports/materialized-dinein-entry-pages.js +231 -0
- package/lib/helpers/materialized-reports/materialized-dinein-key-helpers.d.ts +44 -0
- package/lib/helpers/materialized-reports/materialized-dinein-key-helpers.js +96 -0
- package/lib/helpers/materialized-reports/materialized-index-bootstrap.js +4 -0
- package/lib/helpers/materialized-reports/materialized-report-drilldown-rows.js +8 -0
- package/lib/helpers/materialized-reports/report-platform/definition.js +92 -0
- package/lib/helpers/materialized-reports/tenant-dinein-formatter.d.ts +225 -0
- package/lib/helpers/materialized-reports/tenant-dinein-formatter.js +243 -0
- package/lib/helpers/reporting-contract/report-contract.d.ts +1 -0
- package/lib/helpers/reporting-contract/report-contract.js +3 -0
- package/lib/schemas/models/index.d.ts +2 -0
- package/lib/schemas/models/index.js +2 -0
- package/lib/schemas/models/materialized_tenant_day_readiness.d.ts +3 -3
- package/lib/schemas/models/materialized_tenant_dinein_entries.d.ts +100 -0
- package/lib/schemas/models/materialized_tenant_dinein_entries.js +60 -0
- package/lib/schemas/models/materialized_tenant_dinein_reports.d.ts +111 -0
- package/lib/schemas/models/materialized_tenant_dinein_reports.js +76 -0
- package/lib/schemas/types/index.d.ts +2 -0
- package/lib/schemas/types/index.js +2 -0
- package/lib/schemas/types/materialized_report_drilldown_rows.d.ts +1 -1
- package/lib/schemas/types/materialized_report_drilldown_rows.js +1 -0
- package/lib/schemas/types/materialized_tenant_dinein_entries.d.ts +127 -0
- package/lib/schemas/types/materialized_tenant_dinein_entries.js +2 -0
- package/lib/schemas/types/materialized_tenant_dinein_reports.d.ts +326 -0
- package/lib/schemas/types/materialized_tenant_dinein_reports.js +9 -0
- package/lib/tests/materialized-reports/dinein-fixtures.d.ts +29 -0
- package/lib/tests/materialized-reports/dinein-fixtures.js +130 -0
- package/lib/tests/materialized-reports/materialized-day-readiness.test.js +3 -2
- package/lib/tests/materialized-reports/materialized-dinein-compile.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-dinein-compile.test.js +807 -0
- package/lib/tests/materialized-reports/materialized-dinein-plan.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-dinein-plan.test.js +419 -0
- package/lib/tests/materialized-reports/materialized-tenant-dinein-schema.test.d.ts +1 -0
- package/lib/tests/materialized-reports/materialized-tenant-dinein-schema.test.js +185 -0
- package/lib/tests/materialized-reports/report-platform/registry-conformance.test.js +15 -2
- package/lib/tests/materialized-reports/tenant-dinein-formatter.test.d.ts +1 -0
- package/lib/tests/materialized-reports/tenant-dinein-formatter.test.js +299 -0
- package/package.json +1 -1
|
@@ -682,6 +682,8 @@ export var MATERIALIZED_REPORT_TYPE_ENUM;
|
|
|
682
682
|
MATERIALIZED_REPORT_TYPE_ENUM["TENANT_PAYMENTS_COMPARISON_ENTRIES"] = "TENANT_PAYMENTS_COMPARISON_ENTRIES";
|
|
683
683
|
MATERIALIZED_REPORT_TYPE_ENUM["TENANT_DIALER_REPORTS"] = "TENANT_DIALER_REPORTS";
|
|
684
684
|
MATERIALIZED_REPORT_TYPE_ENUM["TENANT_DIALER_ENTRIES"] = "TENANT_DIALER_ENTRIES";
|
|
685
|
+
MATERIALIZED_REPORT_TYPE_ENUM["TENANT_DINEIN_REPORTS"] = "TENANT_DINEIN_REPORTS";
|
|
686
|
+
MATERIALIZED_REPORT_TYPE_ENUM["TENANT_DINEIN_ENTRIES"] = "TENANT_DINEIN_ENTRIES";
|
|
685
687
|
})(MATERIALIZED_REPORT_TYPE_ENUM || (MATERIALIZED_REPORT_TYPE_ENUM = {}));
|
|
686
688
|
export const ALL_MATERIALIZED_REPORT_TYPES = Object.values(MATERIALIZED_REPORT_TYPE_ENUM);
|
|
687
689
|
/* =====================> Sales Comparison report <===================== */
|
|
@@ -899,11 +901,175 @@ export const MATERIALIZED_DIALER_HOUR_KEYS = Array.from({ length: 24 }, (_, hour
|
|
|
899
901
|
export const MATERIALIZED_DIALER_REPORT_MAX_BSON_BYTES = 15 * 1024 * 1024;
|
|
900
902
|
export const MATERIALIZED_DIALER_ENTRY_MAX_BSON_BYTES = 15 * 1024 * 1024;
|
|
901
903
|
/* ======================================================================== */
|
|
902
|
-
/*
|
|
904
|
+
/* Dinein report (M5) */
|
|
903
905
|
/* ======================================================================== */
|
|
904
906
|
/**
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
+
* The Dinein report: covers, checks, seated occupancy, courses, split bills,
|
|
908
|
+
* reservations and guest experience for the dine-in population.
|
|
909
|
+
*
|
|
910
|
+
* ## Population
|
|
911
|
+
*
|
|
912
|
+
* `orders` with `dinein_details != null` for the order's OWN `localDate`. The
|
|
913
|
+
* deleted split PARENT is excluded from sales/order counts (the children are the
|
|
914
|
+
* collectable checks) and is read only for rating/review discovery.
|
|
915
|
+
*
|
|
916
|
+
* ## Two collections, one report
|
|
917
|
+
*
|
|
918
|
+
* `materialized_tenant_dinein_reports` is COUNTERS ONLY, keyed by
|
|
919
|
+
* `<ORDER_STATUS>:<PLATFORM>` (`sale_type_key_filters`); the reservation block is
|
|
920
|
+
* day-level because a reservation has no order and must never be dropped by an
|
|
921
|
+
* order-status/platform filter. `materialized_tenant_dinein_entries` holds ONE
|
|
922
|
+
* PAGE per source day (the discounts/delivery/dialer page model).
|
|
923
|
+
*/
|
|
924
|
+
/**
|
|
925
|
+
* The two collections are named/versioned by their model modules
|
|
926
|
+
* (`materialized_tenant_dinein_reports` / `..._entries`), exactly like the other
|
|
927
|
+
* materialized report collections.
|
|
928
|
+
*/
|
|
929
|
+
/**
|
|
930
|
+
* Scopes materialized by `materialized_tenant_dinein_reports`.
|
|
931
|
+
*
|
|
932
|
+
* NO `localHour`: the hour dimension is the `by_hour` map inside the document
|
|
933
|
+
* (the sales/covers-by-hour chart), exactly like Delivery. `localDate` is the day
|
|
934
|
+
* the ORDER was sold on (`order.localDate`), never the fingerprint's creation
|
|
935
|
+
* day: a table can close after midnight and still belong to the day it was sold.
|
|
936
|
+
*/
|
|
937
|
+
export const MATERIALIZED_DINEIN_REPORT_SCOPES = [
|
|
938
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE,
|
|
939
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_WEEK,
|
|
940
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_WEEK_OF_YEAR,
|
|
941
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_MONTH,
|
|
942
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_QUARTER,
|
|
943
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_SEMESTER,
|
|
944
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_YEAR,
|
|
945
|
+
];
|
|
946
|
+
/**
|
|
947
|
+
* Entry scopes. A PERIOD entry document is PAGE-PARTITIONED by source day
|
|
948
|
+
* (`page = <source localDate>`) so a document is bounded by ONE day's checks; a
|
|
949
|
+
* month is covered by its 28-31 pages. There is no quarter/semester/year entry
|
|
950
|
+
* document, and a broad details selection is served from the month pages it
|
|
951
|
+
* touches (never refused).
|
|
952
|
+
*/
|
|
953
|
+
export const MATERIALIZED_DINEIN_ENTRY_SCOPES = [
|
|
954
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE,
|
|
955
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_WEEK,
|
|
956
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_WEEK_OF_YEAR,
|
|
957
|
+
MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_MONTH,
|
|
958
|
+
];
|
|
959
|
+
/** Page key of the DAY-scoped entry document (the day scope is already one day). */
|
|
960
|
+
export const MATERIALIZED_DINEIN_ENTRY_PAGE_ALL = 'all';
|
|
961
|
+
/**
|
|
962
|
+
* Ordered key filters of the dinein report (`COMPLETED:POS_DINE-IN`) — the SAME
|
|
963
|
+
* two dimensions every order-shaped materialized counter document declares. They
|
|
964
|
+
* are the only filters the SUMMARY can apply exactly, because they are the key
|
|
965
|
+
* grammar; origin / table / floor / split / offline are ROW filters and are
|
|
966
|
+
* declared `appliesTo: DETAILS` (a summary request that sends one is REJECTED,
|
|
967
|
+
* never silently answered unfiltered).
|
|
968
|
+
*/
|
|
969
|
+
export const DINEIN_KEY_FILTERS = [
|
|
970
|
+
MATERIALIZED_REPORT_KEY_FILTER_ENUM.ORDER_STATUS,
|
|
971
|
+
MATERIALIZED_REPORT_KEY_FILTER_ENUM.PLATFORM,
|
|
972
|
+
];
|
|
973
|
+
/** Token for a missing key/row dimension. A missing dimension is never dropped. */
|
|
974
|
+
export const MATERIALIZED_DINEIN_UNKNOWN_TOKEN = 'UNKNOWN';
|
|
975
|
+
/** Key-component separator (`<ORDER_STATUS>:<PLATFORM>`). */
|
|
976
|
+
export const MATERIALIZED_DINEIN_KEY_SEPARATOR = ':';
|
|
977
|
+
/**
|
|
978
|
+
* Token of the ONE overflow row every BOUNDED map keeps after its top-N
|
|
979
|
+
* (tables / floors / courses / service-charge rates), so a capped map still
|
|
980
|
+
* reconciles against the document totals instead of silently dropping rows.
|
|
981
|
+
*/
|
|
982
|
+
export const MATERIALIZED_DINEIN_OTHER_TOKEN = '__OTHER__';
|
|
983
|
+
/** Per-document caps of the bounded maps (ranked `key ASC` after the metric). */
|
|
984
|
+
export const MATERIALIZED_DINEIN_TABLE_LIMIT = 200;
|
|
985
|
+
export const MATERIALIZED_DINEIN_FLOOR_LIMIT = 50;
|
|
986
|
+
export const MATERIALIZED_DINEIN_COURSE_LIMIT = 50;
|
|
987
|
+
export const MATERIALIZED_DINEIN_SERVICE_CHARGE_RATE_LIMIT = 50;
|
|
988
|
+
/**
|
|
989
|
+
* Caps of the two BOUNDED SUMMARY SNAPSHOTS.
|
|
990
|
+
*
|
|
991
|
+
* `upcoming_reservations` and `top_edited_checks` are display-only tables, not a
|
|
992
|
+
* second pagination source (the Orders tab always uses the cursor read). The DAY
|
|
993
|
+
* document keeps its own top-N; a PERIOD document re-ranks the union of its day
|
|
994
|
+
* documents' snapshots and keeps top-N again, so a month cannot grow the arrays.
|
|
995
|
+
*/
|
|
996
|
+
export const MATERIALIZED_DINEIN_UPCOMING_RESERVATION_LIMIT = 10;
|
|
997
|
+
export const MATERIALIZED_DINEIN_TOP_EDITED_CHECK_LIMIT = 10;
|
|
998
|
+
/** The 24 hour keys of `by_hour`, initialized to 0 so absence is unambiguously zero. */
|
|
999
|
+
export const MATERIALIZED_DINEIN_HOUR_KEYS = Array.from({ length: 24 }, (_, hour) => String(hour));
|
|
1000
|
+
/**
|
|
1001
|
+
* `delete_reason` of a split parent that was auto-deleted by the split flow.
|
|
1002
|
+
*
|
|
1003
|
+
* The parent still carries the rating/review of the visit but is NOT a
|
|
1004
|
+
* collectable check: it never contributes sales or an order count.
|
|
1005
|
+
*/
|
|
1006
|
+
export const MATERIALIZED_DINEIN_SPLIT_PARENT_DELETE_REASON = 'Auto Deleted on Split';
|
|
1007
|
+
/**
|
|
1008
|
+
* Where the first version of a check was taken. Derived from the OLDEST
|
|
1009
|
+
* iteration (or the current order when it has none) — see
|
|
1010
|
+
* `classifyMaterializedDineinOrigin`.
|
|
1011
|
+
*/
|
|
1012
|
+
export var MATERIALIZED_DINEIN_ORIGIN_ENUM;
|
|
1013
|
+
(function (MATERIALIZED_DINEIN_ORIGIN_ENUM) {
|
|
1014
|
+
/** `POS_DINE-IN` — a terminal the guest ordered at. */
|
|
1015
|
+
MATERIALIZED_DINEIN_ORIGIN_ENUM["POS_DIRECT"] = "POS_DIRECT";
|
|
1016
|
+
/** `APP_DINE-IN` / `WEB_DINE-IN` WITH a staff or order-taker — a staff tablet. */
|
|
1017
|
+
MATERIALIZED_DINEIN_ORIGIN_ENUM["STAFF_TABLET"] = "STAFF_TABLET";
|
|
1018
|
+
/** `APP_DINE-IN` / `WEB_DINE-IN`, no staff, but a consumer phone — QR self-order. */
|
|
1019
|
+
MATERIALIZED_DINEIN_ORIGIN_ENUM["QR_SELF_ORDER"] = "QR_SELF_ORDER";
|
|
1020
|
+
/** Anything else. Never invented into one of the three real origins. */
|
|
1021
|
+
MATERIALIZED_DINEIN_ORIGIN_ENUM["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
|
|
1022
|
+
})(MATERIALIZED_DINEIN_ORIGIN_ENUM || (MATERIALIZED_DINEIN_ORIGIN_ENUM = {}));
|
|
1023
|
+
export const ALL_MATERIALIZED_DINEIN_ORIGINS = Object.values(MATERIALIZED_DINEIN_ORIGIN_ENUM);
|
|
1024
|
+
/** The role a counted check plays in a split bill. The parent never appears as a row. */
|
|
1025
|
+
export var MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM;
|
|
1026
|
+
(function (MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM) {
|
|
1027
|
+
MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM["NONE"] = "NONE";
|
|
1028
|
+
MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM["CHILD"] = "CHILD";
|
|
1029
|
+
})(MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM || (MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM = {}));
|
|
1030
|
+
export const ALL_MATERIALIZED_DINEIN_SPLIT_ROLES = Object.values(MATERIALIZED_DINEIN_SPLIT_ROLE_ENUM);
|
|
1031
|
+
/** Payment classification used by `card_amount` / `cash_amount` / `other_amount`. */
|
|
1032
|
+
export var MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM;
|
|
1033
|
+
(function (MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM) {
|
|
1034
|
+
MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM["CASH"] = "CASH";
|
|
1035
|
+
MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM["CARD"] = "CARD";
|
|
1036
|
+
MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM["OTHER"] = "OTHER";
|
|
1037
|
+
})(MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM || (MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM = {}));
|
|
1038
|
+
export const ALL_MATERIALIZED_DINEIN_PAYMENT_CLASSES = Object.values(MATERIALIZED_DINEIN_PAYMENT_CLASS_ENUM);
|
|
1039
|
+
/**
|
|
1040
|
+
* Per-collection BSON budgets (bytes). MongoDB's hard limit is 16 MiB per
|
|
1041
|
+
* document; 15 MiB is the owner-approved practical ceiling for the dinein
|
|
1042
|
+
* report and each entry page (same as Delivery/Dialer). A writer that exceeds
|
|
1043
|
+
* its budget fails at COMPILE/PLAN time with the collection + day + scope in the
|
|
1044
|
+
* message — never midway through the close transaction with a server-side
|
|
1045
|
+
* "object too large" error.
|
|
1046
|
+
*/
|
|
1047
|
+
export const MATERIALIZED_DINEIN_REPORT_MAX_BSON_BYTES = 15 * 1024 * 1024;
|
|
1048
|
+
export const MATERIALIZED_DINEIN_ENTRY_MAX_BSON_BYTES = 15 * 1024 * 1024;
|
|
1049
|
+
/**
|
|
1050
|
+
* SOURCE-collection indexes the Dinein writer needs, DECLARED ONLY.
|
|
1051
|
+
*
|
|
1052
|
+
* The services run with `autoIndex: false`; nothing here is applied at runtime.
|
|
1053
|
+
* `dinein_tables_fingerprints` is queried by the day's order ids (session join)
|
|
1054
|
+
* and by `createdAt` (the table-close event scan); `reservations` is queried by
|
|
1055
|
+
* the tenant-local `reservation_time` day. Creating these indexes is an OWNER
|
|
1056
|
+
* deploy step (see the operations index plan).
|
|
1057
|
+
*/
|
|
1058
|
+
export const MATERIALIZED_DINEIN_FINGERPRINTS_ORDER_INDEX_OPTIONS = [
|
|
1059
|
+
{ key: { tenant_id: 1, order_id: 1 }, name: 'tenant_id__order_id' },
|
|
1060
|
+
];
|
|
1061
|
+
export const MATERIALIZED_DINEIN_FINGERPRINTS_CREATED_AT_INDEX_OPTIONS = [
|
|
1062
|
+
{ key: { tenant_id: 1, createdAt: -1 }, name: 'tenant_id__createdAt' },
|
|
1063
|
+
];
|
|
1064
|
+
export const MATERIALIZED_DINEIN_RESERVATIONS_TIME_INDEX_OPTIONS = [
|
|
1065
|
+
{ key: { tenant_id: 1, reservation_time: 1 }, name: 'tenant_id__reservation_time' },
|
|
1066
|
+
];
|
|
1067
|
+
/* ======================================================================== */
|
|
1068
|
+
/* Day readiness (six production writers) */
|
|
1069
|
+
/* ======================================================================== */
|
|
1070
|
+
/**
|
|
1071
|
+
* COMMITTED-READINESS ledger for the SIX reports written by END_TENANT_DAY and
|
|
1072
|
+
* the range sync: Overview, Discounts, Prep Time, Delivery, Dialer and Dinein.
|
|
907
1073
|
*
|
|
908
1074
|
* One row per (tenant_id, localDate, report_key, schema_version). The row is
|
|
909
1075
|
* written in the SAME transaction/session as the report documents, so it can
|
|
@@ -938,8 +1104,11 @@ export const ALL_MATERIALIZED_REPORT_READINESS_STATUSES = Object.values(MATERIAL
|
|
|
938
1104
|
* The ONLY reports that own a readiness row. Adding another report here means
|
|
939
1105
|
* giving it a writer that participates in the same day transaction.
|
|
940
1106
|
*/
|
|
941
|
-
export const MATERIALIZED_READINESS_REPORT_KEYS = [
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1107
|
+
export const MATERIALIZED_READINESS_REPORT_KEYS = [
|
|
1108
|
+
'OVERVIEW',
|
|
1109
|
+
'DISCOUNTS',
|
|
1110
|
+
'PREP_TIME',
|
|
1111
|
+
'DELIVERY',
|
|
1112
|
+
'DIALER',
|
|
1113
|
+
'DINEIN',
|
|
1114
|
+
];
|
|
@@ -31,6 +31,12 @@ export * from './materialized-dialer-compile-helpers';
|
|
|
31
31
|
export * from './materialized-dialer-entry-pages';
|
|
32
32
|
export * from './materialized-dialer-key-helpers';
|
|
33
33
|
export * from './materialized-dialer-masking';
|
|
34
|
+
export * from './materialized-dinein-accumulator-helpers';
|
|
35
|
+
export * from './materialized-dinein-classification-helpers';
|
|
36
|
+
export * from './materialized-dinein-close-day-helpers';
|
|
37
|
+
export * from './materialized-dinein-compile-helpers';
|
|
38
|
+
export * from './materialized-dinein-entry-pages';
|
|
39
|
+
export * from './materialized-dinein-key-helpers';
|
|
34
40
|
export * from './materialized-day-input-signature';
|
|
35
41
|
export * from './materialized-cash-classification-helpers';
|
|
36
42
|
export * from './materialized-cash-close-day-helpers';
|
|
@@ -58,6 +64,7 @@ export * from './tenant-discount-source-formatter';
|
|
|
58
64
|
export * from './tenant-cash-in-out-formatter';
|
|
59
65
|
export * from './tenant-delivery-formatter';
|
|
60
66
|
export * from './tenant-dialer-formatter';
|
|
67
|
+
export * from './tenant-dinein-formatter';
|
|
61
68
|
export * from './tenant-prep-time-formatter';
|
|
62
69
|
export * from './tenant-sales-overview-formatter';
|
|
63
70
|
export * from './tenant-sales-overview-helpers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MATERIALIZED_READINESS_REPORT_KEYS, MATERIALIZED_REPORT_READINESS_STATUS_ENUM, MATERIALIZED_TENANT_DAY_READINESS_SCHEMA_VERSION, } from '../../constants/MATERIALIZED_REPORTS';
|
|
2
2
|
const uniqueSorted = (values) => [...new Set(values)].sort();
|
|
3
|
-
/** Whether `report` is one of the
|
|
3
|
+
/** Whether `report` is one of the SIX reports that own readiness rows. */
|
|
4
4
|
export function isMaterializedReadinessReportKey(report) {
|
|
5
5
|
return MATERIALIZED_READINESS_REPORT_KEYS.includes(report);
|
|
6
6
|
}
|
|
@@ -80,7 +80,7 @@ export function buildMaterializedDayReadinessDocument(input) {
|
|
|
80
80
|
if (!isMaterializedReadinessReportKey(String(input.reportKey))) {
|
|
81
81
|
throw new Error('buildMaterializedDayReadinessDocument: report ' +
|
|
82
82
|
String(input.reportKey) +
|
|
83
|
-
' is outside the
|
|
83
|
+
' is outside the six report readiness contract');
|
|
84
84
|
}
|
|
85
85
|
return {
|
|
86
86
|
tenant_id: String(input.tenantId),
|