Skip to content

Commit 7051cff

Browse files
committed
Add invites v19
1 parent ac7422e commit 7051cff

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/components/managementservice/meetings/Meetings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { Meeting, MeetingAttendee, MeetingPartstat, Room, User } from '../../../
2626
import { useAppDispatch, useAppSelector } from '../../../store/hooks';
2727
import { localeList } from '../../../utils/intlManager';
2828
import { browserTimezone, timezoneOptions } from '../../../utils/timezones';
29+
import { ensureMomentLocale, toMomentLocale } from '../../../utils/momentLocale';
2930
import {
3031
createData,
3132
deleteData,
@@ -128,6 +129,9 @@ const MeetingsTable = () => {
128129
const localization = useMRTLocalization();
129130
const uiLocale = useAppSelector((state) => state.settings.locale);
130131
const defaultLocale = mapUiLocaleToFile(uiLocale);
132+
const momentLocale = toMomentLocale(defaultLocale);
133+
134+
useEffect(() => { ensureMomentLocale(defaultLocale); }, [ defaultLocale ]);
131135

132136
const [ data, setData ] = useState<Meeting[]>([]);
133137
const [ rooms, setRooms ] = useState<Room[]>([]);
@@ -425,7 +429,7 @@ const MeetingsTable = () => {
425429
};
426430

427431
return (
428-
<LocalizationProvider dateAdapter={AdapterMoment}>
432+
<LocalizationProvider dateAdapter={AdapterMoment} adapterLocale={momentLocale}>
429433
<Box>
430434
<Typography variant="h6">{meetingsLabel()}</Typography>
431435
<Button variant="outlined" onClick={handleOpenAdd} sx={{ mt: 1, mb: 1 }} disabled={rooms.length === 0}>

src/components/managementservice/rooms/RoomMeetings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { Meeting, MeetingAttendee, MeetingPartstat, User } from '../../../utils/
2727
import { useAppDispatch, useAppSelector } from '../../../store/hooks';
2828
import { localeList } from '../../../utils/intlManager';
2929
import { browserTimezone, timezoneOptions } from '../../../utils/timezones';
30+
import { ensureMomentLocale, toMomentLocale } from '../../../utils/momentLocale';
3031
import {
3132
createData,
3233
deleteData,
@@ -128,6 +129,9 @@ const RoomMeetingsTable = (props: RoomProp) => {
128129
const localization = useMRTLocalization();
129130
const uiLocale = useAppSelector((state) => state.settings.locale);
130131
const defaultLocale = mapUiLocaleToFile(uiLocale);
132+
const momentLocale = toMomentLocale(defaultLocale);
133+
134+
useEffect(() => { ensureMomentLocale(defaultLocale); }, [ defaultLocale ]);
131135

132136
const [ data, setData ] = useState<Meeting[]>([]);
133137
const [ users, setUsers ] = useState<User[]>([]);
@@ -404,7 +408,7 @@ const RoomMeetingsTable = (props: RoomProp) => {
404408
};
405409

406410
return (
407-
<LocalizationProvider dateAdapter={AdapterMoment}>
411+
<LocalizationProvider dateAdapter={AdapterMoment} adapterLocale={momentLocale}>
408412
<Box sx={{ mt: 2 }}>
409413
<Typography variant="h6">{meetingsLabel()}</Typography>
410414
<Button variant="outlined" onClick={handleOpenAdd} sx={{ mt: 1, mb: 1 }}>

src/components/managementservice/tenants/TenantInviteConfig.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ const TenantInviteConfigPanel = (props: TenantInviteConfigProps) => {
190190
sx={{ flex: 3 }}
191191
value={smtpHost}
192192
onChange={(e) => setSmtpHost(e.target.value)}
193+
placeholder="smtp.example.com"
194+
error={smtpHost.includes('@')}
195+
helperText={smtpHost.includes('@') ? 'Server hostname only (no @)' : ''}
193196
/>
194197
<TextField
195198
label={smtpPortLabel()}
@@ -239,6 +242,9 @@ const TenantInviteConfigPanel = (props: TenantInviteConfigProps) => {
239242
sx={{ flex: 3 }}
240243
value={imapHost}
241244
onChange={(e) => setImapHost(e.target.value)}
245+
placeholder="imap.example.com"
246+
error={imapHost.includes('@')}
247+
helperText={imapHost.includes('@') ? 'Server hostname only (no @)' : ''}
242248
/>
243249
<TextField
244250
label={imapPortLabel()}

0 commit comments

Comments
 (0)