@anker-in/ui 0.3.7 → 0.3.8
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/demo-room.js +19 -1
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +19 -1
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +313 -158
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +313 -158
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/demo-room.js
CHANGED
|
@@ -1435,7 +1435,25 @@ var DemoRoomApiClient = class {
|
|
|
1435
1435
|
`/api/v1/store/bookings/${token}`,
|
|
1436
1436
|
{ headers }
|
|
1437
1437
|
);
|
|
1438
|
-
|
|
1438
|
+
const { questionnaire, booking } = response;
|
|
1439
|
+
if (questionnaire?.length) {
|
|
1440
|
+
const normalized = questionnaire.reduce(
|
|
1441
|
+
(acc, item) => {
|
|
1442
|
+
if (!item.key) return acc;
|
|
1443
|
+
acc[item.key] = item.value;
|
|
1444
|
+
return acc;
|
|
1445
|
+
},
|
|
1446
|
+
{}
|
|
1447
|
+
);
|
|
1448
|
+
return {
|
|
1449
|
+
...booking,
|
|
1450
|
+
questionnaire_response: {
|
|
1451
|
+
...booking.questionnaire_response || {},
|
|
1452
|
+
...normalized
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
}
|
|
1456
|
+
return booking;
|
|
1439
1457
|
}
|
|
1440
1458
|
/**
|
|
1441
1459
|
* 取消预约(支持多语言邮件通知)
|