kaafil-react-uikit 0.1.0-beta.1 → 0.2.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.
- package/README.md +12 -6
- package/dist/admin/index.cjs +343 -343
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +6 -6
- package/dist/admin/index.js.map +1 -1
- package/dist/chunk-57SUK3GD.cjs +110 -0
- package/dist/chunk-57SUK3GD.cjs.map +1 -0
- package/dist/{chunk-LL243STJ.cjs → chunk-6WV5VYT2.cjs} +111 -95
- package/dist/chunk-6WV5VYT2.cjs.map +1 -0
- package/dist/{chunk-YDGR7JSY.js → chunk-7ISKFGLW.js} +28 -12
- package/dist/chunk-7ISKFGLW.js.map +1 -0
- package/dist/{chunk-PTQ2CJKE.cjs → chunk-7UFX3Y2U.cjs} +4 -4
- package/dist/{chunk-PTQ2CJKE.cjs.map → chunk-7UFX3Y2U.cjs.map} +1 -1
- package/dist/{chunk-6FPAGGFL.js → chunk-A4Z2YBEF.js} +29 -8
- package/dist/chunk-A4Z2YBEF.js.map +1 -0
- package/dist/{chunk-IIPQ4JNC.js → chunk-GJ2J3PYN.js} +3 -3
- package/dist/{chunk-IIPQ4JNC.js.map → chunk-GJ2J3PYN.js.map} +1 -1
- package/dist/{chunk-PJRZCOFF.cjs → chunk-HTIY33UH.cjs} +37 -37
- package/dist/{chunk-PJRZCOFF.cjs.map → chunk-HTIY33UH.cjs.map} +1 -1
- package/dist/chunk-KW5LH6KV.js +105 -0
- package/dist/chunk-KW5LH6KV.js.map +1 -0
- package/dist/{chunk-XI7MK4Y7.js → chunk-L3QEMEFM.js} +3 -3
- package/dist/{chunk-XI7MK4Y7.js.map → chunk-L3QEMEFM.js.map} +1 -1
- package/dist/{chunk-WUAFL77X.js → chunk-LJJMNZ7B.js} +7 -101
- package/dist/chunk-LJJMNZ7B.js.map +1 -0
- package/dist/{chunk-QHUDOVKW.cjs → chunk-OZJ74DVQ.cjs} +33 -17
- package/dist/chunk-OZJ74DVQ.cjs.map +1 -0
- package/dist/{chunk-VHTSTUCJ.cjs → chunk-RG4YDSCN.cjs} +17 -114
- package/dist/chunk-RG4YDSCN.cjs.map +1 -0
- package/dist/{chunk-UYJ6LIWP.js → chunk-RSC2ZJUP.js} +35 -19
- package/dist/chunk-RSC2ZJUP.js.map +1 -0
- package/dist/{chunk-UUGMNP27.js → chunk-SIAPCJ7G.js} +5 -5
- package/dist/{chunk-UUGMNP27.js.map → chunk-SIAPCJ7G.js.map} +1 -1
- package/dist/{chunk-EM7JV3D7.cjs → chunk-UALMCHNW.cjs} +29 -8
- package/dist/chunk-UALMCHNW.cjs.map +1 -0
- package/dist/{chunk-ACVU55PZ.cjs → chunk-YNHOPYBK.cjs} +12 -12
- package/dist/{chunk-ACVU55PZ.cjs.map → chunk-YNHOPYBK.cjs.map} +1 -1
- package/dist/core/index.cjs +126 -120
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +19 -13
- package/dist/core/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/manager/index.cjs +278 -283
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.js +48 -52
- package/dist/manager/index.js.map +1 -1
- package/dist/traveller/index.cjs +35 -35
- package/dist/traveller/index.js +5 -5
- package/package.json +4 -3
- package/dist/chunk-6FPAGGFL.js.map +0 -1
- package/dist/chunk-EM7JV3D7.cjs.map +0 -1
- package/dist/chunk-LL243STJ.cjs.map +0 -1
- package/dist/chunk-PZKXLQSU.js +0 -10
- package/dist/chunk-PZKXLQSU.js.map +0 -1
- package/dist/chunk-QHUDOVKW.cjs.map +0 -1
- package/dist/chunk-TOBZFADB.cjs +0 -12
- package/dist/chunk-TOBZFADB.cjs.map +0 -1
- package/dist/chunk-UYJ6LIWP.js.map +0 -1
- package/dist/chunk-VHTSTUCJ.cjs.map +0 -1
- package/dist/chunk-WUAFL77X.js.map +0 -1
- package/dist/chunk-YDGR7JSY.js.map +0 -1
package/dist/manager/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkOZJ74DVQ_cjs = require('../chunk-OZJ74DVQ.cjs');
|
|
4
|
+
var chunk6WV5VYT2_cjs = require('../chunk-6WV5VYT2.cjs');
|
|
5
|
+
var chunk57SUK3GD_cjs = require('../chunk-57SUK3GD.cjs');
|
|
6
|
+
var chunkYNHOPYBK_cjs = require('../chunk-YNHOPYBK.cjs');
|
|
7
|
+
var chunkUALMCHNW_cjs = require('../chunk-UALMCHNW.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
@@ -180,7 +180,7 @@ function CloseIcon(props) {
|
|
|
180
180
|
}
|
|
181
181
|
var PHASES = ["PRE_DEPARTURE", "IN_TRIP", "POST_TRIP"];
|
|
182
182
|
function AddItemSheet({ open, sections, onSubmit, onClose }) {
|
|
183
|
-
const { t } =
|
|
183
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
184
184
|
const [sectionId, setSectionId] = react.useState(sections[0]?.id ?? "NEW");
|
|
185
185
|
const [newSectionTitle, setNewSectionTitle] = react.useState("");
|
|
186
186
|
const [newSectionPhase, setNewSectionPhase] = react.useState("PRE_DEPARTURE");
|
|
@@ -346,7 +346,7 @@ function AddItemSheet({ open, sections, onSubmit, onClose }) {
|
|
|
346
346
|
}
|
|
347
347
|
var GATES = ["NONE", "PRE_TO_ACTIVE", "ACTIVE_TO_CLOSED_OUT"];
|
|
348
348
|
function EditItemSheet({ item, onSubmit, onClose }) {
|
|
349
|
-
const { t } =
|
|
349
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
350
350
|
const [title, setTitle] = react.useState("");
|
|
351
351
|
const [subLine, setSubLine] = react.useState("");
|
|
352
352
|
const [isMandatory, setIsMandatory] = react.useState(false);
|
|
@@ -492,7 +492,7 @@ function ItemRow({
|
|
|
492
492
|
onEdit,
|
|
493
493
|
onDelete
|
|
494
494
|
}) {
|
|
495
|
-
const { t } =
|
|
495
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
496
496
|
const isComplete = item.status === "COMPLETE";
|
|
497
497
|
const due = dueDayLabelKey(item.dayOffset);
|
|
498
498
|
function onKeyDown(event) {
|
|
@@ -558,7 +558,7 @@ function ItemRow({
|
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
560
|
function ProgressCard({ title, subtitle, progress }) {
|
|
561
|
-
const { t } =
|
|
561
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
562
562
|
const percent = overallPercent(progress);
|
|
563
563
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__progress-card", children: [
|
|
564
564
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-checklist__progress-title", children: title }) : null,
|
|
@@ -585,7 +585,7 @@ function PullTemplateSheet({
|
|
|
585
585
|
onSubmit,
|
|
586
586
|
onClose
|
|
587
587
|
}) {
|
|
588
|
-
const { t } =
|
|
588
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
589
589
|
const [templates, setTemplates] = react.useState(void 0);
|
|
590
590
|
const [loadFailed, setLoadFailed] = react.useState(false);
|
|
591
591
|
const [selectedId, setSelectedId] = react.useState(void 0);
|
|
@@ -760,7 +760,7 @@ function SectionCard({
|
|
|
760
760
|
onDeleteItem,
|
|
761
761
|
ItemRowComponent
|
|
762
762
|
}) {
|
|
763
|
-
const { t } =
|
|
763
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
764
764
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__section", children: [
|
|
765
765
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__section-header", children: [
|
|
766
766
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -792,10 +792,10 @@ function ManagerChecklistSection({
|
|
|
792
792
|
components,
|
|
793
793
|
style
|
|
794
794
|
}) {
|
|
795
|
-
const { t } =
|
|
796
|
-
const checklist =
|
|
797
|
-
const managers =
|
|
798
|
-
const managerMe =
|
|
795
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
796
|
+
const checklist = chunk6WV5VYT2_cjs.useChecklists(tripRef);
|
|
797
|
+
const managers = chunk6WV5VYT2_cjs.useManagers(tripRef);
|
|
798
|
+
const managerMe = chunkOZJ74DVQ_cjs.useManagerMe();
|
|
799
799
|
const ProgressCardUI = components?.ProgressCard ?? ProgressCard;
|
|
800
800
|
const SectionCardUI = components?.SectionCard ?? SectionCard;
|
|
801
801
|
const ItemRowUI = components?.ItemRow ?? ItemRow;
|
|
@@ -807,7 +807,7 @@ function ManagerChecklistSection({
|
|
|
807
807
|
/* @__PURE__ */ new Map()
|
|
808
808
|
);
|
|
809
809
|
if (checklist.status === "loading") {
|
|
810
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__skeleton", style:
|
|
810
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
811
811
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-block" }),
|
|
812
812
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-line" }),
|
|
813
813
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-line kf-manager-checklist__skeleton-line--short" })
|
|
@@ -837,7 +837,7 @@ function ManagerChecklistSection({
|
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
839
|
};
|
|
840
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist", style:
|
|
840
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
841
841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
842
842
|
ProgressCardUI,
|
|
843
843
|
{
|
|
@@ -1066,7 +1066,7 @@ function LockIcon(props) {
|
|
|
1066
1066
|
);
|
|
1067
1067
|
}
|
|
1068
1068
|
function BlockerRow({ blocker, onAction }) {
|
|
1069
|
-
const { t } =
|
|
1069
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1070
1070
|
const Icon = blocker.severity === "hard" ? WarningIcon : InfoIcon;
|
|
1071
1071
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__blocker-row", "data-severity": blocker.severity, children: [
|
|
1072
1072
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-closeout__blocker-icon", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true" }) }),
|
|
@@ -1095,7 +1095,7 @@ function HandoverNoteEditor({
|
|
|
1095
1095
|
disabled,
|
|
1096
1096
|
onSave
|
|
1097
1097
|
}) {
|
|
1098
|
-
const { t } =
|
|
1098
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1099
1099
|
const [draft, setDraft] = react.useState(note ?? "");
|
|
1100
1100
|
const [savedLabel, setSavedLabel] = react.useState(false);
|
|
1101
1101
|
react.useEffect(() => {
|
|
@@ -1172,7 +1172,7 @@ function LockConfirmSheet({
|
|
|
1172
1172
|
onConfirm,
|
|
1173
1173
|
onClose
|
|
1174
1174
|
}) {
|
|
1175
|
-
const { t } =
|
|
1175
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1176
1176
|
react.useEffect(() => {
|
|
1177
1177
|
if (!open) {
|
|
1178
1178
|
return;
|
|
@@ -1247,7 +1247,7 @@ var PERFORMED_BY_LABEL_KEY = {
|
|
|
1247
1247
|
SYSTEM: "chrome.managerTrip.closeout.performedBy.system"
|
|
1248
1248
|
};
|
|
1249
1249
|
function LockedSummary({ aggregate }) {
|
|
1250
|
-
const { t } =
|
|
1250
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1251
1251
|
const performedByLabel = aggregate.performedByKind !== null ? t(
|
|
1252
1252
|
PERFORMED_BY_LABEL_KEY[aggregate.performedByKind] ?? "chrome.managerTrip.closeout.performedBy.system"
|
|
1253
1253
|
) : void 0;
|
|
@@ -1268,7 +1268,7 @@ function stageLabelKey(stage) {
|
|
|
1268
1268
|
return stage !== null ? STAGE_LABEL_KEY[stage] ?? "chrome.managerTrip.closeout.stage.notReturned" : "chrome.managerTrip.closeout.stage.notReturned";
|
|
1269
1269
|
}
|
|
1270
1270
|
function StageStrip({ aggregate }) {
|
|
1271
|
-
const { t } =
|
|
1271
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1272
1272
|
const { financialSummary } = aggregate;
|
|
1273
1273
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__stage", children: [
|
|
1274
1274
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-closeout__stage-badge", "data-stage": aggregate.stage ?? "none", children: t(stageLabelKey(aggregate.stage)) }),
|
|
@@ -1307,7 +1307,7 @@ function StageStrip({ aggregate }) {
|
|
|
1307
1307
|
] });
|
|
1308
1308
|
}
|
|
1309
1309
|
function UnlockRequestForm({ tripRef, onSubmit }) {
|
|
1310
|
-
const { t } =
|
|
1310
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1311
1311
|
const [reason, setReason] = react.useState("");
|
|
1312
1312
|
const [submitting, setSubmitting] = react.useState(false);
|
|
1313
1313
|
const [submitted, setSubmitted] = react.useState(false);
|
|
@@ -1352,13 +1352,13 @@ function ManagerCloseoutSection({
|
|
|
1352
1352
|
components,
|
|
1353
1353
|
style
|
|
1354
1354
|
}) {
|
|
1355
|
-
const { t } =
|
|
1356
|
-
const closeout =
|
|
1355
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1356
|
+
const closeout = chunk6WV5VYT2_cjs.useCloseout(tripRef);
|
|
1357
1357
|
const BlockerRowUI = components?.BlockerRow ?? BlockerRow;
|
|
1358
1358
|
const [lockSheetOpen, setLockSheetOpen] = react.useState(false);
|
|
1359
1359
|
const [lockPending, setLockPending] = react.useState(false);
|
|
1360
1360
|
if (closeout.status === "loading") {
|
|
1361
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style:
|
|
1361
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1362
1362
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1363
1363
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1364
1364
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line kf-manager-closeout__skeleton-line--short" })
|
|
@@ -1368,17 +1368,17 @@ function ManagerCloseoutSection({
|
|
|
1368
1368
|
return null;
|
|
1369
1369
|
}
|
|
1370
1370
|
if (!closeout.loaded || closeout.aggregate === void 0) {
|
|
1371
|
-
return closeout.lastFetchFailed ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style:
|
|
1371
|
+
return closeout.lastFetchFailed ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1372
1372
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1373
1373
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" })
|
|
1374
1374
|
] });
|
|
1375
1375
|
}
|
|
1376
1376
|
const { aggregate } = closeout;
|
|
1377
1377
|
if (aggregate.stage === null) {
|
|
1378
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout", style:
|
|
1378
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout", style: chunkUALMCHNW_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__not-returned", children: t("chrome.managerTrip.closeout.notReturnedYet") }) });
|
|
1379
1379
|
}
|
|
1380
1380
|
if (aggregate.lockedAt !== null) {
|
|
1381
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style:
|
|
1381
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1382
1382
|
/* @__PURE__ */ jsxRuntime.jsx(LockedSummary, { aggregate }),
|
|
1383
1383
|
/* @__PURE__ */ jsxRuntime.jsx(UnlockRequestForm, { tripRef, onSubmit: onSubmitUnlockRequest })
|
|
1384
1384
|
] });
|
|
@@ -1394,7 +1394,7 @@ function ManagerCloseoutSection({
|
|
|
1394
1394
|
setLockPending(false);
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style:
|
|
1397
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1398
1398
|
/* @__PURE__ */ jsxRuntime.jsx(StageStrip, { aggregate }),
|
|
1399
1399
|
rankedBlockers.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__all-clear", children: [
|
|
1400
1400
|
/* @__PURE__ */ jsxRuntime.jsx(CheckIcon2, { "aria-hidden": "true" }),
|
|
@@ -1618,7 +1618,7 @@ var PURPOSE_LABEL_KEY = {
|
|
|
1618
1618
|
trip_document: "chrome.managerTrip.documents.bucket.tripDocument"
|
|
1619
1619
|
};
|
|
1620
1620
|
function DocumentBucketTile({ purpose, count, onOpen }) {
|
|
1621
|
-
const { t } =
|
|
1621
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1622
1622
|
const Icon = PURPOSE_ICON[purpose];
|
|
1623
1623
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1624
1624
|
"button",
|
|
@@ -1654,7 +1654,7 @@ function formatFileSize(sizeBytes) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
var FILE_DATE_FORMATTER = new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short" });
|
|
1656
1656
|
function DocumentBucketGrid({ items, onOpen }) {
|
|
1657
|
-
const { t } =
|
|
1657
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1658
1658
|
const [activePurpose, setActivePurpose] = react.useState(void 0);
|
|
1659
1659
|
const buckets = react.useMemo(() => {
|
|
1660
1660
|
return PURPOSE_ORDER.map((purpose) => ({
|
|
@@ -1723,7 +1723,7 @@ async function shareFile(file) {
|
|
|
1723
1723
|
await navigator.clipboard.writeText(file.url);
|
|
1724
1724
|
}
|
|
1725
1725
|
function DocumentViewerSheet({ file, onClose }) {
|
|
1726
|
-
const { t } =
|
|
1726
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1727
1727
|
react.useEffect(() => {
|
|
1728
1728
|
if (file === void 0) {
|
|
1729
1729
|
return;
|
|
@@ -1810,8 +1810,8 @@ function ManagerDocumentsSection({
|
|
|
1810
1810
|
tripRef,
|
|
1811
1811
|
style
|
|
1812
1812
|
}) {
|
|
1813
|
-
const { t } =
|
|
1814
|
-
const files =
|
|
1813
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1814
|
+
const files = chunk6WV5VYT2_cjs.useFiles({ tripRef });
|
|
1815
1815
|
const [state, setState] = react.useState({ status: "loading" });
|
|
1816
1816
|
const [viewerFile, setViewerFile] = react.useState(void 0);
|
|
1817
1817
|
react.useEffect(() => {
|
|
@@ -1835,7 +1835,7 @@ function ManagerDocumentsSection({
|
|
|
1835
1835
|
setViewerFile(view);
|
|
1836
1836
|
}
|
|
1837
1837
|
if (state.status === "loading") {
|
|
1838
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents__skeleton", style:
|
|
1838
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1839
1839
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-documents__skeleton-tile" }),
|
|
1840
1840
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-documents__skeleton-tile" })
|
|
1841
1841
|
] });
|
|
@@ -1843,7 +1843,7 @@ function ManagerDocumentsSection({
|
|
|
1843
1843
|
if (state.status === "error") {
|
|
1844
1844
|
return null;
|
|
1845
1845
|
}
|
|
1846
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents", style:
|
|
1846
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
1847
1847
|
state.items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-documents__empty", children: t("chrome.managerTrip.documents.empty") }) : /* @__PURE__ */ jsxRuntime.jsx(DocumentBucketGrid, { items: state.items, onOpen: (fileId) => void handleOpen(fileId) }),
|
|
1848
1848
|
/* @__PURE__ */ jsxRuntime.jsx(DocumentViewerSheet, { file: viewerFile, onClose: () => setViewerFile(void 0) })
|
|
1849
1849
|
] });
|
|
@@ -1908,7 +1908,7 @@ function collectionReferenceRequired(mode) {
|
|
|
1908
1908
|
return mode !== "CASH";
|
|
1909
1909
|
}
|
|
1910
1910
|
function BalanceSummaryStrip({ rows, ownManagerId }) {
|
|
1911
|
-
const { t } =
|
|
1911
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1912
1912
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__summary", children: [
|
|
1913
1913
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-float-ledger__eyebrow", children: t("chrome.managerTrip.floatLedger.summaryEyebrow") }),
|
|
1914
1914
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__summary-list", children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__summary-row", children: [
|
|
@@ -1972,7 +1972,7 @@ var MOVEMENT_LABEL_KEY = {
|
|
|
1972
1972
|
EXPENSE: "chrome.managerTrip.floatLedger.type.expense"
|
|
1973
1973
|
};
|
|
1974
1974
|
function LedgerRow({ movement }) {
|
|
1975
|
-
const { t } =
|
|
1975
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
1976
1976
|
const isIn = movement.direction === "IN";
|
|
1977
1977
|
const Icon = isIn ? ArrowInIcon : ArrowOutIcon;
|
|
1978
1978
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__row", children: [
|
|
@@ -1999,10 +1999,10 @@ function ManagerFloatLedgerSection({
|
|
|
1999
1999
|
tripRef,
|
|
2000
2000
|
style
|
|
2001
2001
|
}) {
|
|
2002
|
-
const { t } =
|
|
2003
|
-
const float =
|
|
2002
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2003
|
+
const float = chunk6WV5VYT2_cjs.useFloat(tripRef);
|
|
2004
2004
|
if (float.status === "loading") {
|
|
2005
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__skeleton", style:
|
|
2005
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
2006
2006
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-block" }),
|
|
2007
2007
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-line" }),
|
|
2008
2008
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-line kf-manager-float-ledger__skeleton-line--short" })
|
|
@@ -2016,7 +2016,7 @@ function ManagerFloatLedgerSection({
|
|
|
2016
2016
|
const sortedMovements = [...movements].sort(
|
|
2017
2017
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
2018
2018
|
);
|
|
2019
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger", style:
|
|
2019
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
2020
2020
|
summary.rows.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(BalanceSummaryStrip, { rows: summary.rows, ownManagerId: ownManagerId ?? "" }) : null,
|
|
2021
2021
|
sortedMovements.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-float-ledger__empty", children: t("chrome.managerTrip.floatLedger.empty") }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__list", children: sortedMovements.map((movement) => /* @__PURE__ */ jsxRuntime.jsx(LedgerRow, { movement }, movement.id)) })
|
|
2022
2022
|
] });
|
|
@@ -2100,7 +2100,7 @@ function PersonIcon(props) {
|
|
|
2100
2100
|
);
|
|
2101
2101
|
}
|
|
2102
2102
|
function ConflictNotice({ onRefresh }) {
|
|
2103
|
-
const { t } =
|
|
2103
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2104
2104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__conflict", children: [
|
|
2105
2105
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon2, {}),
|
|
2106
2106
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -2161,7 +2161,7 @@ function SelectFieldEditor({
|
|
|
2161
2161
|
required,
|
|
2162
2162
|
onChange
|
|
2163
2163
|
}) {
|
|
2164
|
-
const { t } =
|
|
2164
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2165
2165
|
const [open, setOpen] = react.useState(false);
|
|
2166
2166
|
const rootRef = react.useRef(null);
|
|
2167
2167
|
const selected = options.find((option) => option.value === value);
|
|
@@ -2264,7 +2264,7 @@ var fallback = {
|
|
|
2264
2264
|
editor: ({ field, t }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-unsupported", children: t("chrome.managerTrip.forms.fieldUnsupported").replace("{label}", field.label) }),
|
|
2265
2265
|
preview: PlainPreview
|
|
2266
2266
|
};
|
|
2267
|
-
var fieldRegistry =
|
|
2267
|
+
var fieldRegistry = chunkUALMCHNW_cjs.createRegistry({ fallback });
|
|
2268
2268
|
fieldRegistry.register("HEADING", {
|
|
2269
2269
|
editor: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-manager-forms__field-heading", children: field.label }),
|
|
2270
2270
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-manager-forms__field-heading", children: field.label })
|
|
@@ -2552,7 +2552,7 @@ fieldRegistry.register("MULTISELECT", {
|
|
|
2552
2552
|
},
|
|
2553
2553
|
preview: ({ value }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-preview", children: Array.isArray(value) ? value.join(", ") : "" })
|
|
2554
2554
|
});
|
|
2555
|
-
fieldRegistry.register(
|
|
2555
|
+
fieldRegistry.register(chunk6WV5VYT2_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN, {
|
|
2556
2556
|
editor: ({ field, value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ToggleSwitch, { checked: value === true, label: field.label, onChange }),
|
|
2557
2557
|
preview: ({ value, t }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-preview", children: value === true ? t("chrome.managerTrip.forms.field.yes") : t("chrome.managerTrip.forms.field.no") })
|
|
2558
2558
|
});
|
|
@@ -2580,7 +2580,7 @@ function FormFillRenderer({
|
|
|
2580
2580
|
onRefreshAfterConflict,
|
|
2581
2581
|
onBack
|
|
2582
2582
|
}) {
|
|
2583
|
-
const { t } =
|
|
2583
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2584
2584
|
const [answers, setAnswers] = react.useState(() => {
|
|
2585
2585
|
const initial = {};
|
|
2586
2586
|
for (const answer of existingResponse?.answers ?? []) {
|
|
@@ -2624,7 +2624,7 @@ function FormFillRenderer({
|
|
|
2624
2624
|
(fieldsBySection.get(section.id) ?? []).map((field) => {
|
|
2625
2625
|
const handler = fieldRegistry.resolve(field.kind);
|
|
2626
2626
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__fill-field", children: [
|
|
2627
|
-
field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !==
|
|
2627
|
+
field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !== chunk6WV5VYT2_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN && field.kind !== "CONSENT" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-forms__fill-field-label", htmlFor: field.id, children: [
|
|
2628
2628
|
field.label,
|
|
2629
2629
|
field.required ? " *" : ""
|
|
2630
2630
|
] }) : null,
|
|
@@ -2666,7 +2666,7 @@ function FillHeader({
|
|
|
2666
2666
|
title,
|
|
2667
2667
|
onBack
|
|
2668
2668
|
}) {
|
|
2669
|
-
const { t } =
|
|
2669
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2670
2670
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__fill-header", children: [
|
|
2671
2671
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2672
2672
|
"button",
|
|
@@ -2720,7 +2720,7 @@ function FormResponsesList({
|
|
|
2720
2720
|
onSelectResponse,
|
|
2721
2721
|
onBack
|
|
2722
2722
|
}) {
|
|
2723
|
-
const { t } =
|
|
2723
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2724
2724
|
const sorted = responses.slice().sort(
|
|
2725
2725
|
(a, b) => (b.submittedAt ?? b.lastSavedAt ?? "").localeCompare(a.submittedAt ?? a.lastSavedAt ?? "")
|
|
2726
2726
|
);
|
|
@@ -2826,7 +2826,7 @@ var STATUS_LABEL_KEY = {
|
|
|
2826
2826
|
ARCHIVED: "chrome.managerTrip.forms.statusArchived"
|
|
2827
2827
|
};
|
|
2828
2828
|
function FormRow({ row, now, travellerScoped, onSelect }) {
|
|
2829
|
-
const { t } =
|
|
2829
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2830
2830
|
const { form, response } = row;
|
|
2831
2831
|
const state = fillStateOf(form);
|
|
2832
2832
|
const due = dueCopyFor(form, now);
|
|
@@ -2864,7 +2864,7 @@ function TripFormsPanel({
|
|
|
2864
2864
|
travellerScoped,
|
|
2865
2865
|
onSelectForm
|
|
2866
2866
|
}) {
|
|
2867
|
-
const { t } =
|
|
2867
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2868
2868
|
if (rows.length === 0) {
|
|
2869
2869
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__empty", children: [
|
|
2870
2870
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__empty-title", children: t("chrome.managerTrip.forms.emptyTitle") }),
|
|
@@ -2924,10 +2924,10 @@ function ManagerFormsSection({
|
|
|
2924
2924
|
components,
|
|
2925
2925
|
style
|
|
2926
2926
|
}) {
|
|
2927
|
-
const { t } =
|
|
2928
|
-
const forms =
|
|
2929
|
-
const conflicts =
|
|
2930
|
-
const parties =
|
|
2927
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
2928
|
+
const forms = chunk6WV5VYT2_cjs.useForms(tripRef);
|
|
2929
|
+
const conflicts = chunkOZJ74DVQ_cjs.useConflicts(tripRef);
|
|
2930
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
2931
2931
|
const TripFormsPanelUI = components?.TripFormsPanel ?? TripFormsPanel;
|
|
2932
2932
|
const FormFillRendererUI = components?.FormFillRenderer ?? FormFillRenderer;
|
|
2933
2933
|
const [travellerRows, setTravellerRows] = react.useState([]);
|
|
@@ -3047,7 +3047,7 @@ function ManagerFormsSection({
|
|
|
3047
3047
|
};
|
|
3048
3048
|
}, [ready, browsingFormId, viewingResponse]);
|
|
3049
3049
|
if (forms.status === "loading") {
|
|
3050
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__skeleton", style:
|
|
3050
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
3051
3051
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line" }),
|
|
3052
3052
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line" }),
|
|
3053
3053
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line kf-manager-forms__skeleton-line--short" })
|
|
@@ -3101,7 +3101,7 @@ function ManagerFormsSection({
|
|
|
3101
3101
|
setPending(false);
|
|
3102
3102
|
}
|
|
3103
3103
|
}
|
|
3104
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms", style:
|
|
3104
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
3105
3105
|
browsingForm !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3106
3106
|
FormResponsesList,
|
|
3107
3107
|
{
|
|
@@ -3400,7 +3400,7 @@ function AddItemSheet2({
|
|
|
3400
3400
|
onDelete,
|
|
3401
3401
|
onClose
|
|
3402
3402
|
}) {
|
|
3403
|
-
const { t } =
|
|
3403
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
3404
3404
|
const [type, setType] = react.useState("OTHER");
|
|
3405
3405
|
const [title, setTitle] = react.useState("");
|
|
3406
3406
|
const [description, setDescription] = react.useState("");
|
|
@@ -3697,7 +3697,7 @@ function ChangeLogSheet({
|
|
|
3697
3697
|
onLoad,
|
|
3698
3698
|
onClose
|
|
3699
3699
|
}) {
|
|
3700
|
-
const { t } =
|
|
3700
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
3701
3701
|
react.useEffect(() => {
|
|
3702
3702
|
if (open) {
|
|
3703
3703
|
onLoad();
|
|
@@ -3760,7 +3760,7 @@ function DayStrip({ days, selectedDayIndex, onSelect }) {
|
|
|
3760
3760
|
)) });
|
|
3761
3761
|
}
|
|
3762
3762
|
function EditDaySheet({ open, day, onPatch, onClose }) {
|
|
3763
|
-
const { t } =
|
|
3763
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
3764
3764
|
const [cardTitle, setCardTitle] = react.useState("");
|
|
3765
3765
|
const [summaryLine, setSummaryLine] = react.useState("");
|
|
3766
3766
|
const [pending, setPending] = react.useState(false);
|
|
@@ -3858,7 +3858,7 @@ function ItemCard({
|
|
|
3858
3858
|
onMoveDown,
|
|
3859
3859
|
onEdit
|
|
3860
3860
|
}) {
|
|
3861
|
-
const { t } =
|
|
3861
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
3862
3862
|
const timeRange = formatTimeRange(item.startTime, item.endTime);
|
|
3863
3863
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__item-card", children: [
|
|
3864
3864
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__item-reorder", children: [
|
|
@@ -3913,9 +3913,9 @@ function ManagerItinerarySection({
|
|
|
3913
3913
|
components,
|
|
3914
3914
|
style
|
|
3915
3915
|
}) {
|
|
3916
|
-
const { t } =
|
|
3917
|
-
const itinerary =
|
|
3918
|
-
const vendors =
|
|
3916
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
3917
|
+
const itinerary = chunk6WV5VYT2_cjs.useItinerary(tripRef);
|
|
3918
|
+
const vendors = chunk6WV5VYT2_cjs.useVendors(tripRef, "");
|
|
3919
3919
|
const DayStripComponent = components?.DayStrip ?? DayStrip;
|
|
3920
3920
|
const ItemCardComponent = components?.ItemCard ?? ItemCard;
|
|
3921
3921
|
const [selectedDayIndex, setSelectedDayIndex] = react.useState(void 0);
|
|
@@ -3923,7 +3923,7 @@ function ManagerItinerarySection({
|
|
|
3923
3923
|
const [editDayOpen, setEditDayOpen] = react.useState(false);
|
|
3924
3924
|
const [changeLogOpen, setChangeLogOpen] = react.useState(false);
|
|
3925
3925
|
if (itinerary.status === "loading") {
|
|
3926
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__skeleton", style:
|
|
3926
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
3927
3927
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-block" }),
|
|
3928
3928
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-line" }),
|
|
3929
3929
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-line kf-manager-itinerary__skeleton-line--short" })
|
|
@@ -3935,7 +3935,7 @@ function ManagerItinerarySection({
|
|
|
3935
3935
|
const days = sortedDays(itinerary.days);
|
|
3936
3936
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
3937
3937
|
if (days.length === 0) {
|
|
3938
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary", style:
|
|
3938
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary", style: chunkUALMCHNW_cjs.tokenStyle(style), children: resolvedEmptyView ?? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__card kf-manager-itinerary__empty", children: t("chrome.managerTrip.itinerary.noDays") }) });
|
|
3939
3939
|
}
|
|
3940
3940
|
const resolvedDayIndex = selectedDayIndex ?? resolveInitialDayIndex(days, itinerary.initialDayIso);
|
|
3941
3941
|
const activeDay = days.find((day) => day.dayIndex === resolvedDayIndex) ?? days[0];
|
|
@@ -3951,7 +3951,7 @@ function ManagerItinerarySection({
|
|
|
3951
3951
|
}
|
|
3952
3952
|
await itinerary.reorderItem({ itemId: item.id, index: index + direction });
|
|
3953
3953
|
};
|
|
3954
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary", style:
|
|
3954
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
3955
3955
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3956
3956
|
DayStripComponent,
|
|
3957
3957
|
{
|
|
@@ -4191,7 +4191,7 @@ function TripBookingGroupCard({
|
|
|
4191
4191
|
onCollect,
|
|
4192
4192
|
onOpenTraveller
|
|
4193
4193
|
}) {
|
|
4194
|
-
const { t } =
|
|
4194
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4195
4195
|
const title = group.label ?? t(KIND_LABEL_KEY[group.kind]);
|
|
4196
4196
|
const visibleMembers = group.members.slice(0, VISIBLE_MEMBER_COUNT);
|
|
4197
4197
|
const overflowCount = group.members.length - visibleMembers.length;
|
|
@@ -4341,7 +4341,7 @@ function TripManifestFilterSheet({
|
|
|
4341
4341
|
onApply,
|
|
4342
4342
|
onClose
|
|
4343
4343
|
}) {
|
|
4344
|
-
const { t } =
|
|
4344
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4345
4345
|
react.useEffect(() => {
|
|
4346
4346
|
if (!open) {
|
|
4347
4347
|
return;
|
|
@@ -4449,7 +4449,7 @@ function TripManifestSearchRow({
|
|
|
4449
4449
|
filters,
|
|
4450
4450
|
onOpenFilters
|
|
4451
4451
|
}) {
|
|
4452
|
-
const { t } =
|
|
4452
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4453
4453
|
const activeCount = activeManifestFilterCount(filters);
|
|
4454
4454
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__search-row", children: [
|
|
4455
4455
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__search-field", children: [
|
|
@@ -4482,7 +4482,7 @@ function TripManifestSearchRow({
|
|
|
4482
4482
|
] });
|
|
4483
4483
|
}
|
|
4484
4484
|
function TripManifestStats({ stats }) {
|
|
4485
|
-
const { t } =
|
|
4485
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4486
4486
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__stats", children: [
|
|
4487
4487
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__stat-cell", children: [
|
|
4488
4488
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-manifest__stat-label", children: t("chrome.managerTrip.manifest.stats.confirmed") }),
|
|
@@ -4530,7 +4530,7 @@ function initials2(fullName) {
|
|
|
4530
4530
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
4531
4531
|
}
|
|
4532
4532
|
function TripTravellerRow({ traveller, onOpen }) {
|
|
4533
|
-
const { t } =
|
|
4533
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4534
4534
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4535
4535
|
"button",
|
|
4536
4536
|
{
|
|
@@ -4564,11 +4564,11 @@ function ManagerManifestSection({
|
|
|
4564
4564
|
components,
|
|
4565
4565
|
style
|
|
4566
4566
|
}) {
|
|
4567
|
-
const { t } =
|
|
4567
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4568
4568
|
const Stats = components?.Stats ?? TripManifestStats;
|
|
4569
4569
|
const BookingGroupCard = components?.BookingGroupCard ?? TripBookingGroupCard;
|
|
4570
4570
|
const TravellerRow = components?.TravellerRow ?? TripTravellerRow;
|
|
4571
|
-
const parties =
|
|
4571
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
4572
4572
|
const [query, setQuery] = react.useState("");
|
|
4573
4573
|
const [filters, setFilters] = react.useState(EMPTY_MANIFEST_FILTERS);
|
|
4574
4574
|
const [filterSheetOpen, setFilterSheetOpen] = react.useState(false);
|
|
@@ -4600,18 +4600,35 @@ function ManagerManifestSection({
|
|
|
4600
4600
|
[travellers]
|
|
4601
4601
|
);
|
|
4602
4602
|
if (parties.status === "loading") {
|
|
4603
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__skeleton", style:
|
|
4603
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
4604
4604
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-block" }),
|
|
4605
4605
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-line" }),
|
|
4606
4606
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-line kf-manager-manifest__skeleton-line--short" })
|
|
4607
4607
|
] });
|
|
4608
4608
|
}
|
|
4609
4609
|
if (parties.status === "error") {
|
|
4610
|
-
return
|
|
4610
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4611
|
+
chunkYNHOPYBK_cjs.OfflineFallbackScreen,
|
|
4612
|
+
{
|
|
4613
|
+
tripRef,
|
|
4614
|
+
onRetry: () => void parties.retry(),
|
|
4615
|
+
...style !== void 0 ? { style } : {}
|
|
4616
|
+
}
|
|
4617
|
+
);
|
|
4618
|
+
}
|
|
4619
|
+
if (!parties.tripRoster.loaded && parties.tripRoster.lastFetchFailed) {
|
|
4620
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4621
|
+
chunkYNHOPYBK_cjs.OfflineFallbackScreen,
|
|
4622
|
+
{
|
|
4623
|
+
tripRef,
|
|
4624
|
+
onRetry: () => void parties.tripRoster.refresh(),
|
|
4625
|
+
...style !== void 0 ? { style } : {}
|
|
4626
|
+
}
|
|
4627
|
+
);
|
|
4611
4628
|
}
|
|
4612
4629
|
const noMatches = filteredTravellers.length === 0;
|
|
4613
4630
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
4614
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest", style:
|
|
4631
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
4615
4632
|
/* @__PURE__ */ jsxRuntime.jsx(Stats, { stats }),
|
|
4616
4633
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4617
4634
|
TripManifestSearchRow,
|
|
@@ -4745,7 +4762,7 @@ function initials3(fullName) {
|
|
|
4745
4762
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
4746
4763
|
}
|
|
4747
4764
|
function ProfileHeader({ fullName }) {
|
|
4748
|
-
const { t } =
|
|
4765
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4749
4766
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__profile-card", children: [
|
|
4750
4767
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-me__avatar", "aria-hidden": "true", children: initials3(fullName) }),
|
|
4751
4768
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__profile-body", children: [
|
|
@@ -4768,7 +4785,7 @@ var STATUS_LABEL_KEY4 = {
|
|
|
4768
4785
|
CANCELLED: "chrome.managerMe.trips.status.cancelled"
|
|
4769
4786
|
};
|
|
4770
4787
|
function RecentTrips({ trips, onOpenTrip }) {
|
|
4771
|
-
const { t } =
|
|
4788
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4772
4789
|
if (trips.length === 0) {
|
|
4773
4790
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerMe.trips.eyebrow"), children: [
|
|
4774
4791
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-me__eyebrow", children: t("chrome.managerMe.trips.eyebrow") }),
|
|
@@ -4808,7 +4825,7 @@ function RecentTrips({ trips, onOpenTrip }) {
|
|
|
4808
4825
|
] });
|
|
4809
4826
|
}
|
|
4810
4827
|
function StatsStrip({ trips }) {
|
|
4811
|
-
const { t } =
|
|
4828
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4812
4829
|
const leading = trips.filter((trip) => trip.isLead).length;
|
|
4813
4830
|
const coManaging = trips.length - leading;
|
|
4814
4831
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__stat-grid", children: [
|
|
@@ -4827,7 +4844,7 @@ function StatsStrip({ trips }) {
|
|
|
4827
4844
|
] });
|
|
4828
4845
|
}
|
|
4829
4846
|
function SyncStatus({ status }) {
|
|
4830
|
-
const { t } =
|
|
4847
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4831
4848
|
const Icon = status.isOnline ? WifiOnIcon : WifiOffIcon;
|
|
4832
4849
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerMe.sync.eyebrow"), children: [
|
|
4833
4850
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-me__eyebrow", children: t("chrome.managerMe.sync.eyebrow") }),
|
|
@@ -4849,11 +4866,11 @@ function ManagerMeSection({
|
|
|
4849
4866
|
onSignOut,
|
|
4850
4867
|
style
|
|
4851
4868
|
}) {
|
|
4852
|
-
const { t } =
|
|
4853
|
-
const managerMe =
|
|
4854
|
-
const outboxStatus =
|
|
4869
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4870
|
+
const managerMe = chunkOZJ74DVQ_cjs.useManagerMe();
|
|
4871
|
+
const outboxStatus = chunkUALMCHNW_cjs.useOutboxStatus();
|
|
4855
4872
|
if (managerMe.status === "loading") {
|
|
4856
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__skeleton", style:
|
|
4873
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
4857
4874
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-block" }),
|
|
4858
4875
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-line" }),
|
|
4859
4876
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-line kf-manager-me__skeleton-line--short" })
|
|
@@ -4862,7 +4879,7 @@ function ManagerMeSection({
|
|
|
4862
4879
|
if (managerMe.status === "error") {
|
|
4863
4880
|
return null;
|
|
4864
4881
|
}
|
|
4865
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me", style:
|
|
4882
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
4866
4883
|
/* @__PURE__ */ jsxRuntime.jsx(ProfileHeader, { fullName: managerMe.manager.fullName }),
|
|
4867
4884
|
/* @__PURE__ */ jsxRuntime.jsx(StatsStrip, { trips: managerMe.trips }),
|
|
4868
4885
|
/* @__PURE__ */ jsxRuntime.jsx(RecentTrips, { trips: managerMe.trips, onOpenTrip }),
|
|
@@ -4906,7 +4923,7 @@ function ManagerFab({
|
|
|
4906
4923
|
"aria-label": label,
|
|
4907
4924
|
"data-tone": tone,
|
|
4908
4925
|
className: "kf-manager-fab kf-press--fab",
|
|
4909
|
-
style:
|
|
4926
|
+
style: chunkUALMCHNW_cjs.tokenStyle(style),
|
|
4910
4927
|
children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(PlusIcon3, {})
|
|
4911
4928
|
}
|
|
4912
4929
|
);
|
|
@@ -4976,7 +4993,7 @@ function FloatMovementSheet({
|
|
|
4976
4993
|
onAdjust,
|
|
4977
4994
|
onClose
|
|
4978
4995
|
}) {
|
|
4979
|
-
const { t } =
|
|
4996
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
4980
4997
|
const [kind, setKind] = react.useState("RETURN");
|
|
4981
4998
|
const [amount, setAmount] = react.useState("");
|
|
4982
4999
|
const [direction, setDirection] = react.useState("OUT");
|
|
@@ -5130,8 +5147,8 @@ function LogExpenseSheet({
|
|
|
5130
5147
|
onSubmit,
|
|
5131
5148
|
onClose
|
|
5132
5149
|
}) {
|
|
5133
|
-
const { t } =
|
|
5134
|
-
const files =
|
|
5150
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5151
|
+
const files = chunk6WV5VYT2_cjs.useFiles({ tripRef });
|
|
5135
5152
|
const receiptInputId = react.useId();
|
|
5136
5153
|
const [amount, setAmount] = react.useState("");
|
|
5137
5154
|
const [category, setCategory] = react.useState("MISC");
|
|
@@ -5356,7 +5373,7 @@ function RecordCollectionSheet({
|
|
|
5356
5373
|
onSubmit,
|
|
5357
5374
|
onClose
|
|
5358
5375
|
}) {
|
|
5359
|
-
const { t } =
|
|
5376
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5360
5377
|
const outstandingByTravellerId = new Map(
|
|
5361
5378
|
balancesDue.map((row) => [row.travellerId, row])
|
|
5362
5379
|
);
|
|
@@ -5578,7 +5595,7 @@ function AddMoneyMenuSheet({
|
|
|
5578
5595
|
onMoveFloat,
|
|
5579
5596
|
onClose
|
|
5580
5597
|
}) {
|
|
5581
|
-
const { t } =
|
|
5598
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5582
5599
|
if (!open) {
|
|
5583
5600
|
return null;
|
|
5584
5601
|
}
|
|
@@ -5683,7 +5700,7 @@ function BalancesDueSection({
|
|
|
5683
5700
|
onSelect,
|
|
5684
5701
|
onSeeAll
|
|
5685
5702
|
}) {
|
|
5686
|
-
const { t } =
|
|
5703
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5687
5704
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.money.balancesDue.ariaLabel"), children: [
|
|
5688
5705
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-manager-money__eyebrow-row", children: [
|
|
5689
5706
|
t("chrome.managerTrip.money.balancesDue.eyebrow"),
|
|
@@ -5714,7 +5731,7 @@ function ExpenseDetailSheet({
|
|
|
5714
5731
|
onWithdrawClaim,
|
|
5715
5732
|
onClose
|
|
5716
5733
|
}) {
|
|
5717
|
-
const { t } =
|
|
5734
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5718
5735
|
const [pending, setPending] = react.useState(false);
|
|
5719
5736
|
const [confirmingVoid, setConfirmingVoid] = react.useState(false);
|
|
5720
5737
|
const [voidReason, setVoidReason] = react.useState("");
|
|
@@ -5860,7 +5877,7 @@ function ExpenseDetailSheet({
|
|
|
5860
5877
|
) });
|
|
5861
5878
|
}
|
|
5862
5879
|
function MoneyStats({ float, spend, collect, reimbursable }) {
|
|
5863
|
-
const { t } =
|
|
5880
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5864
5881
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__stats", children: [
|
|
5865
5882
|
float !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__stat-cell", children: [
|
|
5866
5883
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-money__stat-label", children: t("chrome.managerTrip.money.stat.float") }),
|
|
@@ -5897,7 +5914,7 @@ function RecentExpensesSection({
|
|
|
5897
5914
|
expenses,
|
|
5898
5915
|
onSelect
|
|
5899
5916
|
}) {
|
|
5900
|
-
const { t } =
|
|
5917
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5901
5918
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.money.recentExpenses.ariaLabel"), children: [
|
|
5902
5919
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow", children: t("chrome.managerTrip.money.recentExpenses.eyebrow") }),
|
|
5903
5920
|
expenses.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__card kf-manager-money__empty", children: t("chrome.managerTrip.money.recentExpenses.empty") }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__list", children: expenses.slice(0, 5).map((expense) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5928,11 +5945,11 @@ function ManagerMoneySection({
|
|
|
5928
5945
|
components,
|
|
5929
5946
|
style
|
|
5930
5947
|
}) {
|
|
5931
|
-
const { t } =
|
|
5932
|
-
const float =
|
|
5933
|
-
const expenses =
|
|
5934
|
-
const collections =
|
|
5935
|
-
const parties =
|
|
5948
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
5949
|
+
const float = chunk6WV5VYT2_cjs.useFloat(tripRef);
|
|
5950
|
+
const expenses = chunk6WV5VYT2_cjs.useExpenses(tripRef);
|
|
5951
|
+
const collections = chunk6WV5VYT2_cjs.useCollections(tripRef);
|
|
5952
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
5936
5953
|
const StatsComponent = components?.Stats ?? MoneyStats;
|
|
5937
5954
|
const RecentExpensesComponent = components?.RecentExpenses ?? RecentExpensesSection;
|
|
5938
5955
|
const BalancesDueComponent = components?.BalancesDue ?? BalancesDueSection;
|
|
@@ -5943,7 +5960,7 @@ function ManagerMoneySection({
|
|
|
5943
5960
|
const [expenseDetail, setExpenseDetail] = react.useState(void 0);
|
|
5944
5961
|
const [showingAllBalances, setShowingAllBalances] = react.useState(false);
|
|
5945
5962
|
if (float.status === "loading" && expenses.status === "loading" && collections.status === "loading") {
|
|
5946
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__skeleton", style:
|
|
5963
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
5947
5964
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-block" }),
|
|
5948
5965
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-line" }),
|
|
5949
5966
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-line kf-manager-money__skeleton-line--short" })
|
|
@@ -5961,7 +5978,7 @@ function ManagerMoneySection({
|
|
|
5961
5978
|
const canLogExpense = expensesReady !== void 0;
|
|
5962
5979
|
const canRecordCollection = collectionsReady !== void 0 && rosterRows.length > 0;
|
|
5963
5980
|
const canMoveFloat = floatReady !== void 0 && floatRow !== void 0;
|
|
5964
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money", style:
|
|
5981
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
5965
5982
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5966
5983
|
StatsComponent,
|
|
5967
5984
|
{
|
|
@@ -6159,10 +6176,10 @@ function ManagerNotificationsSection({
|
|
|
6159
6176
|
onSelectNotification,
|
|
6160
6177
|
style
|
|
6161
6178
|
}) {
|
|
6162
|
-
const { t } =
|
|
6163
|
-
const notifications =
|
|
6179
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6180
|
+
const notifications = chunkOZJ74DVQ_cjs.useNotifications();
|
|
6164
6181
|
if (notifications.status === "loading") {
|
|
6165
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__skeleton", style:
|
|
6182
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
6166
6183
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line" }),
|
|
6167
6184
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line" }),
|
|
6168
6185
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line kf-manager-notifications__skeleton-line--short" })
|
|
@@ -6178,7 +6195,7 @@ function ManagerNotificationsSection({
|
|
|
6178
6195
|
}
|
|
6179
6196
|
onSelectNotification({ notificationId: notification.id, tripId: notification.tripId });
|
|
6180
6197
|
}
|
|
6181
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications", style:
|
|
6198
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications", style: chunkUALMCHNW_cjs.tokenStyle(style), children: rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__empty", children: [
|
|
6182
6199
|
/* @__PURE__ */ jsxRuntime.jsx(InboxIcon, { className: "kf-manager-notifications__empty-icon" }),
|
|
6183
6200
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-notifications__empty-title", children: t("chrome.managerNotifications.emptyTitle") }),
|
|
6184
6201
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-notifications__empty-body", children: t("chrome.managerNotifications.emptyBody") })
|
|
@@ -6311,7 +6328,7 @@ var TONE_ICON = {
|
|
|
6311
6328
|
info: () => /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {})
|
|
6312
6329
|
};
|
|
6313
6330
|
function NowBanners({ banners }) {
|
|
6314
|
-
const { t } =
|
|
6331
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6315
6332
|
if (banners.length === 0) {
|
|
6316
6333
|
return null;
|
|
6317
6334
|
}
|
|
@@ -6327,7 +6344,7 @@ function NowBanners({ banners }) {
|
|
|
6327
6344
|
] }, banner.id)) });
|
|
6328
6345
|
}
|
|
6329
6346
|
function NowChecklist({ items }) {
|
|
6330
|
-
const { t } =
|
|
6347
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6331
6348
|
if (items.length === 0) {
|
|
6332
6349
|
return null;
|
|
6333
6350
|
}
|
|
@@ -6352,7 +6369,7 @@ function initials4(fullName) {
|
|
|
6352
6369
|
return `${first[0] ?? ""}${last[0] ?? ""}`.toUpperCase();
|
|
6353
6370
|
}
|
|
6354
6371
|
function NowCoManager({ coManager }) {
|
|
6355
|
-
const { t } =
|
|
6372
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6356
6373
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.coManager.ariaLabel"), children: [
|
|
6357
6374
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.coManager.eyebrow") }),
|
|
6358
6375
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__co-manager-card", children: [
|
|
@@ -6395,7 +6412,7 @@ function NowHero({
|
|
|
6395
6412
|
progressPct,
|
|
6396
6413
|
onNavigateModule
|
|
6397
6414
|
}) {
|
|
6398
|
-
const { t } =
|
|
6415
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6399
6416
|
const progress = Math.max(0, Math.min(100, progressPct));
|
|
6400
6417
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-now__hero", "aria-label": t("chrome.managerNow.hero.ariaLabel"), children: [
|
|
6401
6418
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__hero-top", children: [
|
|
@@ -6454,7 +6471,7 @@ function formatTimeOfDay(isoDateTime, timezone) {
|
|
|
6454
6471
|
return formatter.format(new Date(isoDateTime));
|
|
6455
6472
|
}
|
|
6456
6473
|
function NowTimeline({ items, timezone }) {
|
|
6457
|
-
const { t } =
|
|
6474
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6458
6475
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.timeline.ariaLabel"), children: [
|
|
6459
6476
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.timeline.eyebrow") }),
|
|
6460
6477
|
items.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__card kf-manager-now__list", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__timeline-row", "data-state": item.timeState, children: [
|
|
@@ -6468,7 +6485,7 @@ function NowTimeline({ items, timezone }) {
|
|
|
6468
6485
|
] });
|
|
6469
6486
|
}
|
|
6470
6487
|
function NowTotals({ spend, collections }) {
|
|
6471
|
-
const { t } =
|
|
6488
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6472
6489
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.totals.ariaLabel"), children: [
|
|
6473
6490
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.totals.eyebrow") }),
|
|
6474
6491
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__totals-grid", children: [
|
|
@@ -6521,7 +6538,7 @@ function NowTripSummary({
|
|
|
6521
6538
|
floatOutstandingMinor,
|
|
6522
6539
|
onViewCloseout
|
|
6523
6540
|
}) {
|
|
6524
|
-
const { t } =
|
|
6541
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6525
6542
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.closeout.ariaLabel"), children: [
|
|
6526
6543
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__eyebrow-row", children: [
|
|
6527
6544
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow", children: t("chrome.managerNow.closeout.eyebrow") }),
|
|
@@ -6586,7 +6603,7 @@ function occupancyTone(fillCount, capacity) {
|
|
|
6586
6603
|
return "neutral";
|
|
6587
6604
|
}
|
|
6588
6605
|
function NowVehicleCards({ vehicles }) {
|
|
6589
|
-
const { t } =
|
|
6606
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6590
6607
|
if (vehicles.length === 0) {
|
|
6591
6608
|
return null;
|
|
6592
6609
|
}
|
|
@@ -6627,7 +6644,7 @@ function QuickActionsSheet({
|
|
|
6627
6644
|
onCollectPayment,
|
|
6628
6645
|
onManageFloat
|
|
6629
6646
|
}) {
|
|
6630
|
-
const { t } =
|
|
6647
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6631
6648
|
react.useEffect(() => {
|
|
6632
6649
|
if (!open) {
|
|
6633
6650
|
return;
|
|
@@ -6729,7 +6746,7 @@ function sumTodayCollections(collections, serverTime, timezone, currency) {
|
|
|
6729
6746
|
return { totalMinor, currency, count };
|
|
6730
6747
|
}
|
|
6731
6748
|
function ManagerNowSection(props) {
|
|
6732
|
-
const session =
|
|
6749
|
+
const session = chunkUALMCHNW_cjs.useSession();
|
|
6733
6750
|
if (session.status !== "authenticated") {
|
|
6734
6751
|
return null;
|
|
6735
6752
|
}
|
|
@@ -6766,17 +6783,17 @@ function ReadyManagerNowSection({
|
|
|
6766
6783
|
idleView,
|
|
6767
6784
|
style
|
|
6768
6785
|
}) {
|
|
6769
|
-
const { t } =
|
|
6786
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6770
6787
|
const [sheetOpen, setSheetOpen] = react.useState(false);
|
|
6771
6788
|
const [activeMoneySheet, setActiveMoneySheet] = react.useState(void 0);
|
|
6772
|
-
const managerMe =
|
|
6773
|
-
const today =
|
|
6774
|
-
const expenses =
|
|
6775
|
-
const collections =
|
|
6776
|
-
const float =
|
|
6777
|
-
const parties =
|
|
6778
|
-
const managers =
|
|
6779
|
-
const closeout =
|
|
6789
|
+
const managerMe = chunkOZJ74DVQ_cjs.useManagerMe();
|
|
6790
|
+
const today = chunk6WV5VYT2_cjs.useManagerToday(tripRef);
|
|
6791
|
+
const expenses = chunk6WV5VYT2_cjs.useExpenses(tripRef);
|
|
6792
|
+
const collections = chunk6WV5VYT2_cjs.useCollections(tripRef);
|
|
6793
|
+
const float = chunk6WV5VYT2_cjs.useFloat(tripRef);
|
|
6794
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
6795
|
+
const managers = chunk6WV5VYT2_cjs.useManagers(tripRef);
|
|
6796
|
+
const closeout = chunk6WV5VYT2_cjs.useCloseout(tripRef);
|
|
6780
6797
|
if (today.status === "loading" || managerMe.status === "loading") {
|
|
6781
6798
|
return /* @__PURE__ */ jsxRuntime.jsx(ManagerNowSkeleton, { style });
|
|
6782
6799
|
}
|
|
@@ -6796,7 +6813,7 @@ function ReadyManagerNowSection({
|
|
|
6796
6813
|
if (idleView !== void 0) {
|
|
6797
6814
|
return typeof idleView === "function" ? idleView(idleReading) : idleView;
|
|
6798
6815
|
}
|
|
6799
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style:
|
|
6816
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
6800
6817
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6801
6818
|
NowHero,
|
|
6802
6819
|
{
|
|
@@ -6854,7 +6871,7 @@ function ReadyManagerNowSection({
|
|
|
6854
6871
|
const canLogExpense = expensesReady !== void 0;
|
|
6855
6872
|
const canCollectPayment = collectionsReady !== void 0 && rosterRows.length > 0;
|
|
6856
6873
|
const canManageFloat = floatReady !== void 0 && floatRow !== void 0;
|
|
6857
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style:
|
|
6874
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
6858
6875
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6859
6876
|
NowHero,
|
|
6860
6877
|
{
|
|
@@ -6960,14 +6977,14 @@ function ReadyManagerNowSection({
|
|
|
6960
6977
|
function ManagerNowSkeleton({
|
|
6961
6978
|
style
|
|
6962
6979
|
}) {
|
|
6963
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__skeleton", style:
|
|
6980
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
6964
6981
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-block" }),
|
|
6965
6982
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-line" }),
|
|
6966
6983
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-line kf-manager-now__skeleton-line--short" })
|
|
6967
6984
|
] });
|
|
6968
6985
|
}
|
|
6969
6986
|
function ChecklistPreview({ checklist }) {
|
|
6970
|
-
const { t } =
|
|
6987
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
6971
6988
|
if (checklist === null) {
|
|
6972
6989
|
return null;
|
|
6973
6990
|
}
|
|
@@ -7033,7 +7050,7 @@ function initials5(fullName) {
|
|
|
7033
7050
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
7034
7051
|
}
|
|
7035
7052
|
function CoManagerCard({ managers }) {
|
|
7036
|
-
const { t } =
|
|
7053
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7037
7054
|
const coManager = managers.length > 1 ? managers.find((row) => !row.isLead) ?? managers[1] : void 0;
|
|
7038
7055
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.overview.coManager.eyebrow"), children: [
|
|
7039
7056
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-overview__eyebrow", children: t("chrome.managerTrip.overview.coManager.eyebrow") }),
|
|
@@ -7062,7 +7079,7 @@ function formatOverviewTime(iso) {
|
|
|
7062
7079
|
return TIME_FORMATTER2.format(new Date(iso));
|
|
7063
7080
|
}
|
|
7064
7081
|
function ItineraryPreview({ itinerary }) {
|
|
7065
|
-
const { t } =
|
|
7082
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7066
7083
|
if (itinerary === null) {
|
|
7067
7084
|
return null;
|
|
7068
7085
|
}
|
|
@@ -7094,7 +7111,7 @@ function ItineraryPreview({ itinerary }) {
|
|
|
7094
7111
|
);
|
|
7095
7112
|
}
|
|
7096
7113
|
function PickupsSummary({ pickups }) {
|
|
7097
|
-
const { t } =
|
|
7114
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7098
7115
|
if (pickups === null) {
|
|
7099
7116
|
return null;
|
|
7100
7117
|
}
|
|
@@ -7122,7 +7139,7 @@ function PickupsSummary({ pickups }) {
|
|
|
7122
7139
|
);
|
|
7123
7140
|
}
|
|
7124
7141
|
function RoomingSummary({ rooming }) {
|
|
7125
|
-
const { t } =
|
|
7142
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7126
7143
|
if (rooming === null) {
|
|
7127
7144
|
return null;
|
|
7128
7145
|
}
|
|
@@ -7174,7 +7191,7 @@ function occupancyTone2(fillCount, capacity) {
|
|
|
7174
7191
|
return "neutral";
|
|
7175
7192
|
}
|
|
7176
7193
|
function TransportSummary({ transport }) {
|
|
7177
|
-
const { t } =
|
|
7194
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7178
7195
|
if (transport === null) {
|
|
7179
7196
|
return null;
|
|
7180
7197
|
}
|
|
@@ -7224,20 +7241,20 @@ var TREK_PHASE_LABEL_KEY = {
|
|
|
7224
7241
|
closing: "chrome.managerTrip.overview.trekPhase.closing"
|
|
7225
7242
|
};
|
|
7226
7243
|
function ManagerOverviewSection({ tripRef, style }) {
|
|
7227
|
-
const { t } =
|
|
7228
|
-
const today =
|
|
7229
|
-
const managers =
|
|
7244
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7245
|
+
const today = chunk6WV5VYT2_cjs.useManagerToday(tripRef);
|
|
7246
|
+
const managers = chunk6WV5VYT2_cjs.useManagers(tripRef);
|
|
7230
7247
|
if (today.status === "loading") {
|
|
7231
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__skeleton", style:
|
|
7248
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
7232
7249
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line" }),
|
|
7233
7250
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line" }),
|
|
7234
7251
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line kf-manager-overview__skeleton-line--short" })
|
|
7235
7252
|
] });
|
|
7236
7253
|
}
|
|
7237
7254
|
if (today.status === "error" || today.kind === "idle") {
|
|
7238
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview", style:
|
|
7255
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview", style: chunkUALMCHNW_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-overview__idle", children: t("chrome.managerTrip.overview.title") }) });
|
|
7239
7256
|
}
|
|
7240
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview", style:
|
|
7257
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
7241
7258
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__header", children: [
|
|
7242
7259
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-overview__phase-badge", children: t(PHASE_LABEL_KEY4[today.phase] ?? "chrome.managerTrip.overview.phase.preDeparture") }),
|
|
7243
7260
|
today.kind === "trek" && today.trekPhase !== null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-overview__phase-badge", "data-tone": "accent", children: t(
|
|
@@ -7371,7 +7388,7 @@ function CloseStopSheet({
|
|
|
7371
7388
|
onClose,
|
|
7372
7389
|
onCancel
|
|
7373
7390
|
}) {
|
|
7374
|
-
const { t } =
|
|
7391
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7375
7392
|
const { stop, travellers } = stopRow;
|
|
7376
7393
|
const pendingTravellers = travellers.filter((row) => row.status === "PENDING");
|
|
7377
7394
|
const isShort = stop.boardedCount < stop.expectedCount;
|
|
@@ -7551,7 +7568,7 @@ function StopSegmentedSwitcher({
|
|
|
7551
7568
|
activeStopId,
|
|
7552
7569
|
onSelect
|
|
7553
7570
|
}) {
|
|
7554
|
-
const { t } =
|
|
7571
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7555
7572
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__segmented", role: "tablist", children: stops.map(({ stop }) => {
|
|
7556
7573
|
const done = stop.rollup === "closed";
|
|
7557
7574
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7582,7 +7599,7 @@ function CorrectBoardStatusControl({
|
|
|
7582
7599
|
disabled,
|
|
7583
7600
|
onCorrect
|
|
7584
7601
|
}) {
|
|
7585
|
-
const { t } =
|
|
7602
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7586
7603
|
const [open, setOpen] = react.useState(false);
|
|
7587
7604
|
if (currentStatus === "PENDING") {
|
|
7588
7605
|
return null;
|
|
@@ -7657,7 +7674,7 @@ function TravellerBoardRow({
|
|
|
7657
7674
|
onBoard,
|
|
7658
7675
|
onCorrect
|
|
7659
7676
|
}) {
|
|
7660
|
-
const { t } =
|
|
7677
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7661
7678
|
const isPending = traveller.status === "PENDING";
|
|
7662
7679
|
function onKeyDown(event) {
|
|
7663
7680
|
if ((event.key === "Enter" || event.key === " ") && isPending && !stopClosed) {
|
|
@@ -7739,7 +7756,7 @@ function BoardingView({
|
|
|
7739
7756
|
onCloseStop,
|
|
7740
7757
|
onBack
|
|
7741
7758
|
}) {
|
|
7742
|
-
const { t } =
|
|
7759
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7743
7760
|
const [closeSheetOpen, setCloseSheetOpen] = react.useState(false);
|
|
7744
7761
|
const activeStopRow = manifest.stops.find((row) => row.stop.id === activeStopId) ?? manifest.stops[0];
|
|
7745
7762
|
if (activeStopRow === void 0) {
|
|
@@ -7840,7 +7857,7 @@ function patchManifestTraveller(manifest, stopId, travellerId, status, boardedAt
|
|
|
7840
7857
|
};
|
|
7841
7858
|
}
|
|
7842
7859
|
function StopRow({ stop, onSelect }) {
|
|
7843
|
-
const { t } =
|
|
7860
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7844
7861
|
const percent = boardedPercent(stop);
|
|
7845
7862
|
return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "kf-manager-pickups__row kf-press", onClick: onSelect, children: [
|
|
7846
7863
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-manager-pickups__row-copy", children: [
|
|
@@ -7870,7 +7887,7 @@ function StopList({
|
|
|
7870
7887
|
onKindChange,
|
|
7871
7888
|
onSelectStop
|
|
7872
7889
|
}) {
|
|
7873
|
-
const { t } =
|
|
7890
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
7874
7891
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups", children: [
|
|
7875
7892
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-pickups__title", children: t("chrome.managerTrip.tab.pickups") }),
|
|
7876
7893
|
hasDropStops ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__chips", children: [
|
|
@@ -7907,7 +7924,7 @@ function ManagerPickupsSection({
|
|
|
7907
7924
|
components,
|
|
7908
7925
|
style
|
|
7909
7926
|
}) {
|
|
7910
|
-
const pickups =
|
|
7927
|
+
const pickups = chunk6WV5VYT2_cjs.usePickups(tripRef);
|
|
7911
7928
|
const StopListUI = components?.StopList ?? StopList;
|
|
7912
7929
|
const BoardingViewUI = components?.BoardingView ?? BoardingView;
|
|
7913
7930
|
const [kind, setKind] = react.useState("PICKUP");
|
|
@@ -7932,7 +7949,7 @@ function ManagerPickupsSection({
|
|
|
7932
7949
|
};
|
|
7933
7950
|
}, [ready, selectedStopId, kind]);
|
|
7934
7951
|
if (pickups.status === "loading") {
|
|
7935
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style:
|
|
7952
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
7936
7953
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
7937
7954
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
7938
7955
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line kf-manager-pickups__skeleton-line--short" })
|
|
@@ -8011,12 +8028,12 @@ function ManagerPickupsSection({
|
|
|
8011
8028
|
}
|
|
8012
8029
|
if (selectedStopId !== void 0) {
|
|
8013
8030
|
if (manifest === void 0) {
|
|
8014
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style:
|
|
8031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
8015
8032
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
8016
8033
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" })
|
|
8017
8034
|
] });
|
|
8018
8035
|
}
|
|
8019
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { style:
|
|
8036
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: chunkUALMCHNW_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8020
8037
|
BoardingViewUI,
|
|
8021
8038
|
{
|
|
8022
8039
|
manifest,
|
|
@@ -8032,7 +8049,7 @@ function ManagerPickupsSection({
|
|
|
8032
8049
|
}
|
|
8033
8050
|
) });
|
|
8034
8051
|
}
|
|
8035
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { style:
|
|
8052
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: chunkUALMCHNW_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8036
8053
|
StopListUI,
|
|
8037
8054
|
{
|
|
8038
8055
|
stops: rankedStops,
|
|
@@ -8169,7 +8186,7 @@ function AddRoomSheet({
|
|
|
8169
8186
|
onPatch,
|
|
8170
8187
|
onDelete
|
|
8171
8188
|
}) {
|
|
8172
|
-
const { t } =
|
|
8189
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8173
8190
|
const [code, setCode] = react.useState("");
|
|
8174
8191
|
const [capacity, setCapacity] = react.useState("2");
|
|
8175
8192
|
const [roomType, setRoomType] = react.useState(void 0);
|
|
@@ -8376,7 +8393,7 @@ function AssignBedSheet({
|
|
|
8376
8393
|
onOpenTraveller,
|
|
8377
8394
|
onClose
|
|
8378
8395
|
}) {
|
|
8379
|
-
const { t } =
|
|
8396
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8380
8397
|
const [pending, setPending] = react.useState(false);
|
|
8381
8398
|
react.useEffect(() => {
|
|
8382
8399
|
if (!open) {
|
|
@@ -8586,7 +8603,7 @@ function AutoAssignSheet({
|
|
|
8586
8603
|
onApplied,
|
|
8587
8604
|
onClose
|
|
8588
8605
|
}) {
|
|
8589
|
-
const { t } =
|
|
8606
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8590
8607
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
8591
8608
|
const [preview, setPreview] = react.useState(void 0);
|
|
8592
8609
|
const [loading, setLoading] = react.useState(false);
|
|
@@ -8743,7 +8760,7 @@ var STATUS_LABEL_KEY5 = {
|
|
|
8743
8760
|
FULL: "chrome.managerTrip.rooming.room.status.full"
|
|
8744
8761
|
};
|
|
8745
8762
|
function RoomCard({ room, onSelectBed, onEditRoom }) {
|
|
8746
|
-
const { t } =
|
|
8763
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8747
8764
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__room-card", children: [
|
|
8748
8765
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8749
8766
|
"button",
|
|
@@ -8782,7 +8799,7 @@ function RoomCard({ room, onSelectBed, onEditRoom }) {
|
|
|
8782
8799
|
] });
|
|
8783
8800
|
}
|
|
8784
8801
|
function RoomingStats({ roomCount, beds, unassignedCount }) {
|
|
8785
|
-
const { t } =
|
|
8802
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8786
8803
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__stats", children: [
|
|
8787
8804
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__stat-cell", children: [
|
|
8788
8805
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-rooming__stat-label", children: t("chrome.managerTrip.rooming.stats.rooms") }),
|
|
@@ -8820,7 +8837,7 @@ function StayWindowChips({
|
|
|
8820
8837
|
onAddWindow,
|
|
8821
8838
|
onEditWindow
|
|
8822
8839
|
}) {
|
|
8823
|
-
const { t } =
|
|
8840
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8824
8841
|
const activeWindow = stayWindows.find((window) => window.id === activeStayWindowId);
|
|
8825
8842
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__window-block", children: [
|
|
8826
8843
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8888,7 +8905,7 @@ function StayWindowSheet({
|
|
|
8888
8905
|
onPatch,
|
|
8889
8906
|
onDelete
|
|
8890
8907
|
}) {
|
|
8891
|
-
const { t } =
|
|
8908
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
8892
8909
|
const [label, setLabel] = react.useState("");
|
|
8893
8910
|
const [startDate, setStartDate] = react.useState("");
|
|
8894
8911
|
const [endDate, setEndDate] = react.useState("");
|
|
@@ -9072,7 +9089,7 @@ function UnassignedPoolSection({
|
|
|
9072
9089
|
loaded,
|
|
9073
9090
|
onSelectTraveller
|
|
9074
9091
|
}) {
|
|
9075
|
-
const { t } =
|
|
9092
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9076
9093
|
if (loaded && travellers.length === 0) {
|
|
9077
9094
|
return null;
|
|
9078
9095
|
}
|
|
@@ -9105,8 +9122,8 @@ function ManagerRoomingSection({
|
|
|
9105
9122
|
components,
|
|
9106
9123
|
style
|
|
9107
9124
|
}) {
|
|
9108
|
-
const { t } =
|
|
9109
|
-
const rooming =
|
|
9125
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9126
|
+
const rooming = chunk6WV5VYT2_cjs.useRooming(tripRef);
|
|
9110
9127
|
const Stats = components?.Stats ?? RoomingStats;
|
|
9111
9128
|
const RoomCardComponent = components?.RoomCard ?? RoomCard;
|
|
9112
9129
|
const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection;
|
|
@@ -9142,7 +9159,7 @@ function ManagerRoomingSection({
|
|
|
9142
9159
|
void refreshPool(activeStayWindowId);
|
|
9143
9160
|
}, [refreshPool, activeStayWindowId]);
|
|
9144
9161
|
if (rooming.status === "loading") {
|
|
9145
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__skeleton", style:
|
|
9162
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
9146
9163
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-block" }),
|
|
9147
9164
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-line" }),
|
|
9148
9165
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-line kf-manager-rooming__skeleton-line--short" })
|
|
@@ -9166,7 +9183,7 @@ function ManagerRoomingSection({
|
|
|
9166
9183
|
}
|
|
9167
9184
|
}
|
|
9168
9185
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
9169
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming", style:
|
|
9186
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
9170
9187
|
sortedWindows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__card kf-manager-rooming__empty", children: [
|
|
9171
9188
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.managerTrip.rooming.noWindows") }),
|
|
9172
9189
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9402,7 +9419,7 @@ function initials7(fullName) {
|
|
|
9402
9419
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
9403
9420
|
}
|
|
9404
9421
|
function RosterRow({ row, onOpen }) {
|
|
9405
|
-
const { t } =
|
|
9422
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9406
9423
|
const { traveller } = row;
|
|
9407
9424
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__row", children: [
|
|
9408
9425
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9433,7 +9450,7 @@ function RosterRow({ row, onOpen }) {
|
|
|
9433
9450
|
] });
|
|
9434
9451
|
}
|
|
9435
9452
|
function RosterSearch({ query, onQueryChange }) {
|
|
9436
|
-
const { t } =
|
|
9453
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9437
9454
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-roster__search", children: [
|
|
9438
9455
|
/* @__PURE__ */ jsxRuntime.jsx(SearchIcon2, { "aria-hidden": "true" }),
|
|
9439
9456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9453,8 +9470,8 @@ function ManagerRosterSection({
|
|
|
9453
9470
|
onOpenTraveller,
|
|
9454
9471
|
style
|
|
9455
9472
|
}) {
|
|
9456
|
-
const { t } =
|
|
9457
|
-
const parties =
|
|
9473
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9474
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
9458
9475
|
const [query, setQuery] = react.useState("");
|
|
9459
9476
|
const rows = react.useMemo(
|
|
9460
9477
|
() => parties.status === "ready" ? parties.tripRoster.rows : [],
|
|
@@ -9470,7 +9487,7 @@ function ManagerRosterSection({
|
|
|
9470
9487
|
);
|
|
9471
9488
|
}, [rows, query]);
|
|
9472
9489
|
if (parties.status === "loading") {
|
|
9473
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__skeleton", style:
|
|
9490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
9474
9491
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line" }),
|
|
9475
9492
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line" }),
|
|
9476
9493
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line kf-manager-roster__skeleton-line--short" })
|
|
@@ -9479,7 +9496,7 @@ function ManagerRosterSection({
|
|
|
9479
9496
|
if (parties.status === "error") {
|
|
9480
9497
|
return null;
|
|
9481
9498
|
}
|
|
9482
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster", style:
|
|
9499
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
9483
9500
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-roster__count", children: t("chrome.managerTrip.roster.count").replace("{count}", String(rows.length)) }),
|
|
9484
9501
|
/* @__PURE__ */ jsxRuntime.jsx(RosterSearch, { query, onQueryChange: setQuery }),
|
|
9485
9502
|
rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-roster__empty", children: t("chrome.managerTrip.roster.empty") }) : filteredRows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-roster__empty", children: t("chrome.managerTrip.roster.noMatches") }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__list", children: filteredRows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(RosterRow, { row, onOpen: onOpenTraveller }, row.traveller.travellerId)) })
|
|
@@ -9614,7 +9631,7 @@ function ConflictResolverSheet({
|
|
|
9614
9631
|
onResolve,
|
|
9615
9632
|
onClose
|
|
9616
9633
|
}) {
|
|
9617
|
-
const { t } =
|
|
9634
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9618
9635
|
const [fieldIndex, setFieldIndex] = react.useState(0);
|
|
9619
9636
|
const [pending, setPending] = react.useState(false);
|
|
9620
9637
|
react.useEffect(() => {
|
|
@@ -9749,7 +9766,7 @@ function formatSyncCenterDate(iso) {
|
|
|
9749
9766
|
return iso === void 0 ? void 0 : SYNC_CENTER_DATE_FORMATTER.format(new Date(iso));
|
|
9750
9767
|
}
|
|
9751
9768
|
function OutboxRow({ op, isConflict, label, onSelect }) {
|
|
9752
|
-
const { t } =
|
|
9769
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9753
9770
|
const statusLabel = isConflict ? t("chrome.managerSyncCenter.status.conflict") : op.status === "parked" ? t("chrome.managerSyncCenter.status.parked") : op.status === "inflight" ? t("chrome.managerSyncCenter.status.inflight") : t("chrome.managerSyncCenter.status.pending");
|
|
9754
9771
|
const interactive = isConflict;
|
|
9755
9772
|
const Row = interactive ? "button" : "div";
|
|
@@ -9800,9 +9817,9 @@ function ManagerSyncCenterSection({
|
|
|
9800
9817
|
onResolved,
|
|
9801
9818
|
style
|
|
9802
9819
|
}) {
|
|
9803
|
-
const { t } =
|
|
9804
|
-
const engine =
|
|
9805
|
-
const { conflicts, resolve } =
|
|
9820
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
9821
|
+
const engine = chunk57SUK3GD_cjs.useOfflineEngine();
|
|
9822
|
+
const { conflicts, resolve } = chunkOZJ74DVQ_cjs.useConflicts(tripRef);
|
|
9806
9823
|
const [openConflict, setOpenConflict] = react.useState(void 0);
|
|
9807
9824
|
const ops = engine.outbox.all().filter((op) => op.tripRef === tripRef);
|
|
9808
9825
|
const conflictOpIds = new Set(conflicts.map((conflict) => conflict.opId));
|
|
@@ -9816,7 +9833,7 @@ function ManagerSyncCenterSection({
|
|
|
9816
9833
|
await resolve(opId, choice);
|
|
9817
9834
|
onResolved?.(opId, choice);
|
|
9818
9835
|
}
|
|
9819
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center", style:
|
|
9836
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
9820
9837
|
ops.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center__empty", children: [
|
|
9821
9838
|
/* @__PURE__ */ jsxRuntime.jsx(InboxIcon2, { className: "kf-manager-sync-center__empty-icon", "aria-hidden": "true" }),
|
|
9822
9839
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-sync-center__empty-title", children: t("chrome.managerSyncCenter.emptyTitle") })
|
|
@@ -10037,7 +10054,7 @@ function LogPaymentSheet({
|
|
|
10037
10054
|
onClose,
|
|
10038
10055
|
onSubmit
|
|
10039
10056
|
}) {
|
|
10040
|
-
const { t } =
|
|
10057
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10041
10058
|
const [amount, setAmount] = react.useState("");
|
|
10042
10059
|
const [mode, setMode] = react.useState("CASH");
|
|
10043
10060
|
const [reference, setReference] = react.useState("");
|
|
@@ -10175,7 +10192,7 @@ function LogPaymentSheet({
|
|
|
10175
10192
|
) });
|
|
10176
10193
|
}
|
|
10177
10194
|
function TravellerContactRow({ fullName, phone }) {
|
|
10178
|
-
const { t } =
|
|
10195
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10179
10196
|
if (phone === null) {
|
|
10180
10197
|
return null;
|
|
10181
10198
|
}
|
|
@@ -10214,7 +10231,7 @@ var DIET_LABEL_KEY3 = {
|
|
|
10214
10231
|
J: "chrome.managerTraveller.dietary.diet.j"
|
|
10215
10232
|
};
|
|
10216
10233
|
function TravellerDietaryCard({ rows }) {
|
|
10217
|
-
const { t } =
|
|
10234
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10218
10235
|
if (rows.length === 0) {
|
|
10219
10236
|
return null;
|
|
10220
10237
|
}
|
|
@@ -10244,7 +10261,7 @@ function TravellerEmergencyCard({
|
|
|
10244
10261
|
relation,
|
|
10245
10262
|
phone
|
|
10246
10263
|
}) {
|
|
10247
|
-
const { t } =
|
|
10264
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10248
10265
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTraveller.emergency.ariaLabel"), children: [
|
|
10249
10266
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-traveller__eyebrow-row", children: t("chrome.managerTraveller.emergency.eyebrow") }),
|
|
10250
10267
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__card kf-manager-traveller__emergency-row", children: [
|
|
@@ -10289,7 +10306,7 @@ var DATE_FORMATTER5 = new Intl.DateTimeFormat("en-GB", {
|
|
|
10289
10306
|
minute: "2-digit"
|
|
10290
10307
|
});
|
|
10291
10308
|
function TravellerNotesSection({ notes, onAddNote }) {
|
|
10292
|
-
const { t } =
|
|
10309
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10293
10310
|
const [composing, setComposing] = react.useState(false);
|
|
10294
10311
|
const [draft, setDraft] = react.useState("");
|
|
10295
10312
|
const [submitting, setSubmitting] = react.useState(false);
|
|
@@ -10376,7 +10393,7 @@ function TravellerPaymentCard({
|
|
|
10376
10393
|
canLogPayment,
|
|
10377
10394
|
onLogPayment
|
|
10378
10395
|
}) {
|
|
10379
|
-
const { t } =
|
|
10396
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10380
10397
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTraveller.payment.ariaLabel"), children: [
|
|
10381
10398
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-traveller__eyebrow-row", children: t("chrome.managerTraveller.payment.eyebrow") }),
|
|
10382
10399
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__card", children: [
|
|
@@ -10405,7 +10422,7 @@ function TravellerPaymentCard({
|
|
|
10405
10422
|
] });
|
|
10406
10423
|
}
|
|
10407
10424
|
function TravellerRoomSeatCard({ room, seat }) {
|
|
10408
|
-
const { t } =
|
|
10425
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10409
10426
|
if (room === null && seat === null) {
|
|
10410
10427
|
return null;
|
|
10411
10428
|
}
|
|
@@ -10432,10 +10449,10 @@ function ManagerTravellerProfileSection({
|
|
|
10432
10449
|
components,
|
|
10433
10450
|
style
|
|
10434
10451
|
}) {
|
|
10435
|
-
const { t } =
|
|
10436
|
-
const profile =
|
|
10437
|
-
const parties =
|
|
10438
|
-
const collections =
|
|
10452
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10453
|
+
const profile = chunk6WV5VYT2_cjs.useTravellerProfile(tripRef, travellerRef);
|
|
10454
|
+
const parties = chunk6WV5VYT2_cjs.useParties(tripRef);
|
|
10455
|
+
const collections = chunk6WV5VYT2_cjs.useCollections(tripRef);
|
|
10439
10456
|
const [sheetOpen, setSheetOpen] = react.useState(false);
|
|
10440
10457
|
const partyLabel = react.useMemo(() => {
|
|
10441
10458
|
if (profile.read === void 0 || profile.read.partyId === null) {
|
|
@@ -10447,7 +10464,7 @@ function ManagerTravellerProfileSection({
|
|
|
10447
10464
|
return parties.list.rows.find((row) => row.id === profile.read?.partyId)?.label ?? null;
|
|
10448
10465
|
}, [profile.read, parties]);
|
|
10449
10466
|
if (profile.read === void 0) {
|
|
10450
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__skeleton", style:
|
|
10467
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
10451
10468
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-avatar" }),
|
|
10452
10469
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-line" }),
|
|
10453
10470
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-line kf-manager-traveller__skeleton-line--short" })
|
|
@@ -10470,7 +10487,7 @@ function ManagerTravellerProfileSection({
|
|
|
10470
10487
|
read.profile.medicalNotes
|
|
10471
10488
|
);
|
|
10472
10489
|
const canLogPayment = collections.status === "ready";
|
|
10473
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller", style:
|
|
10490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
10474
10491
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerHero, { fullName: read.fullName, partyLabel }),
|
|
10475
10492
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerContactRow, { fullName: read.fullName, phone: read.phone }),
|
|
10476
10493
|
/* @__PURE__ */ jsxRuntime.jsx(DietaryCard, { rows: dietaryRows }),
|
|
@@ -10809,7 +10826,7 @@ function AddVehicleSheet({
|
|
|
10809
10826
|
onPatch,
|
|
10810
10827
|
onDelete
|
|
10811
10828
|
}) {
|
|
10812
|
-
const { t } =
|
|
10829
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
10813
10830
|
const [regNo, setRegNo] = react.useState("");
|
|
10814
10831
|
const [label, setLabel] = react.useState("");
|
|
10815
10832
|
const [type, setType] = react.useState("BUS");
|
|
@@ -11161,7 +11178,7 @@ function AssignSeatSheet({
|
|
|
11161
11178
|
onOpenTraveller,
|
|
11162
11179
|
onClose
|
|
11163
11180
|
}) {
|
|
11164
|
-
const { t } =
|
|
11181
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11165
11182
|
const [pending, setPending] = react.useState(false);
|
|
11166
11183
|
const [customLabel, setCustomLabel] = react.useState("");
|
|
11167
11184
|
const [editingSeatLabel, setEditingSeatLabel] = react.useState(false);
|
|
@@ -11403,7 +11420,7 @@ function AutoAssignSheet2({
|
|
|
11403
11420
|
onApplied,
|
|
11404
11421
|
onClose
|
|
11405
11422
|
}) {
|
|
11406
|
-
const { t } =
|
|
11423
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11407
11424
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
11408
11425
|
const [preview, setPreview] = react.useState(void 0);
|
|
11409
11426
|
const [loading, setLoading] = react.useState(false);
|
|
@@ -11560,7 +11577,7 @@ function SetOwnerSheet({
|
|
|
11560
11577
|
onSetOwner,
|
|
11561
11578
|
onRemoveOwner
|
|
11562
11579
|
}) {
|
|
11563
|
-
const { t } =
|
|
11580
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11564
11581
|
react.useEffect(() => {
|
|
11565
11582
|
if (!open) {
|
|
11566
11583
|
return;
|
|
@@ -11628,7 +11645,7 @@ function UnassignedPoolSection2({
|
|
|
11628
11645
|
loaded,
|
|
11629
11646
|
onSelectTraveller
|
|
11630
11647
|
}) {
|
|
11631
|
-
const { t } =
|
|
11648
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11632
11649
|
if (loaded && travellers.length === 0) {
|
|
11633
11650
|
return null;
|
|
11634
11651
|
}
|
|
@@ -11664,7 +11681,7 @@ function VehicleCard({
|
|
|
11664
11681
|
onEditOwner,
|
|
11665
11682
|
onViewRoster
|
|
11666
11683
|
}) {
|
|
11667
|
-
const { t } =
|
|
11684
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11668
11685
|
const totalOccupantCount = allOccupantsOfVehicle(vehicle).length;
|
|
11669
11686
|
const dayCoverage = dayCoverageLabel(vehicle.days);
|
|
11670
11687
|
const dayLabel = dayCoverage === "ALL_DAYS" ? t("chrome.managerTrip.vehicles.card.allDays") : t("chrome.managerTrip.vehicles.card.dayCoverage").replace("{days}", dayCoverage);
|
|
@@ -11814,7 +11831,7 @@ function VehicleRosterSheet({
|
|
|
11814
11831
|
onSelectOccupant,
|
|
11815
11832
|
onClose
|
|
11816
11833
|
}) {
|
|
11817
|
-
const { t } =
|
|
11834
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11818
11835
|
react.useEffect(() => {
|
|
11819
11836
|
if (!open) {
|
|
11820
11837
|
return;
|
|
@@ -11893,7 +11910,7 @@ function VehicleStats({
|
|
|
11893
11910
|
capacity,
|
|
11894
11911
|
unassignedCount
|
|
11895
11912
|
}) {
|
|
11896
|
-
const { t } =
|
|
11913
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11897
11914
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__stats", children: [
|
|
11898
11915
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__stat-cell", children: [
|
|
11899
11916
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-vehicles__stat-label", children: t("chrome.managerTrip.vehicles.stats.vehicles") }),
|
|
@@ -11927,9 +11944,9 @@ function ManagerVehiclesSection({
|
|
|
11927
11944
|
components,
|
|
11928
11945
|
style
|
|
11929
11946
|
}) {
|
|
11930
|
-
const { t } =
|
|
11931
|
-
const seating =
|
|
11932
|
-
const managers =
|
|
11947
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
11948
|
+
const seating = chunk6WV5VYT2_cjs.useSeating(tripRef);
|
|
11949
|
+
const managers = chunk6WV5VYT2_cjs.useManagers(tripRef);
|
|
11933
11950
|
const Stats = components?.Stats ?? VehicleStats;
|
|
11934
11951
|
const VehicleCardComponent = components?.VehicleCard ?? VehicleCard;
|
|
11935
11952
|
const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection2;
|
|
@@ -11977,7 +11994,7 @@ function ManagerVehiclesSection({
|
|
|
11977
11994
|
return map;
|
|
11978
11995
|
}, [managerRoster]);
|
|
11979
11996
|
if (seating.status === "loading") {
|
|
11980
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__skeleton", style:
|
|
11997
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
11981
11998
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-block" }),
|
|
11982
11999
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-line" }),
|
|
11983
12000
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-line kf-manager-vehicles__skeleton-line--short" })
|
|
@@ -11990,7 +12007,7 @@ function ManagerVehiclesSection({
|
|
|
11990
12007
|
const unassignedCount = seating.unassignedPool.travellers.length;
|
|
11991
12008
|
const travellerNames = travellerNameMap(seating.unassignedPool.travellers, liveVehicles);
|
|
11992
12009
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
11993
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles", style:
|
|
12010
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
11994
12011
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11995
12012
|
Stats,
|
|
11996
12013
|
{
|
|
@@ -12169,7 +12186,7 @@ function VendorDetailSheet({
|
|
|
12169
12186
|
vehicles,
|
|
12170
12187
|
onClose
|
|
12171
12188
|
}) {
|
|
12172
|
-
const { t } =
|
|
12189
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
12173
12190
|
react.useEffect(() => {
|
|
12174
12191
|
if (vendor === void 0) {
|
|
12175
12192
|
return;
|
|
@@ -12374,7 +12391,7 @@ function VendorListSection({
|
|
|
12374
12391
|
onVendorSelect,
|
|
12375
12392
|
emptyView
|
|
12376
12393
|
}) {
|
|
12377
|
-
const { t } =
|
|
12394
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
12378
12395
|
if (vendors.length === 0) {
|
|
12379
12396
|
if (emptyView !== void 0) {
|
|
12380
12397
|
return typeof emptyView === "function" ? emptyView() : emptyView;
|
|
@@ -12439,13 +12456,13 @@ function ManagerVendorsSection({
|
|
|
12439
12456
|
components,
|
|
12440
12457
|
style
|
|
12441
12458
|
}) {
|
|
12442
|
-
const vendors =
|
|
12443
|
-
const expenses =
|
|
12444
|
-
const seating =
|
|
12459
|
+
const vendors = chunk6WV5VYT2_cjs.useVendors(tripRef, "");
|
|
12460
|
+
const expenses = chunk6WV5VYT2_cjs.useExpenses(tripRef);
|
|
12461
|
+
const seating = chunk6WV5VYT2_cjs.useSeating(tripRef);
|
|
12445
12462
|
const [selectedVendorId, setSelectedVendorId] = react.useState(void 0);
|
|
12446
12463
|
const VendorListUI = components?.VendorListUI ?? VendorListSection;
|
|
12447
12464
|
if (vendors.status === "loading") {
|
|
12448
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors__skeleton", style:
|
|
12465
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
12449
12466
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line" }),
|
|
12450
12467
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line" }),
|
|
12451
12468
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line kf-manager-vendors__skeleton-line--short" })
|
|
@@ -12464,7 +12481,7 @@ function ManagerVendorsSection({
|
|
|
12464
12481
|
description: row.description
|
|
12465
12482
|
})) : void 0;
|
|
12466
12483
|
const detailVehicles = seating.status === "ready" && selectedVendor !== void 0 ? seating.vehicles.filter(isLiveVehicle2).filter((row) => row.vendorId === selectedVendor.id).map((row) => ({ id: row.id, regNo: row.regNo, label: row.label })) : void 0;
|
|
12467
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors", style:
|
|
12484
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
12468
12485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12469
12486
|
VendorListUI,
|
|
12470
12487
|
{
|
|
@@ -12539,7 +12556,7 @@ function TripChipTabs({
|
|
|
12539
12556
|
onSelect,
|
|
12540
12557
|
counts
|
|
12541
12558
|
}) {
|
|
12542
|
-
const { t } =
|
|
12559
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
12543
12560
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12544
12561
|
"div",
|
|
12545
12562
|
{
|
|
@@ -12595,7 +12612,7 @@ function TripHero({
|
|
|
12595
12612
|
endDate,
|
|
12596
12613
|
region
|
|
12597
12614
|
}) {
|
|
12598
|
-
const { t } =
|
|
12615
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
12599
12616
|
const sub = [formatDateRange2(startDate, endDate), region].filter(Boolean).join(" \xB7 ");
|
|
12600
12617
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-trip__hero", "aria-label": t("chrome.managerTrip.hero.ariaLabel"), children: [
|
|
12601
12618
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__hero-body", children: [
|
|
@@ -12625,7 +12642,7 @@ var TAB_LABEL_KEY2 = {
|
|
|
12625
12642
|
documents: "chrome.managerTrip.tab.documents"
|
|
12626
12643
|
};
|
|
12627
12644
|
function TripTabPlaceholder({ tabKey }) {
|
|
12628
|
-
const { t } =
|
|
12645
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
12629
12646
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__card kf-manager-trip__placeholder", children: t("chrome.managerTrip.placeholder.notBuilt").replace("{tab}", t(TAB_LABEL_KEY2[tabKey])) });
|
|
12630
12647
|
}
|
|
12631
12648
|
var BLOCKER_ACTION_TAB = {
|
|
@@ -12641,7 +12658,7 @@ var BLOCKER_ACTION_TAB = {
|
|
|
12641
12658
|
open_past_itinerary: "itinerary"
|
|
12642
12659
|
};
|
|
12643
12660
|
function ManagerTripSection(props) {
|
|
12644
|
-
const session =
|
|
12661
|
+
const session = chunkUALMCHNW_cjs.useSession();
|
|
12645
12662
|
if (session.status !== "authenticated") {
|
|
12646
12663
|
return null;
|
|
12647
12664
|
}
|
|
@@ -12659,7 +12676,7 @@ function ReadyManagerTripSection({
|
|
|
12659
12676
|
panels,
|
|
12660
12677
|
style
|
|
12661
12678
|
}) {
|
|
12662
|
-
const managerMe =
|
|
12679
|
+
const managerMe = chunkOZJ74DVQ_cjs.useManagerMe();
|
|
12663
12680
|
const [internalActiveTab, setInternalActiveTab] = react.useState("manifest");
|
|
12664
12681
|
if (managerMe.status === "loading") {
|
|
12665
12682
|
return /* @__PURE__ */ jsxRuntime.jsx(ManagerTripSkeleton, { style });
|
|
@@ -12723,7 +12740,7 @@ function ReadyManagerTripSection({
|
|
|
12723
12740
|
}
|
|
12724
12741
|
)
|
|
12725
12742
|
};
|
|
12726
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip", style:
|
|
12743
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
12727
12744
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12728
12745
|
TripHero,
|
|
12729
12746
|
{
|
|
@@ -12742,7 +12759,7 @@ function ReadyManagerTripSection({
|
|
|
12742
12759
|
function ManagerTripSkeleton({
|
|
12743
12760
|
style
|
|
12744
12761
|
}) {
|
|
12745
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__skeleton", style:
|
|
12762
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__skeleton", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
12746
12763
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-block" }),
|
|
12747
12764
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-line" }),
|
|
12748
12765
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-line kf-manager-trip__skeleton-line--short" })
|
|
@@ -12908,7 +12925,7 @@ function ManagerShellHeader(props) {
|
|
|
12908
12925
|
"header",
|
|
12909
12926
|
{
|
|
12910
12927
|
className: "kf-manager-shell__header kf-manager-shell__header--back",
|
|
12911
|
-
style:
|
|
12928
|
+
style: chunkUALMCHNW_cjs.tokenStyle(props.style),
|
|
12912
12929
|
children: [
|
|
12913
12930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12914
12931
|
"button",
|
|
@@ -12934,7 +12951,7 @@ function ManagerShellHeader(props) {
|
|
|
12934
12951
|
"header",
|
|
12935
12952
|
{
|
|
12936
12953
|
className: "kf-manager-shell__header kf-manager-shell__header--page",
|
|
12937
|
-
style:
|
|
12954
|
+
style: chunkUALMCHNW_cjs.tokenStyle(style),
|
|
12938
12955
|
children: [
|
|
12939
12956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell__header-titles", children: [
|
|
12940
12957
|
eyebrow !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-shell__header-eyebrow kf-eyebrow", children: eyebrow }) : null,
|
|
@@ -12979,7 +12996,7 @@ function ManagerShellTabBar({
|
|
|
12979
12996
|
{
|
|
12980
12997
|
"aria-label": "Manager navigation",
|
|
12981
12998
|
className: "kf-manager-shell__tab-bar",
|
|
12982
|
-
style:
|
|
12999
|
+
style: chunkUALMCHNW_cjs.tokenStyle(void 0, { "--kf-manager-shell-tab-count": tabs.length }),
|
|
12983
13000
|
children: tabs.map((tab) => {
|
|
12984
13001
|
const active = tab.key === activeTabKey;
|
|
12985
13002
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13011,7 +13028,7 @@ function ManagerShell({
|
|
|
13011
13028
|
fab,
|
|
13012
13029
|
style
|
|
13013
13030
|
}) {
|
|
13014
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell", style:
|
|
13031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell", style: chunkUALMCHNW_cjs.tokenStyle(style), children: [
|
|
13015
13032
|
header !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ManagerShellHeader, { ...header }) : null,
|
|
13016
13033
|
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "kf-manager-shell__main", children }),
|
|
13017
13034
|
fab,
|
|
@@ -13111,7 +13128,7 @@ function SyncStatusBadge({
|
|
|
13111
13128
|
parked,
|
|
13112
13129
|
onOpenSyncCenter
|
|
13113
13130
|
}) {
|
|
13114
|
-
const { t } =
|
|
13131
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
13115
13132
|
const Icon = isOnline ? WifiOnIcon2 : WifiOffIcon2;
|
|
13116
13133
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__sync-badge", "data-online": isOnline, children: [
|
|
13117
13134
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true" }),
|
|
@@ -13144,14 +13161,14 @@ var STATUS_LABEL_KEY7 = {
|
|
|
13144
13161
|
CANCELLED: "chrome.managerApp.tripList.status.cancelled"
|
|
13145
13162
|
};
|
|
13146
13163
|
function TripListRow({ trip, onSelect, style }) {
|
|
13147
|
-
const { t } =
|
|
13164
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
13148
13165
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13149
13166
|
"button",
|
|
13150
13167
|
{
|
|
13151
13168
|
type: "button",
|
|
13152
13169
|
className: "kf-manager-app__trip-row kf-press",
|
|
13153
13170
|
onClick: () => onSelect(trip.tripRef),
|
|
13154
|
-
style:
|
|
13171
|
+
style: chunkUALMCHNW_cjs.tokenStyle(style),
|
|
13155
13172
|
children: [
|
|
13156
13173
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-app__trip-tag", "data-event-type": trip.eventType }),
|
|
13157
13174
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-manager-app__trip-body", children: [
|
|
@@ -13173,14 +13190,14 @@ function TripListScreen({
|
|
|
13173
13190
|
onSelect,
|
|
13174
13191
|
TripListItemComponent
|
|
13175
13192
|
}) {
|
|
13176
|
-
const { t } =
|
|
13193
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
13177
13194
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__trip-list", children: [
|
|
13178
13195
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-app__trip-list-eyebrow", children: t("chrome.managerApp.tripList.eyebrow") }),
|
|
13179
13196
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__trip-list-rows", children: trips.map((trip) => /* @__PURE__ */ jsxRuntime.jsx(TripListItemComponent, { trip, onSelect }, trip.tripRef)) })
|
|
13180
13197
|
] });
|
|
13181
13198
|
}
|
|
13182
13199
|
function KaafilManagerApp(props) {
|
|
13183
|
-
const session =
|
|
13200
|
+
const session = chunkUALMCHNW_cjs.useSession();
|
|
13184
13201
|
if (session.status !== "authenticated") {
|
|
13185
13202
|
return null;
|
|
13186
13203
|
}
|
|
@@ -13215,10 +13232,12 @@ function ReadyKaafilManagerApp(props) {
|
|
|
13215
13232
|
components,
|
|
13216
13233
|
style
|
|
13217
13234
|
} = props;
|
|
13218
|
-
const { t } =
|
|
13219
|
-
const
|
|
13220
|
-
const
|
|
13221
|
-
const
|
|
13235
|
+
const { t } = chunkUALMCHNW_cjs.useKaafilChrome();
|
|
13236
|
+
const { appName } = chunk57SUK3GD_cjs.useKaafilBrand();
|
|
13237
|
+
const surfaceTitle = appName !== void 0 && appName.trim().length > 0 ? appName : t("chrome.managerApp.title");
|
|
13238
|
+
const managerMe = chunkOZJ74DVQ_cjs.useManagerMe();
|
|
13239
|
+
const notifications = chunkOZJ74DVQ_cjs.useNotifications();
|
|
13240
|
+
const outboxStatus = chunkUALMCHNW_cjs.useOutboxStatus();
|
|
13222
13241
|
const [internalTripRef, setInternalTripRef] = react.useState(initialTripRef);
|
|
13223
13242
|
const [internalTab, setInternalTab] = react.useState("now");
|
|
13224
13243
|
const [tripTabKey, setTripTabKey] = react.useState(initialTripTabKey);
|
|
@@ -13248,62 +13267,38 @@ function ReadyKaafilManagerApp(props) {
|
|
|
13248
13267
|
if (LoadingViewComponent !== void 0) {
|
|
13249
13268
|
return /* @__PURE__ */ jsxRuntime.jsx(LoadingViewComponent, {});
|
|
13250
13269
|
}
|
|
13251
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__skeleton", children: [
|
|
13259
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__skeleton-block" }),
|
|
13260
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__skeleton-line" })
|
|
13261
|
-
] }),
|
|
13262
|
-
syncBadge
|
|
13263
|
-
]
|
|
13264
|
-
}
|
|
13265
|
-
);
|
|
13270
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ManagerShell, { header: { title: surfaceTitle }, components: shellComponents, style, children: [
|
|
13271
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__skeleton", children: [
|
|
13272
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__skeleton-block" }),
|
|
13273
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__skeleton-line" })
|
|
13274
|
+
] }),
|
|
13275
|
+
syncBadge
|
|
13276
|
+
] });
|
|
13266
13277
|
}
|
|
13267
13278
|
if (managerMe.status === "error" || managerMe.trips.length === 0) {
|
|
13268
13279
|
if (EmptyStateComponent !== void 0) {
|
|
13269
13280
|
return /* @__PURE__ */ jsxRuntime.jsx(EmptyStateComponent, {});
|
|
13270
13281
|
}
|
|
13271
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
components: shellComponents,
|
|
13276
|
-
style,
|
|
13277
|
-
children: [
|
|
13278
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-app__empty", children: t("chrome.managerApp.noTripAssignment") }),
|
|
13279
|
-
syncBadge
|
|
13280
|
-
]
|
|
13281
|
-
}
|
|
13282
|
-
);
|
|
13282
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ManagerShell, { header: { title: surfaceTitle }, components: shellComponents, style, children: [
|
|
13283
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-app__empty", children: t("chrome.managerApp.noTripAssignment") }),
|
|
13284
|
+
syncBadge
|
|
13285
|
+
] });
|
|
13283
13286
|
}
|
|
13284
13287
|
const { trips, manager, syncedAt } = managerMe;
|
|
13285
13288
|
const resolvedTripRef = controlledTripRef ?? internalTripRef ?? (trips.length === 1 ? trips[0]?.tripRef : void 0);
|
|
13286
13289
|
const currentTrip = trips.find((trip) => trip.tripRef === resolvedTripRef);
|
|
13287
13290
|
if (currentTrip === void 0) {
|
|
13288
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
onSelect: selectTrip,
|
|
13300
|
-
TripListItemComponent
|
|
13301
|
-
}
|
|
13302
|
-
),
|
|
13303
|
-
syncBadge
|
|
13304
|
-
]
|
|
13305
|
-
}
|
|
13306
|
-
);
|
|
13291
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ManagerShell, { header: { title: surfaceTitle }, components: shellComponents, style, children: [
|
|
13292
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13293
|
+
TripListScreen,
|
|
13294
|
+
{
|
|
13295
|
+
trips,
|
|
13296
|
+
onSelect: selectTrip,
|
|
13297
|
+
TripListItemComponent
|
|
13298
|
+
}
|
|
13299
|
+
),
|
|
13300
|
+
syncBadge
|
|
13301
|
+
] });
|
|
13307
13302
|
}
|
|
13308
13303
|
const tripRef = currentTrip.tripRef;
|
|
13309
13304
|
const isTrek = currentTrip.eventType === "TREK";
|
|
@@ -13517,23 +13512,23 @@ function ReadyKaafilManagerApp(props) {
|
|
|
13517
13512
|
|
|
13518
13513
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
13519
13514
|
enumerable: true,
|
|
13520
|
-
get: function () { return
|
|
13515
|
+
get: function () { return chunkYNHOPYBK_cjs.BootErrorScreen; }
|
|
13521
13516
|
});
|
|
13522
13517
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
13523
13518
|
enumerable: true,
|
|
13524
|
-
get: function () { return
|
|
13519
|
+
get: function () { return chunkYNHOPYBK_cjs.LockedTripScreen; }
|
|
13525
13520
|
});
|
|
13526
13521
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
13527
13522
|
enumerable: true,
|
|
13528
|
-
get: function () { return
|
|
13523
|
+
get: function () { return chunkYNHOPYBK_cjs.NotFoundScreen; }
|
|
13529
13524
|
});
|
|
13530
13525
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
13531
13526
|
enumerable: true,
|
|
13532
|
-
get: function () { return
|
|
13527
|
+
get: function () { return chunkYNHOPYBK_cjs.OfflineFallbackScreen; }
|
|
13533
13528
|
});
|
|
13534
13529
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
13535
13530
|
enumerable: true,
|
|
13536
|
-
get: function () { return
|
|
13531
|
+
get: function () { return chunkYNHOPYBK_cjs.SessionExpiredScreen; }
|
|
13537
13532
|
});
|
|
13538
13533
|
exports.KaafilManagerApp = KaafilManagerApp;
|
|
13539
13534
|
exports.ManagerChecklistSection = ManagerChecklistSection;
|