kaafil-react-uikit 0.11.2 → 0.11.4
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/CHANGELOG.md +43 -0
- package/dist/admin/index.cjs +361 -361
- package/dist/admin/index.js +5 -5
- package/dist/{chunk-JK7EGZ6D.js → chunk-4U5VHQDT.js} +5 -5
- package/dist/{chunk-JK7EGZ6D.js.map → chunk-4U5VHQDT.js.map} +1 -1
- package/dist/{chunk-77RL3E4C.cjs → chunk-5ORJRFXZ.cjs} +24 -3
- package/dist/chunk-5ORJRFXZ.cjs.map +1 -0
- package/dist/{chunk-4U5I3QV7.js → chunk-63JQKLMH.js} +3 -3
- package/dist/{chunk-4U5I3QV7.js.map → chunk-63JQKLMH.js.map} +1 -1
- package/dist/{chunk-YCD42AD6.cjs → chunk-6QSHORU3.cjs} +17 -17
- package/dist/{chunk-YCD42AD6.cjs.map → chunk-6QSHORU3.cjs.map} +1 -1
- package/dist/{chunk-GBYQPMJY.js → chunk-F2ENMVT7.js} +3 -3
- package/dist/{chunk-GBYQPMJY.js.map → chunk-F2ENMVT7.js.map} +1 -1
- package/dist/{chunk-T5LU3IUR.js → chunk-LJO2FGFD.js} +5 -5
- package/dist/{chunk-T5LU3IUR.js.map → chunk-LJO2FGFD.js.map} +1 -1
- package/dist/{chunk-BGXB7ST5.js → chunk-LOLQNRIK.js} +3 -3
- package/dist/{chunk-BGXB7ST5.js.map → chunk-LOLQNRIK.js.map} +1 -1
- package/dist/{chunk-63FVHEQV.cjs → chunk-ODH3SYYW.cjs} +55 -55
- package/dist/{chunk-63FVHEQV.cjs.map → chunk-ODH3SYYW.cjs.map} +1 -1
- package/dist/{chunk-IQ4OFIUJ.js → chunk-RCWSMWQD.js} +3 -3
- package/dist/{chunk-IQ4OFIUJ.js.map → chunk-RCWSMWQD.js.map} +1 -1
- package/dist/{chunk-6XUIJCTP.cjs → chunk-T5JYKERY.cjs} +12 -12
- package/dist/{chunk-6XUIJCTP.cjs.map → chunk-T5JYKERY.cjs.map} +1 -1
- package/dist/{chunk-XTNPBDRA.js → chunk-U6IE2UYL.js} +3 -3
- package/dist/{chunk-XTNPBDRA.js.map → chunk-U6IE2UYL.js.map} +1 -1
- package/dist/{chunk-QRDWTJ5F.cjs → chunk-USKVWPJD.cjs} +83 -83
- package/dist/{chunk-QRDWTJ5F.cjs.map → chunk-USKVWPJD.cjs.map} +1 -1
- package/dist/{chunk-I7NTF56J.cjs → chunk-VHBGE4BY.cjs} +4 -4
- package/dist/{chunk-I7NTF56J.cjs.map → chunk-VHBGE4BY.cjs.map} +1 -1
- package/dist/{chunk-SBYLJGAD.cjs → chunk-XWU5MCY3.cjs} +9 -9
- package/dist/{chunk-SBYLJGAD.cjs.map → chunk-XWU5MCY3.cjs.map} +1 -1
- package/dist/{chunk-WYPUA6ZD.js → chunk-YJJ4DI42.js} +24 -3
- package/dist/chunk-YJJ4DI42.js.map +1 -0
- package/dist/chunk-YKBA4WQJ.cjs +12 -0
- package/dist/{chunk-HUJGLKZR.cjs.map → chunk-YKBA4WQJ.cjs.map} +1 -1
- package/dist/core/index.cjs +107 -107
- package/dist/core/index.js +10 -10
- package/dist/manager/index.cjs +262 -260
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.js +12 -10
- 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 +2 -2
- package/dist/chunk-77RL3E4C.cjs.map +0 -1
- package/dist/chunk-HUJGLKZR.cjs +0 -12
- package/dist/chunk-WYPUA6ZD.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 chunkXWU5MCY3_cjs = require('../chunk-XWU5MCY3.cjs');
|
|
4
|
+
var chunkUSKVWPJD_cjs = require('../chunk-USKVWPJD.cjs');
|
|
5
|
+
var chunkYKBA4WQJ_cjs = require('../chunk-YKBA4WQJ.cjs');
|
|
6
|
+
var chunkT5JYKERY_cjs = require('../chunk-T5JYKERY.cjs');
|
|
7
|
+
var chunk5ORJRFXZ_cjs = require('../chunk-5ORJRFXZ.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 } = chunk5ORJRFXZ_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 } = chunk5ORJRFXZ_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 } = chunk5ORJRFXZ_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 } = chunk5ORJRFXZ_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 } = chunk5ORJRFXZ_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 } = chunk5ORJRFXZ_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: [
|
|
@@ -788,7 +788,7 @@ function SectionCard({
|
|
|
788
788
|
] });
|
|
789
789
|
}
|
|
790
790
|
function ManagerChecklistSection(props) {
|
|
791
|
-
const session =
|
|
791
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
792
792
|
if (session.status !== "authenticated") {
|
|
793
793
|
return null;
|
|
794
794
|
}
|
|
@@ -799,10 +799,10 @@ function ReadyManagerChecklistSection({
|
|
|
799
799
|
components,
|
|
800
800
|
style
|
|
801
801
|
}) {
|
|
802
|
-
const { t } =
|
|
803
|
-
const checklist =
|
|
804
|
-
const managers =
|
|
805
|
-
const managerMe =
|
|
802
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
803
|
+
const checklist = chunkUSKVWPJD_cjs.useChecklists(tripRef);
|
|
804
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
805
|
+
const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
|
|
806
806
|
const ProgressCardUI = components?.ProgressCard ?? ProgressCard;
|
|
807
807
|
const SectionCardUI = components?.SectionCard ?? SectionCard;
|
|
808
808
|
const ItemRowUI = components?.ItemRow ?? ItemRow;
|
|
@@ -814,7 +814,7 @@ function ReadyManagerChecklistSection({
|
|
|
814
814
|
/* @__PURE__ */ new Map()
|
|
815
815
|
);
|
|
816
816
|
if (checklist.status === "loading") {
|
|
817
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__skeleton", style:
|
|
817
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
818
818
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-block" }),
|
|
819
819
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-line" }),
|
|
820
820
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-checklist__skeleton-line kf-manager-checklist__skeleton-line--short" })
|
|
@@ -844,7 +844,7 @@ function ReadyManagerChecklistSection({
|
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist", style:
|
|
847
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-checklist", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
848
848
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
849
849
|
ProgressCardUI,
|
|
850
850
|
{
|
|
@@ -1073,7 +1073,7 @@ function LockIcon(props) {
|
|
|
1073
1073
|
);
|
|
1074
1074
|
}
|
|
1075
1075
|
function BlockerRow({ blocker, onAction }) {
|
|
1076
|
-
const { t } =
|
|
1076
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1077
1077
|
const Icon = blocker.severity === "hard" ? WarningIcon : InfoIcon;
|
|
1078
1078
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__blocker-row", "data-severity": blocker.severity, children: [
|
|
1079
1079
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-closeout__blocker-icon", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true" }) }),
|
|
@@ -1102,7 +1102,7 @@ function HandoverNoteEditor({
|
|
|
1102
1102
|
disabled,
|
|
1103
1103
|
onSave
|
|
1104
1104
|
}) {
|
|
1105
|
-
const { t } =
|
|
1105
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1106
1106
|
const [draft, setDraft] = react.useState(note ?? "");
|
|
1107
1107
|
const [savedLabel, setSavedLabel] = react.useState(false);
|
|
1108
1108
|
react.useEffect(() => {
|
|
@@ -1179,7 +1179,7 @@ function LockConfirmSheet({
|
|
|
1179
1179
|
onConfirm,
|
|
1180
1180
|
onClose
|
|
1181
1181
|
}) {
|
|
1182
|
-
const { t } =
|
|
1182
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1183
1183
|
react.useEffect(() => {
|
|
1184
1184
|
if (!open) {
|
|
1185
1185
|
return;
|
|
@@ -1254,7 +1254,7 @@ var PERFORMED_BY_LABEL_KEY = {
|
|
|
1254
1254
|
SYSTEM: "chrome.managerTrip.closeout.performedBy.system"
|
|
1255
1255
|
};
|
|
1256
1256
|
function LockedSummary({ aggregate }) {
|
|
1257
|
-
const { t } =
|
|
1257
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1258
1258
|
const performedByLabel = aggregate.performedByKind !== null ? t(
|
|
1259
1259
|
PERFORMED_BY_LABEL_KEY[aggregate.performedByKind] ?? "chrome.managerTrip.closeout.performedBy.system"
|
|
1260
1260
|
) : void 0;
|
|
@@ -1275,7 +1275,7 @@ function stageLabelKey(stage) {
|
|
|
1275
1275
|
return stage !== null ? STAGE_LABEL_KEY[stage] ?? "chrome.managerTrip.closeout.stage.notReturned" : "chrome.managerTrip.closeout.stage.notReturned";
|
|
1276
1276
|
}
|
|
1277
1277
|
function StageStrip({ aggregate }) {
|
|
1278
|
-
const { t } =
|
|
1278
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1279
1279
|
const { financialSummary } = aggregate;
|
|
1280
1280
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__stage", children: [
|
|
1281
1281
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-closeout__stage-badge", "data-stage": aggregate.stage ?? "none", children: t(stageLabelKey(aggregate.stage)) }),
|
|
@@ -1314,7 +1314,7 @@ function StageStrip({ aggregate }) {
|
|
|
1314
1314
|
] });
|
|
1315
1315
|
}
|
|
1316
1316
|
function UnlockRequestForm({ tripRef, onSubmit }) {
|
|
1317
|
-
const { t } =
|
|
1317
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1318
1318
|
const [reason, setReason] = react.useState("");
|
|
1319
1319
|
const [submitting, setSubmitting] = react.useState(false);
|
|
1320
1320
|
const [submitted, setSubmitted] = react.useState(false);
|
|
@@ -1353,7 +1353,7 @@ function UnlockRequestForm({ tripRef, onSubmit }) {
|
|
|
1353
1353
|
] });
|
|
1354
1354
|
}
|
|
1355
1355
|
function ManagerCloseoutSection(props) {
|
|
1356
|
-
const session =
|
|
1356
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
1357
1357
|
if (session.status !== "authenticated") {
|
|
1358
1358
|
return null;
|
|
1359
1359
|
}
|
|
@@ -1366,13 +1366,13 @@ function ReadyManagerCloseoutSection({
|
|
|
1366
1366
|
components,
|
|
1367
1367
|
style
|
|
1368
1368
|
}) {
|
|
1369
|
-
const { t } =
|
|
1370
|
-
const closeout =
|
|
1369
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1370
|
+
const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
|
|
1371
1371
|
const BlockerRowUI = components?.BlockerRow ?? BlockerRow;
|
|
1372
1372
|
const [lockSheetOpen, setLockSheetOpen] = react.useState(false);
|
|
1373
1373
|
const [lockPending, setLockPending] = react.useState(false);
|
|
1374
1374
|
if (closeout.status === "loading") {
|
|
1375
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style:
|
|
1375
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1376
1376
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1377
1377
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1378
1378
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line kf-manager-closeout__skeleton-line--short" })
|
|
@@ -1382,17 +1382,17 @@ function ReadyManagerCloseoutSection({
|
|
|
1382
1382
|
return null;
|
|
1383
1383
|
}
|
|
1384
1384
|
if (!closeout.loaded || closeout.aggregate === void 0) {
|
|
1385
|
-
return closeout.lastFetchFailed ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style:
|
|
1385
|
+
return closeout.lastFetchFailed ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1386
1386
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" }),
|
|
1387
1387
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__skeleton-line" })
|
|
1388
1388
|
] });
|
|
1389
1389
|
}
|
|
1390
1390
|
const { aggregate } = closeout;
|
|
1391
1391
|
if (aggregate.stage === null) {
|
|
1392
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout", style:
|
|
1392
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-closeout__not-returned", children: t("chrome.managerTrip.closeout.notReturnedYet") }) });
|
|
1393
1393
|
}
|
|
1394
1394
|
if (aggregate.lockedAt !== null) {
|
|
1395
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style:
|
|
1395
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1396
1396
|
/* @__PURE__ */ jsxRuntime.jsx(LockedSummary, { aggregate }),
|
|
1397
1397
|
/* @__PURE__ */ jsxRuntime.jsx(UnlockRequestForm, { tripRef, onSubmit: onSubmitUnlockRequest })
|
|
1398
1398
|
] });
|
|
@@ -1408,7 +1408,7 @@ function ReadyManagerCloseoutSection({
|
|
|
1408
1408
|
setLockPending(false);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style:
|
|
1411
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1412
1412
|
/* @__PURE__ */ jsxRuntime.jsx(StageStrip, { aggregate }),
|
|
1413
1413
|
rankedBlockers.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-closeout__all-clear", children: [
|
|
1414
1414
|
/* @__PURE__ */ jsxRuntime.jsx(CheckIcon2, { "aria-hidden": "true" }),
|
|
@@ -1632,7 +1632,7 @@ var PURPOSE_LABEL_KEY = {
|
|
|
1632
1632
|
trip_document: "chrome.managerTrip.documents.bucket.tripDocument"
|
|
1633
1633
|
};
|
|
1634
1634
|
function DocumentBucketTile({ purpose, count, onOpen }) {
|
|
1635
|
-
const { t } =
|
|
1635
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1636
1636
|
const Icon = PURPOSE_ICON[purpose];
|
|
1637
1637
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1638
1638
|
"button",
|
|
@@ -1668,7 +1668,7 @@ function formatFileSize(sizeBytes) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
var FILE_DATE_FORMATTER = new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short" });
|
|
1670
1670
|
function DocumentBucketGrid({ items, onOpen }) {
|
|
1671
|
-
const { t } =
|
|
1671
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1672
1672
|
const [activePurpose, setActivePurpose] = react.useState(void 0);
|
|
1673
1673
|
const buckets = react.useMemo(() => {
|
|
1674
1674
|
return PURPOSE_ORDER.map((purpose) => ({
|
|
@@ -1737,7 +1737,7 @@ async function shareFile(file) {
|
|
|
1737
1737
|
await navigator.clipboard.writeText(file.url);
|
|
1738
1738
|
}
|
|
1739
1739
|
function DocumentViewerSheet({ file, onClose }) {
|
|
1740
|
-
const { t } =
|
|
1740
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1741
1741
|
react.useEffect(() => {
|
|
1742
1742
|
if (file === void 0) {
|
|
1743
1743
|
return;
|
|
@@ -1821,15 +1821,15 @@ function DocumentViewerSheet({ file, onClose }) {
|
|
|
1821
1821
|
) });
|
|
1822
1822
|
}
|
|
1823
1823
|
function ManagerDocumentsSection(props) {
|
|
1824
|
-
const session =
|
|
1824
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
1825
1825
|
if (session.status !== "authenticated") {
|
|
1826
1826
|
return null;
|
|
1827
1827
|
}
|
|
1828
1828
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyManagerDocumentsSection, { ...props });
|
|
1829
1829
|
}
|
|
1830
1830
|
function ReadyManagerDocumentsSection({ tripRef, style }) {
|
|
1831
|
-
const { t } =
|
|
1832
|
-
const files =
|
|
1831
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1832
|
+
const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
|
|
1833
1833
|
const [state, setState] = react.useState({ status: "loading" });
|
|
1834
1834
|
const [viewerFile, setViewerFile] = react.useState(void 0);
|
|
1835
1835
|
react.useEffect(() => {
|
|
@@ -1853,7 +1853,7 @@ function ReadyManagerDocumentsSection({ tripRef, style }) {
|
|
|
1853
1853
|
setViewerFile(view);
|
|
1854
1854
|
}
|
|
1855
1855
|
if (state.status === "loading") {
|
|
1856
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents__skeleton", style:
|
|
1856
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1857
1857
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-documents__skeleton-tile" }),
|
|
1858
1858
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-documents__skeleton-tile" })
|
|
1859
1859
|
] });
|
|
@@ -1861,7 +1861,7 @@ function ReadyManagerDocumentsSection({ tripRef, style }) {
|
|
|
1861
1861
|
if (state.status === "error") {
|
|
1862
1862
|
return null;
|
|
1863
1863
|
}
|
|
1864
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents", style:
|
|
1864
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-documents", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1865
1865
|
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) }),
|
|
1866
1866
|
/* @__PURE__ */ jsxRuntime.jsx(DocumentViewerSheet, { file: viewerFile, onClose: () => setViewerFile(void 0) })
|
|
1867
1867
|
] });
|
|
@@ -1926,7 +1926,7 @@ function collectionReferenceRequired(mode) {
|
|
|
1926
1926
|
return mode !== "CASH";
|
|
1927
1927
|
}
|
|
1928
1928
|
function BalanceSummaryStrip({ rows, ownManagerId }) {
|
|
1929
|
-
const { t } =
|
|
1929
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1930
1930
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__summary", children: [
|
|
1931
1931
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-float-ledger__eyebrow", children: t("chrome.managerTrip.floatLedger.summaryEyebrow") }),
|
|
1932
1932
|
/* @__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: [
|
|
@@ -1990,7 +1990,7 @@ var MOVEMENT_LABEL_KEY = {
|
|
|
1990
1990
|
EXPENSE: "chrome.managerTrip.floatLedger.type.expense"
|
|
1991
1991
|
};
|
|
1992
1992
|
function LedgerRow({ movement }) {
|
|
1993
|
-
const { t } =
|
|
1993
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1994
1994
|
const isIn = movement.direction === "IN";
|
|
1995
1995
|
const Icon = isIn ? ArrowInIcon : ArrowOutIcon;
|
|
1996
1996
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__row", children: [
|
|
@@ -2014,7 +2014,7 @@ function LedgerRow({ movement }) {
|
|
|
2014
2014
|
] });
|
|
2015
2015
|
}
|
|
2016
2016
|
function ManagerFloatLedgerSection(props) {
|
|
2017
|
-
const session =
|
|
2017
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
2018
2018
|
if (session.status !== "authenticated") {
|
|
2019
2019
|
return null;
|
|
2020
2020
|
}
|
|
@@ -2024,10 +2024,10 @@ function ReadyManagerFloatLedgerSection({
|
|
|
2024
2024
|
tripRef,
|
|
2025
2025
|
style
|
|
2026
2026
|
}) {
|
|
2027
|
-
const { t } =
|
|
2028
|
-
const float =
|
|
2027
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2028
|
+
const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
|
|
2029
2029
|
if (float.status === "loading") {
|
|
2030
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__skeleton", style:
|
|
2030
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
2031
2031
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-block" }),
|
|
2032
2032
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-line" }),
|
|
2033
2033
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-line kf-manager-float-ledger__skeleton-line--short" })
|
|
@@ -2041,7 +2041,7 @@ function ReadyManagerFloatLedgerSection({
|
|
|
2041
2041
|
const sortedMovements = [...movements].sort(
|
|
2042
2042
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
2043
2043
|
);
|
|
2044
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger", style:
|
|
2044
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
2045
2045
|
summary.rows.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(BalanceSummaryStrip, { rows: summary.rows, ownManagerId: ownManagerId ?? "" }) : null,
|
|
2046
2046
|
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)) })
|
|
2047
2047
|
] });
|
|
@@ -2125,7 +2125,7 @@ function PersonIcon(props) {
|
|
|
2125
2125
|
);
|
|
2126
2126
|
}
|
|
2127
2127
|
function ConflictNotice({ onRefresh }) {
|
|
2128
|
-
const { t } =
|
|
2128
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2129
2129
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__conflict", children: [
|
|
2130
2130
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon2, {}),
|
|
2131
2131
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -2186,7 +2186,7 @@ function SelectFieldEditor({
|
|
|
2186
2186
|
required,
|
|
2187
2187
|
onChange
|
|
2188
2188
|
}) {
|
|
2189
|
-
const { t } =
|
|
2189
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2190
2190
|
const [open, setOpen] = react.useState(false);
|
|
2191
2191
|
const rootRef = react.useRef(null);
|
|
2192
2192
|
const selected = options.find((option) => option.value === value);
|
|
@@ -2289,7 +2289,7 @@ var fallback = {
|
|
|
2289
2289
|
editor: ({ field, t }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-unsupported", children: t("chrome.managerTrip.forms.fieldUnsupported").replace("{label}", field.label) }),
|
|
2290
2290
|
preview: PlainPreview
|
|
2291
2291
|
};
|
|
2292
|
-
var fieldRegistry =
|
|
2292
|
+
var fieldRegistry = chunk5ORJRFXZ_cjs.createRegistry({ fallback });
|
|
2293
2293
|
fieldRegistry.register("HEADING", {
|
|
2294
2294
|
editor: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-manager-forms__field-heading", children: field.label }),
|
|
2295
2295
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-manager-forms__field-heading", children: field.label })
|
|
@@ -2577,7 +2577,7 @@ fieldRegistry.register("MULTISELECT", {
|
|
|
2577
2577
|
},
|
|
2578
2578
|
preview: ({ value }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-preview", children: Array.isArray(value) ? value.join(", ") : "" })
|
|
2579
2579
|
});
|
|
2580
|
-
fieldRegistry.register(
|
|
2580
|
+
fieldRegistry.register(chunkUSKVWPJD_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN, {
|
|
2581
2581
|
editor: ({ field, value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ToggleSwitch, { checked: value === true, label: field.label, onChange }),
|
|
2582
2582
|
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") })
|
|
2583
2583
|
});
|
|
@@ -2605,7 +2605,7 @@ function FormFillRenderer({
|
|
|
2605
2605
|
onRefreshAfterConflict,
|
|
2606
2606
|
onBack
|
|
2607
2607
|
}) {
|
|
2608
|
-
const { t } =
|
|
2608
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2609
2609
|
const [answers, setAnswers] = react.useState(() => {
|
|
2610
2610
|
const initial = {};
|
|
2611
2611
|
for (const answer of existingResponse?.answers ?? []) {
|
|
@@ -2649,7 +2649,7 @@ function FormFillRenderer({
|
|
|
2649
2649
|
(fieldsBySection.get(section.id) ?? []).map((field) => {
|
|
2650
2650
|
const handler = fieldRegistry.resolve(field.kind);
|
|
2651
2651
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__fill-field", children: [
|
|
2652
|
-
field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !==
|
|
2652
|
+
field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !== chunkUSKVWPJD_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN && field.kind !== "CONSENT" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-forms__fill-field-label", htmlFor: field.id, children: [
|
|
2653
2653
|
field.label,
|
|
2654
2654
|
field.required ? " *" : ""
|
|
2655
2655
|
] }) : null,
|
|
@@ -2691,7 +2691,7 @@ function FillHeader({
|
|
|
2691
2691
|
title,
|
|
2692
2692
|
onBack
|
|
2693
2693
|
}) {
|
|
2694
|
-
const { t } =
|
|
2694
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2695
2695
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__fill-header", children: [
|
|
2696
2696
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2697
2697
|
"button",
|
|
@@ -2745,7 +2745,7 @@ function FormResponsesList({
|
|
|
2745
2745
|
onSelectResponse,
|
|
2746
2746
|
onBack
|
|
2747
2747
|
}) {
|
|
2748
|
-
const { t } =
|
|
2748
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2749
2749
|
const sorted = responses.slice().sort(
|
|
2750
2750
|
(a, b) => (b.submittedAt ?? b.lastSavedAt ?? "").localeCompare(a.submittedAt ?? a.lastSavedAt ?? "")
|
|
2751
2751
|
);
|
|
@@ -2851,7 +2851,7 @@ var STATUS_LABEL_KEY = {
|
|
|
2851
2851
|
ARCHIVED: "chrome.managerTrip.forms.statusArchived"
|
|
2852
2852
|
};
|
|
2853
2853
|
function FormRow({ row, now, travellerScoped, onSelect }) {
|
|
2854
|
-
const { t } =
|
|
2854
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2855
2855
|
const { form, response } = row;
|
|
2856
2856
|
const state = fillStateOf(form);
|
|
2857
2857
|
const due = dueCopyFor(form, now);
|
|
@@ -2889,7 +2889,7 @@ function TripFormsPanel({
|
|
|
2889
2889
|
travellerScoped,
|
|
2890
2890
|
onSelectForm
|
|
2891
2891
|
}) {
|
|
2892
|
-
const { t } =
|
|
2892
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2893
2893
|
if (rows.length === 0) {
|
|
2894
2894
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__empty", children: [
|
|
2895
2895
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__empty-title", children: t("chrome.managerTrip.forms.emptyTitle") }),
|
|
@@ -2942,7 +2942,7 @@ function TripFormsPanel({
|
|
|
2942
2942
|
] });
|
|
2943
2943
|
}
|
|
2944
2944
|
function ManagerFormsSection(props) {
|
|
2945
|
-
const session =
|
|
2945
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
2946
2946
|
if (session.status !== "authenticated") {
|
|
2947
2947
|
return null;
|
|
2948
2948
|
}
|
|
@@ -2956,10 +2956,10 @@ function ReadyManagerFormsSection({
|
|
|
2956
2956
|
components,
|
|
2957
2957
|
style
|
|
2958
2958
|
}) {
|
|
2959
|
-
const { t } =
|
|
2960
|
-
const forms =
|
|
2961
|
-
const conflicts =
|
|
2962
|
-
const parties =
|
|
2959
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2960
|
+
const forms = chunkUSKVWPJD_cjs.useForms(tripRef);
|
|
2961
|
+
const conflicts = chunkXWU5MCY3_cjs.useConflicts(tripRef);
|
|
2962
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
2963
2963
|
const TripFormsPanelUI = components?.TripFormsPanel ?? TripFormsPanel;
|
|
2964
2964
|
const FormFillRendererUI = components?.FormFillRenderer ?? FormFillRenderer;
|
|
2965
2965
|
const [travellerRows, setTravellerRows] = react.useState([]);
|
|
@@ -3079,7 +3079,7 @@ function ReadyManagerFormsSection({
|
|
|
3079
3079
|
};
|
|
3080
3080
|
}, [ready, browsingFormId, viewingResponse]);
|
|
3081
3081
|
if (forms.status === "loading") {
|
|
3082
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__skeleton", style:
|
|
3082
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
3083
3083
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line" }),
|
|
3084
3084
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line" }),
|
|
3085
3085
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-forms__skeleton-line kf-manager-forms__skeleton-line--short" })
|
|
@@ -3133,7 +3133,7 @@ function ReadyManagerFormsSection({
|
|
|
3133
3133
|
setPending(false);
|
|
3134
3134
|
}
|
|
3135
3135
|
}
|
|
3136
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms", style:
|
|
3136
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
3137
3137
|
browsingForm !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3138
3138
|
FormResponsesList,
|
|
3139
3139
|
{
|
|
@@ -3432,7 +3432,7 @@ function AddItemSheet2({
|
|
|
3432
3432
|
onDelete,
|
|
3433
3433
|
onClose
|
|
3434
3434
|
}) {
|
|
3435
|
-
const { t } =
|
|
3435
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3436
3436
|
const [type, setType] = react.useState("OTHER");
|
|
3437
3437
|
const [title, setTitle] = react.useState("");
|
|
3438
3438
|
const [description, setDescription] = react.useState("");
|
|
@@ -3729,7 +3729,7 @@ function ChangeLogSheet({
|
|
|
3729
3729
|
onLoad,
|
|
3730
3730
|
onClose
|
|
3731
3731
|
}) {
|
|
3732
|
-
const { t } =
|
|
3732
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3733
3733
|
react.useEffect(() => {
|
|
3734
3734
|
if (open) {
|
|
3735
3735
|
onLoad();
|
|
@@ -3792,7 +3792,7 @@ function DayStrip({ days, selectedDayIndex, onSelect }) {
|
|
|
3792
3792
|
)) });
|
|
3793
3793
|
}
|
|
3794
3794
|
function EditDaySheet({ open, day, onPatch, onClose }) {
|
|
3795
|
-
const { t } =
|
|
3795
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3796
3796
|
const [cardTitle, setCardTitle] = react.useState("");
|
|
3797
3797
|
const [summaryLine, setSummaryLine] = react.useState("");
|
|
3798
3798
|
const [pending, setPending] = react.useState(false);
|
|
@@ -3890,7 +3890,7 @@ function ItemCard({
|
|
|
3890
3890
|
onMoveDown,
|
|
3891
3891
|
onEdit
|
|
3892
3892
|
}) {
|
|
3893
|
-
const { t } =
|
|
3893
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3894
3894
|
const timeRange = formatTimeRange(item.startTime, item.endTime);
|
|
3895
3895
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__item-card", children: [
|
|
3896
3896
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__item-reorder", children: [
|
|
@@ -3940,7 +3940,7 @@ function ItemCard({
|
|
|
3940
3940
|
] });
|
|
3941
3941
|
}
|
|
3942
3942
|
function ManagerItinerarySection(props) {
|
|
3943
|
-
const session =
|
|
3943
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
3944
3944
|
if (session.status !== "authenticated") {
|
|
3945
3945
|
return null;
|
|
3946
3946
|
}
|
|
@@ -3952,9 +3952,9 @@ function ReadyManagerItinerarySection({
|
|
|
3952
3952
|
components,
|
|
3953
3953
|
style
|
|
3954
3954
|
}) {
|
|
3955
|
-
const { t } =
|
|
3956
|
-
const itinerary =
|
|
3957
|
-
const vendors =
|
|
3955
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3956
|
+
const itinerary = chunkUSKVWPJD_cjs.useItinerary(tripRef);
|
|
3957
|
+
const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
|
|
3958
3958
|
const DayStripComponent = components?.DayStrip ?? DayStrip;
|
|
3959
3959
|
const ItemCardComponent = components?.ItemCard ?? ItemCard;
|
|
3960
3960
|
const [selectedDayIndex, setSelectedDayIndex] = react.useState(void 0);
|
|
@@ -3962,7 +3962,7 @@ function ReadyManagerItinerarySection({
|
|
|
3962
3962
|
const [editDayOpen, setEditDayOpen] = react.useState(false);
|
|
3963
3963
|
const [changeLogOpen, setChangeLogOpen] = react.useState(false);
|
|
3964
3964
|
if (itinerary.status === "loading") {
|
|
3965
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__skeleton", style:
|
|
3965
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
3966
3966
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-block" }),
|
|
3967
3967
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-line" }),
|
|
3968
3968
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__skeleton-line kf-manager-itinerary__skeleton-line--short" })
|
|
@@ -3974,7 +3974,7 @@ function ReadyManagerItinerarySection({
|
|
|
3974
3974
|
const days = sortedDays(itinerary.days);
|
|
3975
3975
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
3976
3976
|
if (days.length === 0) {
|
|
3977
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary", style:
|
|
3977
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: resolvedEmptyView ?? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-itinerary__card kf-manager-itinerary__empty", children: t("chrome.managerTrip.itinerary.noDays") }) });
|
|
3978
3978
|
}
|
|
3979
3979
|
const resolvedDayIndex = selectedDayIndex ?? resolveInitialDayIndex(days, itinerary.initialDayIso);
|
|
3980
3980
|
const activeDay = days.find((day) => day.dayIndex === resolvedDayIndex) ?? days[0];
|
|
@@ -3990,7 +3990,7 @@ function ReadyManagerItinerarySection({
|
|
|
3990
3990
|
}
|
|
3991
3991
|
await itinerary.reorderItem({ itemId: item.id, index: index + direction });
|
|
3992
3992
|
};
|
|
3993
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary", style:
|
|
3993
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-itinerary", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
3994
3994
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3995
3995
|
DayStripComponent,
|
|
3996
3996
|
{
|
|
@@ -4230,7 +4230,7 @@ function TripBookingGroupCard({
|
|
|
4230
4230
|
onCollect,
|
|
4231
4231
|
onOpenTraveller
|
|
4232
4232
|
}) {
|
|
4233
|
-
const { t } =
|
|
4233
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4234
4234
|
const title = group.label ?? t(KIND_LABEL_KEY[group.kind]);
|
|
4235
4235
|
const visibleMembers = group.members.slice(0, VISIBLE_MEMBER_COUNT);
|
|
4236
4236
|
const overflowCount = group.members.length - visibleMembers.length;
|
|
@@ -4380,7 +4380,7 @@ function TripManifestFilterSheet({
|
|
|
4380
4380
|
onApply,
|
|
4381
4381
|
onClose
|
|
4382
4382
|
}) {
|
|
4383
|
-
const { t } =
|
|
4383
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4384
4384
|
react.useEffect(() => {
|
|
4385
4385
|
if (!open) {
|
|
4386
4386
|
return;
|
|
@@ -4488,7 +4488,7 @@ function TripManifestSearchRow({
|
|
|
4488
4488
|
filters,
|
|
4489
4489
|
onOpenFilters
|
|
4490
4490
|
}) {
|
|
4491
|
-
const { t } =
|
|
4491
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4492
4492
|
const activeCount = activeManifestFilterCount(filters);
|
|
4493
4493
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__search-row", children: [
|
|
4494
4494
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__search-field", children: [
|
|
@@ -4521,7 +4521,7 @@ function TripManifestSearchRow({
|
|
|
4521
4521
|
] });
|
|
4522
4522
|
}
|
|
4523
4523
|
function TripManifestStats({ stats }) {
|
|
4524
|
-
const { t } =
|
|
4524
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4525
4525
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__stats", children: [
|
|
4526
4526
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__stat-cell", children: [
|
|
4527
4527
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-manifest__stat-label", children: t("chrome.managerTrip.manifest.stats.confirmed") }),
|
|
@@ -4569,7 +4569,7 @@ function initials2(fullName) {
|
|
|
4569
4569
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
4570
4570
|
}
|
|
4571
4571
|
function TripTravellerRow({ traveller, onOpen }) {
|
|
4572
|
-
const { t } =
|
|
4572
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4573
4573
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4574
4574
|
"button",
|
|
4575
4575
|
{
|
|
@@ -4596,7 +4596,7 @@ function TripTravellerRow({ traveller, onOpen }) {
|
|
|
4596
4596
|
);
|
|
4597
4597
|
}
|
|
4598
4598
|
function ManagerManifestSection(props) {
|
|
4599
|
-
const session =
|
|
4599
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
4600
4600
|
if (session.status !== "authenticated") {
|
|
4601
4601
|
return null;
|
|
4602
4602
|
}
|
|
@@ -4610,11 +4610,11 @@ function ReadyManagerManifestSection({
|
|
|
4610
4610
|
components,
|
|
4611
4611
|
style
|
|
4612
4612
|
}) {
|
|
4613
|
-
const { t } =
|
|
4613
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4614
4614
|
const Stats = components?.Stats ?? TripManifestStats;
|
|
4615
4615
|
const BookingGroupCard = components?.BookingGroupCard ?? TripBookingGroupCard;
|
|
4616
4616
|
const TravellerRow = components?.TravellerRow ?? TripTravellerRow;
|
|
4617
|
-
const parties =
|
|
4617
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
4618
4618
|
const [query, setQuery] = react.useState("");
|
|
4619
4619
|
const [filters, setFilters] = react.useState(EMPTY_MANIFEST_FILTERS);
|
|
4620
4620
|
const [filterSheetOpen, setFilterSheetOpen] = react.useState(false);
|
|
@@ -4646,7 +4646,7 @@ function ReadyManagerManifestSection({
|
|
|
4646
4646
|
[travellers]
|
|
4647
4647
|
);
|
|
4648
4648
|
if (parties.status === "loading") {
|
|
4649
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__skeleton", style:
|
|
4649
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4650
4650
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-block" }),
|
|
4651
4651
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-line" }),
|
|
4652
4652
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-manifest__skeleton-line kf-manager-manifest__skeleton-line--short" })
|
|
@@ -4654,7 +4654,7 @@ function ReadyManagerManifestSection({
|
|
|
4654
4654
|
}
|
|
4655
4655
|
if (parties.status === "error") {
|
|
4656
4656
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4657
|
-
|
|
4657
|
+
chunkT5JYKERY_cjs.OfflineFallbackScreen,
|
|
4658
4658
|
{
|
|
4659
4659
|
tripRef,
|
|
4660
4660
|
onRetry: () => void parties.retry(),
|
|
@@ -4664,7 +4664,7 @@ function ReadyManagerManifestSection({
|
|
|
4664
4664
|
}
|
|
4665
4665
|
if (!parties.tripRoster.loaded && parties.tripRoster.lastFetchFailed) {
|
|
4666
4666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4667
|
-
|
|
4667
|
+
chunkT5JYKERY_cjs.OfflineFallbackScreen,
|
|
4668
4668
|
{
|
|
4669
4669
|
tripRef,
|
|
4670
4670
|
onRetry: () => void parties.tripRoster.refresh(),
|
|
@@ -4674,7 +4674,7 @@ function ReadyManagerManifestSection({
|
|
|
4674
4674
|
}
|
|
4675
4675
|
const noMatches = filteredTravellers.length === 0;
|
|
4676
4676
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
4677
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest", style:
|
|
4677
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-manifest", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4678
4678
|
/* @__PURE__ */ jsxRuntime.jsx(Stats, { stats }),
|
|
4679
4679
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4680
4680
|
TripManifestSearchRow,
|
|
@@ -4808,7 +4808,7 @@ function initials3(fullName) {
|
|
|
4808
4808
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
4809
4809
|
}
|
|
4810
4810
|
function ProfileHeader({ fullName }) {
|
|
4811
|
-
const { t } =
|
|
4811
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4812
4812
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__profile-card", children: [
|
|
4813
4813
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-me__avatar", "aria-hidden": "true", children: initials3(fullName) }),
|
|
4814
4814
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__profile-body", children: [
|
|
@@ -4831,7 +4831,7 @@ var STATUS_LABEL_KEY4 = {
|
|
|
4831
4831
|
CANCELLED: "chrome.managerMe.trips.status.cancelled"
|
|
4832
4832
|
};
|
|
4833
4833
|
function RecentTrips({ trips, onOpenTrip }) {
|
|
4834
|
-
const { t } =
|
|
4834
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4835
4835
|
if (trips.length === 0) {
|
|
4836
4836
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerMe.trips.eyebrow"), children: [
|
|
4837
4837
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-me__eyebrow", children: t("chrome.managerMe.trips.eyebrow") }),
|
|
@@ -4871,7 +4871,7 @@ function RecentTrips({ trips, onOpenTrip }) {
|
|
|
4871
4871
|
] });
|
|
4872
4872
|
}
|
|
4873
4873
|
function StatsStrip({ trips }) {
|
|
4874
|
-
const { t } =
|
|
4874
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4875
4875
|
const leading = trips.filter((trip) => trip.isLead).length;
|
|
4876
4876
|
const coManaging = trips.length - leading;
|
|
4877
4877
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__stat-grid", children: [
|
|
@@ -4890,7 +4890,7 @@ function StatsStrip({ trips }) {
|
|
|
4890
4890
|
] });
|
|
4891
4891
|
}
|
|
4892
4892
|
function SyncStatus({ status }) {
|
|
4893
|
-
const { t } =
|
|
4893
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4894
4894
|
const Icon = status.isOnline ? WifiOnIcon : WifiOffIcon;
|
|
4895
4895
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerMe.sync.eyebrow"), children: [
|
|
4896
4896
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-me__eyebrow", children: t("chrome.managerMe.sync.eyebrow") }),
|
|
@@ -4908,18 +4908,18 @@ function SyncStatus({ status }) {
|
|
|
4908
4908
|
] });
|
|
4909
4909
|
}
|
|
4910
4910
|
function ManagerMeSection(props) {
|
|
4911
|
-
const session =
|
|
4911
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
4912
4912
|
if (session.status !== "authenticated") {
|
|
4913
4913
|
return null;
|
|
4914
4914
|
}
|
|
4915
4915
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyManagerMeSection, { ...props });
|
|
4916
4916
|
}
|
|
4917
4917
|
function ReadyManagerMeSection({ onOpenTrip, onSignOut, style }) {
|
|
4918
|
-
const { t } =
|
|
4919
|
-
const managerMe =
|
|
4920
|
-
const outboxStatus =
|
|
4918
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4919
|
+
const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
|
|
4920
|
+
const outboxStatus = chunk5ORJRFXZ_cjs.useOutboxStatus();
|
|
4921
4921
|
if (managerMe.status === "loading") {
|
|
4922
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__skeleton", style:
|
|
4922
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4923
4923
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-block" }),
|
|
4924
4924
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-line" }),
|
|
4925
4925
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-me__skeleton-line kf-manager-me__skeleton-line--short" })
|
|
@@ -4928,7 +4928,7 @@ function ReadyManagerMeSection({ onOpenTrip, onSignOut, style }) {
|
|
|
4928
4928
|
if (managerMe.status === "error") {
|
|
4929
4929
|
return null;
|
|
4930
4930
|
}
|
|
4931
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me", style:
|
|
4931
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-me", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4932
4932
|
/* @__PURE__ */ jsxRuntime.jsx(ProfileHeader, { fullName: managerMe.manager.fullName }),
|
|
4933
4933
|
/* @__PURE__ */ jsxRuntime.jsx(StatsStrip, { trips: managerMe.trips }),
|
|
4934
4934
|
/* @__PURE__ */ jsxRuntime.jsx(RecentTrips, { trips: managerMe.trips, onOpenTrip }),
|
|
@@ -4972,7 +4972,7 @@ function ManagerFab({
|
|
|
4972
4972
|
"aria-label": label,
|
|
4973
4973
|
"data-tone": tone,
|
|
4974
4974
|
className: "kf-manager-fab kf-press--fab",
|
|
4975
|
-
style:
|
|
4975
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
4976
4976
|
children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(PlusIcon3, {})
|
|
4977
4977
|
}
|
|
4978
4978
|
);
|
|
@@ -5042,7 +5042,7 @@ function FloatMovementSheet({
|
|
|
5042
5042
|
onAdjust,
|
|
5043
5043
|
onClose
|
|
5044
5044
|
}) {
|
|
5045
|
-
const { t } =
|
|
5045
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5046
5046
|
const [kind, setKind] = react.useState("RETURN");
|
|
5047
5047
|
const [amount, setAmount] = react.useState("");
|
|
5048
5048
|
const [direction, setDirection] = react.useState("OUT");
|
|
@@ -5196,8 +5196,8 @@ function LogExpenseSheet({
|
|
|
5196
5196
|
onSubmit,
|
|
5197
5197
|
onClose
|
|
5198
5198
|
}) {
|
|
5199
|
-
const { t } =
|
|
5200
|
-
const files =
|
|
5199
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5200
|
+
const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
|
|
5201
5201
|
const receiptInputId = react.useId();
|
|
5202
5202
|
const [amount, setAmount] = react.useState("");
|
|
5203
5203
|
const [category, setCategory] = react.useState("MISC");
|
|
@@ -5422,7 +5422,7 @@ function RecordCollectionSheet({
|
|
|
5422
5422
|
onSubmit,
|
|
5423
5423
|
onClose
|
|
5424
5424
|
}) {
|
|
5425
|
-
const { t } =
|
|
5425
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5426
5426
|
const outstandingByTravellerId = new Map(
|
|
5427
5427
|
balancesDue.map((row) => [row.travellerId, row])
|
|
5428
5428
|
);
|
|
@@ -5644,7 +5644,7 @@ function AddMoneyMenuSheet({
|
|
|
5644
5644
|
onMoveFloat,
|
|
5645
5645
|
onClose
|
|
5646
5646
|
}) {
|
|
5647
|
-
const { t } =
|
|
5647
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5648
5648
|
if (!open) {
|
|
5649
5649
|
return null;
|
|
5650
5650
|
}
|
|
@@ -5749,7 +5749,7 @@ function BalancesDueSection({
|
|
|
5749
5749
|
onSelect,
|
|
5750
5750
|
onSeeAll
|
|
5751
5751
|
}) {
|
|
5752
|
-
const { t } =
|
|
5752
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5753
5753
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.money.balancesDue.ariaLabel"), children: [
|
|
5754
5754
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-manager-money__eyebrow-row", children: [
|
|
5755
5755
|
t("chrome.managerTrip.money.balancesDue.eyebrow"),
|
|
@@ -5780,7 +5780,7 @@ function ExpenseDetailSheet({
|
|
|
5780
5780
|
onWithdrawClaim,
|
|
5781
5781
|
onClose
|
|
5782
5782
|
}) {
|
|
5783
|
-
const { t } =
|
|
5783
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5784
5784
|
const [pending, setPending] = react.useState(false);
|
|
5785
5785
|
const [confirmingVoid, setConfirmingVoid] = react.useState(false);
|
|
5786
5786
|
const [voidReason, setVoidReason] = react.useState("");
|
|
@@ -5926,7 +5926,7 @@ function ExpenseDetailSheet({
|
|
|
5926
5926
|
) });
|
|
5927
5927
|
}
|
|
5928
5928
|
function MoneyStats({ float, spend, collect, reimbursable }) {
|
|
5929
|
-
const { t } =
|
|
5929
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5930
5930
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__stats", children: [
|
|
5931
5931
|
float !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__stat-cell", children: [
|
|
5932
5932
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-money__stat-label", children: t("chrome.managerTrip.money.stat.float") }),
|
|
@@ -5963,7 +5963,7 @@ function RecentExpensesSection({
|
|
|
5963
5963
|
expenses,
|
|
5964
5964
|
onSelect
|
|
5965
5965
|
}) {
|
|
5966
|
-
const { t } =
|
|
5966
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5967
5967
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.money.recentExpenses.ariaLabel"), children: [
|
|
5968
5968
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow", children: t("chrome.managerTrip.money.recentExpenses.eyebrow") }),
|
|
5969
5969
|
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(
|
|
@@ -5989,7 +5989,7 @@ function RecentExpensesSection({
|
|
|
5989
5989
|
] });
|
|
5990
5990
|
}
|
|
5991
5991
|
function ManagerMoneySection(props) {
|
|
5992
|
-
const session =
|
|
5992
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
5993
5993
|
if (session.status !== "authenticated") {
|
|
5994
5994
|
return null;
|
|
5995
5995
|
}
|
|
@@ -6001,11 +6001,11 @@ function ReadyManagerMoneySection({
|
|
|
6001
6001
|
components,
|
|
6002
6002
|
style
|
|
6003
6003
|
}) {
|
|
6004
|
-
const { t } =
|
|
6005
|
-
const float =
|
|
6006
|
-
const expenses =
|
|
6007
|
-
const collections =
|
|
6008
|
-
const parties =
|
|
6004
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6005
|
+
const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
|
|
6006
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
6007
|
+
const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
|
|
6008
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
6009
6009
|
const StatsComponent = components?.Stats ?? MoneyStats;
|
|
6010
6010
|
const RecentExpensesComponent = components?.RecentExpenses ?? RecentExpensesSection;
|
|
6011
6011
|
const BalancesDueComponent = components?.BalancesDue ?? BalancesDueSection;
|
|
@@ -6016,7 +6016,7 @@ function ReadyManagerMoneySection({
|
|
|
6016
6016
|
const [expenseDetail, setExpenseDetail] = react.useState(void 0);
|
|
6017
6017
|
const [showingAllBalances, setShowingAllBalances] = react.useState(false);
|
|
6018
6018
|
if (float.status === "loading" && expenses.status === "loading" && collections.status === "loading") {
|
|
6019
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__skeleton", style:
|
|
6019
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6020
6020
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-block" }),
|
|
6021
6021
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-line" }),
|
|
6022
6022
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-money__skeleton-line kf-manager-money__skeleton-line--short" })
|
|
@@ -6034,7 +6034,7 @@ function ReadyManagerMoneySection({
|
|
|
6034
6034
|
const canLogExpense = expensesReady !== void 0;
|
|
6035
6035
|
const canRecordCollection = collectionsReady !== void 0 && rosterRows.length > 0;
|
|
6036
6036
|
const canMoveFloat = floatReady !== void 0 && floatRow !== void 0;
|
|
6037
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money", style:
|
|
6037
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-money", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6038
6038
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6039
6039
|
StatsComponent,
|
|
6040
6040
|
{
|
|
@@ -6229,7 +6229,7 @@ function NotificationRow({ notification, onSelect }) {
|
|
|
6229
6229
|
);
|
|
6230
6230
|
}
|
|
6231
6231
|
function ManagerNotificationsSection(props) {
|
|
6232
|
-
const session =
|
|
6232
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
6233
6233
|
if (session.status !== "authenticated") {
|
|
6234
6234
|
return null;
|
|
6235
6235
|
}
|
|
@@ -6239,10 +6239,10 @@ function ReadyManagerNotificationsSection({
|
|
|
6239
6239
|
onSelectNotification,
|
|
6240
6240
|
style
|
|
6241
6241
|
}) {
|
|
6242
|
-
const { t } =
|
|
6243
|
-
const notifications =
|
|
6242
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6243
|
+
const notifications = chunkXWU5MCY3_cjs.useNotifications();
|
|
6244
6244
|
if (notifications.status === "loading") {
|
|
6245
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__skeleton", style:
|
|
6245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6246
6246
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line" }),
|
|
6247
6247
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line" }),
|
|
6248
6248
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications__skeleton-line kf-manager-notifications__skeleton-line--short" })
|
|
@@ -6258,7 +6258,7 @@ function ReadyManagerNotificationsSection({
|
|
|
6258
6258
|
}
|
|
6259
6259
|
onSelectNotification({ notificationId: notification.id, tripId: notification.tripId });
|
|
6260
6260
|
}
|
|
6261
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications", style:
|
|
6261
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-notifications", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-notifications__empty", children: [
|
|
6262
6262
|
/* @__PURE__ */ jsxRuntime.jsx(InboxIcon, { className: "kf-manager-notifications__empty-icon" }),
|
|
6263
6263
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-notifications__empty-title", children: t("chrome.managerNotifications.emptyTitle") }),
|
|
6264
6264
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-notifications__empty-body", children: t("chrome.managerNotifications.emptyBody") })
|
|
@@ -6391,7 +6391,7 @@ var TONE_ICON = {
|
|
|
6391
6391
|
info: () => /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {})
|
|
6392
6392
|
};
|
|
6393
6393
|
function NowBanners({ banners }) {
|
|
6394
|
-
const { t } =
|
|
6394
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6395
6395
|
if (banners.length === 0) {
|
|
6396
6396
|
return null;
|
|
6397
6397
|
}
|
|
@@ -6407,7 +6407,7 @@ function NowBanners({ banners }) {
|
|
|
6407
6407
|
] }, banner.id)) });
|
|
6408
6408
|
}
|
|
6409
6409
|
function NowChecklist({ items }) {
|
|
6410
|
-
const { t } =
|
|
6410
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6411
6411
|
if (items.length === 0) {
|
|
6412
6412
|
return null;
|
|
6413
6413
|
}
|
|
@@ -6432,7 +6432,7 @@ function initials4(fullName) {
|
|
|
6432
6432
|
return `${first[0] ?? ""}${last[0] ?? ""}`.toUpperCase();
|
|
6433
6433
|
}
|
|
6434
6434
|
function NowCoManager({ coManager }) {
|
|
6435
|
-
const { t } =
|
|
6435
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6436
6436
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.coManager.ariaLabel"), children: [
|
|
6437
6437
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.coManager.eyebrow") }),
|
|
6438
6438
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__co-manager-card", children: [
|
|
@@ -6475,7 +6475,7 @@ function NowHero({
|
|
|
6475
6475
|
progressPct,
|
|
6476
6476
|
onNavigateModule
|
|
6477
6477
|
}) {
|
|
6478
|
-
const { t } =
|
|
6478
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6479
6479
|
const progress = Math.max(0, Math.min(100, progressPct));
|
|
6480
6480
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-now__hero", "aria-label": t("chrome.managerNow.hero.ariaLabel"), children: [
|
|
6481
6481
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__hero-top", children: [
|
|
@@ -6534,21 +6534,22 @@ function formatTimeOfDay(isoDateTime, timezone) {
|
|
|
6534
6534
|
return formatter.format(new Date(isoDateTime));
|
|
6535
6535
|
}
|
|
6536
6536
|
function NowTimeline({ items, timezone }) {
|
|
6537
|
-
const { t } =
|
|
6537
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6538
|
+
const showTime = items.some((item) => item.startTime !== null || item.timeState === "now");
|
|
6538
6539
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.timeline.ariaLabel"), children: [
|
|
6539
6540
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.timeline.eyebrow") }),
|
|
6540
6541
|
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: [
|
|
6541
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__timeline-time-col", children: [
|
|
6542
|
+
showTime ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__timeline-time-col", children: [
|
|
6542
6543
|
item.timeState === "now" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-now__timeline-now-label", children: t("chrome.managerNow.timeline.now") }) : null,
|
|
6543
6544
|
item.startTime !== null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-now__timeline-time", children: formatTimeOfDay(item.startTime, timezone) }) : null
|
|
6544
|
-
] }),
|
|
6545
|
+
] }) : null,
|
|
6545
6546
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-now__timeline-title", children: item.title }),
|
|
6546
6547
|
item.timeState === "done" ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon3, { className: "kf-manager-now__timeline-check" }) : null
|
|
6547
6548
|
] }, item.id)) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__card kf-manager-now__timeline-empty", children: t("chrome.managerNow.timeline.noBlocks") })
|
|
6548
6549
|
] });
|
|
6549
6550
|
}
|
|
6550
6551
|
function NowTotals({ spend, collections }) {
|
|
6551
|
-
const { t } =
|
|
6552
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6552
6553
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.totals.ariaLabel"), children: [
|
|
6553
6554
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-eyebrow kf-manager-now__eyebrow-row", children: t("chrome.managerNow.totals.eyebrow") }),
|
|
6554
6555
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__totals-grid", children: [
|
|
@@ -6601,7 +6602,7 @@ function NowTripSummary({
|
|
|
6601
6602
|
floatOutstandingMinor,
|
|
6602
6603
|
onViewCloseout
|
|
6603
6604
|
}) {
|
|
6604
|
-
const { t } =
|
|
6605
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6605
6606
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerNow.closeout.ariaLabel"), children: [
|
|
6606
6607
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__eyebrow-row", children: [
|
|
6607
6608
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow", children: t("chrome.managerNow.closeout.eyebrow") }),
|
|
@@ -6666,7 +6667,7 @@ function occupancyTone(fillCount, capacity) {
|
|
|
6666
6667
|
return "neutral";
|
|
6667
6668
|
}
|
|
6668
6669
|
function NowVehicleCards({ vehicles }) {
|
|
6669
|
-
const { t } =
|
|
6670
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6670
6671
|
if (vehicles.length === 0) {
|
|
6671
6672
|
return null;
|
|
6672
6673
|
}
|
|
@@ -6707,7 +6708,7 @@ function QuickActionsSheet({
|
|
|
6707
6708
|
onCollectPayment,
|
|
6708
6709
|
onManageFloat
|
|
6709
6710
|
}) {
|
|
6710
|
-
const { t } =
|
|
6711
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6711
6712
|
react.useEffect(() => {
|
|
6712
6713
|
if (!open) {
|
|
6713
6714
|
return;
|
|
@@ -6809,7 +6810,7 @@ function sumTodayCollections(collections, serverTime, timezone, currency) {
|
|
|
6809
6810
|
return { totalMinor, currency, count };
|
|
6810
6811
|
}
|
|
6811
6812
|
function ManagerNowSection(props) {
|
|
6812
|
-
const session =
|
|
6813
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
6813
6814
|
if (session.status !== "authenticated") {
|
|
6814
6815
|
return null;
|
|
6815
6816
|
}
|
|
@@ -6846,17 +6847,17 @@ function ReadyManagerNowSection({
|
|
|
6846
6847
|
idleView,
|
|
6847
6848
|
style
|
|
6848
6849
|
}) {
|
|
6849
|
-
const { t } =
|
|
6850
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6850
6851
|
const [sheetOpen, setSheetOpen] = react.useState(false);
|
|
6851
6852
|
const [activeMoneySheet, setActiveMoneySheet] = react.useState(void 0);
|
|
6852
|
-
const managerMe =
|
|
6853
|
-
const today =
|
|
6854
|
-
const expenses =
|
|
6855
|
-
const collections =
|
|
6856
|
-
const float =
|
|
6857
|
-
const parties =
|
|
6858
|
-
const managers =
|
|
6859
|
-
const closeout =
|
|
6853
|
+
const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
|
|
6854
|
+
const today = chunkUSKVWPJD_cjs.useManagerToday(tripRef);
|
|
6855
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
6856
|
+
const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
|
|
6857
|
+
const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
|
|
6858
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
6859
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
6860
|
+
const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
|
|
6860
6861
|
if (today.status === "loading" || managerMe.status === "loading") {
|
|
6861
6862
|
return /* @__PURE__ */ jsxRuntime.jsx(ManagerNowSkeleton, { style });
|
|
6862
6863
|
}
|
|
@@ -6876,7 +6877,7 @@ function ReadyManagerNowSection({
|
|
|
6876
6877
|
if (idleView !== void 0) {
|
|
6877
6878
|
return typeof idleView === "function" ? idleView(idleReading) : idleView;
|
|
6878
6879
|
}
|
|
6879
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style:
|
|
6880
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6880
6881
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6881
6882
|
NowHero,
|
|
6882
6883
|
{
|
|
@@ -6934,7 +6935,7 @@ function ReadyManagerNowSection({
|
|
|
6934
6935
|
const canLogExpense = expensesReady !== void 0;
|
|
6935
6936
|
const canCollectPayment = collectionsReady !== void 0 && rosterRows.length > 0;
|
|
6936
6937
|
const canManageFloat = floatReady !== void 0 && floatRow !== void 0;
|
|
6937
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style:
|
|
6938
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6938
6939
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6939
6940
|
NowHero,
|
|
6940
6941
|
{
|
|
@@ -7040,14 +7041,14 @@ function ReadyManagerNowSection({
|
|
|
7040
7041
|
function ManagerNowSkeleton({
|
|
7041
7042
|
style
|
|
7042
7043
|
}) {
|
|
7043
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__skeleton", style:
|
|
7044
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-now__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7044
7045
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-block" }),
|
|
7045
7046
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-line" }),
|
|
7046
7047
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-now__skeleton-line kf-manager-now__skeleton-line--short" })
|
|
7047
7048
|
] });
|
|
7048
7049
|
}
|
|
7049
7050
|
function ChecklistPreview({ checklist }) {
|
|
7050
|
-
const { t } =
|
|
7051
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7051
7052
|
if (checklist === null) {
|
|
7052
7053
|
return null;
|
|
7053
7054
|
}
|
|
@@ -7113,7 +7114,7 @@ function initials5(fullName) {
|
|
|
7113
7114
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
7114
7115
|
}
|
|
7115
7116
|
function CoManagerCard({ managers }) {
|
|
7116
|
-
const { t } =
|
|
7117
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7117
7118
|
const coManager = managers.length > 1 ? managers.find((row) => !row.isLead) ?? managers[1] : void 0;
|
|
7118
7119
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTrip.overview.coManager.eyebrow"), children: [
|
|
7119
7120
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-overview__eyebrow", children: t("chrome.managerTrip.overview.coManager.eyebrow") }),
|
|
@@ -7142,10 +7143,11 @@ function formatOverviewTime(iso) {
|
|
|
7142
7143
|
return TIME_FORMATTER2.format(new Date(iso));
|
|
7143
7144
|
}
|
|
7144
7145
|
function ItineraryPreview({ itinerary }) {
|
|
7145
|
-
const { t } =
|
|
7146
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7146
7147
|
if (itinerary === null) {
|
|
7147
7148
|
return null;
|
|
7148
7149
|
}
|
|
7150
|
+
const showTime = itinerary.some((item) => item.startTime !== null || item.timeState === "now");
|
|
7149
7151
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7150
7152
|
"section",
|
|
7151
7153
|
{
|
|
@@ -7159,10 +7161,10 @@ function ItineraryPreview({ itinerary }) {
|
|
|
7159
7161
|
className: "kf-manager-overview__timeline-row",
|
|
7160
7162
|
"data-time-state": item.timeState,
|
|
7161
7163
|
children: [
|
|
7162
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__timeline-time-col", children: [
|
|
7164
|
+
showTime ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__timeline-time-col", children: [
|
|
7163
7165
|
item.timeState === "now" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-overview__timeline-now-label", children: t("chrome.managerTrip.overview.itinerary.now") }) : null,
|
|
7164
7166
|
item.startTime !== null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-overview__timeline-time", children: formatOverviewTime(item.startTime) }) : null
|
|
7165
|
-
] }),
|
|
7167
|
+
] }) : null,
|
|
7166
7168
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-overview__timeline-title", children: item.title }),
|
|
7167
7169
|
item.timeState === "done" ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon4, { className: "kf-manager-overview__timeline-check" }) : null
|
|
7168
7170
|
]
|
|
@@ -7174,7 +7176,7 @@ function ItineraryPreview({ itinerary }) {
|
|
|
7174
7176
|
);
|
|
7175
7177
|
}
|
|
7176
7178
|
function PickupsSummary({ pickups }) {
|
|
7177
|
-
const { t } =
|
|
7179
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7178
7180
|
if (pickups === null) {
|
|
7179
7181
|
return null;
|
|
7180
7182
|
}
|
|
@@ -7202,7 +7204,7 @@ function PickupsSummary({ pickups }) {
|
|
|
7202
7204
|
);
|
|
7203
7205
|
}
|
|
7204
7206
|
function RoomingSummary({ rooming }) {
|
|
7205
|
-
const { t } =
|
|
7207
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7206
7208
|
if (rooming === null) {
|
|
7207
7209
|
return null;
|
|
7208
7210
|
}
|
|
@@ -7254,7 +7256,7 @@ function occupancyTone2(fillCount, capacity) {
|
|
|
7254
7256
|
return "neutral";
|
|
7255
7257
|
}
|
|
7256
7258
|
function TransportSummary({ transport }) {
|
|
7257
|
-
const { t } =
|
|
7259
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7258
7260
|
if (transport === null) {
|
|
7259
7261
|
return null;
|
|
7260
7262
|
}
|
|
@@ -7304,27 +7306,27 @@ var TREK_PHASE_LABEL_KEY = {
|
|
|
7304
7306
|
closing: "chrome.managerTrip.overview.trekPhase.closing"
|
|
7305
7307
|
};
|
|
7306
7308
|
function ManagerOverviewSection(props) {
|
|
7307
|
-
const session =
|
|
7309
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
7308
7310
|
if (session.status !== "authenticated") {
|
|
7309
7311
|
return null;
|
|
7310
7312
|
}
|
|
7311
7313
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyManagerOverviewSection, { ...props });
|
|
7312
7314
|
}
|
|
7313
7315
|
function ReadyManagerOverviewSection({ tripRef, style }) {
|
|
7314
|
-
const { t } =
|
|
7315
|
-
const today =
|
|
7316
|
-
const managers =
|
|
7316
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7317
|
+
const today = chunkUSKVWPJD_cjs.useManagerToday(tripRef);
|
|
7318
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
7317
7319
|
if (today.status === "loading") {
|
|
7318
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__skeleton", style:
|
|
7320
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7319
7321
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line" }),
|
|
7320
7322
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line" }),
|
|
7321
7323
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line kf-manager-overview__skeleton-line--short" })
|
|
7322
7324
|
] });
|
|
7323
7325
|
}
|
|
7324
7326
|
if (today.status === "error" || today.kind === "idle") {
|
|
7325
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview", style:
|
|
7327
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-overview__idle", children: t("chrome.managerTrip.overview.title") }) });
|
|
7326
7328
|
}
|
|
7327
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview", style:
|
|
7329
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7328
7330
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__header", children: [
|
|
7329
7331
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-overview__phase-badge", children: t(PHASE_LABEL_KEY4[today.phase] ?? "chrome.managerTrip.overview.phase.preDeparture") }),
|
|
7330
7332
|
today.kind === "trek" && today.trekPhase !== null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-overview__phase-badge", "data-tone": "accent", children: t(
|
|
@@ -7458,7 +7460,7 @@ function CloseStopSheet({
|
|
|
7458
7460
|
onClose,
|
|
7459
7461
|
onCancel
|
|
7460
7462
|
}) {
|
|
7461
|
-
const { t } =
|
|
7463
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7462
7464
|
const { stop, travellers } = stopRow;
|
|
7463
7465
|
const pendingTravellers = travellers.filter((row) => row.status === "PENDING");
|
|
7464
7466
|
const isShort = stop.boardedCount < stop.expectedCount;
|
|
@@ -7638,7 +7640,7 @@ function StopSegmentedSwitcher({
|
|
|
7638
7640
|
activeStopId,
|
|
7639
7641
|
onSelect
|
|
7640
7642
|
}) {
|
|
7641
|
-
const { t } =
|
|
7643
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7642
7644
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__segmented", role: "tablist", children: stops.map(({ stop }) => {
|
|
7643
7645
|
const done = stop.rollup === "closed";
|
|
7644
7646
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7669,7 +7671,7 @@ function CorrectBoardStatusControl({
|
|
|
7669
7671
|
disabled,
|
|
7670
7672
|
onCorrect
|
|
7671
7673
|
}) {
|
|
7672
|
-
const { t } =
|
|
7674
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7673
7675
|
const [open, setOpen] = react.useState(false);
|
|
7674
7676
|
if (currentStatus === "PENDING") {
|
|
7675
7677
|
return null;
|
|
@@ -7744,7 +7746,7 @@ function TravellerBoardRow({
|
|
|
7744
7746
|
onBoard,
|
|
7745
7747
|
onCorrect
|
|
7746
7748
|
}) {
|
|
7747
|
-
const { t } =
|
|
7749
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7748
7750
|
const isPending = traveller.status === "PENDING";
|
|
7749
7751
|
function onKeyDown(event) {
|
|
7750
7752
|
if ((event.key === "Enter" || event.key === " ") && isPending && !stopClosed) {
|
|
@@ -7826,7 +7828,7 @@ function BoardingView({
|
|
|
7826
7828
|
onCloseStop,
|
|
7827
7829
|
onBack
|
|
7828
7830
|
}) {
|
|
7829
|
-
const { t } =
|
|
7831
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7830
7832
|
const [closeSheetOpen, setCloseSheetOpen] = react.useState(false);
|
|
7831
7833
|
const activeStopRow = manifest.stops.find((row) => row.stop.id === activeStopId) ?? manifest.stops[0];
|
|
7832
7834
|
if (activeStopRow === void 0) {
|
|
@@ -7927,7 +7929,7 @@ function patchManifestTraveller(manifest, stopId, travellerId, status, boardedAt
|
|
|
7927
7929
|
};
|
|
7928
7930
|
}
|
|
7929
7931
|
function StopRow({ stop, onSelect }) {
|
|
7930
|
-
const { t } =
|
|
7932
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7931
7933
|
const percent = boardedPercent(stop);
|
|
7932
7934
|
return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "kf-manager-pickups__row kf-press", onClick: onSelect, children: [
|
|
7933
7935
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-manager-pickups__row-copy", children: [
|
|
@@ -7957,7 +7959,7 @@ function StopList({
|
|
|
7957
7959
|
onKindChange,
|
|
7958
7960
|
onSelectStop
|
|
7959
7961
|
}) {
|
|
7960
|
-
const { t } =
|
|
7962
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7961
7963
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups", children: [
|
|
7962
7964
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-pickups__title", children: t("chrome.managerTrip.tab.pickups") }),
|
|
7963
7965
|
hasDropStops ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__chips", children: [
|
|
@@ -7989,7 +7991,7 @@ function StopList({
|
|
|
7989
7991
|
] });
|
|
7990
7992
|
}
|
|
7991
7993
|
function ManagerPickupsSection(props) {
|
|
7992
|
-
const session =
|
|
7994
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
7993
7995
|
if (session.status !== "authenticated") {
|
|
7994
7996
|
return null;
|
|
7995
7997
|
}
|
|
@@ -8001,7 +8003,7 @@ function ReadyManagerPickupsSection({
|
|
|
8001
8003
|
components,
|
|
8002
8004
|
style
|
|
8003
8005
|
}) {
|
|
8004
|
-
const pickups =
|
|
8006
|
+
const pickups = chunkUSKVWPJD_cjs.usePickups(tripRef);
|
|
8005
8007
|
const StopListUI = components?.StopList ?? StopList;
|
|
8006
8008
|
const BoardingViewUI = components?.BoardingView ?? BoardingView;
|
|
8007
8009
|
const [kind, setKind] = react.useState("PICKUP");
|
|
@@ -8026,7 +8028,7 @@ function ReadyManagerPickupsSection({
|
|
|
8026
8028
|
};
|
|
8027
8029
|
}, [ready, selectedStopId, kind]);
|
|
8028
8030
|
if (pickups.status === "loading") {
|
|
8029
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style:
|
|
8031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
8030
8032
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
8031
8033
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
8032
8034
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line kf-manager-pickups__skeleton-line--short" })
|
|
@@ -8105,12 +8107,12 @@ function ReadyManagerPickupsSection({
|
|
|
8105
8107
|
}
|
|
8106
8108
|
if (selectedStopId !== void 0) {
|
|
8107
8109
|
if (manifest === void 0) {
|
|
8108
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style:
|
|
8110
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
8109
8111
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
|
|
8110
8112
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" })
|
|
8111
8113
|
] });
|
|
8112
8114
|
}
|
|
8113
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { style:
|
|
8115
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8114
8116
|
BoardingViewUI,
|
|
8115
8117
|
{
|
|
8116
8118
|
manifest,
|
|
@@ -8126,7 +8128,7 @@ function ReadyManagerPickupsSection({
|
|
|
8126
8128
|
}
|
|
8127
8129
|
) });
|
|
8128
8130
|
}
|
|
8129
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { style:
|
|
8131
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8130
8132
|
StopListUI,
|
|
8131
8133
|
{
|
|
8132
8134
|
stops: rankedStops,
|
|
@@ -8263,7 +8265,7 @@ function AddRoomSheet({
|
|
|
8263
8265
|
onPatch,
|
|
8264
8266
|
onDelete
|
|
8265
8267
|
}) {
|
|
8266
|
-
const { t } =
|
|
8268
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8267
8269
|
const [code, setCode] = react.useState("");
|
|
8268
8270
|
const [capacity, setCapacity] = react.useState("2");
|
|
8269
8271
|
const [roomType, setRoomType] = react.useState(void 0);
|
|
@@ -8470,7 +8472,7 @@ function AssignBedSheet({
|
|
|
8470
8472
|
onOpenTraveller,
|
|
8471
8473
|
onClose
|
|
8472
8474
|
}) {
|
|
8473
|
-
const { t } =
|
|
8475
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8474
8476
|
const [pending, setPending] = react.useState(false);
|
|
8475
8477
|
react.useEffect(() => {
|
|
8476
8478
|
if (!open) {
|
|
@@ -8680,7 +8682,7 @@ function AutoAssignSheet({
|
|
|
8680
8682
|
onApplied,
|
|
8681
8683
|
onClose
|
|
8682
8684
|
}) {
|
|
8683
|
-
const { t } =
|
|
8685
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8684
8686
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
8685
8687
|
const [preview, setPreview] = react.useState(void 0);
|
|
8686
8688
|
const [loading, setLoading] = react.useState(false);
|
|
@@ -8837,7 +8839,7 @@ var STATUS_LABEL_KEY5 = {
|
|
|
8837
8839
|
FULL: "chrome.managerTrip.rooming.room.status.full"
|
|
8838
8840
|
};
|
|
8839
8841
|
function RoomCard({ room, onSelectBed, onEditRoom }) {
|
|
8840
|
-
const { t } =
|
|
8842
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8841
8843
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__room-card", children: [
|
|
8842
8844
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8843
8845
|
"button",
|
|
@@ -8876,7 +8878,7 @@ function RoomCard({ room, onSelectBed, onEditRoom }) {
|
|
|
8876
8878
|
] });
|
|
8877
8879
|
}
|
|
8878
8880
|
function RoomingStats({ roomCount, beds, unassignedCount }) {
|
|
8879
|
-
const { t } =
|
|
8881
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8880
8882
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__stats", children: [
|
|
8881
8883
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__stat-cell", children: [
|
|
8882
8884
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-rooming__stat-label", children: t("chrome.managerTrip.rooming.stats.rooms") }),
|
|
@@ -8914,7 +8916,7 @@ function StayWindowChips({
|
|
|
8914
8916
|
onAddWindow,
|
|
8915
8917
|
onEditWindow
|
|
8916
8918
|
}) {
|
|
8917
|
-
const { t } =
|
|
8919
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8918
8920
|
const activeWindow = stayWindows.find((window) => window.id === activeStayWindowId);
|
|
8919
8921
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__window-block", children: [
|
|
8920
8922
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8982,7 +8984,7 @@ function StayWindowSheet({
|
|
|
8982
8984
|
onPatch,
|
|
8983
8985
|
onDelete
|
|
8984
8986
|
}) {
|
|
8985
|
-
const { t } =
|
|
8987
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8986
8988
|
const [label, setLabel] = react.useState("");
|
|
8987
8989
|
const [startDate, setStartDate] = react.useState("");
|
|
8988
8990
|
const [endDate, setEndDate] = react.useState("");
|
|
@@ -9166,7 +9168,7 @@ function UnassignedPoolSection({
|
|
|
9166
9168
|
loaded,
|
|
9167
9169
|
onSelectTraveller
|
|
9168
9170
|
}) {
|
|
9169
|
-
const { t } =
|
|
9171
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9170
9172
|
if (loaded && travellers.length === 0) {
|
|
9171
9173
|
return null;
|
|
9172
9174
|
}
|
|
@@ -9193,7 +9195,7 @@ function UnassignedPoolSection({
|
|
|
9193
9195
|
] });
|
|
9194
9196
|
}
|
|
9195
9197
|
function ManagerRoomingSection(props) {
|
|
9196
|
-
const session =
|
|
9198
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
9197
9199
|
if (session.status !== "authenticated") {
|
|
9198
9200
|
return null;
|
|
9199
9201
|
}
|
|
@@ -9206,8 +9208,8 @@ function ReadyManagerRoomingSection({
|
|
|
9206
9208
|
components,
|
|
9207
9209
|
style
|
|
9208
9210
|
}) {
|
|
9209
|
-
const { t } =
|
|
9210
|
-
const rooming =
|
|
9211
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9212
|
+
const rooming = chunkUSKVWPJD_cjs.useRooming(tripRef);
|
|
9211
9213
|
const Stats = components?.Stats ?? RoomingStats;
|
|
9212
9214
|
const RoomCardComponent = components?.RoomCard ?? RoomCard;
|
|
9213
9215
|
const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection;
|
|
@@ -9243,7 +9245,7 @@ function ReadyManagerRoomingSection({
|
|
|
9243
9245
|
void refreshPool(activeStayWindowId);
|
|
9244
9246
|
}, [refreshPool, activeStayWindowId]);
|
|
9245
9247
|
if (rooming.status === "loading") {
|
|
9246
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__skeleton", style:
|
|
9248
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9247
9249
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-block" }),
|
|
9248
9250
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-line" }),
|
|
9249
9251
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-rooming__skeleton-line kf-manager-rooming__skeleton-line--short" })
|
|
@@ -9267,7 +9269,7 @@ function ReadyManagerRoomingSection({
|
|
|
9267
9269
|
}
|
|
9268
9270
|
}
|
|
9269
9271
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
9270
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming", style:
|
|
9272
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9271
9273
|
sortedWindows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-rooming__card kf-manager-rooming__empty", children: [
|
|
9272
9274
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.managerTrip.rooming.noWindows") }),
|
|
9273
9275
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9503,7 +9505,7 @@ function initials7(fullName) {
|
|
|
9503
9505
|
return `${parts[0]?.[0] ?? ""}${parts[parts.length - 1]?.[0] ?? ""}`.toUpperCase();
|
|
9504
9506
|
}
|
|
9505
9507
|
function RosterRow({ row, onOpen }) {
|
|
9506
|
-
const { t } =
|
|
9508
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9507
9509
|
const { traveller } = row;
|
|
9508
9510
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__row", children: [
|
|
9509
9511
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9534,7 +9536,7 @@ function RosterRow({ row, onOpen }) {
|
|
|
9534
9536
|
] });
|
|
9535
9537
|
}
|
|
9536
9538
|
function RosterSearch({ query, onQueryChange }) {
|
|
9537
|
-
const { t } =
|
|
9539
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9538
9540
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-roster__search", children: [
|
|
9539
9541
|
/* @__PURE__ */ jsxRuntime.jsx(SearchIcon2, { "aria-hidden": "true" }),
|
|
9540
9542
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9550,7 +9552,7 @@ function RosterSearch({ query, onQueryChange }) {
|
|
|
9550
9552
|
] });
|
|
9551
9553
|
}
|
|
9552
9554
|
function ManagerRosterSection(props) {
|
|
9553
|
-
const session =
|
|
9555
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
9554
9556
|
if (session.status !== "authenticated") {
|
|
9555
9557
|
return null;
|
|
9556
9558
|
}
|
|
@@ -9561,8 +9563,8 @@ function ReadyManagerRosterSection({
|
|
|
9561
9563
|
onOpenTraveller,
|
|
9562
9564
|
style
|
|
9563
9565
|
}) {
|
|
9564
|
-
const { t } =
|
|
9565
|
-
const parties =
|
|
9566
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9567
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
9566
9568
|
const [query, setQuery] = react.useState("");
|
|
9567
9569
|
const rows = react.useMemo(
|
|
9568
9570
|
() => parties.status === "ready" ? parties.tripRoster.rows : [],
|
|
@@ -9578,7 +9580,7 @@ function ReadyManagerRosterSection({
|
|
|
9578
9580
|
);
|
|
9579
9581
|
}, [rows, query]);
|
|
9580
9582
|
if (parties.status === "loading") {
|
|
9581
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__skeleton", style:
|
|
9583
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9582
9584
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line" }),
|
|
9583
9585
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line" }),
|
|
9584
9586
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-roster__skeleton-line kf-manager-roster__skeleton-line--short" })
|
|
@@ -9587,7 +9589,7 @@ function ReadyManagerRosterSection({
|
|
|
9587
9589
|
if (parties.status === "error") {
|
|
9588
9590
|
return null;
|
|
9589
9591
|
}
|
|
9590
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster", style:
|
|
9592
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-roster", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9591
9593
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-roster__count", children: t("chrome.managerTrip.roster.count").replace("{count}", String(rows.length)) }),
|
|
9592
9594
|
/* @__PURE__ */ jsxRuntime.jsx(RosterSearch, { query, onQueryChange: setQuery }),
|
|
9593
9595
|
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)) })
|
|
@@ -9722,7 +9724,7 @@ function ConflictResolverSheet({
|
|
|
9722
9724
|
onResolve,
|
|
9723
9725
|
onClose
|
|
9724
9726
|
}) {
|
|
9725
|
-
const { t } =
|
|
9727
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9726
9728
|
const [fieldIndex, setFieldIndex] = react.useState(0);
|
|
9727
9729
|
const [pending, setPending] = react.useState(false);
|
|
9728
9730
|
react.useEffect(() => {
|
|
@@ -9857,7 +9859,7 @@ function formatSyncCenterDate(iso) {
|
|
|
9857
9859
|
return iso === void 0 ? void 0 : SYNC_CENTER_DATE_FORMATTER.format(new Date(iso));
|
|
9858
9860
|
}
|
|
9859
9861
|
function OutboxRow({ op, isConflict, label, onSelect }) {
|
|
9860
|
-
const { t } =
|
|
9862
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9861
9863
|
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");
|
|
9862
9864
|
const interactive = isConflict;
|
|
9863
9865
|
const Row = interactive ? "button" : "div";
|
|
@@ -9908,9 +9910,9 @@ function ManagerSyncCenterSection({
|
|
|
9908
9910
|
onResolved,
|
|
9909
9911
|
style
|
|
9910
9912
|
}) {
|
|
9911
|
-
const { t } =
|
|
9912
|
-
const engine =
|
|
9913
|
-
const { conflicts, resolve } =
|
|
9913
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9914
|
+
const engine = chunkYKBA4WQJ_cjs.useOfflineEngine();
|
|
9915
|
+
const { conflicts, resolve } = chunkXWU5MCY3_cjs.useConflicts(tripRef);
|
|
9914
9916
|
const [openConflict, setOpenConflict] = react.useState(void 0);
|
|
9915
9917
|
const ops = engine.outbox.all().filter((op) => op.tripRef === tripRef);
|
|
9916
9918
|
const conflictOpIds = new Set(conflicts.map((conflict) => conflict.opId));
|
|
@@ -9924,7 +9926,7 @@ function ManagerSyncCenterSection({
|
|
|
9924
9926
|
await resolve(opId, choice);
|
|
9925
9927
|
onResolved?.(opId, choice);
|
|
9926
9928
|
}
|
|
9927
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center", style:
|
|
9929
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9928
9930
|
ops.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-sync-center__empty", children: [
|
|
9929
9931
|
/* @__PURE__ */ jsxRuntime.jsx(InboxIcon2, { className: "kf-manager-sync-center__empty-icon", "aria-hidden": "true" }),
|
|
9930
9932
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-sync-center__empty-title", children: t("chrome.managerSyncCenter.emptyTitle") })
|
|
@@ -10145,7 +10147,7 @@ function LogPaymentSheet({
|
|
|
10145
10147
|
onClose,
|
|
10146
10148
|
onSubmit
|
|
10147
10149
|
}) {
|
|
10148
|
-
const { t } =
|
|
10150
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10149
10151
|
const [amount, setAmount] = react.useState("");
|
|
10150
10152
|
const [mode, setMode] = react.useState("CASH");
|
|
10151
10153
|
const [reference, setReference] = react.useState("");
|
|
@@ -10283,7 +10285,7 @@ function LogPaymentSheet({
|
|
|
10283
10285
|
) });
|
|
10284
10286
|
}
|
|
10285
10287
|
function TravellerContactRow({ fullName, phone }) {
|
|
10286
|
-
const { t } =
|
|
10288
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10287
10289
|
if (phone === null) {
|
|
10288
10290
|
return null;
|
|
10289
10291
|
}
|
|
@@ -10322,7 +10324,7 @@ var DIET_LABEL_KEY3 = {
|
|
|
10322
10324
|
J: "chrome.managerTraveller.dietary.diet.j"
|
|
10323
10325
|
};
|
|
10324
10326
|
function TravellerDietaryCard({ rows }) {
|
|
10325
|
-
const { t } =
|
|
10327
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10326
10328
|
if (rows.length === 0) {
|
|
10327
10329
|
return null;
|
|
10328
10330
|
}
|
|
@@ -10352,7 +10354,7 @@ function TravellerEmergencyCard({
|
|
|
10352
10354
|
relation,
|
|
10353
10355
|
phone
|
|
10354
10356
|
}) {
|
|
10355
|
-
const { t } =
|
|
10357
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10356
10358
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTraveller.emergency.ariaLabel"), children: [
|
|
10357
10359
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-traveller__eyebrow-row", children: t("chrome.managerTraveller.emergency.eyebrow") }),
|
|
10358
10360
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__card kf-manager-traveller__emergency-row", children: [
|
|
@@ -10397,7 +10399,7 @@ var DATE_FORMATTER5 = new Intl.DateTimeFormat("en-GB", {
|
|
|
10397
10399
|
minute: "2-digit"
|
|
10398
10400
|
});
|
|
10399
10401
|
function TravellerNotesSection({ notes, onAddNote }) {
|
|
10400
|
-
const { t } =
|
|
10402
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10401
10403
|
const [composing, setComposing] = react.useState(false);
|
|
10402
10404
|
const [draft, setDraft] = react.useState("");
|
|
10403
10405
|
const [submitting, setSubmitting] = react.useState(false);
|
|
@@ -10484,7 +10486,7 @@ function TravellerPaymentCard({
|
|
|
10484
10486
|
canLogPayment,
|
|
10485
10487
|
onLogPayment
|
|
10486
10488
|
}) {
|
|
10487
|
-
const { t } =
|
|
10489
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10488
10490
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": t("chrome.managerTraveller.payment.ariaLabel"), children: [
|
|
10489
10491
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-traveller__eyebrow-row", children: t("chrome.managerTraveller.payment.eyebrow") }),
|
|
10490
10492
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__card", children: [
|
|
@@ -10513,7 +10515,7 @@ function TravellerPaymentCard({
|
|
|
10513
10515
|
] });
|
|
10514
10516
|
}
|
|
10515
10517
|
function TravellerRoomSeatCard({ room, seat }) {
|
|
10516
|
-
const { t } =
|
|
10518
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10517
10519
|
if (room === null && seat === null) {
|
|
10518
10520
|
return null;
|
|
10519
10521
|
}
|
|
@@ -10535,7 +10537,7 @@ function TravellerRoomSeatCard({ room, seat }) {
|
|
|
10535
10537
|
] });
|
|
10536
10538
|
}
|
|
10537
10539
|
function ManagerTravellerProfileSection(props) {
|
|
10538
|
-
const session =
|
|
10540
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
10539
10541
|
if (session.status !== "authenticated") {
|
|
10540
10542
|
return null;
|
|
10541
10543
|
}
|
|
@@ -10547,10 +10549,10 @@ function ReadyManagerTravellerProfileSection({
|
|
|
10547
10549
|
components,
|
|
10548
10550
|
style
|
|
10549
10551
|
}) {
|
|
10550
|
-
const { t } =
|
|
10551
|
-
const profile =
|
|
10552
|
-
const parties =
|
|
10553
|
-
const collections =
|
|
10552
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10553
|
+
const profile = chunkUSKVWPJD_cjs.useTravellerProfile(tripRef, travellerRef);
|
|
10554
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
10555
|
+
const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
|
|
10554
10556
|
const [sheetOpen, setSheetOpen] = react.useState(false);
|
|
10555
10557
|
const partyLabel = react.useMemo(() => {
|
|
10556
10558
|
if (profile.read === void 0 || profile.read.partyId === null) {
|
|
@@ -10562,7 +10564,7 @@ function ReadyManagerTravellerProfileSection({
|
|
|
10562
10564
|
return parties.list.rows.find((row) => row.id === profile.read?.partyId)?.label ?? null;
|
|
10563
10565
|
}, [profile.read, parties]);
|
|
10564
10566
|
if (profile.read === void 0) {
|
|
10565
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__skeleton", style:
|
|
10567
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
10566
10568
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-avatar" }),
|
|
10567
10569
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-line" }),
|
|
10568
10570
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-traveller__skeleton-line kf-manager-traveller__skeleton-line--short" })
|
|
@@ -10585,7 +10587,7 @@ function ReadyManagerTravellerProfileSection({
|
|
|
10585
10587
|
read.profile.medicalNotes
|
|
10586
10588
|
);
|
|
10587
10589
|
const canLogPayment = collections.status === "ready";
|
|
10588
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller", style:
|
|
10590
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-traveller", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
10589
10591
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerHero, { fullName: read.fullName, partyLabel }),
|
|
10590
10592
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerContactRow, { fullName: read.fullName, phone: read.phone }),
|
|
10591
10593
|
/* @__PURE__ */ jsxRuntime.jsx(DietaryCard, { rows: dietaryRows }),
|
|
@@ -10924,7 +10926,7 @@ function AddVehicleSheet({
|
|
|
10924
10926
|
onPatch,
|
|
10925
10927
|
onDelete
|
|
10926
10928
|
}) {
|
|
10927
|
-
const { t } =
|
|
10929
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10928
10930
|
const [regNo, setRegNo] = react.useState("");
|
|
10929
10931
|
const [label, setLabel] = react.useState("");
|
|
10930
10932
|
const [type, setType] = react.useState("BUS");
|
|
@@ -11276,7 +11278,7 @@ function AssignSeatSheet({
|
|
|
11276
11278
|
onOpenTraveller,
|
|
11277
11279
|
onClose
|
|
11278
11280
|
}) {
|
|
11279
|
-
const { t } =
|
|
11281
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11280
11282
|
const [pending, setPending] = react.useState(false);
|
|
11281
11283
|
const [customLabel, setCustomLabel] = react.useState("");
|
|
11282
11284
|
const [editingSeatLabel, setEditingSeatLabel] = react.useState(false);
|
|
@@ -11518,7 +11520,7 @@ function AutoAssignSheet2({
|
|
|
11518
11520
|
onApplied,
|
|
11519
11521
|
onClose
|
|
11520
11522
|
}) {
|
|
11521
|
-
const { t } =
|
|
11523
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11522
11524
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
11523
11525
|
const [preview, setPreview] = react.useState(void 0);
|
|
11524
11526
|
const [loading, setLoading] = react.useState(false);
|
|
@@ -11675,7 +11677,7 @@ function SetOwnerSheet({
|
|
|
11675
11677
|
onSetOwner,
|
|
11676
11678
|
onRemoveOwner
|
|
11677
11679
|
}) {
|
|
11678
|
-
const { t } =
|
|
11680
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11679
11681
|
react.useEffect(() => {
|
|
11680
11682
|
if (!open) {
|
|
11681
11683
|
return;
|
|
@@ -11743,7 +11745,7 @@ function UnassignedPoolSection2({
|
|
|
11743
11745
|
loaded,
|
|
11744
11746
|
onSelectTraveller
|
|
11745
11747
|
}) {
|
|
11746
|
-
const { t } =
|
|
11748
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11747
11749
|
if (loaded && travellers.length === 0) {
|
|
11748
11750
|
return null;
|
|
11749
11751
|
}
|
|
@@ -11779,7 +11781,7 @@ function VehicleCard({
|
|
|
11779
11781
|
onEditOwner,
|
|
11780
11782
|
onViewRoster
|
|
11781
11783
|
}) {
|
|
11782
|
-
const { t } =
|
|
11784
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11783
11785
|
const totalOccupantCount = allOccupantsOfVehicle(vehicle).length;
|
|
11784
11786
|
const dayCoverage = dayCoverageLabel(vehicle.days);
|
|
11785
11787
|
const dayLabel = dayCoverage === "ALL_DAYS" ? t("chrome.managerTrip.vehicles.card.allDays") : t("chrome.managerTrip.vehicles.card.dayCoverage").replace("{days}", dayCoverage);
|
|
@@ -11929,7 +11931,7 @@ function VehicleRosterSheet({
|
|
|
11929
11931
|
onSelectOccupant,
|
|
11930
11932
|
onClose
|
|
11931
11933
|
}) {
|
|
11932
|
-
const { t } =
|
|
11934
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11933
11935
|
react.useEffect(() => {
|
|
11934
11936
|
if (!open) {
|
|
11935
11937
|
return;
|
|
@@ -12008,7 +12010,7 @@ function VehicleStats({
|
|
|
12008
12010
|
capacity,
|
|
12009
12011
|
unassignedCount
|
|
12010
12012
|
}) {
|
|
12011
|
-
const { t } =
|
|
12013
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12012
12014
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__stats", children: [
|
|
12013
12015
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__stat-cell", children: [
|
|
12014
12016
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-vehicles__stat-label", children: t("chrome.managerTrip.vehicles.stats.vehicles") }),
|
|
@@ -12036,7 +12038,7 @@ function VehicleStats({
|
|
|
12036
12038
|
] });
|
|
12037
12039
|
}
|
|
12038
12040
|
function ManagerVehiclesSection(props) {
|
|
12039
|
-
const session =
|
|
12041
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
12040
12042
|
if (session.status !== "authenticated") {
|
|
12041
12043
|
return null;
|
|
12042
12044
|
}
|
|
@@ -12049,9 +12051,9 @@ function ReadyManagerVehiclesSection({
|
|
|
12049
12051
|
components,
|
|
12050
12052
|
style
|
|
12051
12053
|
}) {
|
|
12052
|
-
const { t } =
|
|
12053
|
-
const seating =
|
|
12054
|
-
const managers =
|
|
12054
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12055
|
+
const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
|
|
12056
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
12055
12057
|
const Stats = components?.Stats ?? VehicleStats;
|
|
12056
12058
|
const VehicleCardComponent = components?.VehicleCard ?? VehicleCard;
|
|
12057
12059
|
const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection2;
|
|
@@ -12099,7 +12101,7 @@ function ReadyManagerVehiclesSection({
|
|
|
12099
12101
|
return map;
|
|
12100
12102
|
}, [managerRoster]);
|
|
12101
12103
|
if (seating.status === "loading") {
|
|
12102
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__skeleton", style:
|
|
12104
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12103
12105
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-block" }),
|
|
12104
12106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-line" }),
|
|
12105
12107
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vehicles__skeleton-line kf-manager-vehicles__skeleton-line--short" })
|
|
@@ -12112,7 +12114,7 @@ function ReadyManagerVehiclesSection({
|
|
|
12112
12114
|
const unassignedCount = seating.unassignedPool.travellers.length;
|
|
12113
12115
|
const travellerNames = travellerNameMap(seating.unassignedPool.travellers, liveVehicles);
|
|
12114
12116
|
const resolvedEmptyView = emptyView !== void 0 ? typeof emptyView === "function" ? emptyView() : emptyView : null;
|
|
12115
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles", style:
|
|
12117
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vehicles", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12116
12118
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12117
12119
|
Stats,
|
|
12118
12120
|
{
|
|
@@ -12291,7 +12293,7 @@ function VendorDetailSheet({
|
|
|
12291
12293
|
vehicles,
|
|
12292
12294
|
onClose
|
|
12293
12295
|
}) {
|
|
12294
|
-
const { t } =
|
|
12296
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12295
12297
|
react.useEffect(() => {
|
|
12296
12298
|
if (vendor === void 0) {
|
|
12297
12299
|
return;
|
|
@@ -12496,7 +12498,7 @@ function VendorListSection({
|
|
|
12496
12498
|
onVendorSelect,
|
|
12497
12499
|
emptyView
|
|
12498
12500
|
}) {
|
|
12499
|
-
const { t } =
|
|
12501
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12500
12502
|
if (vendors.length === 0) {
|
|
12501
12503
|
if (emptyView !== void 0) {
|
|
12502
12504
|
return typeof emptyView === "function" ? emptyView() : emptyView;
|
|
@@ -12554,7 +12556,7 @@ function isLiveVehicle2(row) {
|
|
|
12554
12556
|
return !("_tombstone" in row);
|
|
12555
12557
|
}
|
|
12556
12558
|
function ManagerVendorsSection(props) {
|
|
12557
|
-
const session =
|
|
12559
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
12558
12560
|
if (session.status !== "authenticated") {
|
|
12559
12561
|
return null;
|
|
12560
12562
|
}
|
|
@@ -12568,13 +12570,13 @@ function ReadyManagerVendorsSection({
|
|
|
12568
12570
|
components,
|
|
12569
12571
|
style
|
|
12570
12572
|
}) {
|
|
12571
|
-
const vendors =
|
|
12572
|
-
const expenses =
|
|
12573
|
-
const seating =
|
|
12573
|
+
const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
|
|
12574
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
12575
|
+
const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
|
|
12574
12576
|
const [selectedVendorId, setSelectedVendorId] = react.useState(void 0);
|
|
12575
12577
|
const VendorListUI = components?.VendorListUI ?? VendorListSection;
|
|
12576
12578
|
if (vendors.status === "loading") {
|
|
12577
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors__skeleton", style:
|
|
12579
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12578
12580
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line" }),
|
|
12579
12581
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line" }),
|
|
12580
12582
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-vendors__skeleton-line kf-manager-vendors__skeleton-line--short" })
|
|
@@ -12593,7 +12595,7 @@ function ReadyManagerVendorsSection({
|
|
|
12593
12595
|
description: row.description
|
|
12594
12596
|
})) : void 0;
|
|
12595
12597
|
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;
|
|
12596
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors", style:
|
|
12598
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-vendors", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12597
12599
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12598
12600
|
VendorListUI,
|
|
12599
12601
|
{
|
|
@@ -12668,7 +12670,7 @@ function TripChipTabs({
|
|
|
12668
12670
|
onSelect,
|
|
12669
12671
|
counts
|
|
12670
12672
|
}) {
|
|
12671
|
-
const { t } =
|
|
12673
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12672
12674
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12673
12675
|
"div",
|
|
12674
12676
|
{
|
|
@@ -12724,7 +12726,7 @@ function TripHero({
|
|
|
12724
12726
|
endDate,
|
|
12725
12727
|
region
|
|
12726
12728
|
}) {
|
|
12727
|
-
const { t } =
|
|
12729
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12728
12730
|
const sub = [formatDateRange2(startDate, endDate), region].filter(Boolean).join(" \xB7 ");
|
|
12729
12731
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-trip__hero", "aria-label": t("chrome.managerTrip.hero.ariaLabel"), children: [
|
|
12730
12732
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__hero-body", children: [
|
|
@@ -12754,7 +12756,7 @@ var TAB_LABEL_KEY2 = {
|
|
|
12754
12756
|
documents: "chrome.managerTrip.tab.documents"
|
|
12755
12757
|
};
|
|
12756
12758
|
function TripTabPlaceholder({ tabKey }) {
|
|
12757
|
-
const { t } =
|
|
12759
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12758
12760
|
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])) });
|
|
12759
12761
|
}
|
|
12760
12762
|
var BLOCKER_ACTION_TAB = {
|
|
@@ -12770,7 +12772,7 @@ var BLOCKER_ACTION_TAB = {
|
|
|
12770
12772
|
open_past_itinerary: "itinerary"
|
|
12771
12773
|
};
|
|
12772
12774
|
function ManagerTripSection(props) {
|
|
12773
|
-
const session =
|
|
12775
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
12774
12776
|
if (session.status !== "authenticated") {
|
|
12775
12777
|
return null;
|
|
12776
12778
|
}
|
|
@@ -12788,7 +12790,7 @@ function ReadyManagerTripSection({
|
|
|
12788
12790
|
panels,
|
|
12789
12791
|
style
|
|
12790
12792
|
}) {
|
|
12791
|
-
const managerMe =
|
|
12793
|
+
const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
|
|
12792
12794
|
const [internalActiveTab, setInternalActiveTab] = react.useState("manifest");
|
|
12793
12795
|
if (managerMe.status === "loading") {
|
|
12794
12796
|
return /* @__PURE__ */ jsxRuntime.jsx(ManagerTripSkeleton, { style });
|
|
@@ -12852,7 +12854,7 @@ function ReadyManagerTripSection({
|
|
|
12852
12854
|
}
|
|
12853
12855
|
)
|
|
12854
12856
|
};
|
|
12855
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip", style:
|
|
12857
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12856
12858
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12857
12859
|
TripHero,
|
|
12858
12860
|
{
|
|
@@ -12871,7 +12873,7 @@ function ReadyManagerTripSection({
|
|
|
12871
12873
|
function ManagerTripSkeleton({
|
|
12872
12874
|
style
|
|
12873
12875
|
}) {
|
|
12874
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__skeleton", style:
|
|
12876
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-trip__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12875
12877
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-block" }),
|
|
12876
12878
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-line" }),
|
|
12877
12879
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-trip__skeleton-line kf-manager-trip__skeleton-line--short" })
|
|
@@ -13037,7 +13039,7 @@ function ManagerShellHeader(props) {
|
|
|
13037
13039
|
"header",
|
|
13038
13040
|
{
|
|
13039
13041
|
className: "kf-manager-shell__header kf-manager-shell__header--back",
|
|
13040
|
-
style:
|
|
13042
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(props.style),
|
|
13041
13043
|
children: [
|
|
13042
13044
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13043
13045
|
"button",
|
|
@@ -13063,7 +13065,7 @@ function ManagerShellHeader(props) {
|
|
|
13063
13065
|
"header",
|
|
13064
13066
|
{
|
|
13065
13067
|
className: "kf-manager-shell__header kf-manager-shell__header--page",
|
|
13066
|
-
style:
|
|
13068
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
13067
13069
|
children: [
|
|
13068
13070
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell__header-titles", children: [
|
|
13069
13071
|
eyebrow !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-shell__header-eyebrow kf-eyebrow", children: eyebrow }) : null,
|
|
@@ -13108,7 +13110,7 @@ function ManagerShellTabBar({
|
|
|
13108
13110
|
{
|
|
13109
13111
|
"aria-label": "Manager navigation",
|
|
13110
13112
|
className: "kf-manager-shell__tab-bar",
|
|
13111
|
-
style:
|
|
13113
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(void 0, { "--kf-manager-shell-tab-count": tabs.length }),
|
|
13112
13114
|
children: tabs.map((tab) => {
|
|
13113
13115
|
const active = tab.key === activeTabKey;
|
|
13114
13116
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13140,7 +13142,7 @@ function ManagerShell({
|
|
|
13140
13142
|
fab,
|
|
13141
13143
|
style
|
|
13142
13144
|
}) {
|
|
13143
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell", style:
|
|
13145
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-shell", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
13144
13146
|
header !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ManagerShellHeader, { ...header }) : null,
|
|
13145
13147
|
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "kf-manager-shell__main", children }),
|
|
13146
13148
|
fab,
|
|
@@ -13240,7 +13242,7 @@ function SyncStatusBadge({
|
|
|
13240
13242
|
parked,
|
|
13241
13243
|
onOpenSyncCenter
|
|
13242
13244
|
}) {
|
|
13243
|
-
const { t } =
|
|
13245
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13244
13246
|
const Icon = isOnline ? WifiOnIcon2 : WifiOffIcon2;
|
|
13245
13247
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__sync-badge", "data-online": isOnline, children: [
|
|
13246
13248
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true" }),
|
|
@@ -13273,14 +13275,14 @@ var STATUS_LABEL_KEY7 = {
|
|
|
13273
13275
|
CANCELLED: "chrome.managerApp.tripList.status.cancelled"
|
|
13274
13276
|
};
|
|
13275
13277
|
function TripListRow({ trip, onSelect, style }) {
|
|
13276
|
-
const { t } =
|
|
13278
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13277
13279
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13278
13280
|
"button",
|
|
13279
13281
|
{
|
|
13280
13282
|
type: "button",
|
|
13281
13283
|
className: "kf-manager-app__trip-row kf-press",
|
|
13282
13284
|
onClick: () => onSelect(trip.tripRef),
|
|
13283
|
-
style:
|
|
13285
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
13284
13286
|
children: [
|
|
13285
13287
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-manager-app__trip-tag", "data-event-type": trip.eventType }),
|
|
13286
13288
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-manager-app__trip-body", children: [
|
|
@@ -13302,14 +13304,14 @@ function TripListScreen({
|
|
|
13302
13304
|
onSelect,
|
|
13303
13305
|
TripListItemComponent
|
|
13304
13306
|
}) {
|
|
13305
|
-
const { t } =
|
|
13307
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13306
13308
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-app__trip-list", children: [
|
|
13307
13309
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-eyebrow kf-manager-app__trip-list-eyebrow", children: t("chrome.managerApp.tripList.eyebrow") }),
|
|
13308
13310
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-app__trip-list-rows", children: trips.map((trip) => /* @__PURE__ */ jsxRuntime.jsx(TripListItemComponent, { trip, onSelect }, trip.tripRef)) })
|
|
13309
13311
|
] });
|
|
13310
13312
|
}
|
|
13311
13313
|
function KaafilManagerApp(props) {
|
|
13312
|
-
const session =
|
|
13314
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
13313
13315
|
if (session.status !== "authenticated") {
|
|
13314
13316
|
return null;
|
|
13315
13317
|
}
|
|
@@ -13344,12 +13346,12 @@ function ReadyKaafilManagerApp(props) {
|
|
|
13344
13346
|
components,
|
|
13345
13347
|
style
|
|
13346
13348
|
} = props;
|
|
13347
|
-
const { t } =
|
|
13348
|
-
const { appName } =
|
|
13349
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13350
|
+
const { appName } = chunk5ORJRFXZ_cjs.useKaafilBrand();
|
|
13349
13351
|
const surfaceTitle = appName !== void 0 && appName.trim().length > 0 ? appName : t("chrome.managerApp.title");
|
|
13350
|
-
const managerMe =
|
|
13351
|
-
const notifications =
|
|
13352
|
-
const outboxStatus =
|
|
13352
|
+
const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
|
|
13353
|
+
const notifications = chunkXWU5MCY3_cjs.useNotifications();
|
|
13354
|
+
const outboxStatus = chunk5ORJRFXZ_cjs.useOutboxStatus();
|
|
13353
13355
|
const [internalTripRef, setInternalTripRef] = react.useState(initialTripRef);
|
|
13354
13356
|
const [internalTab, setInternalTab] = react.useState("now");
|
|
13355
13357
|
const [tripTabKey, setTripTabKey] = react.useState(initialTripTabKey);
|
|
@@ -13624,23 +13626,23 @@ function ReadyKaafilManagerApp(props) {
|
|
|
13624
13626
|
|
|
13625
13627
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
13626
13628
|
enumerable: true,
|
|
13627
|
-
get: function () { return
|
|
13629
|
+
get: function () { return chunkT5JYKERY_cjs.BootErrorScreen; }
|
|
13628
13630
|
});
|
|
13629
13631
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
13630
13632
|
enumerable: true,
|
|
13631
|
-
get: function () { return
|
|
13633
|
+
get: function () { return chunkT5JYKERY_cjs.LockedTripScreen; }
|
|
13632
13634
|
});
|
|
13633
13635
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
13634
13636
|
enumerable: true,
|
|
13635
|
-
get: function () { return
|
|
13637
|
+
get: function () { return chunkT5JYKERY_cjs.NotFoundScreen; }
|
|
13636
13638
|
});
|
|
13637
13639
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
13638
13640
|
enumerable: true,
|
|
13639
|
-
get: function () { return
|
|
13641
|
+
get: function () { return chunkT5JYKERY_cjs.OfflineFallbackScreen; }
|
|
13640
13642
|
});
|
|
13641
13643
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
13642
13644
|
enumerable: true,
|
|
13643
|
-
get: function () { return
|
|
13645
|
+
get: function () { return chunkT5JYKERY_cjs.SessionExpiredScreen; }
|
|
13644
13646
|
});
|
|
13645
13647
|
exports.KaafilManagerApp = KaafilManagerApp;
|
|
13646
13648
|
exports.ManagerChecklistSection = ManagerChecklistSection;
|