Skip to content

Commit 6beff33

Browse files
authored
Merge branch 'main' into 112-dockerize-django-appointment-with-docker-compose-support
2 parents 86d818f + 9c22a19 commit 6beff33

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

appointment/services.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
get_all_staff_members,
2828
get_appointment_by_id, get_appointments_for_date_and_time, get_staff_member_appointment_list,
2929
get_staff_member_from_user_id_or_logged_in, get_times_from_config, get_user_by_email,
30-
get_working_hours_for_staff_and_day, parse_name, update_appointment_reminder, working_hours_exist)
30+
get_weekday_num_from_date, get_working_hours_for_staff_and_day, parse_name, update_appointment_reminder,
31+
working_hours_exist)
3132
from appointment.utils.error_codes import ErrorCode
3233
from appointment.utils.json_context import convert_appointment_to_json, get_generic_context, json_response
3334
from appointment.utils.permissions import check_entity_ownership
@@ -418,7 +419,7 @@ def get_available_slots_for_staff(date, staff_member):
418419
return []
419420

420421
# Check if the staff member works on the provided date
421-
day_of_week = date.weekday() # Python's weekday starts from Monday (0) to Sunday (6)
422+
day_of_week = get_weekday_num_from_date() # Python's weekday starts from Monday (0) to Sunday (6)
422423
working_hours_dict = get_working_hours_for_staff_and_day(staff_member, day_of_week)
423424
if not working_hours_dict:
424425
return []

appointment/templates/email_sender/reminder_email.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
text-decoration: none;
5353
display: inline-block;
5454
margin-top: 20px;
55+
text-decoration-color: white;
5556
}
5657

5758
.button:hover {

appointment/utils/db_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,10 @@ def get_staff_member_appointment_list(staff_member: StaffMember) -> list:
525525
return Appointment.objects.filter(appointment_request__staff_member=staff_member)
526526

527527

528-
def get_weekday_num_from_date(date: datetime.date) -> int:
528+
def get_weekday_num_from_date(date: datetime.date = None) -> int:
529529
"""Get the number of the weekday from the given date."""
530+
if date is None:
531+
date = datetime.date.today()
530532
return get_weekday_num(date.strftime("%A"))
531533

532534

0 commit comments

Comments
 (0)