@splpi/estore-shared-components 0.0.6 → 7.0.2
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/dist/index.d.mts +73 -17
- package/dist/index.d.ts +73 -17
- package/dist/index.js +1083 -898
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +737 -552
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -39,17 +39,19 @@ __export(index_exports, {
|
|
|
39
39
|
LifePlanApplicationFormWrapper: () => LifePlanApplicationFormWrapper_default,
|
|
40
40
|
LifePlanApplicationStepWrapper: () => LifePlanApplicationStepWrapper_default,
|
|
41
41
|
NotifyInstall: () => NotifyInstall,
|
|
42
|
+
OCR_STORAGE_KEY: () => OCR_STORAGE_KEY,
|
|
42
43
|
SharedLifePlanApplication: () => SharedLifePlanApplication_default,
|
|
43
44
|
UserProfile: () => UserProfile_default,
|
|
44
45
|
createEmptyApplicationData: () => createEmptyApplicationData,
|
|
45
46
|
loadApplicationDataFromLocalStorage: () => loadApplicationDataFromLocalStorage,
|
|
47
|
+
markOcrApplied: () => markOcrApplied,
|
|
48
|
+
readOcrResult: () => readOcrResult,
|
|
46
49
|
saveApplicationDataToLocalStorage: () => saveApplicationDataToLocalStorage
|
|
47
50
|
});
|
|
48
51
|
module.exports = __toCommonJS(index_exports);
|
|
49
52
|
|
|
50
53
|
// src/NewSaleForm/LifePlanApplication1.tsx
|
|
51
54
|
var import_react3 = require("@chakra-ui/react");
|
|
52
|
-
var import_react4 = require("react");
|
|
53
55
|
|
|
54
56
|
// src/lib/theme/layout-tokens.ts
|
|
55
57
|
var RESPONSIVE_LAYOUT_TOKENS = {
|
|
@@ -270,6 +272,40 @@ var STANDARD_ICON_BUTTON_STYLES = {
|
|
|
270
272
|
}
|
|
271
273
|
};
|
|
272
274
|
|
|
275
|
+
// src/hooks/ocrStorage.ts
|
|
276
|
+
var OCR_STORAGE_KEY = "ocrResult";
|
|
277
|
+
var readStored = () => {
|
|
278
|
+
try {
|
|
279
|
+
const raw = localStorage.getItem(OCR_STORAGE_KEY);
|
|
280
|
+
return raw ? JSON.parse(raw) : null;
|
|
281
|
+
} catch {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
var readOcrResult = (section) => {
|
|
286
|
+
if (typeof window === "undefined") return null;
|
|
287
|
+
const stored = readStored();
|
|
288
|
+
if (!stored || stored.applied?.[section]) return null;
|
|
289
|
+
return stored;
|
|
290
|
+
};
|
|
291
|
+
var markOcrApplied = (section) => {
|
|
292
|
+
if (typeof window === "undefined") return false;
|
|
293
|
+
const stored = readStored();
|
|
294
|
+
if (!stored || stored.applied?.[section]) return false;
|
|
295
|
+
try {
|
|
296
|
+
localStorage.setItem(
|
|
297
|
+
OCR_STORAGE_KEY,
|
|
298
|
+
JSON.stringify({ ...stored, applied: { ...stored.applied, [section]: true } })
|
|
299
|
+
);
|
|
300
|
+
} catch {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
return true;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// src/NewSaleForm/LifePlanApplication1.tsx
|
|
307
|
+
var import_react4 = require("react");
|
|
308
|
+
|
|
273
309
|
// src/NewSaleForm/ui/FloatingLabelInput.tsx
|
|
274
310
|
var import_react = require("@chakra-ui/react");
|
|
275
311
|
var import_react2 = require("react");
|
|
@@ -364,11 +400,20 @@ var civilStatusCollection = (0, import_react3.createListCollection)({
|
|
|
364
400
|
{ label: "Annulled", value: "annulled" }
|
|
365
401
|
]
|
|
366
402
|
});
|
|
403
|
+
var applyOcr = (data, ocr) => ocr ? {
|
|
404
|
+
...data,
|
|
405
|
+
firstName: ocr.firstName || data.firstName || "",
|
|
406
|
+
middleName: ocr.middleName || data.middleName || "",
|
|
407
|
+
lastName: ocr.lastName || data.lastName || "",
|
|
408
|
+
birthDate: ocr.birthDate || data.birthDate || "",
|
|
409
|
+
idType: ocr.idType || data.idType || "",
|
|
410
|
+
idNumber: ocr.idNumber || data.idNumber || ""
|
|
411
|
+
} : data;
|
|
367
412
|
var LifePlanApplication1 = ({
|
|
368
413
|
initialData,
|
|
369
414
|
onUpdate
|
|
370
415
|
}) => {
|
|
371
|
-
const [formData, setFormData] = (0, import_react4.useState)({
|
|
416
|
+
const [formData, setFormData] = (0, import_react4.useState)(() => applyOcr({
|
|
372
417
|
firstName: initialData?.firstName ?? "Juan",
|
|
373
418
|
middleName: initialData?.middleName ?? "Santos",
|
|
374
419
|
lastName: initialData?.lastName ?? "Dela Cruz",
|
|
@@ -385,44 +430,14 @@ var LifePlanApplication1 = ({
|
|
|
385
430
|
emailAddress: initialData?.emailAddress ?? "juan.delacruz@example.com",
|
|
386
431
|
mailingAddress: initialData?.mailingAddress ?? "123 Mabini Street, Barangay San Antonio, Makati City",
|
|
387
432
|
landLineNumber: initialData?.landLineNumber ?? "02-8123-4567"
|
|
388
|
-
});
|
|
433
|
+
}, readOcrResult("personal")));
|
|
389
434
|
const updateFormData = (nextData) => {
|
|
390
435
|
setFormData(nextData);
|
|
391
436
|
onUpdate?.(nextData);
|
|
392
437
|
};
|
|
393
438
|
(0, import_react4.useEffect)(() => {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
try {
|
|
397
|
-
const ocrData = JSON.parse(OCRValue);
|
|
398
|
-
const [month, day, year] = ocrData.birthDate.split("/").map((part) => part.trim());
|
|
399
|
-
const formattedBirthDate = `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
|
400
|
-
let mappedIdType = "";
|
|
401
|
-
if (ocrData?.idType) {
|
|
402
|
-
const normalizedIdType = ocrData.idType.toLowerCase().replace(/\s+/g, "_").replace(/'/g, "");
|
|
403
|
-
if (normalizedIdType.includes("passport")) {
|
|
404
|
-
mappedIdType = "passport";
|
|
405
|
-
} else if (normalizedIdType.includes("driver")) {
|
|
406
|
-
mappedIdType = "driver_license";
|
|
407
|
-
} else if (normalizedIdType.includes("national") || normalizedIdType.includes("id")) {
|
|
408
|
-
mappedIdType = "national_id";
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
const updatedData = {
|
|
412
|
-
...formData,
|
|
413
|
-
firstName: ocrData?.firstName || "",
|
|
414
|
-
lastName: ocrData?.lastName || "",
|
|
415
|
-
middleName: ocrData?.middleName || "",
|
|
416
|
-
birthDate: formattedBirthDate || "",
|
|
417
|
-
idType: mappedIdType || ""
|
|
418
|
-
};
|
|
419
|
-
updateFormData(updatedData);
|
|
420
|
-
} catch (e) {
|
|
421
|
-
console.error("Failed to parse OCR value:", e);
|
|
422
|
-
localStorage.removeItem("ocrResult");
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}, []);
|
|
439
|
+
if (markOcrApplied("personal")) onUpdate?.(formData);
|
|
440
|
+
}, [formData, onUpdate]);
|
|
426
441
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
427
442
|
import_react3.Grid,
|
|
428
443
|
{
|
|
@@ -648,6 +663,36 @@ var LifePlanApplication1_default = LifePlanApplication1;
|
|
|
648
663
|
// src/NewSaleForm/LifePlanApplication2.tsx
|
|
649
664
|
var import_react5 = require("@chakra-ui/react");
|
|
650
665
|
var import_react6 = require("react");
|
|
666
|
+
|
|
667
|
+
// src/lib/theme/brand-colors.ts
|
|
668
|
+
var BRAND_COLORS = {
|
|
669
|
+
primaryGreen: "#109448",
|
|
670
|
+
darkGreen: "#006838",
|
|
671
|
+
softGreen: "#92DDBF",
|
|
672
|
+
pastelPeaGreen: "#ACD6A6",
|
|
673
|
+
seafoamGreen: "#92DDBF",
|
|
674
|
+
lightCyan: "#D3EDEE",
|
|
675
|
+
successBg: "#F0FDF4",
|
|
676
|
+
warningBg: "#FFF7ED",
|
|
677
|
+
warningText: "#F1592B",
|
|
678
|
+
warningBorder: "#F4845F",
|
|
679
|
+
errorBg: "#FEF2F2",
|
|
680
|
+
destructiveRed: "#BF1F2F",
|
|
681
|
+
errorRed: "#EF4444",
|
|
682
|
+
neutralText: "#22223B",
|
|
683
|
+
neutralBorder: "#E5E7EB",
|
|
684
|
+
mutedBg: "#F3F4F6",
|
|
685
|
+
subtleBg: "#F9FAFB",
|
|
686
|
+
white: "#FFFFFF",
|
|
687
|
+
black: "#000000",
|
|
688
|
+
grey: "#808080",
|
|
689
|
+
ashWhite: "#ECECEC",
|
|
690
|
+
gold: "#CBA135",
|
|
691
|
+
brightGold: "#FFD026",
|
|
692
|
+
paleGold: "#FFF48E"
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
// src/NewSaleForm/LifePlanApplication2.tsx
|
|
651
696
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
652
697
|
var provinceOptions = [
|
|
653
698
|
"Abra",
|
|
@@ -841,22 +886,55 @@ var cityOptions = [
|
|
|
841
886
|
"Bongao",
|
|
842
887
|
"Ipil"
|
|
843
888
|
].map((city) => ({ label: city, value: city }));
|
|
844
|
-
var districtOptions = cityOptions;
|
|
845
|
-
var barangayOptions = cityOptions;
|
|
846
889
|
var provinceCollection = (0, import_react5.createListCollection)({ items: provinceOptions });
|
|
847
890
|
var cityCollection = (0, import_react5.createListCollection)({ items: cityOptions });
|
|
848
|
-
var
|
|
849
|
-
var
|
|
891
|
+
var normalizePlace = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/^city of\s+/, "").replace(/\s+city$/, "").replace(/[^a-z0-9]/g, "");
|
|
892
|
+
var matchOption = (candidates, options) => {
|
|
893
|
+
for (const candidate of candidates ?? []) {
|
|
894
|
+
const key = normalizePlace(candidate);
|
|
895
|
+
const match = options.find(
|
|
896
|
+
(option) => normalizePlace(option.value) === key
|
|
897
|
+
);
|
|
898
|
+
if (match) return match.value;
|
|
899
|
+
}
|
|
900
|
+
return "";
|
|
901
|
+
};
|
|
850
902
|
var LifePlanApplication2 = ({
|
|
851
|
-
onAddressUpdate
|
|
903
|
+
onAddressUpdate,
|
|
904
|
+
parseAddress
|
|
852
905
|
}) => {
|
|
853
|
-
const
|
|
854
|
-
const [
|
|
855
|
-
const [
|
|
856
|
-
const [
|
|
857
|
-
const [
|
|
858
|
-
const [
|
|
859
|
-
|
|
906
|
+
const [lot, setLot] = (0, import_react6.useState)("");
|
|
907
|
+
const [street, setStreet] = (0, import_react6.useState)("");
|
|
908
|
+
const [city, setCity] = (0, import_react6.useState)("");
|
|
909
|
+
const [province, setProvince] = (0, import_react6.useState)("");
|
|
910
|
+
const [district, setDistrict] = (0, import_react6.useState)("");
|
|
911
|
+
const [barangay, setBarangay] = (0, import_react6.useState)("");
|
|
912
|
+
(0, import_react6.useEffect)(() => {
|
|
913
|
+
if (!parseAddress) return;
|
|
914
|
+
const ocr = readOcrResult("address");
|
|
915
|
+
if (!ocr?.addressLine) return;
|
|
916
|
+
markOcrApplied("address");
|
|
917
|
+
parseAddress(ocr.addressLine).then((result) => {
|
|
918
|
+
setLot(result.lot ?? "");
|
|
919
|
+
setStreet(result.street ?? "");
|
|
920
|
+
setProvince(matchOption(result.provinceCandidates, provinceOptions));
|
|
921
|
+
setCity(matchOption(result.cityCandidates, cityOptions));
|
|
922
|
+
setDistrict(result.district ?? "");
|
|
923
|
+
setBarangay(result.barangay ?? "");
|
|
924
|
+
}).catch((error) => {
|
|
925
|
+
console.error("Error parsing address:", error);
|
|
926
|
+
});
|
|
927
|
+
}, [parseAddress]);
|
|
928
|
+
(0, import_react6.useEffect)(() => {
|
|
929
|
+
onAddressUpdate?.({
|
|
930
|
+
lot,
|
|
931
|
+
street,
|
|
932
|
+
barangay,
|
|
933
|
+
district,
|
|
934
|
+
city,
|
|
935
|
+
province
|
|
936
|
+
});
|
|
937
|
+
}, [lot, street, barangay, city, province, district]);
|
|
860
938
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
861
939
|
import_react5.Box,
|
|
862
940
|
{
|
|
@@ -902,44 +980,22 @@ var LifePlanApplication2 = ({
|
|
|
902
980
|
]
|
|
903
981
|
}
|
|
904
982
|
) }),
|
|
905
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
906
|
-
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
984
|
+
FloatingLabelInput,
|
|
907
985
|
{
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
children: [
|
|
913
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.HiddenSelect, {}),
|
|
914
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Control, { children: [
|
|
915
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ValueText, { placeholder: "Select District" }) }),
|
|
916
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.IndicatorGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Indicator, {}) })
|
|
917
|
-
] }),
|
|
918
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Content, { children: districtOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Item, { item, children: [
|
|
919
|
-
item.label,
|
|
920
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ItemIndicator, {})
|
|
921
|
-
] }, item.value)) }) }) })
|
|
922
|
-
]
|
|
986
|
+
id: "district",
|
|
987
|
+
label: "District",
|
|
988
|
+
value: district,
|
|
989
|
+
onChange: (e) => setDistrict(e.target.value)
|
|
923
990
|
}
|
|
924
991
|
) }),
|
|
925
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
926
|
-
|
|
992
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
993
|
+
FloatingLabelInput,
|
|
927
994
|
{
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
children: [
|
|
933
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.HiddenSelect, {}),
|
|
934
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Control, { children: [
|
|
935
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ValueText, { placeholder: "Select Barangay" }) }),
|
|
936
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.IndicatorGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Indicator, {}) })
|
|
937
|
-
] }),
|
|
938
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Content, { children: barangayOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Item, { item, children: [
|
|
939
|
-
item.label,
|
|
940
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ItemIndicator, {})
|
|
941
|
-
] }, item.value)) }) }) })
|
|
942
|
-
]
|
|
995
|
+
id: "barangay",
|
|
996
|
+
label: "Barangay",
|
|
997
|
+
value: barangay,
|
|
998
|
+
onChange: (e) => setBarangay(e.target.value)
|
|
943
999
|
}
|
|
944
1000
|
) }),
|
|
945
1001
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -1105,7 +1161,66 @@ var RowItem = ({
|
|
|
1105
1161
|
),
|
|
1106
1162
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react9.Text, { fontWeight: "medium", textAlign: "right", whiteSpace: "nowrap", children: value ?? "-" })
|
|
1107
1163
|
] });
|
|
1108
|
-
|
|
1164
|
+
|
|
1165
|
+
// src/lib/applicationData.ts
|
|
1166
|
+
var LIFE_PLAN_APPLICATION_KEY = "LifePlanApplication";
|
|
1167
|
+
var createEmptyApplicationData = () => ({
|
|
1168
|
+
personalInfo: {
|
|
1169
|
+
firstName: "",
|
|
1170
|
+
middleName: "",
|
|
1171
|
+
lastName: "",
|
|
1172
|
+
suffix: "",
|
|
1173
|
+
birthDate: "",
|
|
1174
|
+
idType: "",
|
|
1175
|
+
idNumber: "",
|
|
1176
|
+
height: 0,
|
|
1177
|
+
weight: 0,
|
|
1178
|
+
gender: "",
|
|
1179
|
+
civilStatus: "",
|
|
1180
|
+
nationality: "",
|
|
1181
|
+
mobileNumber: "",
|
|
1182
|
+
emailAddress: "",
|
|
1183
|
+
mailingAddress: "",
|
|
1184
|
+
landLineNumber: ""
|
|
1185
|
+
},
|
|
1186
|
+
address: {
|
|
1187
|
+
lot: "",
|
|
1188
|
+
street: "",
|
|
1189
|
+
barangay: "",
|
|
1190
|
+
district: "",
|
|
1191
|
+
city: "",
|
|
1192
|
+
province: ""
|
|
1193
|
+
},
|
|
1194
|
+
employment: {
|
|
1195
|
+
occupation: "",
|
|
1196
|
+
employerName: "",
|
|
1197
|
+
employmentStatus: "",
|
|
1198
|
+
officeAddress: "",
|
|
1199
|
+
TIN: "",
|
|
1200
|
+
SSS: "",
|
|
1201
|
+
sourceOfIncome: ""
|
|
1202
|
+
},
|
|
1203
|
+
beneficiaries: [],
|
|
1204
|
+
healthDeclaration: {
|
|
1205
|
+
healthDeclaration1: false,
|
|
1206
|
+
healthDeclaration2: false,
|
|
1207
|
+
healthDeclaration3: false,
|
|
1208
|
+
healthDeclaration4: false
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
var loadApplicationDataFromLocalStorage = (storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1212
|
+
if (typeof window === "undefined") return null;
|
|
1213
|
+
try {
|
|
1214
|
+
const stored = window.localStorage.getItem(storageKey);
|
|
1215
|
+
return stored ? JSON.parse(stored) : null;
|
|
1216
|
+
} catch {
|
|
1217
|
+
return null;
|
|
1218
|
+
}
|
|
1219
|
+
};
|
|
1220
|
+
var saveApplicationDataToLocalStorage = (data, storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1221
|
+
if (typeof window === "undefined") return;
|
|
1222
|
+
window.localStorage.setItem(storageKey, JSON.stringify(data));
|
|
1223
|
+
};
|
|
1109
1224
|
|
|
1110
1225
|
// src/NewSaleForm/beneficiary.tsx
|
|
1111
1226
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -1126,7 +1241,7 @@ var relationshipTypes = (0, import_react10.createListCollection)({
|
|
|
1126
1241
|
});
|
|
1127
1242
|
var ReviewRows = ({
|
|
1128
1243
|
rows
|
|
1129
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.VStack, { align: "stretch", gap: 1, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1244
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.VStack, { align: "stretch", gap: 1, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RowItem, { label: row.label, value: row.value }, row.label)) });
|
|
1130
1245
|
var Beneficiary = ({ onUpdate }) => {
|
|
1131
1246
|
const isMobile = (0, import_react10.useBreakpointValue)({ base: true, md: false });
|
|
1132
1247
|
const [principalBeneficiaries, setPrincipalBeneficiaries] = (0, import_react11.useState)([]);
|
|
@@ -1152,6 +1267,65 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1152
1267
|
relationship: "",
|
|
1153
1268
|
beneficiaryClass: "principal"
|
|
1154
1269
|
});
|
|
1270
|
+
const syncBeneficiaries = (principal, contingent) => {
|
|
1271
|
+
const allBeneficiaries = [...principal, ...contingent];
|
|
1272
|
+
onUpdate?.(
|
|
1273
|
+
principal.length > 0 ? principal[0] : void 0,
|
|
1274
|
+
contingent.length > 0 ? contingent[0] : void 0,
|
|
1275
|
+
allBeneficiaries
|
|
1276
|
+
);
|
|
1277
|
+
const currentData = loadApplicationDataFromLocalStorage() ?? createEmptyApplicationData();
|
|
1278
|
+
const {
|
|
1279
|
+
principalBeneficiary: _oldPrincipal,
|
|
1280
|
+
contingentBeneficiary: _oldContingent,
|
|
1281
|
+
...restData
|
|
1282
|
+
} = currentData;
|
|
1283
|
+
saveApplicationDataToLocalStorage({
|
|
1284
|
+
...restData,
|
|
1285
|
+
beneficiaries: allBeneficiaries,
|
|
1286
|
+
...principal[0] ? { principalBeneficiary: principal[0] } : {},
|
|
1287
|
+
...contingent[0] ? { contingentBeneficiary: contingent[0] } : {}
|
|
1288
|
+
});
|
|
1289
|
+
};
|
|
1290
|
+
(0, import_react11.useEffect)(() => {
|
|
1291
|
+
const timeoutId = window.setTimeout(() => {
|
|
1292
|
+
const currentData = loadApplicationDataFromLocalStorage();
|
|
1293
|
+
if (!currentData) return;
|
|
1294
|
+
const storedBeneficiaries = currentData.beneficiaries ?? [];
|
|
1295
|
+
let principalFromStorage = storedBeneficiaries.filter(
|
|
1296
|
+
(beneficiary) => beneficiary.beneficiaryClass === "principal"
|
|
1297
|
+
);
|
|
1298
|
+
let contingentFromStorage = storedBeneficiaries.filter(
|
|
1299
|
+
(beneficiary) => beneficiary.beneficiaryClass === "contingent"
|
|
1300
|
+
);
|
|
1301
|
+
if (storedBeneficiaries.length === 0) {
|
|
1302
|
+
if (currentData.principalBeneficiary) {
|
|
1303
|
+
principalFromStorage = [
|
|
1304
|
+
{
|
|
1305
|
+
...currentData.principalBeneficiary,
|
|
1306
|
+
beneficiaryClass: currentData.principalBeneficiary.beneficiaryClass || "principal"
|
|
1307
|
+
}
|
|
1308
|
+
];
|
|
1309
|
+
}
|
|
1310
|
+
if (currentData.contingentBeneficiary) {
|
|
1311
|
+
contingentFromStorage = [
|
|
1312
|
+
{
|
|
1313
|
+
...currentData.contingentBeneficiary,
|
|
1314
|
+
beneficiaryClass: currentData.contingentBeneficiary.beneficiaryClass || "contingent"
|
|
1315
|
+
}
|
|
1316
|
+
];
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
setPrincipalBeneficiaries(principalFromStorage);
|
|
1320
|
+
setContingentBeneficiaries(contingentFromStorage);
|
|
1321
|
+
onUpdate?.(
|
|
1322
|
+
principalFromStorage.length > 0 ? principalFromStorage[0] : void 0,
|
|
1323
|
+
contingentFromStorage.length > 0 ? contingentFromStorage[0] : void 0,
|
|
1324
|
+
[...principalFromStorage, ...contingentFromStorage]
|
|
1325
|
+
);
|
|
1326
|
+
}, 0);
|
|
1327
|
+
return () => window.clearTimeout(timeoutId);
|
|
1328
|
+
}, [onUpdate]);
|
|
1155
1329
|
const handleSaveAddBeneficiary = () => {
|
|
1156
1330
|
if (!addFormBeneficiary.firstName || !addFormBeneficiary.lastName || !addFormBeneficiary.birthDate || !addFormBeneficiary.relationship || !addFormBeneficiary.address) {
|
|
1157
1331
|
alert("Please fill in all required fields");
|
|
@@ -1177,6 +1351,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1177
1351
|
});
|
|
1178
1352
|
setAddDialogOpen(false);
|
|
1179
1353
|
console.log("Beneficiary added:", addFormBeneficiary);
|
|
1354
|
+
syncBeneficiaries(newPrincipal, newContingent);
|
|
1180
1355
|
};
|
|
1181
1356
|
const formatFullName = (beneficiary) => {
|
|
1182
1357
|
return [
|
|
@@ -1200,9 +1375,6 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1200
1375
|
setFormBeneficiary({ ...beneficiary });
|
|
1201
1376
|
setEditDialogOpen(true);
|
|
1202
1377
|
};
|
|
1203
|
-
function handleDeleteBeneficiary(arg0, idx) {
|
|
1204
|
-
throw new Error("Function not implemented.");
|
|
1205
|
-
}
|
|
1206
1378
|
const handleSaveEdit = () => {
|
|
1207
1379
|
if (!selectedBeneficiary) return;
|
|
1208
1380
|
let updatedPrincipal = principalBeneficiaries;
|
|
@@ -1218,9 +1390,26 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1218
1390
|
);
|
|
1219
1391
|
setContingentBeneficiaries(updatedContingent);
|
|
1220
1392
|
}
|
|
1393
|
+
syncBeneficiaries(updatedPrincipal, updatedContingent);
|
|
1221
1394
|
setEditDialogOpen(false);
|
|
1222
1395
|
setSelectedBeneficiary(null);
|
|
1223
1396
|
};
|
|
1397
|
+
const handleDeleteBeneficiary = (type, index) => {
|
|
1398
|
+
let updatedPrincipal = principalBeneficiaries;
|
|
1399
|
+
let updatedContingent = contingentBeneficiaries;
|
|
1400
|
+
if (type === "principal") {
|
|
1401
|
+
updatedPrincipal = principalBeneficiaries.filter(
|
|
1402
|
+
(_, beneficiaryIndex) => beneficiaryIndex !== index
|
|
1403
|
+
);
|
|
1404
|
+
setPrincipalBeneficiaries(updatedPrincipal);
|
|
1405
|
+
} else {
|
|
1406
|
+
updatedContingent = contingentBeneficiaries.filter(
|
|
1407
|
+
(_, beneficiaryIndex) => beneficiaryIndex !== index
|
|
1408
|
+
);
|
|
1409
|
+
setContingentBeneficiaries(updatedContingent);
|
|
1410
|
+
}
|
|
1411
|
+
syncBeneficiaries(updatedPrincipal, updatedContingent);
|
|
1412
|
+
};
|
|
1224
1413
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
1225
1414
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1226
1415
|
import_react10.Flex,
|
|
@@ -1240,14 +1429,14 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1240
1429
|
{
|
|
1241
1430
|
placement: "center",
|
|
1242
1431
|
motionPreset: "slide-in-bottom",
|
|
1243
|
-
size: { mdDown: "full", md: "
|
|
1432
|
+
size: { mdDown: "full", md: "xl" },
|
|
1244
1433
|
open: addDialogOpen,
|
|
1245
1434
|
onOpenChange: (details) => setAddDialogOpen(details.open),
|
|
1246
1435
|
children: [
|
|
1247
1436
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Button, { w: { base: "full", md: "auto" }, children: "Add Beneficiary" }) }),
|
|
1248
1437
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react10.Portal, { children: [
|
|
1249
1438
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Backdrop, {}),
|
|
1250
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react10.Dialog.Content, {
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react10.Dialog.Content, { children: [
|
|
1251
1440
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Title, { children: "Add Beneficiary" }) }),
|
|
1252
1441
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react10.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react10.VStack, { gap: 5, w: "full", align: "stretch", children: [
|
|
1253
1442
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
@@ -1753,6 +1942,29 @@ var HealthDeclaration = () => {
|
|
|
1753
1942
|
healthDeclaration3: false,
|
|
1754
1943
|
healthDeclaration4: false
|
|
1755
1944
|
});
|
|
1945
|
+
(0, import_react12.useEffect)(() => {
|
|
1946
|
+
let appData = loadApplicationDataFromLocalStorage();
|
|
1947
|
+
if (!appData) {
|
|
1948
|
+
appData = createEmptyApplicationData();
|
|
1949
|
+
saveApplicationDataToLocalStorage(appData);
|
|
1950
|
+
}
|
|
1951
|
+
if (appData && appData.healthDeclaration) {
|
|
1952
|
+
setHealthDeclarationValues(appData.healthDeclaration);
|
|
1953
|
+
}
|
|
1954
|
+
}, []);
|
|
1955
|
+
(0, import_react12.useEffect)(() => {
|
|
1956
|
+
return () => {
|
|
1957
|
+
const appData = loadApplicationDataFromLocalStorage();
|
|
1958
|
+
if (appData) {
|
|
1959
|
+
appData.healthDeclaration = healthDeclarationValues;
|
|
1960
|
+
saveApplicationDataToLocalStorage(appData);
|
|
1961
|
+
console.log(
|
|
1962
|
+
"Health Declaration saved to localStorage",
|
|
1963
|
+
healthDeclarationValues
|
|
1964
|
+
);
|
|
1965
|
+
}
|
|
1966
|
+
};
|
|
1967
|
+
}, [healthDeclarationValues]);
|
|
1756
1968
|
const items = [
|
|
1757
1969
|
{
|
|
1758
1970
|
value: "first-item",
|
|
@@ -1889,76 +2101,15 @@ var HealthDeclaration = () => {
|
|
|
1889
2101
|
var HealthDeclaration_default = HealthDeclaration;
|
|
1890
2102
|
|
|
1891
2103
|
// src/NewSaleForm/LifePlanApplicationFormWrapper.tsx
|
|
1892
|
-
var
|
|
2104
|
+
var import_react17 = require("@chakra-ui/react");
|
|
1893
2105
|
var import_fa2 = require("react-icons/fa");
|
|
1894
2106
|
var import_io = require("react-icons/io");
|
|
1895
2107
|
var import_lu3 = require("react-icons/lu");
|
|
1896
|
-
var
|
|
1897
|
-
var import_st_peter_ui3 = require("st-peter-ui");
|
|
1898
|
-
|
|
1899
|
-
// src/lib/applicationData.ts
|
|
1900
|
-
var LIFE_PLAN_APPLICATION_KEY = "LifePlanApplication";
|
|
1901
|
-
var createEmptyApplicationData = () => ({
|
|
1902
|
-
personalInfo: {
|
|
1903
|
-
firstName: "",
|
|
1904
|
-
middleName: "",
|
|
1905
|
-
lastName: "",
|
|
1906
|
-
suffix: "",
|
|
1907
|
-
birthDate: "",
|
|
1908
|
-
idType: "",
|
|
1909
|
-
idNumber: "",
|
|
1910
|
-
height: 0,
|
|
1911
|
-
weight: 0,
|
|
1912
|
-
gender: "",
|
|
1913
|
-
civilStatus: "",
|
|
1914
|
-
nationality: "",
|
|
1915
|
-
mobileNumber: "",
|
|
1916
|
-
emailAddress: "",
|
|
1917
|
-
mailingAddress: "",
|
|
1918
|
-
landLineNumber: ""
|
|
1919
|
-
},
|
|
1920
|
-
address: {
|
|
1921
|
-
lot: "",
|
|
1922
|
-
street: "",
|
|
1923
|
-
barangay: "",
|
|
1924
|
-
district: "",
|
|
1925
|
-
city: "",
|
|
1926
|
-
province: ""
|
|
1927
|
-
},
|
|
1928
|
-
employment: {
|
|
1929
|
-
occupation: "",
|
|
1930
|
-
employerName: "",
|
|
1931
|
-
employmentStatus: "",
|
|
1932
|
-
officeAddress: "",
|
|
1933
|
-
TIN: "",
|
|
1934
|
-
SSS: "",
|
|
1935
|
-
sourceOfIncome: ""
|
|
1936
|
-
},
|
|
1937
|
-
beneficiaries: [],
|
|
1938
|
-
healthDeclaration: {
|
|
1939
|
-
healthDeclaration1: false,
|
|
1940
|
-
healthDeclaration2: false,
|
|
1941
|
-
healthDeclaration3: false,
|
|
1942
|
-
healthDeclaration4: false
|
|
1943
|
-
}
|
|
1944
|
-
});
|
|
1945
|
-
var loadApplicationDataFromLocalStorage = (storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1946
|
-
if (typeof window === "undefined") return null;
|
|
1947
|
-
try {
|
|
1948
|
-
const stored = window.localStorage.getItem(storageKey);
|
|
1949
|
-
return stored ? JSON.parse(stored) : null;
|
|
1950
|
-
} catch {
|
|
1951
|
-
return null;
|
|
1952
|
-
}
|
|
1953
|
-
};
|
|
1954
|
-
var saveApplicationDataToLocalStorage = (data, storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1955
|
-
if (typeof window === "undefined") return;
|
|
1956
|
-
window.localStorage.setItem(storageKey, JSON.stringify(data));
|
|
1957
|
-
};
|
|
2108
|
+
var import_react18 = require("react");
|
|
1958
2109
|
|
|
1959
2110
|
// src/NewSaleForm/ui/info-card.tsx
|
|
1960
|
-
var import_react14 = require("react");
|
|
1961
|
-
var
|
|
2111
|
+
var import_react14 = require("@chakra-ui/react");
|
|
2112
|
+
var import_st_peter_ui3 = require("st-peter-ui");
|
|
1962
2113
|
var import_hi = require("react-icons/hi");
|
|
1963
2114
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1964
2115
|
var InfoCard = ({
|
|
@@ -1966,28 +2117,35 @@ var InfoCard = ({
|
|
|
1966
2117
|
icon = import_hi.HiInformationCircle
|
|
1967
2118
|
}) => {
|
|
1968
2119
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1969
|
-
|
|
2120
|
+
import_react14.HStack,
|
|
1970
2121
|
{
|
|
1971
|
-
gap:
|
|
2122
|
+
gap: STANDARD_SPACING.sm,
|
|
1972
2123
|
align: "center",
|
|
1973
2124
|
p: "8px",
|
|
1974
|
-
borderRadius:
|
|
2125
|
+
borderRadius: STANDARD_RADIUS.md,
|
|
1975
2126
|
bg: "#ebf4fb",
|
|
1976
2127
|
borderWidth: "1px",
|
|
1977
2128
|
borderColor: "#1976d2",
|
|
1978
|
-
color:
|
|
2129
|
+
color: BRAND_COLORS.darkGreen,
|
|
1979
2130
|
children: [
|
|
1980
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1981
|
-
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2132
|
+
import_react14.Box,
|
|
2133
|
+
{
|
|
2134
|
+
as: icon,
|
|
2135
|
+
boxSize: STANDARD_SIZES.iconButton.sm,
|
|
2136
|
+
color: "#1976d2",
|
|
2137
|
+
flexShrink: 0
|
|
2138
|
+
}
|
|
2139
|
+
),
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react14.Text, { color: "#1976d2", fontSize: "xs", children })
|
|
1982
2141
|
]
|
|
1983
2142
|
}
|
|
1984
2143
|
);
|
|
1985
2144
|
};
|
|
1986
|
-
var info_card_default = InfoCard;
|
|
1987
2145
|
|
|
1988
2146
|
// src/NewSaleForm/ui/input-card-accordion.tsx
|
|
1989
|
-
var
|
|
1990
|
-
var
|
|
2147
|
+
var import_react15 = require("@chakra-ui/react");
|
|
2148
|
+
var import_react16 = require("react");
|
|
1991
2149
|
var import_lu2 = require("react-icons/lu");
|
|
1992
2150
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1993
2151
|
function InputCardAccordion({
|
|
@@ -2001,7 +2159,7 @@ function InputCardAccordion({
|
|
|
2001
2159
|
onToggle,
|
|
2002
2160
|
isComplete
|
|
2003
2161
|
}) {
|
|
2004
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2162
|
+
const [internalOpen, setInternalOpen] = (0, import_react16.useState)(defaultOpen);
|
|
2005
2163
|
const isControlled = controlledOpen !== void 0;
|
|
2006
2164
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
2007
2165
|
const toggle = () => {
|
|
@@ -2019,7 +2177,7 @@ function InputCardAccordion({
|
|
|
2019
2177
|
};
|
|
2020
2178
|
const activeIcon = isOpen && openedIcon ? openedIcon : icon;
|
|
2021
2179
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2022
|
-
|
|
2180
|
+
import_react15.Box,
|
|
2023
2181
|
{
|
|
2024
2182
|
w: "full",
|
|
2025
2183
|
position: "relative",
|
|
@@ -2033,7 +2191,7 @@ function InputCardAccordion({
|
|
|
2033
2191
|
cursor: "pointer",
|
|
2034
2192
|
children: [
|
|
2035
2193
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2036
|
-
|
|
2194
|
+
import_react15.Flex,
|
|
2037
2195
|
{
|
|
2038
2196
|
align: "center",
|
|
2039
2197
|
justify: "space-between",
|
|
@@ -2048,9 +2206,9 @@ function InputCardAccordion({
|
|
|
2048
2206
|
_hover: { bg: "gray.50" },
|
|
2049
2207
|
transition: "background 0.15s ease",
|
|
2050
2208
|
children: [
|
|
2051
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react15.Flex, { align: "center", gap: 2, children: [
|
|
2052
2210
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2053
|
-
|
|
2211
|
+
import_react15.Box,
|
|
2054
2212
|
{
|
|
2055
2213
|
p: 2,
|
|
2056
2214
|
borderRadius: "full",
|
|
@@ -2060,28 +2218,29 @@ function InputCardAccordion({
|
|
|
2060
2218
|
children: activeIcon
|
|
2061
2219
|
}
|
|
2062
2220
|
),
|
|
2063
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2064
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2065
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react15.Box, { children: [
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react15.Text, { fontWeight: "bold", fontSize: "md", lineHeight: "1.2", children: title }),
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react15.Flex, { align: "center", gap: 1, fontSize: "xs", color: "gray.500", children: [
|
|
2066
2224
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lu2.LuHash, { size: 12 }),
|
|
2067
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2225
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react15.Text, { children: subtitle })
|
|
2068
2226
|
] })
|
|
2069
2227
|
] })
|
|
2070
2228
|
] }),
|
|
2071
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2072
|
-
isComplete && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2073
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react15.Flex, { align: "center", gap: 1.5, flexShrink: 0, children: [
|
|
2230
|
+
isComplete && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react15.Box, { color: "green.500", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lu2.LuCheck, { size: 16 }) }),
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react15.Box, { color: "gray.400", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lu2.LuChevronUp, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lu2.LuChevronDown, { size: 16 }) })
|
|
2074
2232
|
] })
|
|
2075
2233
|
]
|
|
2076
2234
|
}
|
|
2077
2235
|
),
|
|
2078
|
-
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2236
|
+
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react15.Box, { p: 4, borderTopWidth: 1, borderColor: "gray.100", children })
|
|
2079
2237
|
]
|
|
2080
2238
|
}
|
|
2081
2239
|
);
|
|
2082
2240
|
}
|
|
2083
2241
|
|
|
2084
2242
|
// src/NewSaleForm/LifePlanApplicationFormWrapper.tsx
|
|
2243
|
+
var import_st_peter_ui4 = require("st-peter-ui");
|
|
2085
2244
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2086
2245
|
var hasText = (value) => String(value ?? "").trim() !== "";
|
|
2087
2246
|
var isPersonalComplete = (p) => !!p && [
|
|
@@ -2110,14 +2269,15 @@ var isEmploymentComplete = (e) => !!e && [
|
|
|
2110
2269
|
var LifePlanApplicationFormWrapper = ({
|
|
2111
2270
|
openSection,
|
|
2112
2271
|
openSectionKey,
|
|
2113
|
-
onValidChange
|
|
2272
|
+
onValidChange,
|
|
2273
|
+
parseAddress
|
|
2114
2274
|
}) => {
|
|
2115
|
-
const [applicationData, setApplicationData] = (0,
|
|
2275
|
+
const [applicationData, setApplicationData] = (0, import_react18.useState)(
|
|
2116
2276
|
createEmptyApplicationData
|
|
2117
2277
|
);
|
|
2118
|
-
const [hydrated, setHydrated] = (0,
|
|
2119
|
-
const [openSections, setOpenSections] = (0,
|
|
2120
|
-
(0,
|
|
2278
|
+
const [hydrated, setHydrated] = (0, import_react18.useState)(false);
|
|
2279
|
+
const [openSections, setOpenSections] = (0, import_react18.useState)(["personal"]);
|
|
2280
|
+
(0, import_react18.useEffect)(() => {
|
|
2121
2281
|
const timeoutId = window.setTimeout(() => {
|
|
2122
2282
|
const saved = loadApplicationDataFromLocalStorage();
|
|
2123
2283
|
if (saved) setApplicationData(saved);
|
|
@@ -2125,15 +2285,15 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2125
2285
|
}, 0);
|
|
2126
2286
|
return () => window.clearTimeout(timeoutId);
|
|
2127
2287
|
}, []);
|
|
2128
|
-
(0,
|
|
2288
|
+
(0, import_react18.useEffect)(() => {
|
|
2129
2289
|
if (!hydrated) return;
|
|
2130
2290
|
saveApplicationDataToLocalStorage(applicationData);
|
|
2131
2291
|
}, [applicationData, hydrated]);
|
|
2132
2292
|
const isComplete = isPersonalComplete(applicationData.personalInfo) && isAddressComplete(applicationData.address);
|
|
2133
|
-
(0,
|
|
2293
|
+
(0, import_react18.useEffect)(() => {
|
|
2134
2294
|
onValidChange?.(isComplete);
|
|
2135
2295
|
}, [isComplete, onValidChange]);
|
|
2136
|
-
(0,
|
|
2296
|
+
(0, import_react18.useEffect)(() => {
|
|
2137
2297
|
if (!openSection) return;
|
|
2138
2298
|
const timer = window.setTimeout(() => {
|
|
2139
2299
|
setOpenSections(
|
|
@@ -2143,7 +2303,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2143
2303
|
}, 80);
|
|
2144
2304
|
return () => window.clearTimeout(timer);
|
|
2145
2305
|
}, [openSection, openSectionKey]);
|
|
2146
|
-
const handlePersonalInfoUpdate = (0,
|
|
2306
|
+
const handlePersonalInfoUpdate = (0, import_react18.useCallback)(
|
|
2147
2307
|
(personalInfo) => {
|
|
2148
2308
|
setApplicationData((prev) => ({
|
|
2149
2309
|
...prev,
|
|
@@ -2152,13 +2312,13 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2152
2312
|
},
|
|
2153
2313
|
[]
|
|
2154
2314
|
);
|
|
2155
|
-
const handleAddressUpdate = (0,
|
|
2315
|
+
const handleAddressUpdate = (0, import_react18.useCallback)((address) => {
|
|
2156
2316
|
setApplicationData((prev) => ({
|
|
2157
2317
|
...prev,
|
|
2158
2318
|
address
|
|
2159
2319
|
}));
|
|
2160
2320
|
}, []);
|
|
2161
|
-
const handleEmploymentUpdate = (0,
|
|
2321
|
+
const handleEmploymentUpdate = (0, import_react18.useCallback)((employment) => {
|
|
2162
2322
|
setApplicationData((prev) => ({
|
|
2163
2323
|
...prev,
|
|
2164
2324
|
employment
|
|
@@ -2185,7 +2345,13 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2185
2345
|
description: "Where you currently live",
|
|
2186
2346
|
value: "address",
|
|
2187
2347
|
complete: isAddressComplete(applicationData.address),
|
|
2188
|
-
page: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2348
|
+
page: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2349
|
+
LifePlanApplication2_default,
|
|
2350
|
+
{
|
|
2351
|
+
onAddressUpdate: handleAddressUpdate,
|
|
2352
|
+
...parseAddress ? { parseAddress } : {}
|
|
2353
|
+
}
|
|
2354
|
+
)
|
|
2189
2355
|
},
|
|
2190
2356
|
{
|
|
2191
2357
|
icon: import_io.IoIosInformationCircleOutline,
|
|
@@ -2209,23 +2375,23 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2209
2375
|
(prev) => prev.includes(value) ? prev.filter((sectionValue) => sectionValue !== value) : [...prev, value]
|
|
2210
2376
|
);
|
|
2211
2377
|
};
|
|
2212
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react17.Box, { w: "full", children: [
|
|
2213
2379
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2214
|
-
|
|
2380
|
+
import_react17.Flex,
|
|
2215
2381
|
{
|
|
2216
2382
|
direction: { base: "column", sm: "row" },
|
|
2217
2383
|
align: { base: "stretch", sm: "center" },
|
|
2218
2384
|
justify: "space-between",
|
|
2219
2385
|
gap: STANDARD_SPACING.sm,
|
|
2220
2386
|
mb: STANDARD_SPACING.sm,
|
|
2221
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2222
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2223
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2224
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react17.Flex, { direction: "column", gap: STANDARD_SPACING.xs, w: "full", children: [
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InfoCard, { children: "Sections below are expandable and collapsible. Use them to focus only on relevant details." }),
|
|
2389
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react17.Flex, { gap: STANDARD_SPACING.xs, justify: "flex-end", children: [
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_st_peter_ui4.TertiarySmButton, { onClick: expandAll, children: [
|
|
2225
2391
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lu3.LuChevronsDown, { size: 14 }),
|
|
2226
2392
|
"Expand All"
|
|
2227
2393
|
] }),
|
|
2228
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_st_peter_ui4.TertiarySmButton, { onClick: collapseAll, children: [
|
|
2229
2395
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lu3.LuChevronsUp, { size: 14 }),
|
|
2230
2396
|
"Collapse All"
|
|
2231
2397
|
] })
|
|
@@ -2233,15 +2399,15 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2233
2399
|
] })
|
|
2234
2400
|
}
|
|
2235
2401
|
),
|
|
2236
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2237
|
-
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react17.VStack, { align: "stretch", gap: 2, children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2403
|
+
import_react17.Box,
|
|
2238
2404
|
{
|
|
2239
2405
|
id: `app-section-${section.value}`,
|
|
2240
2406
|
scrollMarginTop: "80px",
|
|
2241
2407
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2242
2408
|
InputCardAccordion,
|
|
2243
2409
|
{
|
|
2244
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2410
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react17.Icon, { as: section.icon, boxSize: "18px" }),
|
|
2245
2411
|
title: section.label,
|
|
2246
2412
|
subtitle: section.description,
|
|
2247
2413
|
isOpen: openSections.includes(section.value),
|
|
@@ -2258,107 +2424,126 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2258
2424
|
var LifePlanApplicationFormWrapper_default = LifePlanApplicationFormWrapper;
|
|
2259
2425
|
|
|
2260
2426
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
2261
|
-
var
|
|
2262
|
-
var
|
|
2427
|
+
var import_react26 = require("@chakra-ui/react");
|
|
2428
|
+
var import_react27 = require("react");
|
|
2263
2429
|
|
|
2264
2430
|
// src/NewSaleForm/data/lifePlanSteps.tsx
|
|
2265
2431
|
var import_fa4 = require("react-icons/fa");
|
|
2266
2432
|
var import_io3 = require("react-icons/io");
|
|
2267
2433
|
|
|
2268
2434
|
// src/NewSaleForm/confirmation.tsx
|
|
2269
|
-
var
|
|
2270
|
-
var
|
|
2435
|
+
var import_react22 = require("@chakra-ui/react");
|
|
2436
|
+
var import_st_peter_ui6 = require("st-peter-ui");
|
|
2271
2437
|
var import_fa6 = require("react-icons/fa6");
|
|
2272
2438
|
var import_fa3 = require("react-icons/fa");
|
|
2273
2439
|
var import_io2 = require("react-icons/io");
|
|
2274
|
-
var
|
|
2440
|
+
var import_fi = require("react-icons/fi");
|
|
2441
|
+
var import_react23 = require("react");
|
|
2275
2442
|
|
|
2276
2443
|
// src/NewSaleForm/data/checkBoxList.tsx
|
|
2277
|
-
var
|
|
2278
|
-
var
|
|
2444
|
+
var import_react19 = require("@chakra-ui/react");
|
|
2445
|
+
var import_st_peter_ui5 = require("st-peter-ui");
|
|
2279
2446
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2280
2447
|
var checkboxList = [
|
|
2281
2448
|
{
|
|
2282
2449
|
title: "TERMS OF USE",
|
|
2283
2450
|
checkBoxTitle: "I hereby confirm that the information that I provided is correct and that I accept the TERMS AND CONDITIONS AND DATA PRIVACY AGREEMENT.",
|
|
2284
|
-
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2285
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2286
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2287
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2288
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2289
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2290
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2291
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2292
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2293
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2294
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2295
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2296
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2297
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2298
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2299
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2300
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2301
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2302
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2303
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2304
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2305
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2451
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react19.Box, { children: [
|
|
2452
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Please read these Terms and Conditions of Use carefully before using this website. Using this website means you have read, understood, agreed to and accepted these Terms and Conditions of Use. If you do not accept these Terms and Conditions of Use, do not use this website." }),
|
|
2453
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "CHANGES TO THIS TERMS AND USE" }),
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "St. Peter Group reserves the right to change these Terms and Conditions of Use from time to time, in whole or in part, without prior notice. Your continued use of this Website after changes to the Terms and Conditions of Use have been published constitutes your binding agreement and acceptance of the updated Terms and Conditions of Use. If at any time the Terms and Conditions of Use are not acceptable to you, you should immediately cease use of this website." }),
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "TRADEMARKS" }),
|
|
2456
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "The trademarks, logos, and service marks displayed on this Website are the properties of the St. Peter Group or the St. Peter Group. You are not permitted to use these items without the prior written consent of St. Peter Group or the St. Peter Group." }),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "INTELLECTUAL PROPERTY RIGHTS" }),
|
|
2458
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "The St. Peter Group owns the intellectual property rights in the content that is made available on this Website, or has obtained the permission of the proper owner/s to make such content available. The St. Peter Group strictly prohibits the redistribution or copying of this Website, in whole or in part, without written permission." }),
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "LINKS TO OTHER SITES" }),
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "This website contains links to other websites and are provided for convenience only. St. Peter Group has not reviewed the linked websites and is not responsible for the content or availability of any linked websites. Inclusion of any link does not imply endorsement." }),
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "SUBMISSION OF UNOFFICIAL IDEAS" }),
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "St. Peter Group does not accept unsolicited unofficial ideas. Do not send original creative artwork, samples, demos, or other works. Any submissions will not be treated as confidential or proprietary." }),
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "RULES OF CONDUCT" }),
|
|
2464
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Your use of this Website is subject to all applicable laws. Do not post threatening, abusive, defamatory, obscene, hateful, or illegal content. Do not upload harmful software or attempt to disrupt the Website." }),
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { mt: 2, children: "You may not post advertisements, political materials, chain letters, spam, or use robots or scraping tools. You may not harvest data without consent." }),
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "GLOBAL AVAILABILITY" }),
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "St. Peter Group manages this site from the Philippines. You are responsible for complying with local laws if used from other locations. Some products may not be available worldwide." }),
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "ACCURACY, COMPLETENESS AND TIMELINESS OF INFORMATION" }),
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "St. Peter Group is not responsible if information on this Website is inaccurate or incomplete for very specific needs. You are responsible for monitoring changes." }),
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "DISCLAIMER" }),
|
|
2471
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "The Website is provided \u201Cas is\u201D. St. Peter Group makes no warranties and is not liable for any damages, including loss of data, viruses, errors, or reliance on content." }),
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "LIMITATION OF LIABILITY" }),
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "St. Peter Group is not liable for any direct, indirect, punitive, special, incidental, or consequential damages, including loss of business or data." }),
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { mt: 2, children: "Some jurisdictions may not allow the exclusion of certain damages." }),
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "JURISDICTION" }),
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "These Terms are governed by Philippine law. If any provision is held invalid, the remainder stays effective." }),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "PRIVACY POLICY" }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Please read our Privacy Policy." }),
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react19.Separator, { my: 8 }),
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "HOW TO CONTACT US" }),
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "If you have any concern regarding these Terms of Use, contact us:" }),
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { mt: 2, fontWeight: "semibold", children: "For website concerns: ronagl@stpeter.com.ph" }),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { mt: 2, fontWeight: "semibold", children: "For data privacy concerns: joycemb@stpeter.com.ph" }),
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Small, { textAlign: "center", mt: 8, children: "This Terms of Use was amended on August 30, 2018" })
|
|
2306
2485
|
] })
|
|
2307
2486
|
},
|
|
2308
2487
|
{
|
|
2309
2488
|
title: "TERMS OF LIFE PLAN CONTRACT",
|
|
2310
2489
|
checkBoxTitle: "I hereby confirm that the information that I provided is correct and that I accept the TERMS OF LIFE PLAN CONTRACT.",
|
|
2311
|
-
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2312
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2313
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2314
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2315
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2316
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2317
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2318
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2319
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2320
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2321
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2322
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2323
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2324
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2325
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2326
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2327
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2328
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2329
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2330
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2331
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2332
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2333
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2334
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2335
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2336
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2337
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2338
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2490
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react19.Box, { children: [
|
|
2491
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "ARTICLE I. DEFINITION OF TERMS" }),
|
|
2492
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "ST. PETER" }),
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "ST. PETER LIFE PLAN, INC." }),
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "PLANHOLDER" }),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the person who purchases and owns the plan for whom or for whose beneficiaries benefits are to be delivered, as stipulated and guaranteed by ST. PETER. The term includes the assignee, transferee, and any successor-in-interest of the PLANHOLDER." }),
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Contract" }),
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the Life Plan Contract between ST. PETER and the PLANHOLDER providing the terms and conditions thereof." }),
|
|
2498
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Contract Price" }),
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the stipulated price of the Life Plan which may be paid either in lump sum or in installments, net of handling fees and other charges, if any." }),
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Gross Contract Price" }),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the stipulated price of the Life Plan which includes handling fees and other charges." }),
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Plan Installment" }),
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the monthly, quarterly, semi-annual or annual installment amounts paid by the PLANHOLDER." }),
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Paying Period" }),
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the period of time within which the PLANHOLDER has to pay for the Gross Contract Price of the plan in monthly, quarterly, semi-annual, annual installments or lump sum." }),
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Due Date" }),
|
|
2507
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the date when the PLANHOLDER\u2019s installment should be paid." }),
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Beneficiary" }),
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the person designated by the PLANHOLDER, in accordance with law, to receive the plan\u2019s insurance proceeds and/or pre-need benefits in case of unrendered service. The PLANHOLDER has the right to change the beneficiary/ies designated in the application subject to the submission of the standard form and approval." }),
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Grace Period" }),
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the sixty-day period given to the PLANHOLDER within which to pay accrued installments due, counted from the due date of the first unpaid installment in default, as stipulated in this Life Plan Contract." }),
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Lapsed Plan" }),
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to a delinquent plan which has remained unpaid beyond the grace period. A Lapsed Plan has no force and effect." }),
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Reinstatement" }),
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the process of reactivating a lapsed plan." }),
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Certificate of Full Payment" }),
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to ST. PETER\u2019s duly signed certification stating that a plan has been fully paid." }),
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "In Force Plan or Active Plan" }),
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to a pre-need plan for which ST. PETER has an outstanding obligation, either for (1) delivery of benefits or services or (2) payment of termination value." }),
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Mortuary Tie-Up" }),
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the memorial servicing tie-up or mortuary accredited with ST. PETER which renders the memorial services stipulated hereunder." }),
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Effective Date" }),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "Refers to the date when the payment of at least one (1) modal installment has been accepted and the purchase has been approved by ST. PETER with the issuance of this Contract and as indicated herein." })
|
|
2339
2524
|
] })
|
|
2340
2525
|
},
|
|
2341
2526
|
{
|
|
2342
2527
|
title: "OUR CUSTOMER SERVICE CHARTER",
|
|
2343
2528
|
checkBoxTitle: "I have read and understood the CUSTOMER SERVICE CHARTER.",
|
|
2344
|
-
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2345
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2346
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2347
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2529
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react19.Box, { children: [
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { children: "We at ST. PETER LIFE PLAN, INC. hold ourselves as DeathCare Experts who aspire to be the most trusted and reliable provider in your Pre-Need Life Plan needs. We also aim to deliver world-class DeathCare services to our planholders. At the core of our corporate values is customer satisfaction. We believe that every filipino family should have a St. Peter Life Plan. These are the pillars of our company\u2019s customer service commitment especially in our online facility and in social media." }),
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { fontWeight: "semibold", mt: 4, children: "Our customer service charter reflects our commitment to:" }),
|
|
2532
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react19.Box, { as: "ul", listStyleType: "circle", listStylePosition: "inside", children: [
|
|
2348
2533
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Safe and Secure Operations" }),
|
|
2349
2534
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Maintenance of Customer Privacy" }),
|
|
2350
2535
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Quality Services" }),
|
|
2351
2536
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Transparent Product Information" }),
|
|
2352
2537
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: "Prompt Response to Inquiries and Complaints" })
|
|
2353
2538
|
] }),
|
|
2354
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_st_peter_ui5.Body, { mt: 4, fontWeight: "semibold", children: "OUR CUSTOMER SERVICE STANDARDS AND COMMITMENTS" })
|
|
2355
2540
|
] })
|
|
2356
2541
|
}
|
|
2357
2542
|
];
|
|
2358
2543
|
|
|
2359
2544
|
// src/NewSaleForm/ui/info-card-accordion.tsx
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2545
|
+
var import_react20 = require("@chakra-ui/react");
|
|
2546
|
+
var import_react21 = require("react");
|
|
2362
2547
|
var import_lu4 = require("react-icons/lu");
|
|
2363
2548
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2364
2549
|
function InfoCardAccordion({
|
|
@@ -2372,7 +2557,7 @@ function InfoCardAccordion({
|
|
|
2372
2557
|
onToggle,
|
|
2373
2558
|
onEdit
|
|
2374
2559
|
}) {
|
|
2375
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2560
|
+
const [internalOpen, setInternalOpen] = (0, import_react21.useState)(defaultOpen);
|
|
2376
2561
|
const isControlled = controlledOpen !== void 0;
|
|
2377
2562
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
2378
2563
|
const toggle = () => {
|
|
@@ -2390,7 +2575,7 @@ function InfoCardAccordion({
|
|
|
2390
2575
|
};
|
|
2391
2576
|
const activeIcon = isOpen && openedIcon ? openedIcon : icon;
|
|
2392
2577
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2393
|
-
|
|
2578
|
+
import_react20.Box,
|
|
2394
2579
|
{
|
|
2395
2580
|
w: "full",
|
|
2396
2581
|
position: "relative",
|
|
@@ -2404,7 +2589,7 @@ function InfoCardAccordion({
|
|
|
2404
2589
|
cursor: "pointer",
|
|
2405
2590
|
children: [
|
|
2406
2591
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2407
|
-
|
|
2592
|
+
import_react20.Flex,
|
|
2408
2593
|
{
|
|
2409
2594
|
align: "center",
|
|
2410
2595
|
justify: "space-between",
|
|
@@ -2419,9 +2604,9 @@ function InfoCardAccordion({
|
|
|
2419
2604
|
_hover: { bg: "gray.50" },
|
|
2420
2605
|
transition: "background 0.15s ease",
|
|
2421
2606
|
children: [
|
|
2422
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Flex, { align: "center", gap: 2, children: [
|
|
2423
2608
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2424
|
-
|
|
2609
|
+
import_react20.Box,
|
|
2425
2610
|
{
|
|
2426
2611
|
p: 2,
|
|
2427
2612
|
borderRadius: "full",
|
|
@@ -2431,17 +2616,17 @@ function InfoCardAccordion({
|
|
|
2431
2616
|
children: activeIcon
|
|
2432
2617
|
}
|
|
2433
2618
|
),
|
|
2434
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2435
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2436
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Box, { children: [
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Text, { fontWeight: "bold", fontSize: "md", lineHeight: "1.2", children: title }),
|
|
2621
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Flex, { align: "center", gap: 1, fontSize: "xs", color: "gray.500", children: [
|
|
2437
2622
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuHash, { size: 12 }),
|
|
2438
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Text, { children: subtitle })
|
|
2439
2624
|
] })
|
|
2440
2625
|
] })
|
|
2441
2626
|
] }),
|
|
2442
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react20.Flex, { align: "center", gap: 1, flexShrink: 0, children: [
|
|
2443
2628
|
onEdit && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2444
|
-
|
|
2629
|
+
import_react20.Button,
|
|
2445
2630
|
{
|
|
2446
2631
|
variant: "ghost",
|
|
2447
2632
|
p: 0,
|
|
@@ -2453,15 +2638,15 @@ function InfoCardAccordion({
|
|
|
2453
2638
|
e.stopPropagation();
|
|
2454
2639
|
onEdit();
|
|
2455
2640
|
},
|
|
2456
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Icon, { as: import_lu4.LuPencil, boxSize: 4 })
|
|
2457
2642
|
}
|
|
2458
2643
|
),
|
|
2459
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Box, { color: "gray.400", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuChevronUp, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuChevronDown, { size: 16 }) })
|
|
2460
2645
|
] })
|
|
2461
2646
|
]
|
|
2462
2647
|
}
|
|
2463
2648
|
),
|
|
2464
|
-
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2649
|
+
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react20.Box, { p: 4, borderTopWidth: 1, borderColor: "gray.100", children })
|
|
2465
2650
|
]
|
|
2466
2651
|
}
|
|
2467
2652
|
);
|
|
@@ -2489,10 +2674,10 @@ var ApplicationAccordion = ({
|
|
|
2489
2674
|
items,
|
|
2490
2675
|
onEdit
|
|
2491
2676
|
}) => {
|
|
2492
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.VStack, { align: "stretch", gap: 3, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2493
2678
|
InfoCardAccordion,
|
|
2494
2679
|
{
|
|
2495
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2680
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Icon, { as: item.icon, boxSize: "18px" }),
|
|
2496
2681
|
title: item.label,
|
|
2497
2682
|
...item.subtitle !== void 0 ? { subtitle: item.subtitle } : {},
|
|
2498
2683
|
defaultOpen: index === 0,
|
|
@@ -2504,16 +2689,66 @@ var ApplicationAccordion = ({
|
|
|
2504
2689
|
};
|
|
2505
2690
|
var ReviewRows2 = ({
|
|
2506
2691
|
rows
|
|
2507
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2692
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.VStack, { align: "stretch", gap: 1, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RowItem, { label: row.label, value: row.value }, row.label)) });
|
|
2693
|
+
var FieldGrid = ({
|
|
2694
|
+
rows
|
|
2695
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.SimpleGrid, { columns: { base: 1, sm: 2 }, columnGap: 6, rowGap: 5, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Box, { minW: 0, children: [
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Text, { fontSize: "xs", color: "gray.500", mb: 1, children: row.label }),
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2698
|
+
import_react22.Text,
|
|
2699
|
+
{
|
|
2700
|
+
fontSize: "sm",
|
|
2701
|
+
fontWeight: "600",
|
|
2702
|
+
color: "gray.900",
|
|
2703
|
+
wordBreak: "break-word",
|
|
2704
|
+
children: row.value ?? "-"
|
|
2705
|
+
}
|
|
2706
|
+
)
|
|
2707
|
+
] }, row.label)) });
|
|
2708
|
+
var SectionCard = ({
|
|
2709
|
+
title,
|
|
2710
|
+
onEdit,
|
|
2711
|
+
children
|
|
2712
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2713
|
+
import_react22.Box,
|
|
2714
|
+
{
|
|
2715
|
+
css: { breakInside: "avoid" },
|
|
2716
|
+
mb: 6,
|
|
2717
|
+
bg: "white",
|
|
2718
|
+
borderWidth: "1px",
|
|
2719
|
+
borderColor: "gray.200",
|
|
2720
|
+
borderRadius: "xl",
|
|
2721
|
+
boxShadow: "sm",
|
|
2722
|
+
p: 6,
|
|
2723
|
+
children: [
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Flex, { justify: "space-between", align: "center", mb: 5, children: [
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Heading, { as: "h3", fontSize: "lg", fontWeight: "bold", color: "gray.900", children: title }),
|
|
2726
|
+
onEdit ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2727
|
+
import_react22.IconButton,
|
|
2728
|
+
{
|
|
2729
|
+
"aria-label": `Edit ${title}`,
|
|
2730
|
+
size: "sm",
|
|
2731
|
+
variant: "ghost",
|
|
2732
|
+
color: "gray.400",
|
|
2733
|
+
_hover: { color: "green.600", bg: "green.50" },
|
|
2734
|
+
onClick: onEdit,
|
|
2735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_fi.FiEdit2, {})
|
|
2736
|
+
}
|
|
2737
|
+
) : null
|
|
2738
|
+
] }),
|
|
2739
|
+
children
|
|
2740
|
+
]
|
|
2741
|
+
}
|
|
2742
|
+
);
|
|
2508
2743
|
var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
2509
|
-
const [cartItems, setCartItems] = (0,
|
|
2510
|
-
const [lifePlanApplication, setLifePlanApplication] = (0,
|
|
2511
|
-
const [openDialog, setOpenDialog] = (0,
|
|
2512
|
-
const [pendingCheck, setPendingCheck] = (0,
|
|
2513
|
-
const [acceptedAgreements, setAcceptedAgreements] = (0,
|
|
2744
|
+
const [cartItems, setCartItems] = (0, import_react23.useState)(null);
|
|
2745
|
+
const [lifePlanApplication, setLifePlanApplication] = (0, import_react23.useState)(null);
|
|
2746
|
+
const [openDialog, setOpenDialog] = (0, import_react23.useState)(false);
|
|
2747
|
+
const [pendingCheck, setPendingCheck] = (0, import_react23.useState)(null);
|
|
2748
|
+
const [acceptedAgreements, setAcceptedAgreements] = (0, import_react23.useState)(
|
|
2514
2749
|
() => checkboxList.map(() => false)
|
|
2515
2750
|
);
|
|
2516
|
-
(0,
|
|
2751
|
+
(0, import_react23.useEffect)(() => {
|
|
2517
2752
|
const loadStoredData = () => {
|
|
2518
2753
|
try {
|
|
2519
2754
|
const checkoutStored = sessionStorage.getItem("CheckoutCart");
|
|
@@ -2548,7 +2783,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2548
2783
|
const acceptedCount = acceptedAgreements.filter(Boolean).length;
|
|
2549
2784
|
const allAccepted = checkboxList.length > 0 && acceptedCount === checkboxList.length;
|
|
2550
2785
|
const pendingAgreement = pendingCheck !== null ? checkboxList[pendingCheck] : null;
|
|
2551
|
-
(0,
|
|
2786
|
+
(0, import_react23.useEffect)(() => {
|
|
2552
2787
|
onAllAcceptedChange?.(allAccepted);
|
|
2553
2788
|
}, [allAccepted, onAllAcceptedChange]);
|
|
2554
2789
|
const beneficiaries = [
|
|
@@ -2575,335 +2810,265 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2575
2810
|
setOpenDialog(false);
|
|
2576
2811
|
setPendingCheck(null);
|
|
2577
2812
|
};
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2813
|
+
const orderRows = [
|
|
2814
|
+
{ label: "Selected Plan", value: selectedPlan?.planDesc },
|
|
2815
|
+
{ label: "Quantity", value: selectedPlan?.quantity },
|
|
2816
|
+
{
|
|
2817
|
+
label: "Total Amount Payable",
|
|
2818
|
+
value: selectedPlan ? `\u20B1 ${selectedPlan.total}` : void 0
|
|
2819
|
+
}
|
|
2820
|
+
];
|
|
2821
|
+
const personalRows = [
|
|
2822
|
+
{ label: "Uploaded ID", value: lifePlanApplication?.personalInfo.idType },
|
|
2823
|
+
{ label: "Last Name", value: lifePlanApplication?.personalInfo.lastName },
|
|
2824
|
+
{ label: "First Name", value: lifePlanApplication?.personalInfo.firstName },
|
|
2825
|
+
{
|
|
2826
|
+
label: "Middle Name",
|
|
2827
|
+
value: lifePlanApplication?.personalInfo.middleName
|
|
2828
|
+
},
|
|
2829
|
+
{ label: "Suffix", value: lifePlanApplication?.personalInfo.suffix },
|
|
2830
|
+
{
|
|
2831
|
+
label: "Date of Birth",
|
|
2832
|
+
value: lifePlanApplication?.personalInfo.birthDate
|
|
2833
|
+
},
|
|
2834
|
+
{ label: "Gender", value: lifePlanApplication?.personalInfo.gender },
|
|
2835
|
+
{
|
|
2836
|
+
label: "Contact Number",
|
|
2837
|
+
value: lifePlanApplication?.personalInfo.mobileNumber
|
|
2838
|
+
},
|
|
2839
|
+
{ label: "Email", value: lifePlanApplication?.personalInfo.emailAddress },
|
|
2840
|
+
{
|
|
2841
|
+
label: "Landline Number",
|
|
2842
|
+
value: lifePlanApplication?.personalInfo.landLineNumber
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
label: "Mailing Address",
|
|
2846
|
+
value: lifePlanApplication?.personalInfo.mailingAddress
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
label: "Civil Status",
|
|
2850
|
+
value: lifePlanApplication?.personalInfo.civilStatus
|
|
2851
|
+
}
|
|
2852
|
+
];
|
|
2853
|
+
const addressRows = [
|
|
2854
|
+
{ label: "Lot #", value: lifePlanApplication?.address.lot },
|
|
2855
|
+
{ label: "Street", value: lifePlanApplication?.address.street },
|
|
2856
|
+
{ label: "Barangay", value: lifePlanApplication?.address.barangay },
|
|
2857
|
+
{ label: "City", value: lifePlanApplication?.address.city },
|
|
2858
|
+
{ label: "Province", value: lifePlanApplication?.address.province }
|
|
2859
|
+
];
|
|
2860
|
+
const employmentRows = [
|
|
2861
|
+
{ label: "Occupation", value: lifePlanApplication?.employment.occupation },
|
|
2862
|
+
{
|
|
2863
|
+
label: "Employer Name",
|
|
2864
|
+
value: lifePlanApplication?.employment.employerName
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
label: "Employment Status",
|
|
2868
|
+
value: lifePlanApplication?.employment.employmentStatus
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
label: "Office Address",
|
|
2872
|
+
value: lifePlanApplication?.employment.officeAddress
|
|
2873
|
+
},
|
|
2874
|
+
{ label: "TIN", value: lifePlanApplication?.employment.TIN },
|
|
2875
|
+
{ label: "SSS/GSIS", value: lifePlanApplication?.employment.SSS },
|
|
2876
|
+
{
|
|
2877
|
+
label: "Source of Income",
|
|
2878
|
+
value: lifePlanApplication?.employment.sourceOfIncome
|
|
2879
|
+
}
|
|
2880
|
+
];
|
|
2881
|
+
const beneficiaryItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.VStack, { align: "stretch", gap: 4, children: beneficiaries.map((beneficiary, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Box, { children: [
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Text, { fontWeight: "semibold", fontSize: "sm", mb: 1, children: beneficiary.name }),
|
|
2607
2883
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2608
|
-
|
|
2884
|
+
ReviewRows2,
|
|
2609
2885
|
{
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
{
|
|
2614
|
-
icon: import_fa3.FaRegUser,
|
|
2615
|
-
label: "Personal Info",
|
|
2616
|
-
subtitle: "Identification and full name",
|
|
2617
|
-
value: "personal",
|
|
2618
|
-
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2619
|
-
ReviewRows2,
|
|
2620
|
-
{
|
|
2621
|
-
rows: [
|
|
2622
|
-
{
|
|
2623
|
-
label: "Uploaded ID",
|
|
2624
|
-
value: lifePlanApplication?.personalInfo.idType
|
|
2625
|
-
},
|
|
2626
|
-
{
|
|
2627
|
-
label: "Last Name",
|
|
2628
|
-
value: lifePlanApplication?.personalInfo.lastName
|
|
2629
|
-
},
|
|
2630
|
-
{
|
|
2631
|
-
label: "First Name",
|
|
2632
|
-
value: lifePlanApplication?.personalInfo.firstName
|
|
2633
|
-
},
|
|
2634
|
-
{
|
|
2635
|
-
label: "Middle Name",
|
|
2636
|
-
value: lifePlanApplication?.personalInfo.middleName
|
|
2637
|
-
},
|
|
2638
|
-
{
|
|
2639
|
-
label: "Suffix",
|
|
2640
|
-
value: lifePlanApplication?.personalInfo.suffix
|
|
2641
|
-
},
|
|
2642
|
-
{
|
|
2643
|
-
label: "Date of Birth",
|
|
2644
|
-
value: lifePlanApplication?.personalInfo.birthDate
|
|
2645
|
-
},
|
|
2646
|
-
{
|
|
2647
|
-
label: "Gender",
|
|
2648
|
-
value: lifePlanApplication?.personalInfo.gender
|
|
2649
|
-
},
|
|
2650
|
-
{
|
|
2651
|
-
label: "Contact Number",
|
|
2652
|
-
value: lifePlanApplication?.personalInfo.mobileNumber
|
|
2653
|
-
},
|
|
2654
|
-
{
|
|
2655
|
-
label: "Email",
|
|
2656
|
-
value: lifePlanApplication?.personalInfo.emailAddress
|
|
2657
|
-
},
|
|
2658
|
-
{
|
|
2659
|
-
label: "Landline Number",
|
|
2660
|
-
value: lifePlanApplication?.personalInfo.landLineNumber
|
|
2661
|
-
},
|
|
2662
|
-
{
|
|
2663
|
-
label: "Mailing Address",
|
|
2664
|
-
value: lifePlanApplication?.personalInfo.mailingAddress
|
|
2665
|
-
},
|
|
2666
|
-
{
|
|
2667
|
-
label: "Civil Status",
|
|
2668
|
-
value: lifePlanApplication?.personalInfo.civilStatus
|
|
2669
|
-
}
|
|
2670
|
-
]
|
|
2671
|
-
}
|
|
2672
|
-
)
|
|
2673
|
-
},
|
|
2674
|
-
{
|
|
2675
|
-
icon: import_fa6.FaRegAddressCard,
|
|
2676
|
-
label: "Address",
|
|
2677
|
-
subtitle: "Where you currently live",
|
|
2678
|
-
value: "address",
|
|
2679
|
-
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2680
|
-
ReviewRows2,
|
|
2681
|
-
{
|
|
2682
|
-
rows: [
|
|
2683
|
-
{
|
|
2684
|
-
label: "Lot #",
|
|
2685
|
-
value: lifePlanApplication?.address.lot
|
|
2686
|
-
},
|
|
2687
|
-
{
|
|
2688
|
-
label: "Street",
|
|
2689
|
-
value: lifePlanApplication?.address.street
|
|
2690
|
-
},
|
|
2691
|
-
{
|
|
2692
|
-
label: "Barangay",
|
|
2693
|
-
value: lifePlanApplication?.address.barangay
|
|
2694
|
-
},
|
|
2695
|
-
{
|
|
2696
|
-
label: "City",
|
|
2697
|
-
value: lifePlanApplication?.address.city
|
|
2698
|
-
},
|
|
2699
|
-
{
|
|
2700
|
-
label: "Province",
|
|
2701
|
-
value: lifePlanApplication?.address.province
|
|
2702
|
-
}
|
|
2703
|
-
]
|
|
2704
|
-
}
|
|
2705
|
-
)
|
|
2706
|
-
},
|
|
2707
|
-
{
|
|
2708
|
-
icon: import_io2.IoIosInformationCircleOutline,
|
|
2709
|
-
label: "Employment",
|
|
2710
|
-
subtitle: "Work and income details",
|
|
2711
|
-
value: "employment",
|
|
2712
|
-
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2713
|
-
ReviewRows2,
|
|
2714
|
-
{
|
|
2715
|
-
rows: [
|
|
2716
|
-
{
|
|
2717
|
-
label: "Occupation",
|
|
2718
|
-
value: lifePlanApplication?.employment.occupation
|
|
2719
|
-
},
|
|
2720
|
-
{
|
|
2721
|
-
label: "Employer Name",
|
|
2722
|
-
value: lifePlanApplication?.employment.employerName
|
|
2723
|
-
},
|
|
2724
|
-
{
|
|
2725
|
-
label: "Employment Status",
|
|
2726
|
-
value: lifePlanApplication?.employment.employmentStatus
|
|
2727
|
-
},
|
|
2728
|
-
{
|
|
2729
|
-
label: "Office Address",
|
|
2730
|
-
value: lifePlanApplication?.employment.officeAddress
|
|
2731
|
-
},
|
|
2732
|
-
{
|
|
2733
|
-
label: "TIN",
|
|
2734
|
-
value: lifePlanApplication?.employment.TIN
|
|
2735
|
-
},
|
|
2736
|
-
{
|
|
2737
|
-
label: "SSS/GSIS",
|
|
2738
|
-
value: lifePlanApplication?.employment.SSS
|
|
2739
|
-
},
|
|
2740
|
-
{
|
|
2741
|
-
label: "Source of Income",
|
|
2742
|
-
value: lifePlanApplication?.employment.sourceOfIncome
|
|
2743
|
-
}
|
|
2744
|
-
]
|
|
2745
|
-
}
|
|
2746
|
-
)
|
|
2747
|
-
}
|
|
2886
|
+
rows: [
|
|
2887
|
+
{ label: "Relationship", value: beneficiary.relationship },
|
|
2888
|
+
{ label: "Date of Birth", value: beneficiary.dob },
|
|
2889
|
+
{ label: "Address", value: beneficiary.address }
|
|
2748
2890
|
]
|
|
2749
2891
|
}
|
|
2750
|
-
)
|
|
2751
|
-
|
|
2752
|
-
|
|
2892
|
+
)
|
|
2893
|
+
] }, `${beneficiary.name}-${index}`)) });
|
|
2894
|
+
const agreementItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.VStack, { align: "stretch", gap: 3, children: checkboxList.map((item, index) => {
|
|
2895
|
+
const isAccepted = acceptedAgreements[index];
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2897
|
+
import_react22.Box,
|
|
2753
2898
|
{
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2899
|
+
role: "button",
|
|
2900
|
+
tabIndex: 0,
|
|
2901
|
+
p: 4,
|
|
2902
|
+
borderWidth: "1px",
|
|
2903
|
+
rounded: "xl",
|
|
2904
|
+
bg: isAccepted ? "green.50" : "gray.50",
|
|
2905
|
+
transition: "all 0.15s ease",
|
|
2906
|
+
_hover: { bg: isAccepted ? "green.100" : "gray.100" },
|
|
2907
|
+
onClick: () => {
|
|
2908
|
+
setPendingCheck(index);
|
|
2909
|
+
setOpenDialog(true);
|
|
2910
|
+
},
|
|
2911
|
+
onKeyDown: (e) => {
|
|
2912
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2913
|
+
e.preventDefault();
|
|
2914
|
+
setPendingCheck(index);
|
|
2915
|
+
setOpenDialog(true);
|
|
2916
|
+
}
|
|
2917
|
+
},
|
|
2918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Flex, { justify: "space-between", align: "start", gap: 4, children: [
|
|
2919
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Box, { flex: "1", minW: 0, children: [
|
|
2920
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Text, { fontWeight: "semibold", lineClamp: 2, children: [
|
|
2921
|
+
item.checkBoxTitle,
|
|
2922
|
+
"."
|
|
2923
|
+
] }),
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Text, { fontSize: "sm", color: "gray.600", mt: 1, lineClamp: 1, children: "Tap to review details." })
|
|
2925
|
+
] }),
|
|
2759
2926
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2760
|
-
|
|
2927
|
+
import_react22.Badge,
|
|
2761
2928
|
{
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
value: beneficiary.relationship
|
|
2766
|
-
},
|
|
2767
|
-
{
|
|
2768
|
-
label: "Date of Birth",
|
|
2769
|
-
value: beneficiary.dob
|
|
2770
|
-
},
|
|
2771
|
-
{
|
|
2772
|
-
label: "Address",
|
|
2773
|
-
value: beneficiary.address
|
|
2774
|
-
}
|
|
2775
|
-
]
|
|
2929
|
+
variant: "subtle",
|
|
2930
|
+
colorPalette: isAccepted ? "green" : "gray",
|
|
2931
|
+
children: isAccepted ? "Accepted" : "Review"
|
|
2776
2932
|
}
|
|
2777
2933
|
)
|
|
2778
|
-
] }
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2934
|
+
] })
|
|
2935
|
+
},
|
|
2936
|
+
index
|
|
2937
|
+
);
|
|
2938
|
+
}) });
|
|
2939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Box, { minH: "100vh", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Box, { px: { base: 0, md: 8 }, pb: { base: 4, md: 8 }, children: [
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Box, { display: { base: "block", lg: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.VStack, { align: "stretch", gap: 3, children: [
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2942
|
+
InfoCardAccordion,
|
|
2943
|
+
{
|
|
2944
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
2945
|
+
title: "Order Summary",
|
|
2946
|
+
subtitle: modeLabel(selectedPlan?.mode),
|
|
2947
|
+
defaultOpen: true,
|
|
2948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ReviewRows2, { rows: orderRows })
|
|
2949
|
+
}
|
|
2950
|
+
),
|
|
2951
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2952
|
+
ApplicationAccordion,
|
|
2953
|
+
{
|
|
2954
|
+
onEdit: onEdit ?? (() => {
|
|
2955
|
+
}),
|
|
2956
|
+
items: [
|
|
2791
2957
|
{
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
bg: isAccepted ? "green.50" : "gray.50",
|
|
2798
|
-
transition: "all 0.15s ease",
|
|
2799
|
-
_hover: { bg: isAccepted ? "green.100" : "gray.100" },
|
|
2800
|
-
onClick: () => {
|
|
2801
|
-
setPendingCheck(index);
|
|
2802
|
-
setOpenDialog(true);
|
|
2803
|
-
},
|
|
2804
|
-
onKeyDown: (e) => {
|
|
2805
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
2806
|
-
e.preventDefault();
|
|
2807
|
-
setPendingCheck(index);
|
|
2808
|
-
setOpenDialog(true);
|
|
2809
|
-
}
|
|
2810
|
-
},
|
|
2811
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Flex, { justify: "space-between", align: "start", gap: 4, children: [
|
|
2812
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Box, { flex: "1", minW: 0, children: [
|
|
2813
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Text, { fontWeight: "semibold", lineClamp: 2, children: [
|
|
2814
|
-
item.checkBoxTitle,
|
|
2815
|
-
"."
|
|
2816
|
-
] }),
|
|
2817
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2818
|
-
import_react23.Text,
|
|
2819
|
-
{
|
|
2820
|
-
fontSize: "sm",
|
|
2821
|
-
color: "gray.600",
|
|
2822
|
-
mt: 1,
|
|
2823
|
-
lineClamp: 1,
|
|
2824
|
-
children: "Tap to review details."
|
|
2825
|
-
}
|
|
2826
|
-
)
|
|
2827
|
-
] }),
|
|
2828
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2829
|
-
import_react23.Badge,
|
|
2830
|
-
{
|
|
2831
|
-
variant: "subtle",
|
|
2832
|
-
colorPalette: isAccepted ? "green" : "gray",
|
|
2833
|
-
children: isAccepted ? "Accepted" : "Review"
|
|
2834
|
-
}
|
|
2835
|
-
)
|
|
2836
|
-
] })
|
|
2958
|
+
icon: import_fa3.FaRegUser,
|
|
2959
|
+
label: "Personal Info",
|
|
2960
|
+
subtitle: "Identification and full name",
|
|
2961
|
+
value: "personal",
|
|
2962
|
+
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ReviewRows2, { rows: personalRows })
|
|
2837
2963
|
},
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2964
|
+
{
|
|
2965
|
+
icon: import_fa6.FaRegAddressCard,
|
|
2966
|
+
label: "Address",
|
|
2967
|
+
subtitle: "Where you currently live",
|
|
2968
|
+
value: "address",
|
|
2969
|
+
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ReviewRows2, { rows: addressRows })
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
icon: import_io2.IoIosInformationCircleOutline,
|
|
2973
|
+
label: "Employment",
|
|
2974
|
+
subtitle: "Work and income details",
|
|
2975
|
+
value: "employment",
|
|
2976
|
+
page: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ReviewRows2, { rows: employmentRows })
|
|
2977
|
+
}
|
|
2978
|
+
]
|
|
2979
|
+
}
|
|
2980
|
+
),
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2982
|
+
InfoCardAccordion,
|
|
2983
|
+
{
|
|
2984
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Icon, { as: import_fa3.FaRegUser, boxSize: "18px" }),
|
|
2985
|
+
title: "Beneficiaries",
|
|
2986
|
+
subtitle: `${beneficiaries.length} listed`,
|
|
2987
|
+
children: beneficiaryItems
|
|
2988
|
+
}
|
|
2989
|
+
),
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2991
|
+
InfoCardAccordion,
|
|
2992
|
+
{
|
|
2993
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
2994
|
+
title: "Agreements",
|
|
2995
|
+
subtitle: `${acceptedCount}/${checkboxList.length} accepted`,
|
|
2996
|
+
children: agreementItems
|
|
2997
|
+
}
|
|
2998
|
+
)
|
|
2999
|
+
] }) }),
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3001
|
+
import_react22.Box,
|
|
3002
|
+
{
|
|
3003
|
+
display: { base: "none", lg: "block" },
|
|
3004
|
+
css: { columnCount: 2, columnGap: "24px" },
|
|
3005
|
+
children: [
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3007
|
+
SectionCard,
|
|
3008
|
+
{
|
|
3009
|
+
title: "Personal Information",
|
|
3010
|
+
onEdit: () => onEdit?.("personal"),
|
|
3011
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: personalRows })
|
|
3012
|
+
}
|
|
3013
|
+
),
|
|
3014
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Order Summary", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: orderRows }) }),
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Address", onEdit: () => onEdit?.("address"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: addressRows }) }),
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Employment", onEdit: () => onEdit?.("employment"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: employmentRows }) }),
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Beneficiaries", children: beneficiaryItems }),
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(SectionCard, { title: "Agreements", children: [
|
|
3019
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Text, { fontSize: "xs", color: "gray.500", mb: 4, children: [
|
|
3020
|
+
acceptedCount,
|
|
3021
|
+
"/",
|
|
3022
|
+
checkboxList.length,
|
|
3023
|
+
" accepted"
|
|
3024
|
+
] }),
|
|
3025
|
+
agreementItems
|
|
3026
|
+
] })
|
|
3027
|
+
]
|
|
2841
3028
|
}
|
|
2842
3029
|
),
|
|
2843
3030
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2844
|
-
|
|
3031
|
+
import_react22.Dialog.Root,
|
|
2845
3032
|
{
|
|
2846
3033
|
open: openDialog,
|
|
2847
3034
|
onOpenChange: (details) => setOpenDialog(details.open),
|
|
2848
3035
|
size: { mdDown: "full", md: "xl" },
|
|
2849
3036
|
scrollBehavior: "inside",
|
|
2850
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2851
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2852
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2853
|
-
|
|
3037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Portal, { children: [
|
|
3038
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Dialog.Backdrop, { backdropFilter: "blur(6px)" }),
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3040
|
+
import_react22.Dialog.Content,
|
|
2854
3041
|
{
|
|
2855
3042
|
bg: "white",
|
|
2856
3043
|
rounded: "xl",
|
|
2857
3044
|
shadow: "lg",
|
|
2858
3045
|
overflow: "hidden",
|
|
2859
3046
|
children: [
|
|
2860
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2861
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2862
|
-
|
|
2863
|
-
{
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
children: pendingCheck !== null ? pendingAgreement?.description || "Please review and confirm before proceeding." : "Please review and confirm before proceeding."
|
|
2879
|
-
}
|
|
2880
|
-
) }) }),
|
|
2881
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2882
|
-
import_react23.Dialog.Footer,
|
|
2883
|
-
{
|
|
2884
|
-
px: { base: 4, md: 6 },
|
|
2885
|
-
pb: { base: 5, md: 6 },
|
|
2886
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.HStack, { justify: "flex-end", gap: 3, w: "full", children: [
|
|
2887
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2888
|
-
import_st_peter_ui5.CancelButton,
|
|
2889
|
-
{
|
|
2890
|
-
onClick: () => {
|
|
2891
|
-
setOpenDialog(false);
|
|
2892
|
-
setPendingCheck(null);
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
),
|
|
2896
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_st_peter_ui5.ConfirmButton, { onClick: confirmAgreement })
|
|
2897
|
-
] })
|
|
2898
|
-
}
|
|
2899
|
-
)
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.CloseButton, { position: "absolute", top: 3, right: 3 }) }),
|
|
3048
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.Dialog.Header, { px: { base: 4, md: 6 }, pt: { base: 5, md: 6 }, children: [
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_st_peter_ui6.H3, { children: pendingCheck !== null ? pendingAgreement?.title || "Agreement" : "Agreement" }),
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Text, { fontSize: "sm", color: "gray.600", mt: 2, children: "Please read carefully. Confirm to accept this agreement." })
|
|
3051
|
+
] }),
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Dialog.Body, { px: { base: 4, md: 6 }, pb: { base: 5, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Box, { p: 4, borderWidth: "0px", rounded: "lg", bg: "gray.50", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Text, { whiteSpace: "pre-wrap", fontSize: "sm", color: "gray.800", children: pendingCheck !== null ? pendingAgreement?.description || "Please review and confirm before proceeding." : "Please review and confirm before proceeding." }) }) }),
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react22.Dialog.Footer, { px: { base: 4, md: 6 }, pb: { base: 5, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react22.HStack, { justify: "flex-end", gap: 3, w: "full", children: [
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3055
|
+
import_st_peter_ui6.CancelButton,
|
|
3056
|
+
{
|
|
3057
|
+
onClick: () => {
|
|
3058
|
+
setOpenDialog(false);
|
|
3059
|
+
setPendingCheck(null);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
),
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_st_peter_ui6.ConfirmButton, { onClick: confirmAgreement })
|
|
3064
|
+
] }) })
|
|
2900
3065
|
]
|
|
2901
3066
|
}
|
|
2902
3067
|
) })
|
|
2903
3068
|
] })
|
|
2904
3069
|
}
|
|
2905
3070
|
)
|
|
2906
|
-
] }) })
|
|
3071
|
+
] }) });
|
|
2907
3072
|
};
|
|
2908
3073
|
var confirmation_default = Confirmation;
|
|
2909
3074
|
|
|
@@ -2927,6 +3092,9 @@ var createLifePlanSteps = (confirmationProps) => [
|
|
|
2927
3092
|
if (confirmationProps?.onApplicationValidChange !== void 0) {
|
|
2928
3093
|
applicationFormWrapperProps.onValidChange = confirmationProps.onApplicationValidChange;
|
|
2929
3094
|
}
|
|
3095
|
+
if (confirmationProps?.parseAddress !== void 0) {
|
|
3096
|
+
applicationFormWrapperProps.parseAddress = confirmationProps.parseAddress;
|
|
3097
|
+
}
|
|
2930
3098
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LifePlanApplicationFormWrapper_default, { ...applicationFormWrapperProps });
|
|
2931
3099
|
})()
|
|
2932
3100
|
},
|
|
@@ -2971,9 +3139,9 @@ var createLifePlanSteps = (confirmationProps) => [
|
|
|
2971
3139
|
];
|
|
2972
3140
|
|
|
2973
3141
|
// src/NewSaleForm/ui/horizontal-stepper.tsx
|
|
2974
|
-
var
|
|
2975
|
-
var
|
|
2976
|
-
var
|
|
3142
|
+
var import_react24 = require("react");
|
|
3143
|
+
var import_react25 = require("@chakra-ui/react");
|
|
3144
|
+
var import_st_peter_ui7 = require("st-peter-ui");
|
|
2977
3145
|
var import_lu5 = require("react-icons/lu");
|
|
2978
3146
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2979
3147
|
var PRIMARY = "var(--chakra-colors-primary)";
|
|
@@ -2990,9 +3158,9 @@ var HorizontalStepper = ({
|
|
|
2990
3158
|
nextDisabled,
|
|
2991
3159
|
submitButtonText = "Proceed To Payment"
|
|
2992
3160
|
}) => {
|
|
2993
|
-
const [localActiveStep, setLocalActiveStep] = (0,
|
|
3161
|
+
const [localActiveStep, setLocalActiveStep] = (0, import_react24.useState)(0);
|
|
2994
3162
|
const activeStep = controlledActiveStep !== void 0 ? controlledActiveStep : localActiveStep;
|
|
2995
|
-
const formTopRef = (0,
|
|
3163
|
+
const formTopRef = (0, import_react24.useRef)(null);
|
|
2996
3164
|
const isCompact = steps.length < 3;
|
|
2997
3165
|
const isLastStep = activeStep === steps.length - 1;
|
|
2998
3166
|
const nextStepTitle = steps[activeStep + 1]?.title;
|
|
@@ -3016,7 +3184,7 @@ var HorizontalStepper = ({
|
|
|
3016
3184
|
handleStepChange(Math.min(activeStep + 1, steps.length - 1));
|
|
3017
3185
|
};
|
|
3018
3186
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3019
|
-
|
|
3187
|
+
import_react25.Flex,
|
|
3020
3188
|
{
|
|
3021
3189
|
direction: "column",
|
|
3022
3190
|
align: "start",
|
|
@@ -3025,9 +3193,10 @@ var HorizontalStepper = ({
|
|
|
3025
3193
|
overflow: "visible",
|
|
3026
3194
|
pb: { base: "12px", md: "0px" },
|
|
3027
3195
|
children: [
|
|
3028
|
-
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Box, { ref: formTopRef, h: "0", w: "full", scrollMarginTop: { base: 4, md: 6 } }),
|
|
3197
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react25.Box, { mb: 4, children: [
|
|
3029
3198
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3030
|
-
|
|
3199
|
+
import_react25.Box,
|
|
3031
3200
|
{
|
|
3032
3201
|
as: "h1",
|
|
3033
3202
|
m: "0",
|
|
@@ -3043,10 +3212,10 @@ var HorizontalStepper = ({
|
|
|
3043
3212
|
children: title
|
|
3044
3213
|
}
|
|
3045
3214
|
),
|
|
3046
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3215
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Text, { fontSize: "sm", color: "gray.500", mt: 1, children: description })
|
|
3047
3216
|
] }),
|
|
3048
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3049
|
-
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Box, { w: "full", rounded: "2xl", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3218
|
+
import_react25.Steps.Root,
|
|
3050
3219
|
{
|
|
3051
3220
|
step: activeStep,
|
|
3052
3221
|
onStepChange: (index) => handleStepChange(index.step),
|
|
@@ -3055,7 +3224,7 @@ var HorizontalStepper = ({
|
|
|
3055
3224
|
colorPalette: "green",
|
|
3056
3225
|
children: [
|
|
3057
3226
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3058
|
-
|
|
3227
|
+
import_react25.Box,
|
|
3059
3228
|
{
|
|
3060
3229
|
position: "sticky",
|
|
3061
3230
|
top: 0,
|
|
@@ -3070,7 +3239,7 @@ var HorizontalStepper = ({
|
|
|
3070
3239
|
boxShadow: "0 2px 8px -2px rgba(0,0,0,0.06)",
|
|
3071
3240
|
children: [
|
|
3072
3241
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3073
|
-
|
|
3242
|
+
import_react25.Steps.List,
|
|
3074
3243
|
{
|
|
3075
3244
|
py: 0,
|
|
3076
3245
|
flexDirection: "row",
|
|
@@ -3081,7 +3250,7 @@ var HorizontalStepper = ({
|
|
|
3081
3250
|
const isCompleted = index < activeStep;
|
|
3082
3251
|
const isActive = index === activeStep;
|
|
3083
3252
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3084
|
-
|
|
3253
|
+
import_react25.Steps.Item,
|
|
3085
3254
|
{
|
|
3086
3255
|
index,
|
|
3087
3256
|
title: step.title,
|
|
@@ -3089,7 +3258,7 @@ var HorizontalStepper = ({
|
|
|
3089
3258
|
flex: isCompact ? "0 0 auto" : "1",
|
|
3090
3259
|
children: [
|
|
3091
3260
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3092
|
-
|
|
3261
|
+
import_react25.Steps.Trigger,
|
|
3093
3262
|
{
|
|
3094
3263
|
flexDirection: isCompact ? "row" : "column",
|
|
3095
3264
|
alignItems: "center",
|
|
@@ -3101,7 +3270,7 @@ var HorizontalStepper = ({
|
|
|
3101
3270
|
_hover: { bg: "gray.50" },
|
|
3102
3271
|
children: [
|
|
3103
3272
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3104
|
-
|
|
3273
|
+
import_react25.Steps.Indicator,
|
|
3105
3274
|
{
|
|
3106
3275
|
borderWidth: "2px",
|
|
3107
3276
|
transition: "all 0.25s",
|
|
@@ -3111,11 +3280,11 @@ var HorizontalStepper = ({
|
|
|
3111
3280
|
color: isCompleted ? "white" : isActive ? PRIMARY : void 0,
|
|
3112
3281
|
boxShadow: isActive ? `0 0 0 3px ${PRIMARY_DISABLED}` : "none"
|
|
3113
3282
|
},
|
|
3114
|
-
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuCheck, { size: 14 }) : step.icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3283
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuCheck, { size: 14 }) : step.icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Box, { as: step.icon, w: 4, h: 4 }) : null
|
|
3115
3284
|
}
|
|
3116
3285
|
),
|
|
3117
3286
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3118
|
-
|
|
3287
|
+
import_react25.Steps.Title,
|
|
3119
3288
|
{
|
|
3120
3289
|
fontSize: { base: "xs", md: "sm" },
|
|
3121
3290
|
textAlign: isCompact ? "left" : "center",
|
|
@@ -3131,7 +3300,7 @@ var HorizontalStepper = ({
|
|
|
3131
3300
|
}
|
|
3132
3301
|
),
|
|
3133
3302
|
!isCompact && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3134
|
-
|
|
3303
|
+
import_react25.Steps.Separator,
|
|
3135
3304
|
{
|
|
3136
3305
|
display: { base: "none", md: "block" }
|
|
3137
3306
|
}
|
|
@@ -3144,7 +3313,7 @@ var HorizontalStepper = ({
|
|
|
3144
3313
|
}
|
|
3145
3314
|
),
|
|
3146
3315
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3147
|
-
|
|
3316
|
+
import_react25.Box,
|
|
3148
3317
|
{
|
|
3149
3318
|
w: "full",
|
|
3150
3319
|
h: "3px",
|
|
@@ -3153,7 +3322,7 @@ var HorizontalStepper = ({
|
|
|
3153
3322
|
overflow: "hidden",
|
|
3154
3323
|
mt: 1,
|
|
3155
3324
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3156
|
-
|
|
3325
|
+
import_react25.Box,
|
|
3157
3326
|
{
|
|
3158
3327
|
h: "full",
|
|
3159
3328
|
bg: PRIMARY,
|
|
@@ -3166,9 +3335,9 @@ var HorizontalStepper = ({
|
|
|
3166
3335
|
]
|
|
3167
3336
|
}
|
|
3168
3337
|
),
|
|
3169
|
-
steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3338
|
+
steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Steps.Content, { index, children: step.component ?? step.description }, index)),
|
|
3170
3339
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3171
|
-
|
|
3340
|
+
import_react25.Flex,
|
|
3172
3341
|
{
|
|
3173
3342
|
w: "full",
|
|
3174
3343
|
justify: "space-between",
|
|
@@ -3177,8 +3346,8 @@ var HorizontalStepper = ({
|
|
|
3177
3346
|
gap: 2,
|
|
3178
3347
|
display: { base: "flex", md: "none" },
|
|
3179
3348
|
children: [
|
|
3180
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3181
|
-
|
|
3349
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Steps.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3350
|
+
import_react25.Box,
|
|
3182
3351
|
{
|
|
3183
3352
|
as: "button",
|
|
3184
3353
|
display: "flex",
|
|
@@ -3204,7 +3373,7 @@ var HorizontalStepper = ({
|
|
|
3204
3373
|
}
|
|
3205
3374
|
) }),
|
|
3206
3375
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3207
|
-
|
|
3376
|
+
import_react25.Box,
|
|
3208
3377
|
{
|
|
3209
3378
|
as: "button",
|
|
3210
3379
|
display: "flex",
|
|
@@ -3229,7 +3398,7 @@ var HorizontalStepper = ({
|
|
|
3229
3398
|
]
|
|
3230
3399
|
}
|
|
3231
3400
|
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3232
|
-
|
|
3401
|
+
import_react25.Box,
|
|
3233
3402
|
{
|
|
3234
3403
|
as: "button",
|
|
3235
3404
|
display: "flex",
|
|
@@ -3258,18 +3427,18 @@ var HorizontalStepper = ({
|
|
|
3258
3427
|
}
|
|
3259
3428
|
),
|
|
3260
3429
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3261
|
-
|
|
3430
|
+
import_react25.ButtonGroup,
|
|
3262
3431
|
{
|
|
3263
3432
|
size: "sm",
|
|
3264
3433
|
variant: "outline",
|
|
3265
3434
|
display: { base: "none", md: "flex" },
|
|
3266
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3267
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react25.Flex, { mt: 5, w: "full", align: "center", justify: "space-between", children: [
|
|
3436
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react25.Steps.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_st_peter_ui7.SecondaryMdButton, { children: [
|
|
3268
3437
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuChevronLeft, {}),
|
|
3269
3438
|
"Previous"
|
|
3270
3439
|
] }) }),
|
|
3271
3440
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3272
|
-
|
|
3441
|
+
import_react25.Box,
|
|
3273
3442
|
{
|
|
3274
3443
|
as: "button",
|
|
3275
3444
|
display: "flex",
|
|
@@ -3294,7 +3463,7 @@ var HorizontalStepper = ({
|
|
|
3294
3463
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuChevronRight, { size: 15 })
|
|
3295
3464
|
]
|
|
3296
3465
|
}
|
|
3297
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3466
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_st_peter_ui7.PrimaryMdButton, { disabled: !!submitDisabled, onClick: onSubmit, children: submitButtonText })
|
|
3298
3467
|
] })
|
|
3299
3468
|
}
|
|
3300
3469
|
)
|
|
@@ -3309,22 +3478,33 @@ var horizontal_stepper_default = HorizontalStepper;
|
|
|
3309
3478
|
|
|
3310
3479
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
3311
3480
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3481
|
+
var safeParse = (value) => {
|
|
3482
|
+
if (!value) return null;
|
|
3483
|
+
try {
|
|
3484
|
+
return JSON.parse(value);
|
|
3485
|
+
} catch {
|
|
3486
|
+
return null;
|
|
3487
|
+
}
|
|
3488
|
+
};
|
|
3312
3489
|
var SharedLifePlanApplication = ({
|
|
3313
3490
|
title = "Life Plan Application",
|
|
3314
3491
|
description = "Please fill out the form below to apply for a life plan.",
|
|
3315
|
-
onPaymentError
|
|
3492
|
+
onPaymentError,
|
|
3493
|
+
onCheckout,
|
|
3494
|
+
parseAddress
|
|
3316
3495
|
}) => {
|
|
3317
|
-
const [currentStep, setCurrentStep] = (0,
|
|
3318
|
-
const [loading, setLoading] = (0,
|
|
3319
|
-
const [allAgreementsAccepted, setAllAgreementsAccepted] = (0,
|
|
3320
|
-
const [applicationSection, setApplicationSection] = (0,
|
|
3321
|
-
const [applicationSectionKey, setApplicationSectionKey] = (0,
|
|
3322
|
-
const [applicationValid, setApplicationValid] = (0,
|
|
3496
|
+
const [currentStep, setCurrentStep] = (0, import_react27.useState)(0);
|
|
3497
|
+
const [loading, setLoading] = (0, import_react27.useState)(false);
|
|
3498
|
+
const [allAgreementsAccepted, setAllAgreementsAccepted] = (0, import_react27.useState)(false);
|
|
3499
|
+
const [applicationSection, setApplicationSection] = (0, import_react27.useState)();
|
|
3500
|
+
const [applicationSectionKey, setApplicationSectionKey] = (0, import_react27.useState)(0);
|
|
3501
|
+
const [applicationValid, setApplicationValid] = (0, import_react27.useState)(false);
|
|
3323
3502
|
const steps = createLifePlanSteps({
|
|
3324
3503
|
onAllAcceptedChange: setAllAgreementsAccepted,
|
|
3325
3504
|
...applicationSection ? { applicationSection } : {},
|
|
3326
3505
|
applicationSectionKey,
|
|
3327
3506
|
onApplicationValidChange: setApplicationValid,
|
|
3507
|
+
...parseAddress ? { parseAddress } : {},
|
|
3328
3508
|
onEdit: (section) => {
|
|
3329
3509
|
setApplicationSection(section ?? "personal");
|
|
3330
3510
|
setApplicationSectionKey((key) => key + 1);
|
|
@@ -3335,8 +3515,40 @@ var SharedLifePlanApplication = ({
|
|
|
3335
3515
|
const handleCheckout = async () => {
|
|
3336
3516
|
if (!allAgreementsAccepted) return;
|
|
3337
3517
|
setLoading(true);
|
|
3518
|
+
try {
|
|
3519
|
+
if (!onCheckout) {
|
|
3520
|
+
throw new Error("onCheckout prop is not provided");
|
|
3521
|
+
}
|
|
3522
|
+
const checkoutRaw = sessionStorage.getItem("CheckoutCart");
|
|
3523
|
+
const cartRaw = sessionStorage.getItem("Cart");
|
|
3524
|
+
const parsed = safeParse(checkoutRaw) ?? safeParse(cartRaw);
|
|
3525
|
+
const items = Array.isArray(parsed) ? parsed : parsed ? [parsed] : [];
|
|
3526
|
+
if (items.length === 0) {
|
|
3527
|
+
throw new Error("No items to checkout");
|
|
3528
|
+
}
|
|
3529
|
+
const applicationData = loadApplicationDataFromLocalStorage() ?? createEmptyApplicationData();
|
|
3530
|
+
const checkoutPayload = items.map((item) => ({
|
|
3531
|
+
planDesc: item.planDesc,
|
|
3532
|
+
mode: item.mode,
|
|
3533
|
+
ipInstAmt: Number(item.price),
|
|
3534
|
+
planTerm: item.planTerm,
|
|
3535
|
+
quantity: item.quantity ?? 1
|
|
3536
|
+
}));
|
|
3537
|
+
const checkoutUrl = await onCheckout({
|
|
3538
|
+
items: checkoutPayload,
|
|
3539
|
+
application: applicationData
|
|
3540
|
+
});
|
|
3541
|
+
if (!checkoutUrl) throw new Error("Checkout URL not found");
|
|
3542
|
+
window.location.href = checkoutUrl;
|
|
3543
|
+
} catch (error) {
|
|
3544
|
+
console.error(error);
|
|
3545
|
+
onPaymentError?.(error);
|
|
3546
|
+
alert("Failed to proceed to payment");
|
|
3547
|
+
} finally {
|
|
3548
|
+
setLoading(false);
|
|
3549
|
+
}
|
|
3338
3550
|
};
|
|
3339
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react26.Box, { w: "full", overflowX: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3340
3552
|
horizontal_stepper_default,
|
|
3341
3553
|
{
|
|
3342
3554
|
steps,
|
|
@@ -3352,46 +3564,16 @@ var SharedLifePlanApplication_default = SharedLifePlanApplication;
|
|
|
3352
3564
|
|
|
3353
3565
|
// src/NewSaleForm/LifePlanApplicationStepWrapper.tsx
|
|
3354
3566
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3355
|
-
var LifePlanApplicationStepWrapper = () => {
|
|
3356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SharedLifePlanApplication_default, {});
|
|
3567
|
+
var LifePlanApplicationStepWrapper = (props) => {
|
|
3568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SharedLifePlanApplication_default, { ...props });
|
|
3357
3569
|
};
|
|
3358
3570
|
var LifePlanApplicationStepWrapper_default = LifePlanApplicationStepWrapper;
|
|
3359
3571
|
|
|
3360
3572
|
// src/Generic/BottomQuickActions.tsx
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3573
|
+
var import_react28 = __toESM(require("react"));
|
|
3574
|
+
var import_react29 = require("@chakra-ui/react");
|
|
3363
3575
|
var import_lu6 = require("react-icons/lu");
|
|
3364
3576
|
var import_link = __toESM(require("next/link"));
|
|
3365
|
-
|
|
3366
|
-
// src/lib/theme/brand-colors.ts
|
|
3367
|
-
var BRAND_COLORS = {
|
|
3368
|
-
primaryGreen: "#109448",
|
|
3369
|
-
darkGreen: "#006838",
|
|
3370
|
-
softGreen: "#92DDBF",
|
|
3371
|
-
pastelPeaGreen: "#ACD6A6",
|
|
3372
|
-
seafoamGreen: "#92DDBF",
|
|
3373
|
-
lightCyan: "#D3EDEE",
|
|
3374
|
-
successBg: "#F0FDF4",
|
|
3375
|
-
warningBg: "#FFF7ED",
|
|
3376
|
-
warningText: "#F1592B",
|
|
3377
|
-
warningBorder: "#F4845F",
|
|
3378
|
-
errorBg: "#FEF2F2",
|
|
3379
|
-
destructiveRed: "#BF1F2F",
|
|
3380
|
-
errorRed: "#EF4444",
|
|
3381
|
-
neutralText: "#22223B",
|
|
3382
|
-
neutralBorder: "#E5E7EB",
|
|
3383
|
-
mutedBg: "#F3F4F6",
|
|
3384
|
-
subtleBg: "#F9FAFB",
|
|
3385
|
-
white: "#FFFFFF",
|
|
3386
|
-
black: "#000000",
|
|
3387
|
-
grey: "#808080",
|
|
3388
|
-
ashWhite: "#ECECEC",
|
|
3389
|
-
gold: "#CBA135",
|
|
3390
|
-
brightGold: "#FFD026",
|
|
3391
|
-
paleGold: "#FFF48E"
|
|
3392
|
-
};
|
|
3393
|
-
|
|
3394
|
-
// src/Generic/BottomQuickActions.tsx
|
|
3395
3577
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3396
3578
|
var SHEET_BG = BRAND_COLORS.white;
|
|
3397
3579
|
var DRAG_COLOR = BRAND_COLORS.neutralBorder;
|
|
@@ -3409,7 +3591,7 @@ var SUBTITLE_COLOR = BRAND_COLORS.grey;
|
|
|
3409
3591
|
var LABEL_COLOR = BRAND_COLORS.neutralText;
|
|
3410
3592
|
var DESC_COLOR = BRAND_COLORS.grey;
|
|
3411
3593
|
var CHEVRON_COLOR = BRAND_COLORS.ashWhite;
|
|
3412
|
-
var QuickActionsHeaderCard =
|
|
3594
|
+
var QuickActionsHeaderCard = import_react28.default.memo(
|
|
3413
3595
|
({
|
|
3414
3596
|
initials,
|
|
3415
3597
|
avatarBg = AVATAR_DEFAULT_BG,
|
|
@@ -3417,7 +3599,7 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3417
3599
|
meta,
|
|
3418
3600
|
trailing
|
|
3419
3601
|
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3420
|
-
|
|
3602
|
+
import_react29.HStack,
|
|
3421
3603
|
{
|
|
3422
3604
|
gap: STANDARD_SPACING.sm,
|
|
3423
3605
|
px: STANDARD_SPACING.sm,
|
|
@@ -3428,7 +3610,7 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3428
3610
|
borderColor: HEADER_CARD_BORDER,
|
|
3429
3611
|
children: [
|
|
3430
3612
|
initials && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3431
|
-
|
|
3613
|
+
import_react29.Flex,
|
|
3432
3614
|
{
|
|
3433
3615
|
w: "40px",
|
|
3434
3616
|
h: "40px",
|
|
@@ -3438,7 +3620,7 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3438
3620
|
justify: "center",
|
|
3439
3621
|
flexShrink: 0,
|
|
3440
3622
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3441
|
-
|
|
3623
|
+
import_react29.Text,
|
|
3442
3624
|
{
|
|
3443
3625
|
fontSize: "14px",
|
|
3444
3626
|
fontWeight: "700",
|
|
@@ -3449,9 +3631,9 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3449
3631
|
)
|
|
3450
3632
|
}
|
|
3451
3633
|
),
|
|
3452
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3634
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react29.Box, { flex: "1", minW: 0, children: [
|
|
3453
3635
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3454
|
-
|
|
3636
|
+
import_react29.Text,
|
|
3455
3637
|
{
|
|
3456
3638
|
fontSize: "15px",
|
|
3457
3639
|
fontWeight: "700",
|
|
@@ -3464,7 +3646,7 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3464
3646
|
}
|
|
3465
3647
|
),
|
|
3466
3648
|
meta && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3467
|
-
|
|
3649
|
+
import_react29.Text,
|
|
3468
3650
|
{
|
|
3469
3651
|
fontSize: "12px",
|
|
3470
3652
|
color: SUBTITLE_COLOR,
|
|
@@ -3485,11 +3667,11 @@ var QuickActionsHeaderCard = import_react29.default.memo(
|
|
|
3485
3667
|
var ITEM_TRANSITION = {
|
|
3486
3668
|
transition: "background 0.15s ease, transform 0.1s ease"
|
|
3487
3669
|
};
|
|
3488
|
-
var ActionItem =
|
|
3670
|
+
var ActionItem = import_react28.default.memo(({ action }) => {
|
|
3489
3671
|
const iconBg = action.iconBg ?? DEFAULT_ICON_BG;
|
|
3490
3672
|
const iconColor = action.iconColor ?? DEFAULT_ICON_COLOR;
|
|
3491
3673
|
const inner = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3492
|
-
|
|
3674
|
+
import_react29.HStack,
|
|
3493
3675
|
{
|
|
3494
3676
|
gap: STANDARD_SPACING.sm,
|
|
3495
3677
|
px: STANDARD_SPACING.sm,
|
|
@@ -3512,7 +3694,7 @@ var ActionItem = import_react29.default.memo(({ action }) => {
|
|
|
3512
3694
|
style: ITEM_TRANSITION,
|
|
3513
3695
|
children: [
|
|
3514
3696
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3515
|
-
|
|
3697
|
+
import_react29.Flex,
|
|
3516
3698
|
{
|
|
3517
3699
|
w: "40px",
|
|
3518
3700
|
h: "40px",
|
|
@@ -3521,12 +3703,12 @@ var ActionItem = import_react29.default.memo(({ action }) => {
|
|
|
3521
3703
|
align: "center",
|
|
3522
3704
|
justify: "center",
|
|
3523
3705
|
flexShrink: 0,
|
|
3524
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Icon, { as: action.icon, boxSize: "20px", color: iconColor })
|
|
3525
3707
|
}
|
|
3526
3708
|
),
|
|
3527
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3709
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react29.Box, { flex: "1", minW: 0, children: [
|
|
3528
3710
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3529
|
-
|
|
3711
|
+
import_react29.Text,
|
|
3530
3712
|
{
|
|
3531
3713
|
fontSize: "15px",
|
|
3532
3714
|
fontWeight: "600",
|
|
@@ -3536,7 +3718,7 @@ var ActionItem = import_react29.default.memo(({ action }) => {
|
|
|
3536
3718
|
}
|
|
3537
3719
|
),
|
|
3538
3720
|
action.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3539
|
-
|
|
3721
|
+
import_react29.Text,
|
|
3540
3722
|
{
|
|
3541
3723
|
fontSize: "12px",
|
|
3542
3724
|
color: DESC_COLOR,
|
|
@@ -3550,7 +3732,7 @@ var ActionItem = import_react29.default.memo(({ action }) => {
|
|
|
3550
3732
|
)
|
|
3551
3733
|
] }),
|
|
3552
3734
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3553
|
-
|
|
3735
|
+
import_react29.Icon,
|
|
3554
3736
|
{
|
|
3555
3737
|
as: import_lu6.LuChevronRight,
|
|
3556
3738
|
boxSize: "18px",
|
|
@@ -3582,15 +3764,15 @@ var BottomQuickActions = ({
|
|
|
3582
3764
|
actions
|
|
3583
3765
|
}) => {
|
|
3584
3766
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3585
|
-
|
|
3767
|
+
import_react29.Drawer.Root,
|
|
3586
3768
|
{
|
|
3587
3769
|
open,
|
|
3588
3770
|
onOpenChange: (e) => onOpenChange(e.open),
|
|
3589
3771
|
placement: "bottom",
|
|
3590
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3591
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3592
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3593
|
-
|
|
3772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react29.Portal, { children: [
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Drawer.Backdrop, {}),
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Drawer.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3775
|
+
import_react29.Drawer.Content,
|
|
3594
3776
|
{
|
|
3595
3777
|
borderTopRadius: "l3",
|
|
3596
3778
|
borderBottomRadius: "0",
|
|
@@ -3600,8 +3782,8 @@ var BottomQuickActions = ({
|
|
|
3600
3782
|
pb: `calc(${STANDARD_SPACING.sm} + env(safe-area-inset-bottom))`,
|
|
3601
3783
|
boxShadow: STANDARD_SHADOWS.level4,
|
|
3602
3784
|
children: [
|
|
3603
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3604
|
-
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Flex, { justify: "center", pt: "10px", pb: "4px", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3786
|
+
import_react29.Box,
|
|
3605
3787
|
{
|
|
3606
3788
|
w: "36px",
|
|
3607
3789
|
h: "4px",
|
|
@@ -3610,16 +3792,16 @@ var BottomQuickActions = ({
|
|
|
3610
3792
|
}
|
|
3611
3793
|
) }),
|
|
3612
3794
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3613
|
-
|
|
3795
|
+
import_react29.Drawer.Header,
|
|
3614
3796
|
{
|
|
3615
3797
|
px: STANDARD_SPACING.sm,
|
|
3616
3798
|
pt: "12px",
|
|
3617
3799
|
pb: "0",
|
|
3618
3800
|
borderBottomWidth: "0",
|
|
3619
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3620
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react29.Flex, { align: "flex-start", justify: "space-between", gap: "12px", children: [
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react29.Box, { flex: "1", minW: 0, children: [
|
|
3621
3803
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3622
|
-
|
|
3804
|
+
import_react29.Drawer.Title,
|
|
3623
3805
|
{
|
|
3624
3806
|
fontSize: "18px",
|
|
3625
3807
|
fontWeight: "700",
|
|
@@ -3630,7 +3812,7 @@ var BottomQuickActions = ({
|
|
|
3630
3812
|
}
|
|
3631
3813
|
),
|
|
3632
3814
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3633
|
-
|
|
3815
|
+
import_react29.Text,
|
|
3634
3816
|
{
|
|
3635
3817
|
fontSize: "13px",
|
|
3636
3818
|
color: SUBTITLE_COLOR,
|
|
@@ -3641,8 +3823,8 @@ var BottomQuickActions = ({
|
|
|
3641
3823
|
}
|
|
3642
3824
|
)
|
|
3643
3825
|
] }),
|
|
3644
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3645
|
-
|
|
3826
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Drawer.CloseTrigger, { asChild: true, mt: "2px", flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3827
|
+
import_react29.CloseButton,
|
|
3646
3828
|
{
|
|
3647
3829
|
size: "sm",
|
|
3648
3830
|
color: BRAND_COLORS.neutralText,
|
|
@@ -3654,14 +3836,14 @@ var BottomQuickActions = ({
|
|
|
3654
3836
|
}
|
|
3655
3837
|
),
|
|
3656
3838
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3657
|
-
|
|
3839
|
+
import_react29.Drawer.Body,
|
|
3658
3840
|
{
|
|
3659
3841
|
px: STANDARD_SPACING.sm,
|
|
3660
3842
|
pt: STANDARD_SPACING.sm,
|
|
3661
3843
|
pb: "4px",
|
|
3662
3844
|
children: [
|
|
3663
|
-
headerSlot && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3664
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3845
|
+
headerSlot && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.Box, { mb: STANDARD_SPACING.xs, children: headerSlot }),
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react29.VStack, { gap: STANDARD_SPACING.xs, align: "stretch", children: actions.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ActionItem, { action }, i)) })
|
|
3665
3847
|
]
|
|
3666
3848
|
}
|
|
3667
3849
|
)
|
|
@@ -3675,18 +3857,18 @@ var BottomQuickActions = ({
|
|
|
3675
3857
|
var BottomQuickActions_default = BottomQuickActions;
|
|
3676
3858
|
|
|
3677
3859
|
// src/Generic/NotifyInstall.tsx
|
|
3678
|
-
var
|
|
3679
|
-
var
|
|
3680
|
-
var
|
|
3681
|
-
var
|
|
3860
|
+
var import_react31 = require("react");
|
|
3861
|
+
var import_react32 = require("@chakra-ui/react");
|
|
3862
|
+
var import_react33 = require("motion/react");
|
|
3863
|
+
var import_fi2 = require("react-icons/fi");
|
|
3682
3864
|
|
|
3683
3865
|
// src/hooks/useNotifyInstall.ts
|
|
3684
|
-
var
|
|
3866
|
+
var import_react30 = require("react");
|
|
3685
3867
|
function useNotifyInstall() {
|
|
3686
|
-
const [isInstalled, setIsInstalled] = (0,
|
|
3687
|
-
const [isMobile, setIsMobile] = (0,
|
|
3688
|
-
const [installPrompt, setInstallPrompt] = (0,
|
|
3689
|
-
(0,
|
|
3868
|
+
const [isInstalled, setIsInstalled] = (0, import_react30.useState)(false);
|
|
3869
|
+
const [isMobile, setIsMobile] = (0, import_react30.useState)(false);
|
|
3870
|
+
const [installPrompt, setInstallPrompt] = (0, import_react30.useState)(null);
|
|
3871
|
+
(0, import_react30.useEffect)(() => {
|
|
3690
3872
|
const mobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
3691
3873
|
setIsMobile(mobile);
|
|
3692
3874
|
const installed = window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
@@ -3720,8 +3902,8 @@ function useNotifyInstall() {
|
|
|
3720
3902
|
// src/Generic/NotifyInstall.tsx
|
|
3721
3903
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3722
3904
|
var STEPS = [
|
|
3723
|
-
{ icon:
|
|
3724
|
-
{ icon:
|
|
3905
|
+
{ icon: import_fi2.FiShare, label: "Tap the browser menu or Share button" },
|
|
3906
|
+
{ icon: import_fi2.FiPlusSquare, label: 'Choose "Add to Home Screen"' }
|
|
3725
3907
|
];
|
|
3726
3908
|
var DISMISSED_KEY = "estore-install-dialog-dismissed";
|
|
3727
3909
|
function NotifyInstall({
|
|
@@ -3729,8 +3911,8 @@ function NotifyInstall({
|
|
|
3729
3911
|
appName
|
|
3730
3912
|
}) {
|
|
3731
3913
|
const { isInstalled, isMobile, canInstall, install } = useNotifyInstall();
|
|
3732
|
-
const [isDismissed, setIsDismissed] = (0,
|
|
3733
|
-
(0,
|
|
3914
|
+
const [isDismissed, setIsDismissed] = (0, import_react31.useState)(true);
|
|
3915
|
+
(0, import_react31.useEffect)(() => {
|
|
3734
3916
|
if (localStorage.getItem(DISMISSED_KEY) !== "true") {
|
|
3735
3917
|
setIsDismissed(false);
|
|
3736
3918
|
}
|
|
@@ -3742,9 +3924,9 @@ function NotifyInstall({
|
|
|
3742
3924
|
const showPrompt = isMobile && !isInstalled && !isDismissed;
|
|
3743
3925
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
3744
3926
|
children,
|
|
3745
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.AnimatePresence, { children: showPrompt && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
3746
3928
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3747
|
-
|
|
3929
|
+
import_react33.motion.div,
|
|
3748
3930
|
{
|
|
3749
3931
|
initial: { opacity: 0 },
|
|
3750
3932
|
animate: { opacity: 1 },
|
|
@@ -3763,7 +3945,7 @@ function NotifyInstall({
|
|
|
3763
3945
|
"install-backdrop"
|
|
3764
3946
|
),
|
|
3765
3947
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3766
|
-
|
|
3948
|
+
import_react33.motion.div,
|
|
3767
3949
|
{
|
|
3768
3950
|
initial: { y: "100%" },
|
|
3769
3951
|
animate: { y: 0 },
|
|
@@ -3800,12 +3982,12 @@ function NotifyInstall({
|
|
|
3800
3982
|
justifyContent: "center",
|
|
3801
3983
|
color: "#9ca3af"
|
|
3802
3984
|
},
|
|
3803
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_fi2.FiX, { size: 18 })
|
|
3804
3986
|
}
|
|
3805
3987
|
),
|
|
3806
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3988
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react32.VStack, { gap: 6, textAlign: "center", px: 6, py: 8, children: [
|
|
3807
3989
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3808
|
-
|
|
3990
|
+
import_react32.Flex,
|
|
3809
3991
|
{
|
|
3810
3992
|
boxSize: 16,
|
|
3811
3993
|
align: "center",
|
|
@@ -3814,12 +3996,12 @@ function NotifyInstall({
|
|
|
3814
3996
|
bg: "green.50",
|
|
3815
3997
|
color: "green.600",
|
|
3816
3998
|
shadow: "sm",
|
|
3817
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react32.Icon, { as: import_fi2.FiDownload, boxSize: 8 })
|
|
3818
4000
|
}
|
|
3819
4001
|
),
|
|
3820
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react32.VStack, { gap: 2, children: [
|
|
3821
4003
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3822
|
-
|
|
4004
|
+
import_react32.Text,
|
|
3823
4005
|
{
|
|
3824
4006
|
fontSize: "lg",
|
|
3825
4007
|
fontWeight: "bold",
|
|
@@ -3831,10 +4013,10 @@ function NotifyInstall({
|
|
|
3831
4013
|
]
|
|
3832
4014
|
}
|
|
3833
4015
|
),
|
|
3834
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react32.Text, { fontSize: "sm", color: "gray.500", lineHeight: "tall", children: "Add the app to your home screen for a faster, app-like experience before continuing." })
|
|
3835
4017
|
] }),
|
|
3836
4018
|
canInstall ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3837
|
-
|
|
4019
|
+
import_react32.Button,
|
|
3838
4020
|
{
|
|
3839
4021
|
onClick: install,
|
|
3840
4022
|
colorPalette: "green",
|
|
@@ -3842,12 +4024,12 @@ function NotifyInstall({
|
|
|
3842
4024
|
w: "full",
|
|
3843
4025
|
rounded: "xl",
|
|
3844
4026
|
children: [
|
|
3845
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4027
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react32.Icon, { as: import_fi2.FiDownload }),
|
|
3846
4028
|
"Add to Home Screen"
|
|
3847
4029
|
]
|
|
3848
4030
|
}
|
|
3849
4031
|
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3850
|
-
|
|
4032
|
+
import_react32.VStack,
|
|
3851
4033
|
{
|
|
3852
4034
|
w: "full",
|
|
3853
4035
|
bg: "gray.50",
|
|
@@ -3857,9 +4039,9 @@ function NotifyInstall({
|
|
|
3857
4039
|
p: 4,
|
|
3858
4040
|
gap: 4,
|
|
3859
4041
|
align: "stretch",
|
|
3860
|
-
children: STEPS.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4042
|
+
children: STEPS.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react32.HStack, { gap: 3, align: "center", children: [
|
|
3861
4043
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3862
|
-
|
|
4044
|
+
import_react32.Flex,
|
|
3863
4045
|
{
|
|
3864
4046
|
boxSize: 9,
|
|
3865
4047
|
flexShrink: 0,
|
|
@@ -3870,10 +4052,10 @@ function NotifyInstall({
|
|
|
3870
4052
|
borderWidth: "1px",
|
|
3871
4053
|
borderColor: "gray.200",
|
|
3872
4054
|
color: "green.600",
|
|
3873
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react32.Icon, { as: step.icon, boxSize: 4 })
|
|
3874
4056
|
}
|
|
3875
4057
|
),
|
|
3876
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react32.Text, { fontSize: "sm", color: "gray.700", textAlign: "left", children: step.label })
|
|
3877
4059
|
] }, i))
|
|
3878
4060
|
}
|
|
3879
4061
|
)
|
|
@@ -3887,8 +4069,8 @@ function NotifyInstall({
|
|
|
3887
4069
|
}
|
|
3888
4070
|
|
|
3889
4071
|
// src/UserProfile/UserProfile.tsx
|
|
3890
|
-
var
|
|
3891
|
-
var
|
|
4072
|
+
var import_react34 = require("react");
|
|
4073
|
+
var import_react35 = require("@chakra-ui/react");
|
|
3892
4074
|
var import_ri = require("react-icons/ri");
|
|
3893
4075
|
var import_lu7 = require("react-icons/lu");
|
|
3894
4076
|
var import_hi2 = require("react-icons/hi2");
|
|
@@ -4195,28 +4377,28 @@ function ReusableProfile({
|
|
|
4195
4377
|
onTwoFactorChange,
|
|
4196
4378
|
onToast = noopToast
|
|
4197
4379
|
}) {
|
|
4198
|
-
const [profileView, setProfileView] = (0,
|
|
4199
|
-
const [fallbackColorMode, setFallbackColorMode] = (0,
|
|
4380
|
+
const [profileView, setProfileView] = (0, import_react34.useState)("main");
|
|
4381
|
+
const [fallbackColorMode, setFallbackColorMode] = (0, import_react34.useState)("light");
|
|
4200
4382
|
const colorMode = controlledColorMode ?? fallbackColorMode;
|
|
4201
|
-
const [fontSize, setFontSizeLocal] = (0,
|
|
4202
|
-
const [quickNavHrefs, setQuickNavHrefs] = (0,
|
|
4203
|
-
const [replacingIdx, setReplacingIdx] = (0,
|
|
4204
|
-
const [editName, setEditName] = (0,
|
|
4205
|
-
const [editLoading, setEditLoading] = (0,
|
|
4206
|
-
const [currentPw, setCurrentPw] = (0,
|
|
4207
|
-
const [newPw, setNewPw] = (0,
|
|
4208
|
-
const [confirmPw, setConfirmPw] = (0,
|
|
4209
|
-
const [showCurrentPw, setShowCurrentPw] = (0,
|
|
4210
|
-
const [showNewPw, setShowNewPw] = (0,
|
|
4211
|
-
const [showConfirmPw, setShowConfirmPw] = (0,
|
|
4212
|
-
const [pwLoading, setPwLoading] = (0,
|
|
4213
|
-
const [twoFactorEnabled, setTwoFactorEnabled] = (0,
|
|
4383
|
+
const [fontSize, setFontSizeLocal] = (0, import_react34.useState)("md");
|
|
4384
|
+
const [quickNavHrefs, setQuickNavHrefs] = (0, import_react34.useState)(initialQuickNavHrefs);
|
|
4385
|
+
const [replacingIdx, setReplacingIdx] = (0, import_react34.useState)(null);
|
|
4386
|
+
const [editName, setEditName] = (0, import_react34.useState)(user.displayName);
|
|
4387
|
+
const [editLoading, setEditLoading] = (0, import_react34.useState)(false);
|
|
4388
|
+
const [currentPw, setCurrentPw] = (0, import_react34.useState)("");
|
|
4389
|
+
const [newPw, setNewPw] = (0, import_react34.useState)("");
|
|
4390
|
+
const [confirmPw, setConfirmPw] = (0, import_react34.useState)("");
|
|
4391
|
+
const [showCurrentPw, setShowCurrentPw] = (0, import_react34.useState)(false);
|
|
4392
|
+
const [showNewPw, setShowNewPw] = (0, import_react34.useState)(false);
|
|
4393
|
+
const [showConfirmPw, setShowConfirmPw] = (0, import_react34.useState)(false);
|
|
4394
|
+
const [pwLoading, setPwLoading] = (0, import_react34.useState)(false);
|
|
4395
|
+
const [twoFactorEnabled, setTwoFactorEnabled] = (0, import_react34.useState)(
|
|
4214
4396
|
initialTwoFactorEnabled
|
|
4215
4397
|
);
|
|
4216
|
-
const [isMounted, setIsMounted] = (0,
|
|
4217
|
-
const isDesktopRaw = (0,
|
|
4398
|
+
const [isMounted, setIsMounted] = (0, import_react34.useState)(false);
|
|
4399
|
+
const isDesktopRaw = (0, import_react35.useBreakpointValue)({ base: false, md: true });
|
|
4218
4400
|
const isDesktop = isMounted ? isDesktopRaw ?? false : false;
|
|
4219
|
-
(0,
|
|
4401
|
+
(0, import_react34.useEffect)(() => {
|
|
4220
4402
|
setIsMounted(true);
|
|
4221
4403
|
if (!enableLocalStorage || typeof window === "undefined") return;
|
|
4222
4404
|
setFontSizeLocal(localStorage.getItem(FONT_SIZE_STORAGE_KEY) ?? "md");
|
|
@@ -4227,10 +4409,10 @@ function ReusableProfile({
|
|
|
4227
4409
|
setQuickNavHrefs(initialQuickNavHrefs);
|
|
4228
4410
|
}
|
|
4229
4411
|
}, [enableLocalStorage, initialQuickNavHrefs, storageKey]);
|
|
4230
|
-
(0,
|
|
4412
|
+
(0, import_react34.useEffect)(() => {
|
|
4231
4413
|
setEditName(user.displayName);
|
|
4232
4414
|
}, [user.displayName]);
|
|
4233
|
-
const availableOptions = (0,
|
|
4415
|
+
const availableOptions = (0, import_react34.useMemo)(
|
|
4234
4416
|
() => availableNavOptions.filter(
|
|
4235
4417
|
(option) => !user.role || option.roles.includes(user.role)
|
|
4236
4418
|
),
|
|
@@ -4360,7 +4542,7 @@ function ReusableProfile({
|
|
|
4360
4542
|
const roleLabel = user.role ? ROLE_LABELS[user.role] ?? user.role : "";
|
|
4361
4543
|
const mainContent = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
4362
4544
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4363
|
-
|
|
4545
|
+
import_react35.Box,
|
|
4364
4546
|
{
|
|
4365
4547
|
bg: "var(--chakra-colors-primary)",
|
|
4366
4548
|
pt: 12,
|
|
@@ -4369,20 +4551,20 @@ function ReusableProfile({
|
|
|
4369
4551
|
textAlign: "center",
|
|
4370
4552
|
children: [
|
|
4371
4553
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4372
|
-
|
|
4554
|
+
import_react35.Avatar.Root,
|
|
4373
4555
|
{
|
|
4374
4556
|
size: "2xl",
|
|
4375
4557
|
mx: "auto",
|
|
4376
4558
|
mb: 4,
|
|
4377
4559
|
colorPalette: pickPalette(user.displayName || "U"),
|
|
4378
4560
|
children: [
|
|
4379
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4380
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4561
|
+
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Avatar.Image, { src: user.avatarSrc, alt: user.displayName }),
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Avatar.Fallback, { name: user.displayName })
|
|
4381
4563
|
]
|
|
4382
4564
|
}
|
|
4383
4565
|
),
|
|
4384
4566
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4385
|
-
|
|
4567
|
+
import_react35.Text,
|
|
4386
4568
|
{
|
|
4387
4569
|
color: "white",
|
|
4388
4570
|
fontWeight: "bold",
|
|
@@ -4392,9 +4574,9 @@ function ReusableProfile({
|
|
|
4392
4574
|
children: user.displayName
|
|
4393
4575
|
}
|
|
4394
4576
|
),
|
|
4395
|
-
user.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4396
|
-
roleLabel && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4397
|
-
|
|
4577
|
+
user.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { color: "rgba(255,255,255,0.75)", fontSize: "sm", mb: 2, children: user.email }),
|
|
4578
|
+
roleLabel && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4579
|
+
import_react35.Badge,
|
|
4398
4580
|
{
|
|
4399
4581
|
bg: "rgba(255,255,255,0.15)",
|
|
4400
4582
|
color: "white",
|
|
@@ -4410,9 +4592,9 @@ function ReusableProfile({
|
|
|
4410
4592
|
]
|
|
4411
4593
|
}
|
|
4412
4594
|
),
|
|
4413
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4595
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { px: 4, pt: 5, pb: 1, children: [
|
|
4414
4596
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4415
|
-
|
|
4597
|
+
import_react35.Text,
|
|
4416
4598
|
{
|
|
4417
4599
|
fontSize: "xs",
|
|
4418
4600
|
fontWeight: "bold",
|
|
@@ -4424,7 +4606,7 @@ function ReusableProfile({
|
|
|
4424
4606
|
}
|
|
4425
4607
|
),
|
|
4426
4608
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4427
|
-
|
|
4609
|
+
import_react35.Box,
|
|
4428
4610
|
{
|
|
4429
4611
|
as: "button",
|
|
4430
4612
|
w: "full",
|
|
@@ -4433,7 +4615,7 @@ function ReusableProfile({
|
|
|
4433
4615
|
transition: "opacity 0.15s",
|
|
4434
4616
|
onClick: () => setProfileView("edit-account"),
|
|
4435
4617
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4436
|
-
|
|
4618
|
+
import_react35.Flex,
|
|
4437
4619
|
{
|
|
4438
4620
|
justify: "space-between",
|
|
4439
4621
|
align: "center",
|
|
@@ -4442,9 +4624,9 @@ function ReusableProfile({
|
|
|
4442
4624
|
borderRadius: "lg",
|
|
4443
4625
|
bg: isDesktop && profileView === "edit-account" ? "gray.100" : void 0,
|
|
4444
4626
|
children: [
|
|
4445
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4627
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4446
4628
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4447
|
-
|
|
4629
|
+
import_react35.Box,
|
|
4448
4630
|
{
|
|
4449
4631
|
w: "38px",
|
|
4450
4632
|
h: "38px",
|
|
@@ -4458,9 +4640,9 @@ function ReusableProfile({
|
|
|
4458
4640
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuUser, { size: 16 })
|
|
4459
4641
|
}
|
|
4460
4642
|
),
|
|
4461
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4462
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4463
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4644
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Edit Account" }),
|
|
4645
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: "Update your display name and contact details" })
|
|
4464
4646
|
] })
|
|
4465
4647
|
] }),
|
|
4466
4648
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -4469,9 +4651,9 @@ function ReusableProfile({
|
|
|
4469
4651
|
)
|
|
4470
4652
|
}
|
|
4471
4653
|
),
|
|
4472
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4654
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {}),
|
|
4473
4655
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4474
|
-
|
|
4656
|
+
import_react35.Box,
|
|
4475
4657
|
{
|
|
4476
4658
|
as: "button",
|
|
4477
4659
|
w: "full",
|
|
@@ -4483,7 +4665,7 @@ function ReusableProfile({
|
|
|
4483
4665
|
setProfileView("change-password");
|
|
4484
4666
|
},
|
|
4485
4667
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4486
|
-
|
|
4668
|
+
import_react35.Flex,
|
|
4487
4669
|
{
|
|
4488
4670
|
justify: "space-between",
|
|
4489
4671
|
align: "center",
|
|
@@ -4492,9 +4674,9 @@ function ReusableProfile({
|
|
|
4492
4674
|
borderRadius: "lg",
|
|
4493
4675
|
bg: isDesktop && profileView === "change-password" ? "gray.100" : void 0,
|
|
4494
4676
|
children: [
|
|
4495
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4677
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4496
4678
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4497
|
-
|
|
4679
|
+
import_react35.Box,
|
|
4498
4680
|
{
|
|
4499
4681
|
w: "38px",
|
|
4500
4682
|
h: "38px",
|
|
@@ -4508,9 +4690,9 @@ function ReusableProfile({
|
|
|
4508
4690
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuLock, { size: 16 })
|
|
4509
4691
|
}
|
|
4510
4692
|
),
|
|
4511
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4512
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4513
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4693
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4694
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Change Password" }),
|
|
4695
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: "Test locally through the callback prop" })
|
|
4514
4696
|
] })
|
|
4515
4697
|
] }),
|
|
4516
4698
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -4519,11 +4701,11 @@ function ReusableProfile({
|
|
|
4519
4701
|
)
|
|
4520
4702
|
}
|
|
4521
4703
|
),
|
|
4522
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4523
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4524
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4704
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {}),
|
|
4705
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
4706
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4525
4707
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4526
|
-
|
|
4708
|
+
import_react35.Box,
|
|
4527
4709
|
{
|
|
4528
4710
|
w: "38px",
|
|
4529
4711
|
h: "38px",
|
|
@@ -4537,13 +4719,13 @@ function ReusableProfile({
|
|
|
4537
4719
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuShield, { size: 16 })
|
|
4538
4720
|
}
|
|
4539
4721
|
),
|
|
4540
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4541
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4542
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4722
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Two Factor Authentication" }),
|
|
4724
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: twoFactorEnabled ? "Enabled" : "Disabled" })
|
|
4543
4725
|
] })
|
|
4544
4726
|
] }),
|
|
4545
4727
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4546
|
-
|
|
4728
|
+
import_react35.Box,
|
|
4547
4729
|
{
|
|
4548
4730
|
role: "switch",
|
|
4549
4731
|
"aria-checked": twoFactorEnabled,
|
|
@@ -4566,7 +4748,7 @@ function ReusableProfile({
|
|
|
4566
4748
|
flexShrink: 0,
|
|
4567
4749
|
outline: "none",
|
|
4568
4750
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4569
|
-
|
|
4751
|
+
import_react35.Box,
|
|
4570
4752
|
{
|
|
4571
4753
|
position: "absolute",
|
|
4572
4754
|
top: "3px",
|
|
@@ -4583,9 +4765,9 @@ function ReusableProfile({
|
|
|
4583
4765
|
)
|
|
4584
4766
|
] })
|
|
4585
4767
|
] }),
|
|
4586
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4768
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { px: 4, pt: 4, pb: 2, children: [
|
|
4587
4769
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4588
|
-
|
|
4770
|
+
import_react35.Text,
|
|
4589
4771
|
{
|
|
4590
4772
|
fontSize: "xs",
|
|
4591
4773
|
fontWeight: "bold",
|
|
@@ -4596,10 +4778,10 @@ function ReusableProfile({
|
|
|
4596
4778
|
children: "Preferences"
|
|
4597
4779
|
}
|
|
4598
4780
|
),
|
|
4599
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4600
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4781
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
4782
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4601
4783
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4602
|
-
|
|
4784
|
+
import_react35.Box,
|
|
4603
4785
|
{
|
|
4604
4786
|
w: "38px",
|
|
4605
4787
|
h: "38px",
|
|
@@ -4613,15 +4795,15 @@ function ReusableProfile({
|
|
|
4613
4795
|
children: colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuMoon, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuSun, { size: 16 })
|
|
4614
4796
|
}
|
|
4615
4797
|
),
|
|
4616
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4617
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4618
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4798
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Appearance" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: colorMode === "light" ? "Light mode" : "Dark mode" })
|
|
4619
4801
|
] })
|
|
4620
4802
|
] }),
|
|
4621
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4803
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.HStack, { gap: 1.5, children: ["light", "dark"].map((mode) => {
|
|
4622
4804
|
const isActive = colorMode === mode;
|
|
4623
4805
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4624
|
-
|
|
4806
|
+
import_react35.Button,
|
|
4625
4807
|
{
|
|
4626
4808
|
size: "sm",
|
|
4627
4809
|
variant: "outline",
|
|
@@ -4638,7 +4820,7 @@ function ReusableProfile({
|
|
|
4638
4820
|
children: [
|
|
4639
4821
|
mode === "light" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuSun, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuMoon, { size: 13 }),
|
|
4640
4822
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4641
|
-
|
|
4823
|
+
import_react35.Text,
|
|
4642
4824
|
{
|
|
4643
4825
|
fontSize: "xs",
|
|
4644
4826
|
textTransform: "capitalize",
|
|
@@ -4652,11 +4834,11 @@ function ReusableProfile({
|
|
|
4652
4834
|
);
|
|
4653
4835
|
}) })
|
|
4654
4836
|
] }),
|
|
4655
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4656
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4657
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4837
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {}),
|
|
4838
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
4839
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4658
4840
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4659
|
-
|
|
4841
|
+
import_react35.Box,
|
|
4660
4842
|
{
|
|
4661
4843
|
w: "38px",
|
|
4662
4844
|
h: "38px",
|
|
@@ -4672,15 +4854,15 @@ function ReusableProfile({
|
|
|
4672
4854
|
children: "A"
|
|
4673
4855
|
}
|
|
4674
4856
|
),
|
|
4675
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4676
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4677
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4857
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4858
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Text Size" }),
|
|
4859
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: fontSizeLabel })
|
|
4678
4860
|
] })
|
|
4679
4861
|
] }),
|
|
4680
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4862
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.HStack, { gap: 1, children: FONT_SIZES.map((option) => {
|
|
4681
4863
|
const isActive = fontSize === option.value;
|
|
4682
4864
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4683
|
-
|
|
4865
|
+
import_react35.Button,
|
|
4684
4866
|
{
|
|
4685
4867
|
size: "sm",
|
|
4686
4868
|
variant: "outline",
|
|
@@ -4696,7 +4878,7 @@ function ReusableProfile({
|
|
|
4696
4878
|
onClick: () => handleFontSize(option.value),
|
|
4697
4879
|
title: option.title,
|
|
4698
4880
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4699
|
-
|
|
4881
|
+
import_react35.Text,
|
|
4700
4882
|
{
|
|
4701
4883
|
fontWeight: isActive ? "bold" : "normal",
|
|
4702
4884
|
style: { fontSize: `${option.scale * 13}px` },
|
|
@@ -4708,9 +4890,9 @@ function ReusableProfile({
|
|
|
4708
4890
|
);
|
|
4709
4891
|
}) })
|
|
4710
4892
|
] }),
|
|
4711
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4893
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {}),
|
|
4712
4894
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4713
|
-
|
|
4895
|
+
import_react35.Box,
|
|
4714
4896
|
{
|
|
4715
4897
|
as: "button",
|
|
4716
4898
|
w: "full",
|
|
@@ -4718,10 +4900,10 @@ function ReusableProfile({
|
|
|
4718
4900
|
_hover: { opacity: 0.7 },
|
|
4719
4901
|
transition: "opacity 0.15s",
|
|
4720
4902
|
onClick: () => setProfileView("navbar-customize"),
|
|
4721
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4722
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
4904
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
4723
4905
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4724
|
-
|
|
4906
|
+
import_react35.Box,
|
|
4725
4907
|
{
|
|
4726
4908
|
w: "38px",
|
|
4727
4909
|
h: "38px",
|
|
@@ -4735,9 +4917,9 @@ function ReusableProfile({
|
|
|
4735
4917
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuArrowLeftRight, { size: 16 })
|
|
4736
4918
|
}
|
|
4737
4919
|
),
|
|
4738
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4739
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4740
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4920
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
4921
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "semibold", children: "Quick Navigation" }),
|
|
4922
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: [
|
|
4741
4923
|
quickNavHrefs.length,
|
|
4742
4924
|
" of ",
|
|
4743
4925
|
maxQuickNavItems,
|
|
@@ -4750,8 +4932,8 @@ function ReusableProfile({
|
|
|
4750
4932
|
}
|
|
4751
4933
|
)
|
|
4752
4934
|
] }),
|
|
4753
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4754
|
-
|
|
4935
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { px: 4, pt: 4, pb: 10, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.VStack, { gap: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4936
|
+
import_react35.Button,
|
|
4755
4937
|
{
|
|
4756
4938
|
w: "full",
|
|
4757
4939
|
variant: "outline",
|
|
@@ -4764,9 +4946,9 @@ function ReusableProfile({
|
|
|
4764
4946
|
) }) })
|
|
4765
4947
|
] });
|
|
4766
4948
|
const editAccountContent = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
4767
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4949
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
4768
4950
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4769
|
-
|
|
4951
|
+
import_react35.IconButton,
|
|
4770
4952
|
{
|
|
4771
4953
|
size: "sm",
|
|
4772
4954
|
variant: "ghost",
|
|
@@ -4776,17 +4958,17 @@ function ReusableProfile({
|
|
|
4776
4958
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuChevronLeft, {})
|
|
4777
4959
|
}
|
|
4778
4960
|
),
|
|
4779
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4961
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontWeight: "bold", fontSize: "md", children: "Edit Account" })
|
|
4780
4962
|
] }) }),
|
|
4781
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4782
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4783
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4963
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { textAlign: "center", pt: 5, pb: 4, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Avatar.Root, { size: "xl", mx: "auto", mb: 1, children: [
|
|
4964
|
+
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Avatar.Image, { src: user.avatarSrc, alt: editName }),
|
|
4965
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Avatar.Fallback, { name: editName })
|
|
4784
4966
|
] }) }),
|
|
4785
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4786
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4787
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4967
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.VStack, { gap: 4, px: 4, pb: 10, align: "stretch", children: [
|
|
4968
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
4969
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Display Name" }),
|
|
4788
4970
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4789
|
-
|
|
4971
|
+
import_react35.Input,
|
|
4790
4972
|
{
|
|
4791
4973
|
value: editName,
|
|
4792
4974
|
onChange: (event) => setEditName(event.target.value),
|
|
@@ -4795,10 +4977,10 @@ function ReusableProfile({
|
|
|
4795
4977
|
}
|
|
4796
4978
|
)
|
|
4797
4979
|
] }),
|
|
4798
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4799
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4980
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
4981
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Email" }),
|
|
4800
4982
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4801
|
-
|
|
4983
|
+
import_react35.Input,
|
|
4802
4984
|
{
|
|
4803
4985
|
value: user.email ?? "",
|
|
4804
4986
|
readOnly: true,
|
|
@@ -4808,10 +4990,10 @@ function ReusableProfile({
|
|
|
4808
4990
|
}
|
|
4809
4991
|
)
|
|
4810
4992
|
] }),
|
|
4811
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4812
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4993
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Mobile Number" }),
|
|
4813
4995
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4814
|
-
|
|
4996
|
+
import_react35.Input,
|
|
4815
4997
|
{
|
|
4816
4998
|
value: user.mobileNumber ?? "",
|
|
4817
4999
|
readOnly: true,
|
|
@@ -4822,7 +5004,7 @@ function ReusableProfile({
|
|
|
4822
5004
|
)
|
|
4823
5005
|
] }),
|
|
4824
5006
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4825
|
-
|
|
5007
|
+
import_react35.Button,
|
|
4826
5008
|
{
|
|
4827
5009
|
w: "full",
|
|
4828
5010
|
mt: 2,
|
|
@@ -4837,9 +5019,9 @@ function ReusableProfile({
|
|
|
4837
5019
|
] })
|
|
4838
5020
|
] });
|
|
4839
5021
|
const changePasswordContent = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
4840
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5022
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
4841
5023
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4842
|
-
|
|
5024
|
+
import_react35.IconButton,
|
|
4843
5025
|
{
|
|
4844
5026
|
size: "sm",
|
|
4845
5027
|
variant: "ghost",
|
|
@@ -4849,16 +5031,16 @@ function ReusableProfile({
|
|
|
4849
5031
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuChevronLeft, {})
|
|
4850
5032
|
}
|
|
4851
5033
|
),
|
|
4852
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5034
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontWeight: "bold", fontSize: "md", children: "Change Password" })
|
|
4853
5035
|
] }) }),
|
|
4854
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4855
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4856
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5036
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.VStack, { gap: 5, px: 4, pt: 6, pb: 10, children: [
|
|
5037
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
5038
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Current Password" }),
|
|
4857
5039
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4858
|
-
|
|
5040
|
+
import_react35.InputGroup,
|
|
4859
5041
|
{
|
|
4860
5042
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4861
|
-
|
|
5043
|
+
import_react35.IconButton,
|
|
4862
5044
|
{
|
|
4863
5045
|
size: "xs",
|
|
4864
5046
|
variant: "ghost",
|
|
@@ -4869,7 +5051,7 @@ function ReusableProfile({
|
|
|
4869
5051
|
}
|
|
4870
5052
|
),
|
|
4871
5053
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4872
|
-
|
|
5054
|
+
import_react35.Input,
|
|
4873
5055
|
{
|
|
4874
5056
|
type: showCurrentPw ? "text" : "password",
|
|
4875
5057
|
value: currentPw,
|
|
@@ -4881,13 +5063,13 @@ function ReusableProfile({
|
|
|
4881
5063
|
}
|
|
4882
5064
|
)
|
|
4883
5065
|
] }),
|
|
4884
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4885
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5066
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "New Password" }),
|
|
4886
5068
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4887
|
-
|
|
5069
|
+
import_react35.InputGroup,
|
|
4888
5070
|
{
|
|
4889
5071
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4890
|
-
|
|
5072
|
+
import_react35.IconButton,
|
|
4891
5073
|
{
|
|
4892
5074
|
size: "xs",
|
|
4893
5075
|
variant: "ghost",
|
|
@@ -4898,7 +5080,7 @@ function ReusableProfile({
|
|
|
4898
5080
|
}
|
|
4899
5081
|
),
|
|
4900
5082
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4901
|
-
|
|
5083
|
+
import_react35.Input,
|
|
4902
5084
|
{
|
|
4903
5085
|
type: showNewPw ? "text" : "password",
|
|
4904
5086
|
value: newPw,
|
|
@@ -4909,9 +5091,9 @@ function ReusableProfile({
|
|
|
4909
5091
|
)
|
|
4910
5092
|
}
|
|
4911
5093
|
),
|
|
4912
|
-
newPw && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4913
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4914
|
-
|
|
5094
|
+
newPw && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { mt: 2, children: [
|
|
5095
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Flex, { gap: 1, mb: 1, children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5096
|
+
import_react35.Box,
|
|
4915
5097
|
{
|
|
4916
5098
|
flex: 1,
|
|
4917
5099
|
h: "3px",
|
|
@@ -4921,16 +5103,16 @@ function ReusableProfile({
|
|
|
4921
5103
|
},
|
|
4922
5104
|
i
|
|
4923
5105
|
)) }),
|
|
4924
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5106
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: pwMeta.color, fontWeight: "medium", children: pwMeta.label })
|
|
4925
5107
|
] })
|
|
4926
5108
|
] }),
|
|
4927
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4928
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5109
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
5110
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Confirm New Password" }),
|
|
4929
5111
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4930
|
-
|
|
5112
|
+
import_react35.InputGroup,
|
|
4931
5113
|
{
|
|
4932
5114
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4933
|
-
|
|
5115
|
+
import_react35.IconButton,
|
|
4934
5116
|
{
|
|
4935
5117
|
size: "xs",
|
|
4936
5118
|
variant: "ghost",
|
|
@@ -4941,7 +5123,7 @@ function ReusableProfile({
|
|
|
4941
5123
|
}
|
|
4942
5124
|
),
|
|
4943
5125
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4944
|
-
|
|
5126
|
+
import_react35.Input,
|
|
4945
5127
|
{
|
|
4946
5128
|
type: showConfirmPw ? "text" : "password",
|
|
4947
5129
|
value: confirmPw,
|
|
@@ -4952,10 +5134,10 @@ function ReusableProfile({
|
|
|
4952
5134
|
)
|
|
4953
5135
|
}
|
|
4954
5136
|
),
|
|
4955
|
-
confirmPw && confirmPw !== newPw && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5137
|
+
confirmPw && confirmPw !== newPw && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "xs", color: "red.500", mt: 1, children: "Passwords do not match" })
|
|
4956
5138
|
] }),
|
|
4957
5139
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4958
|
-
|
|
5140
|
+
import_react35.Button,
|
|
4959
5141
|
{
|
|
4960
5142
|
w: "full",
|
|
4961
5143
|
mt: 1,
|
|
@@ -4972,7 +5154,7 @@ function ReusableProfile({
|
|
|
4972
5154
|
] });
|
|
4973
5155
|
const navbarCustomizeContent = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
4974
5156
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4975
|
-
|
|
5157
|
+
import_react35.Box,
|
|
4976
5158
|
{
|
|
4977
5159
|
px: 4,
|
|
4978
5160
|
pt: 4,
|
|
@@ -4983,9 +5165,9 @@ function ReusableProfile({
|
|
|
4983
5165
|
top: 0,
|
|
4984
5166
|
bg: "bg",
|
|
4985
5167
|
zIndex: 1,
|
|
4986
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
4987
5169
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4988
|
-
|
|
5170
|
+
import_react35.IconButton,
|
|
4989
5171
|
{
|
|
4990
5172
|
size: "sm",
|
|
4991
5173
|
variant: "ghost",
|
|
@@ -4998,9 +5180,9 @@ function ReusableProfile({
|
|
|
4998
5180
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuChevronLeft, {})
|
|
4999
5181
|
}
|
|
5000
5182
|
),
|
|
5001
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5002
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5003
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5183
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
5184
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontWeight: "bold", fontSize: "md", children: "Quick Navigation" }),
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Text, { fontSize: "xs", color: "gray.500", children: [
|
|
5004
5186
|
"Choose up to ",
|
|
5005
5187
|
maxQuickNavItems,
|
|
5006
5188
|
" shortcuts for the bottom bar"
|
|
@@ -5009,10 +5191,10 @@ function ReusableProfile({
|
|
|
5009
5191
|
] })
|
|
5010
5192
|
}
|
|
5011
5193
|
),
|
|
5012
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5013
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5194
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { px: 4, pt: 5, pb: 2, children: [
|
|
5195
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", justify: "space-between", mb: 3, children: [
|
|
5014
5196
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5015
|
-
|
|
5197
|
+
import_react35.Text,
|
|
5016
5198
|
{
|
|
5017
5199
|
fontSize: "xs",
|
|
5018
5200
|
fontWeight: "bold",
|
|
@@ -5023,7 +5205,7 @@ function ReusableProfile({
|
|
|
5023
5205
|
}
|
|
5024
5206
|
),
|
|
5025
5207
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5026
|
-
|
|
5208
|
+
import_react35.Text,
|
|
5027
5209
|
{
|
|
5028
5210
|
fontSize: "xs",
|
|
5029
5211
|
color: quickNavHrefs.length >= maxQuickNavItems ? "orange.500" : "gray.400",
|
|
@@ -5037,7 +5219,7 @@ function ReusableProfile({
|
|
|
5037
5219
|
)
|
|
5038
5220
|
] }),
|
|
5039
5221
|
quickNavHrefs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5040
|
-
|
|
5222
|
+
import_react35.Flex,
|
|
5041
5223
|
{
|
|
5042
5224
|
align: "center",
|
|
5043
5225
|
justify: "center",
|
|
@@ -5046,18 +5228,18 @@ function ReusableProfile({
|
|
|
5046
5228
|
borderWidth: "1px",
|
|
5047
5229
|
borderStyle: "dashed",
|
|
5048
5230
|
borderColor: "gray.200",
|
|
5049
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", color: "gray.400", children: "No items pinned \u2014 add from below" })
|
|
5050
5232
|
}
|
|
5051
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5233
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.VStack, { gap: 0, children: quickNavHrefs.map((href, idx) => {
|
|
5052
5234
|
const option = availableOptions.find((item) => item.key === href);
|
|
5053
5235
|
if (!option) return null;
|
|
5054
5236
|
const ItemIcon = option.Icon;
|
|
5055
5237
|
const isFirst = idx === 0;
|
|
5056
5238
|
const isLast = idx === quickNavHrefs.length - 1;
|
|
5057
5239
|
const isReplacing = replacingIdx === idx;
|
|
5058
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
5059
5241
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5060
|
-
|
|
5242
|
+
import_react35.Flex,
|
|
5061
5243
|
{
|
|
5062
5244
|
justify: "space-between",
|
|
5063
5245
|
align: "center",
|
|
@@ -5069,9 +5251,9 @@ function ReusableProfile({
|
|
|
5069
5251
|
borderColor: isReplacing ? "orange.200" : void 0,
|
|
5070
5252
|
transition: "all 0.15s",
|
|
5071
5253
|
children: [
|
|
5072
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5254
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
5073
5255
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5074
|
-
|
|
5256
|
+
import_react35.Box,
|
|
5075
5257
|
{
|
|
5076
5258
|
w: "36px",
|
|
5077
5259
|
h: "36px",
|
|
@@ -5085,10 +5267,10 @@ function ReusableProfile({
|
|
|
5085
5267
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ItemIcon, { size: 15 })
|
|
5086
5268
|
}
|
|
5087
5269
|
),
|
|
5088
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5089
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5270
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
5271
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", fontWeight: "medium", children: option.title }),
|
|
5090
5272
|
isReplacing && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5091
|
-
|
|
5273
|
+
import_react35.Text,
|
|
5092
5274
|
{
|
|
5093
5275
|
fontSize: "xs",
|
|
5094
5276
|
color: "orange.500",
|
|
@@ -5098,9 +5280,9 @@ function ReusableProfile({
|
|
|
5098
5280
|
)
|
|
5099
5281
|
] })
|
|
5100
5282
|
] }),
|
|
5101
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.HStack, { gap: 0.5, children: [
|
|
5102
5284
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5103
|
-
|
|
5285
|
+
import_react35.IconButton,
|
|
5104
5286
|
{
|
|
5105
5287
|
size: "xs",
|
|
5106
5288
|
variant: "ghost",
|
|
@@ -5112,7 +5294,7 @@ function ReusableProfile({
|
|
|
5112
5294
|
}
|
|
5113
5295
|
),
|
|
5114
5296
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5115
|
-
|
|
5297
|
+
import_react35.IconButton,
|
|
5116
5298
|
{
|
|
5117
5299
|
size: "xs",
|
|
5118
5300
|
variant: "ghost",
|
|
@@ -5124,7 +5306,7 @@ function ReusableProfile({
|
|
|
5124
5306
|
}
|
|
5125
5307
|
),
|
|
5126
5308
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5127
|
-
|
|
5309
|
+
import_react35.IconButton,
|
|
5128
5310
|
{
|
|
5129
5311
|
size: "xs",
|
|
5130
5312
|
variant: isReplacing ? "solid" : "ghost",
|
|
@@ -5137,7 +5319,7 @@ function ReusableProfile({
|
|
|
5137
5319
|
}
|
|
5138
5320
|
),
|
|
5139
5321
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5140
|
-
|
|
5322
|
+
import_react35.IconButton,
|
|
5141
5323
|
{
|
|
5142
5324
|
size: "xs",
|
|
5143
5325
|
variant: "ghost",
|
|
@@ -5153,16 +5335,16 @@ function ReusableProfile({
|
|
|
5153
5335
|
]
|
|
5154
5336
|
}
|
|
5155
5337
|
),
|
|
5156
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5338
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {})
|
|
5157
5339
|
] }, href);
|
|
5158
5340
|
}) })
|
|
5159
5341
|
] }),
|
|
5160
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5161
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5162
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5163
|
-
replacingIdx !== null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, { mx: 4, my: 1 }),
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { px: 4, pt: 4, pb: 10, children: [
|
|
5344
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", justify: "space-between", mb: 3, children: [
|
|
5345
|
+
replacingIdx !== null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { children: [
|
|
5164
5346
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5165
|
-
|
|
5347
|
+
import_react35.Text,
|
|
5166
5348
|
{
|
|
5167
5349
|
fontSize: "xs",
|
|
5168
5350
|
fontWeight: "bold",
|
|
@@ -5172,7 +5354,7 @@ function ReusableProfile({
|
|
|
5172
5354
|
children: "Select Replacement"
|
|
5173
5355
|
}
|
|
5174
5356
|
),
|
|
5175
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5357
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Text, { fontSize: "xs", color: "gray.500", mt: 0.5, children: [
|
|
5176
5358
|
'for "',
|
|
5177
5359
|
availableOptions.find(
|
|
5178
5360
|
(item) => item.key === quickNavHrefs[replacingIdx]
|
|
@@ -5180,7 +5362,7 @@ function ReusableProfile({
|
|
|
5180
5362
|
'"'
|
|
5181
5363
|
] })
|
|
5182
5364
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5183
|
-
|
|
5365
|
+
import_react35.Text,
|
|
5184
5366
|
{
|
|
5185
5367
|
fontSize: "xs",
|
|
5186
5368
|
fontWeight: "bold",
|
|
@@ -5191,7 +5373,7 @@ function ReusableProfile({
|
|
|
5191
5373
|
}
|
|
5192
5374
|
),
|
|
5193
5375
|
replacingIdx !== null && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5194
|
-
|
|
5376
|
+
import_react35.Button,
|
|
5195
5377
|
{
|
|
5196
5378
|
size: "xs",
|
|
5197
5379
|
variant: "ghost",
|
|
@@ -5201,17 +5383,17 @@ function ReusableProfile({
|
|
|
5201
5383
|
}
|
|
5202
5384
|
)
|
|
5203
5385
|
] }),
|
|
5204
|
-
unpinnedOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5386
|
+
unpinnedOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", color: "gray.400", py: 3, textAlign: "center", children: "All available items are pinned" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.VStack, { gap: 0, children: unpinnedOptions.map((option, idx) => {
|
|
5205
5387
|
const ItemIcon = option.Icon;
|
|
5206
5388
|
const isLast = idx === unpinnedOptions.length - 1;
|
|
5207
5389
|
const isReplacingMode = replacingIdx !== null;
|
|
5208
5390
|
const canAdd = quickNavHrefs.length < maxQuickNavItems;
|
|
5209
5391
|
const actionEnabled = isReplacingMode || canAdd;
|
|
5210
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5211
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5212
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Box, { w: "full", children: [
|
|
5393
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { justify: "space-between", align: "center", py: 2.5, children: [
|
|
5394
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react35.Flex, { align: "center", gap: 3, children: [
|
|
5213
5395
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5214
|
-
|
|
5396
|
+
import_react35.Box,
|
|
5215
5397
|
{
|
|
5216
5398
|
w: "36px",
|
|
5217
5399
|
h: "36px",
|
|
@@ -5226,7 +5408,7 @@ function ReusableProfile({
|
|
|
5226
5408
|
}
|
|
5227
5409
|
),
|
|
5228
5410
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5229
|
-
|
|
5411
|
+
import_react35.Text,
|
|
5230
5412
|
{
|
|
5231
5413
|
fontSize: "sm",
|
|
5232
5414
|
fontWeight: "medium",
|
|
@@ -5236,7 +5418,7 @@ function ReusableProfile({
|
|
|
5236
5418
|
)
|
|
5237
5419
|
] }),
|
|
5238
5420
|
isReplacingMode ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5239
|
-
|
|
5421
|
+
import_react35.IconButton,
|
|
5240
5422
|
{
|
|
5241
5423
|
size: "xs",
|
|
5242
5424
|
variant: "outline",
|
|
@@ -5248,7 +5430,7 @@ function ReusableProfile({
|
|
|
5248
5430
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuArrowLeftRight, { size: 13 })
|
|
5249
5431
|
}
|
|
5250
5432
|
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5251
|
-
|
|
5433
|
+
import_react35.IconButton,
|
|
5252
5434
|
{
|
|
5253
5435
|
size: "xs",
|
|
5254
5436
|
variant: "outline",
|
|
@@ -5262,7 +5444,7 @@ function ReusableProfile({
|
|
|
5262
5444
|
}
|
|
5263
5445
|
)
|
|
5264
5446
|
] }),
|
|
5265
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5447
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Separator, {})
|
|
5266
5448
|
] }, option.key);
|
|
5267
5449
|
}) })
|
|
5268
5450
|
] })
|
|
@@ -5270,7 +5452,7 @@ function ReusableProfile({
|
|
|
5270
5452
|
const subViewContent = profileView === "edit-account" ? editAccountContent : profileView === "change-password" ? changePasswordContent : profileView === "navbar-customize" ? navbarCustomizeContent : null;
|
|
5271
5453
|
if (isDesktop) {
|
|
5272
5454
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5273
|
-
|
|
5455
|
+
import_react35.Flex,
|
|
5274
5456
|
{
|
|
5275
5457
|
maxW: "6xl",
|
|
5276
5458
|
mx: "auto",
|
|
@@ -5281,7 +5463,7 @@ function ReusableProfile({
|
|
|
5281
5463
|
align: "start",
|
|
5282
5464
|
children: [
|
|
5283
5465
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5284
|
-
|
|
5466
|
+
import_react35.Box,
|
|
5285
5467
|
{
|
|
5286
5468
|
w: { md: "300px", lg: "340px" },
|
|
5287
5469
|
flexShrink: 0,
|
|
@@ -5296,7 +5478,7 @@ function ReusableProfile({
|
|
|
5296
5478
|
}
|
|
5297
5479
|
),
|
|
5298
5480
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5299
|
-
|
|
5481
|
+
import_react35.Box,
|
|
5300
5482
|
{
|
|
5301
5483
|
flex: "1",
|
|
5302
5484
|
minW: 0,
|
|
@@ -5307,7 +5489,7 @@ function ReusableProfile({
|
|
|
5307
5489
|
bg: "bg",
|
|
5308
5490
|
minH: "540px",
|
|
5309
5491
|
children: subViewContent ?? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
5310
|
-
|
|
5492
|
+
import_react35.Flex,
|
|
5311
5493
|
{
|
|
5312
5494
|
direction: "column",
|
|
5313
5495
|
align: "center",
|
|
@@ -5318,7 +5500,7 @@ function ReusableProfile({
|
|
|
5318
5500
|
color: "gray.400",
|
|
5319
5501
|
children: [
|
|
5320
5502
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5321
|
-
|
|
5503
|
+
import_react35.Box,
|
|
5322
5504
|
{
|
|
5323
5505
|
w: "56px",
|
|
5324
5506
|
h: "56px",
|
|
@@ -5331,7 +5513,7 @@ function ReusableProfile({
|
|
|
5331
5513
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lu7.LuUser, { size: 24 })
|
|
5332
5514
|
}
|
|
5333
5515
|
),
|
|
5334
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5516
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Text, { fontSize: "sm", mt: 1, maxW: "280px", children: "Choose Edit Account, Change Password, or Quick Navigation from the menu to update your details here." })
|
|
5335
5517
|
]
|
|
5336
5518
|
}
|
|
5337
5519
|
)
|
|
@@ -5341,7 +5523,7 @@ function ReusableProfile({
|
|
|
5341
5523
|
}
|
|
5342
5524
|
);
|
|
5343
5525
|
}
|
|
5344
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react35.Box, { maxW: "480px", mx: "auto", w: "full", minH: "100%", bg: "bg", children: profileView === "main" ? mainContent : subViewContent });
|
|
5345
5527
|
}
|
|
5346
5528
|
var UserProfile_default = ReusableProfile;
|
|
5347
5529
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -5355,10 +5537,13 @@ var UserProfile_default = ReusableProfile;
|
|
|
5355
5537
|
LifePlanApplicationFormWrapper,
|
|
5356
5538
|
LifePlanApplicationStepWrapper,
|
|
5357
5539
|
NotifyInstall,
|
|
5540
|
+
OCR_STORAGE_KEY,
|
|
5358
5541
|
SharedLifePlanApplication,
|
|
5359
5542
|
UserProfile,
|
|
5360
5543
|
createEmptyApplicationData,
|
|
5361
5544
|
loadApplicationDataFromLocalStorage,
|
|
5545
|
+
markOcrApplied,
|
|
5546
|
+
readOcrResult,
|
|
5362
5547
|
saveApplicationDataToLocalStorage
|
|
5363
5548
|
});
|
|
5364
5549
|
//# sourceMappingURL=index.js.map
|