diff --git a/src/components/client/DeliveryChoiceFlow.jsx b/src/components/client/DeliveryChoiceFlow.jsx
index d2d5b79..d51a6ea 100644
--- a/src/components/client/DeliveryChoiceFlow.jsx
+++ b/src/components/client/DeliveryChoiceFlow.jsx
@@ -50,7 +50,6 @@ const splitOrderItem = (item) => {
export const DeliveryChoiceFlow = ({
invitation = {},
selectedSlot = null,
- isChoiceSaved = false,
onConfirmChoice = () => {},
onRequestNewLink = () => {},
}) => {
@@ -62,24 +61,6 @@ export const DeliveryChoiceFlow = ({
.map(splitOrderItem)
.filter(Boolean);
const slotSummary = selectedSlot ? formatDeliverySlotLabel(selectedSlot) : "";
- const isLocked = isChoiceSaved || !isActive;
-
- const selectionCard = (
-
-
- Выбранный слот
-
- {slotSummary && !isChoiceSaved ? (
-
- Выбрано: {slotSummary}
-
- ) : (
-
- Выберите дату и половину дня выше, затем нажмите «Сохранить».
-
- )}
-
- );
if (!isActive) {
return (
@@ -119,24 +100,18 @@ export const DeliveryChoiceFlow = ({
) : null}
- {selectionCard}
-
- {!isLocked ? (
- onConfirmChoice(selectedSlot)}
- >
- Сохранить
-
- ) : null}
+ onConfirmChoice(selectedSlot)}
+ >
+ Сохранить
+
Запросить новую ссылку
-
- {isChoiceSaved ? : null}
);
};
diff --git a/src/components/client/DeliveryChoiceFlow.test.jsx b/src/components/client/DeliveryChoiceFlow.test.jsx
index 6779413..4dd04ed 100644
--- a/src/components/client/DeliveryChoiceFlow.test.jsx
+++ b/src/components/client/DeliveryChoiceFlow.test.jsx
@@ -12,19 +12,12 @@ describe("DeliveryChoiceFlow", () => {
orderNumber: "CD-240031",
customerName: "Мария Волкова",
}}
- selectedSlot={{
- date: "2026-04-14",
- time: "До обеда",
- }}
onConfirmChoice={() => {}}
onRequestNewLink={() => {}}
/>,
);
expect(markup).toContain("Выберите время доставки");
- expect(markup).toContain("Выбрано");
- expect(markup).toContain("14.04.2026");
- expect(markup).toContain("До обеда");
expect(markup).toContain("Сохранить");
expect(markup).toContain("Ожидает ответа клиента");
});
@@ -42,29 +35,10 @@ describe("DeliveryChoiceFlow", () => {
/>,
);
- expect(markup).toContain("Выберите дату и половину дня");
+ expect(markup).toContain("Сохранить");
expect(markup).toContain("disabled");
});
- it("renders a saved selection in read-only mode", () => {
- const markup = renderToStaticMarkup(
- {}}
- onRequestNewLink={() => {}}
- />,
- );
-
- expect(markup).toContain("Доставка уже согласована");
- expect(markup).not.toContain("Выбранный слот");
- expect(markup).not.toContain("Сохранить");
- });
-
it("renders order items with quantities when they are provided", () => {
const markup = renderToStaticMarkup(
{
Ваш выбор
Сохранено: {savedChoiceLabel}
- При повторном открытии этой ссылки будет показан тот же выбор.
+ Статус: доставка уже согласована. При повторном открытии этой ссылки будет показан тот же выбор.
) : null}
@@ -257,17 +257,16 @@ export const ClientDeliveryPage = () => {
/>
) : null}
- {isActiveState ? (
+ {isActiveState && !isChoiceSaved ? (
- ) : (
+ ) : !isChoiceSaved ? (
- )}
+ ) : null}
{actionMessage ? (
{actionMessage}