fix: improve video conference link positioning and null safety

- Fix calendarUtils.ts null safety for calendars[id] access
- Update video conference link to be added on line 2 instead of line 3
- Update regex in handleDeleteVideoConference to match new format
- Update all test cases for videoConferenceUtils to match new format
- Add null checks in updateCalsDetails function
This commit is contained in:
lenhanphung
2025-10-03 10:46:34 +07:00
parent ff54840ac8
commit cea576e5e8
4 changed files with 19 additions and 19 deletions
+2 -4
View File
@@ -270,7 +270,7 @@ function EventPopover({
const handleDeleteVideoConference = () => {
// Remove video conference footer from description
const updatedDescription = description.replace(
/\n\nVisio: https?:\/\/[^\s]+/,
/\nVisio: https?:\/\/[^\s]+/,
""
);
setDescription(updatedDescription);
@@ -500,7 +500,6 @@ function EventPopover({
/>
}
label="Mark as important"
sx={{ padding: "0 8px 0 0" }}
/>
<FormControlLabel
control={
@@ -534,7 +533,6 @@ function EventPopover({
/>
}
label="All day"
sx={{ padding: "0 8px 0 0" }}
/>
<FormControlLabel
control={
@@ -596,7 +594,7 @@ function EventPopover({
</FieldWithLabel>
<FieldWithLabel label="Video meeting" isExpanded={showMore}>
<Box display="flex" gap={1} mb={1} alignItems="center">
<Box display="flex" gap={1} alignItems="center">
<Button
startIcon={<VideocamIcon />}
onClick={handleAddVideoConference}