wbintegrator_office365 1.55.5__py2.py3-none-any.whl → 1.55.6__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,7 +293,7 @@ class CallUser(WBModel):
293
293
  def get_humanized_repr(self) -> str | None:
294
294
  if self.tenant_user:
295
295
  if self.tenant_user.profile:
296
- return str(self.tenant_user.profile)
296
+ return self.tenant_user.profile.computed_str
297
297
  elif self.tenant_user.mail or self.tenant_user.display_name:
298
298
  mail = self.tenant_user.mail if self.tenant_user.mail else self.tenant_user.id
299
299
  return f"{self.tenant_user.display_name}({mail})"
@@ -39,7 +39,7 @@ def send_call_summary(
39
39
  profiles = profiles.filter(user_account__in=Group.objects.get(id=group_id).user_set.all())
40
40
 
41
41
  end_date = date.today()
42
- start_date = end_date - timedelta(days=offset)
42
+ start_date = end_date - timedelta(days=offset + 1)
43
43
  if offset == 0:
44
44
  frequency_repr = "Daily"
45
45
  date_repr = start_date.strftime("%Y-%m-%d")
@@ -77,7 +77,7 @@ def send_call_summary(
77
77
  </div>
78
78
  """
79
79
  if include_detail:
80
- for call_date in call_events.dates("start", "day"):
80
+ for call_date in call_events.dates("start", "day", order="DESC"):
81
81
  call_day_events = call_events.filter(start__date=call_date)
82
82
  if call_day_events.exists():
83
83
  message += f"<p><b>{call_date:%Y-%m-%d}:</b></p>"
@@ -103,17 +103,20 @@ def send_call_summary(
103
103
  <td style='border: 1px solid #ddd;padding: 2px; width: 20px;' >{call.start.astimezone():%H:%M}</td> \
104
104
  <td style='border: 1px solid #ddd;padding: 2px; width: 20px;' >{call.end.astimezone():%H:%M}</td> \
105
105
  <td style='border: 1px solid #ddd;padding: 2px; width: 60px;' text-align:center;><b>{format_td(call.end - call.start)}</b></td> \
106
- <td style='border: 1px solid #ddd;padding: 2px; width: 80px;' ><b>{call.organizer}</b></td> \
106
+ <td style='border: 1px solid #ddd;padding: 2px; width: 80px;' ><b>{call.organizer.get_humanized_repr()}</b></td> \
107
107
  <td style='border: 1px solid #ddd;padding: 2px; width: 150px;' >{participants}</td> \
108
108
  </tr>"
109
109
  message += "</table><br/>"
110
110
 
111
111
  message += "</div>"
112
+ title = f"Call summary - {date_repr}"
113
+ if include_detail:
114
+ title = "Detailed " + title
112
115
  for to_email in to_emails:
113
116
  recipient = get_user_model().objects.get(email=to_email)
114
117
  send_notification(
115
118
  code="wbintegrator_office365.callevent.call_summary",
116
- title=f"Call summary - {date_repr}",
119
+ title=title,
117
120
  body=message,
118
121
  user=recipient,
119
122
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbintegrator_office365
3
- Version: 1.55.5
3
+ Version: 1.55.6
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  Requires-Dist: bs4==0.0.*
6
6
  Requires-Dist: oauthlib==3.1.*
@@ -5,7 +5,7 @@ wbintegrator_office365/dynamic_preferences_registry.py,sha256=RIptl8WGibV_XMynXl
5
5
  wbintegrator_office365/factories.py,sha256=pG8moGurbSElIugs_Gz3nd7-UJt3vC6mGy-EZQIeldI,3872
6
6
  wbintegrator_office365/filters.py,sha256=bSX1jrP1SrqiGkysoX__AqPRUPSU-uQq_-tOHinqijU,7447
7
7
  wbintegrator_office365/serializers.py,sha256=tR_HdsyxwCZo2_sOdhj2NErOEjTRyoIXA6DRR-BjVKs,8097
8
- wbintegrator_office365/tasks.py,sha256=fwLE3YuV-zK71oD4xRNCkAgneD_PweSfu7XfQXIlAiY,7672
8
+ wbintegrator_office365/tasks.py,sha256=gley52lfXrOQUCz3L3NN3OGp5L7_sBVI2PtdxWDQBnE,7800
9
9
  wbintegrator_office365/urls.py,sha256=qfIIb3CNJw40xhGJnE7ztEMt2l-kgnRXA_P8Y3sDlPg,1922
10
10
  wbintegrator_office365/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  wbintegrator_office365/configurations/configurations/__init__.py,sha256=tIBWiG0KWrDJ1xtKe5m1W9aKX5PMNLwsYuoy7xrQ4uI,1145
@@ -20,7 +20,7 @@ wbintegrator_office365/migrations/0002_remove_calendar_owner_remove_calendareven
20
20
  wbintegrator_office365/migrations/0003_alter_event_options.py,sha256=rUYPQdwEuJowo10veLOZPtV3WMqxJu8_uan600EcpN4,585
21
21
  wbintegrator_office365/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  wbintegrator_office365/models/__init__.py,sha256=sZKutR9oNMm2IaON35doaMVPgeMfxmWDqoAdALHRLIA,126
23
- wbintegrator_office365/models/event.py,sha256=Uj4HhNrTR9c9IGSi3HdyaZb4IqZnPbXTU7wLcNsBecg,26994
23
+ wbintegrator_office365/models/event.py,sha256=5mKpTheP8UpUlLF_eFujfNDlsYjjbdwwdH5fB3Tg8Rg,27002
24
24
  wbintegrator_office365/models/subscription.py,sha256=EnesSa2OnuygsyfXXY8ABYOjgOaUv9Jj3c6OVQOPWyU,6424
25
25
  wbintegrator_office365/models/tenant.py,sha256=-FS6jg9nt8IgUv_729D92QFvrrbKleBUGnXhwaLv5Sc,2357
26
26
  wbintegrator_office365/templates/admin/tenant_change_list.html,sha256=mI4C1ZmTkl5MdN4CgoIWgCziSReqlHiK71aI7zJpVEM,358
@@ -37,6 +37,6 @@ wbintegrator_office365/viewsets/endpoints.py,sha256=NxEdH-tKk87mJdSNxpOZdN2z0AhY
37
37
  wbintegrator_office365/viewsets/menu.py,sha256=hafwoiHZmN3ltf30dTfwHreDwhyfdHlGOQk8bB7jB_o,2406
38
38
  wbintegrator_office365/viewsets/titles.py,sha256=9GZ_fqN9-sJzYHFvibOhNrRQQMNTh_m4eAv66VaGzDM,1214
39
39
  wbintegrator_office365/viewsets/viewsets.py,sha256=T9u8vViyeHrK1xzPbQqIKXgpf4qM-5KkPzbZGdLLujA,26331
40
- wbintegrator_office365-1.55.5.dist-info/METADATA,sha256=qpaj5CKWjJm98pmj3Ai6R8SqBNVFla6SbDqjuKRHRsM,304
41
- wbintegrator_office365-1.55.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
42
- wbintegrator_office365-1.55.5.dist-info/RECORD,,
40
+ wbintegrator_office365-1.55.6.dist-info/METADATA,sha256=dXTKs3IGettBFHIupPsZ-W0VITAjGYA0__LRM3vT8hs,304
41
+ wbintegrator_office365-1.55.6.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
42
+ wbintegrator_office365-1.55.6.dist-info/RECORD,,