ISSUE-713 Inform user of COUNTER success (#714)
This commit is contained in:
@@ -4,6 +4,7 @@ import { DateTimeFields } from "@/components/Event/components/DateTimeFields";
|
||||
import { FieldWithLabel } from "@/components/Event/components/FieldWithLabel";
|
||||
import { splitDateTime } from "@/components/Event/utils/dateTimeHelpers";
|
||||
import { Box, Button, TextField, Typography } from "@linagora/twake-mui";
|
||||
import { SnackbarAlert } from "@/components/Loading/SnackBarAlert";
|
||||
import moment from "moment-timezone";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useI18n } from "twake-i18n";
|
||||
@@ -22,6 +23,7 @@ export function EventCounterModal({
|
||||
}) {
|
||||
const { t } = useI18n();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const [showSuccessToast, setShowSuccessToast] = useState(false);
|
||||
|
||||
const allday = contextualizedEvent.event.allday ?? false;
|
||||
|
||||
@@ -128,6 +130,7 @@ export function EventCounterModal({
|
||||
: `${endDate}T${endTime}`,
|
||||
message,
|
||||
});
|
||||
setShowSuccessToast(true);
|
||||
setOpen(false);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@@ -150,6 +153,12 @@ export function EventCounterModal({
|
||||
}, [open, startSplit.date, startSplit.time, endSplit.date, endSplit.time]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<SnackbarAlert
|
||||
open={showSuccessToast}
|
||||
setOpen={setShowSuccessToast}
|
||||
message={t("eventPreview.proposalSubmitted")}
|
||||
/>
|
||||
<ResponsiveDialog
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
@@ -176,7 +185,10 @@ export function EventCounterModal({
|
||||
/>
|
||||
|
||||
{/* Your proposal label */}
|
||||
<FieldWithLabel label={t("eventPreview.yourProposal")} isExpanded={false}>
|
||||
<FieldWithLabel
|
||||
label={t("eventPreview.yourProposal")}
|
||||
isExpanded={false}
|
||||
>
|
||||
<DateTimeFields
|
||||
startDate={startDate}
|
||||
startTime={startTime}
|
||||
@@ -239,5 +251,6 @@ export function EventCounterModal({
|
||||
</Button>
|
||||
</Box>
|
||||
</ResponsiveDialog>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -286,6 +286,7 @@
|
||||
"yourProposal": "Your proposal",
|
||||
"optionalMessage": "Add optional message to the organizer",
|
||||
"sendProposal": "Send proposal",
|
||||
"proposalSubmitted": "New time proposal submitted",
|
||||
"ACCEPTED": "Yes",
|
||||
"TENTATIVE": "Maybe",
|
||||
"DECLINED": "No",
|
||||
|
||||
@@ -287,6 +287,7 @@
|
||||
"yourProposal": "Votre proposition",
|
||||
"optionalMessage": "Ajouter un message optionnel à l'organisateur",
|
||||
"sendProposal": "Envoyer la proposition",
|
||||
"proposalSubmitted": "Proposition de nouvel horaire envoyée",
|
||||
"ACCEPTED": "Oui",
|
||||
"TENTATIVE": "Peut-être",
|
||||
"DECLINED": "Non",
|
||||
|
||||
@@ -287,6 +287,7 @@
|
||||
"yourProposal": "Ваше предложение",
|
||||
"optionalMessage": "Добавить необязательное сообщение организатору",
|
||||
"sendProposal": "Отправить предложение",
|
||||
"proposalSubmitted": "Новое предложение по времени отправлено",
|
||||
"ACCEPTED": "Да",
|
||||
"TENTATIVE": "Возможно",
|
||||
"DECLINED": "Нет",
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
"yourProposal": "Đề xuất của bạn",
|
||||
"optionalMessage": "Thêm tin nhắn tùy chọn cho người tổ chức",
|
||||
"sendProposal": "Gửi đề xuất",
|
||||
"proposalSubmitted": "Đề xuất thời gian mới đã được gửi",
|
||||
"ACCEPTED": "Có",
|
||||
"TENTATIVE": "Có thể",
|
||||
"DECLINED": "Không",
|
||||
|
||||
Reference in New Issue
Block a user