[#625] changed caption for busy connected user
This commit is contained in:
committed by
Benoit TELLIER
parent
d41cfe1186
commit
29e9619f02
@@ -1,3 +1,4 @@
|
|||||||
|
import { useAppSelector } from "@/app/hooks";
|
||||||
import { useAttendeesFreeBusy } from "@/components/Attendees/useFreeBusy";
|
import { useAttendeesFreeBusy } from "@/components/Attendees/useFreeBusy";
|
||||||
import { renderAttendeeBadge } from "@/components/Event/utils/eventUtils";
|
import { renderAttendeeBadge } from "@/components/Event/utils/eventUtils";
|
||||||
import { extractEventBaseUuid } from "@/utils/extractEventBaseUuid";
|
import { extractEventBaseUuid } from "@/utils/extractEventBaseUuid";
|
||||||
@@ -34,7 +35,7 @@ export function EventPreviewAttendees({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const infoIconColor = alpha(theme.palette.grey[900], 0.9);
|
const infoIconColor = alpha(theme.palette.grey[900], 0.9);
|
||||||
const infoIconSx = { minWidth: "25px", marginRight: 2, color: infoIconColor };
|
const infoIconSx = { minWidth: "25px", marginRight: 2, color: infoIconColor };
|
||||||
|
const userEmail = useAppSelector((state) => state.user.userData.email);
|
||||||
const [showAllAttendees, setShowAllAttendees] = useState(false);
|
const [showAllAttendees, setShowAllAttendees] = useState(false);
|
||||||
|
|
||||||
const attendeePreview = makeAttendeePreview(allAttendees, t);
|
const attendeePreview = makeAttendeePreview(allAttendees, t);
|
||||||
@@ -61,7 +62,9 @@ export function EventPreviewAttendees({
|
|||||||
|
|
||||||
const busyCaption = (a: userAttendee) =>
|
const busyCaption = (a: userAttendee) =>
|
||||||
freeBusyMap[a.cal_address] === "busy"
|
freeBusyMap[a.cal_address] === "busy"
|
||||||
? t("event.freeBusy.busy")
|
? a.cal_address === userEmail
|
||||||
|
? t("event.freeBusy.busyCalOwner")
|
||||||
|
: t("event.freeBusy.busy")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -136,6 +136,7 @@
|
|||||||
"freeBusy": {
|
"freeBusy": {
|
||||||
"unknown": "Unknown status",
|
"unknown": "Unknown status",
|
||||||
"busy": "This person is busy",
|
"busy": "This person is busy",
|
||||||
|
"busyCalOwner": "You have another event at this time",
|
||||||
"free": "User is free",
|
"free": "User is free",
|
||||||
"loading": "Status is loading"
|
"loading": "Status is loading"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -137,6 +137,7 @@
|
|||||||
"freeBusy": {
|
"freeBusy": {
|
||||||
"unknown": "Statut inconnu",
|
"unknown": "Statut inconnu",
|
||||||
"busy": "Cette personne est occupée",
|
"busy": "Cette personne est occupée",
|
||||||
|
"busyCalOwner": "Vous avez un autre événement à cette heure-ci",
|
||||||
"free": "L'utilisateur est disponible",
|
"free": "L'utilisateur est disponible",
|
||||||
"loading": "Chargement du statut"
|
"loading": "Chargement du statut"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -137,6 +137,7 @@
|
|||||||
"freeBusy": {
|
"freeBusy": {
|
||||||
"unknown": "Статус неизвестен",
|
"unknown": "Статус неизвестен",
|
||||||
"busy": "Пользователь занят",
|
"busy": "Пользователь занят",
|
||||||
|
"busyCalOwner": "У вас в данный момент другое мероприятие",
|
||||||
"free": "Пользователь свободен",
|
"free": "Пользователь свободен",
|
||||||
"loading": "Загрузка статуса"
|
"loading": "Загрузка статуса"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
"freeBusy": {
|
"freeBusy": {
|
||||||
"unknown": "Trạng thái không rõ",
|
"unknown": "Trạng thái không rõ",
|
||||||
"busy": "Người này đang bận",
|
"busy": "Người này đang bận",
|
||||||
|
"busyCalOwner": "Bạn có một sự kiện khác vào thời gian này",
|
||||||
"free": "Người dùng đang rảnh",
|
"free": "Người dùng đang rảnh",
|
||||||
"loading": "Đang tải trạng thái"
|
"loading": "Đang tải trạng thái"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user