Skip to content

Commit

Permalink
Send equipment and additional filled by club to SLO in their email te…
Browse files Browse the repository at this point in the history
…mplate
  • Loading branch information
bhavberi committed Mar 21, 2024
1 parent db76a6c commit 10431b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion mailing_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
6. End Date : $end_time
7. Location : $location
8. Equipment Support : $equipment
9. Additional Information : $additional
8. Point of Contact -
10. Point of Contact -
Name : $poc_name
RollNo : $poc_roll
Email : $poc_email
Expand Down
10 changes: 9 additions & 1 deletion mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def editEvent(details: InputEditEventDetails, info: Info) -> EventType:
if details.location is not None and updatable:
# updates["status.room"] = False or user["role"] == "cc"
updates["location"] = [Event_Location(loc) for loc in details.location]
if details.poc is not None and event_ref["poc"] != details.poc:
if details.poc is not None and event_ref.get("poc", None) != details.poc:
updates["poc"] = details.poc
# Check POC Details Exist or not
if not getMember(details.clubid, details.poc, cookies=info.context.cookies):
Expand Down Expand Up @@ -354,6 +354,12 @@ def progressEvent(
[getattr(Event_Full_Location, loc) for loc in event.location]
)

equipment, additional = "N/A", "N/A"
if event.equipment:
equipment = event.equipment
if event.additional:
additional = event.additional

ist_offset = timedelta(hours=5, minutes=30)
start_dt = event.datetimeperiod[0] + ist_offset
end_dt = event.datetimeperiod[1] + ist_offset
Expand Down Expand Up @@ -394,6 +400,8 @@ def progressEvent(
start_time=event_start_time,
end_time=event_end_time,
location=mail_location,
equipment=equipment,
additional=additional,
poc_name=poc_name,
poc_roll=poc_roll,
poc_email=poc_email,
Expand Down

0 comments on commit 10431b6

Please sign in to comment.