Skip to content

Commit

Permalink
Merge pull request #208 from amosproj/fix-email-bugs
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
xilef45 authored Jan 31, 2023
2 parents eb6fe1a + 99f349c commit c620ade
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/deskstar-backend/Deskstar/Helper/EmailHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class EmailHelper
private static string? _emailUsername;
private static SmtpClient? _smtpClient;

private const string Footer = "Please note: This is an automatic email notification. Do not reply to this email. If this email contains time infomation, the used timezone is the ISo Norm Timezone.<br/> " +
private const string Footer = "Please note: This is an automatic email notification. Do not reply to this email. If this email contains time information, the used timezone is the ISO Norm Timezone.<br/> " +
"<br/> " +
"Regards, <br/> " +
"<br/>" +
Expand Down
12 changes: 6 additions & 6 deletions src/deskstar-backend/Deskstar/Usecases/BookingUsecases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public Booking CreateBooking(Guid userId, BookingRequest bookingRequest)
_context.SaveChanges();
var body = $"Hello {user.FirstName},</br> " +
$"you have successfully booked desk {booking.Desk.DeskName}.</br> " +
$"Your booked timeslot is from {booking.StartTime} till {booking.EndTime}.</br>" +
$"Your booked timeslot is from {booking.StartTime} until {booking.EndTime}.</br>" +
"Have a great day in the office!</br>";
EmailHelper.SendEmail(_logger, user.MailAddress, $"You're booking of desk {booking.Desk.DeskName} is confirmed!", body);
EmailHelper.SendEmail(_logger, user.MailAddress, $"Your booking of desk {booking.Desk.DeskName} is confirmed!", body);
return booking;
}

Expand Down Expand Up @@ -149,8 +149,8 @@ public Booking DeleteBooking(Guid userId, Guid bookingId)

var body = $"Hello {user.FirstName},<br/> " +
$"you have successfully canceled your booking of desk {booking.Desk.DeskName} " +
$"form {booking.StartTime} till {booking.EndTime}.<br/>";
EmailHelper.SendEmail(_logger, user.MailAddress, $"You're deleition of booking desk {booking.Desk.DeskName} is confirmed!", body);
$"from {booking.StartTime} until {booking.EndTime}.<br/>";
EmailHelper.SendEmail(_logger, user.MailAddress, $"The deletion of your booking is confirmed!", body);
return booking;
}

Expand Down Expand Up @@ -188,8 +188,8 @@ public Booking UpdateBooking(Guid userId, Guid bookingId, UpdateBookingRequest u
_context.SaveChanges();

var body = $"Hello {user.FirstName},</br> " +
$"you have successfully edit your booking of desk {booking.Desk.DeskName}.</br> " +
$"Your new timeslot is from {booking.StartTime} till {booking.EndTime}.</br>" +
$"you have successfully edited your booking of desk {booking.Desk.DeskName}.</br> " +
$"Your new timeslot is from {booking.StartTime} until {booking.EndTime}.</br>" +
"Have a great day in the office!</br>";
EmailHelper.SendEmail(_logger, user.MailAddress, $"Your booking of desk {booking.Desk.DeskName} is confirmed!", body);
return booking;
Expand Down
6 changes: 3 additions & 3 deletions src/deskstar-backend/Deskstar/Usecases/ResourceUsecases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,9 @@ private void notifybookers(Desk deletedDesk)
foreach (var booking in bookings)
{
var body = $"Hello {booking.User.FirstName},<br/> " +
$"some problems with your booking of desk {booking.Desk.DeskName} between " +
$"{booking.StartTime} till {booking.EndTime} occured.<br/>" +
"The desk was deleted by an admin. Please make sure to book an other desk for your day in office.<br/>";
$"some problems with your booking of desk {booking.Desk.DeskName} from " +
$"{booking.StartTime} until {booking.EndTime} occured.<br/>" +
"The desk was deleted by an admin. Please make sure to book another desk for your day in the office.<br/>";
EmailHelper.SendEmail(_logger, booking.User.MailAddress, $"A problem with your booking of desk {booking.Desk.DeskName} occured!", body);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/deskstar-frontend/pages/bookings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ export default function Bookings({
<BookingsTable bookings={bookings} onEdit={onEdit} onDelete={onDelete} />
<ConfirmModal
title={
"Delete booking of desk" +
"Delete booking of desk " +
booking?.deskName +
" between " +
" from " +
dayjs(booking?.startTime, {
utc: true,
}).format("DD.MM.YYYY HH:mm") +
" till " +
" untill " +
dayjs(booking?.endTime, {
utc: true,
}).format("DD.MM.YYYY HH:mm") +
Expand Down
2 changes: 1 addition & 1 deletion src/deskstar-frontend/pages/resources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ const ResourceOverview = ({
/>
<ConfirmModal
title={"Delete Desktype " + deskType?.deskTypeName + "?"}
description="This be undone!"
description="Make sure that all desks of this type are deleted first!"
text=""
warn
buttonText="DELETE"
Expand Down

0 comments on commit c620ade

Please sign in to comment.