Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from Onlineberatung:develop #69

Merged
merged 7 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/message/Appointment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const Appointment = (param: {
const parsedData: AppointmentData = JSON.parse(param.data);
const duration = parsedData.duration;
const startingTimeStampDate = new Date(
convertUTCDateToLocalDate(new Date(parsedData.date)).toLocaleString()
convertUTCDateToLocalDate(new Date(parsedData.date)).toLocaleString(
'en-ZA'
)
).getTime();
const finishingHour = startingTimeStampDate + duration * 60 * 1000;
const appointmentDate = new Date(parsedData.date).toLocaleDateString(
Expand Down
4 changes: 3 additions & 1 deletion src/containers/bookings/components/Calcom/Cal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export default function Cal({

const sessionId = sessions[0]?.session?.id;
const { data } = e.detail;
const date = data.date;
const date = new Date(data.date)
.toUTCString()
.split(' GMT')[0];
const appointmentData = {
userName: userData.userName,
counselorEmail: data.organizer.email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const useAskerHasAssignedConsultant = () => {
const { sessions } = useContext(SessionsDataContext);
const hasConsultants = !!sessions
.filter((session) => session.agency !== null)
.map((consultant) => consultant);
.map((consultant) => consultant.consultant)
.filter((el) => el != null).length;

useEffect(() => {
if (isAdviceSeeker) {
Expand All @@ -29,7 +30,11 @@ export const useAskerHasAssignedConsultant = () => {
(session: ListItemInterface) =>
session.agency !== null
)
.map((consultant: ListItemInterface) => consultant)
.map(
(consultant: ListItemInterface) =>
consultant.consultant
)
.filter((el) => el != null).length
);
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,8 @@ export const de = {
},
overview: {
title: 'Willkommen zurück!',
myMessagesTitle: '%count% ungelesene Nachrichten',
initialInquiriesTitle: '%count% Erstanfragen',
myMessagesTitle: '{{countStr}} ungelesene Nachrichten',
initialInquiriesTitle: '{{countStr}} Erstanfragen',
upcomingAppointments: 'Ihre nächsten {{countStr}} Termine',
upcomingAppointment: 'Ihr nächster Termin',
emptyMessages: 'Du hast alles im Blick, alle Nachrichten sind gelesen!',
Expand Down
4 changes: 2 additions & 2 deletions src/resources/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1250,8 +1250,8 @@ export const en = {
},
overview: {
title: 'Welcome back!',
myMessagesTitle: '%count% unread messages',
initialInquiriesTitle: '%count% enquiries',
myMessagesTitle: '{{countStr}} unread messages',
initialInquiriesTitle: '{{countStr}} enquiries',
upcomingAppointments: 'Your next {{countStr}} appointments',
upcomingAppointment: 'Your next appointment',
emptyMessages: 'You have everything in view, all messages are read!',
Expand Down
10 changes: 6 additions & 4 deletions src/utils/transformBookingData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ export const transformBookingData = (bookings: BookingEventsInterface[]) => {
let bookingEvents: BookingEventUiInterface[] = [];
bookings?.forEach((event: BookingEventsInterface) => {
const startTime = new Date(
convertUTCDateToLocalDate(
new Date(event.startTime)
).toLocaleString()
convertUTCDateToLocalDate(new Date(event.startTime)).toLocaleString(
'en-ZA'
)
);
const endTime = new Date(
convertUTCDateToLocalDate(new Date(event.endTime)).toLocaleString()
convertUTCDateToLocalDate(new Date(event.endTime)).toLocaleString(
'en-ZA'
)
);
const date = new Date(event.startTime).toLocaleDateString('de-de', {
weekday: 'long',
Expand Down