"""Meetings: the overview of an invite and its prep summary, and rows of earlier occurrences. CSS: meetings.css.""" from .icons import icon from .links import e, link, placeholder, text, texts def overview(invite, summary, generated_from, join_label=''): """A meeting overview's two blocks, divided by a line: the invite's description, quoted as written, and the prep summary. Data: invite is {"text", "recordedIn"?}, or None when the invite has no description. summary is a list of text fields, and generated_from names what it came from. With join_label, the invite block says joining details were removed and points to that button. overview({"text": "Weekly go/no-go for the search cutover."}, ["This call decides the date."], "the Oct 22 notes, Google Calendar and Jira", join_label='Join Google Meet') """ if invite: notes = [] if join_label: notes.append(f'Joining details removed. Use {join_label} above. It may ask for the passcode in your calendar invite.') if invite.get('recordedIn'): notes.append(f'This meeting is recorded in {invite["recordedIn"]}.') quoted = f'
{e(invite["text"])}' quoted += f'
{e(" ".join(notes))}
' if notes else '' else: quoted = 'The invite has no description.
' paras = ''.join(f'{text(s)}
' for s in texts(summary)) return (f'Generated from {e(generated_from)}. Check it before sharing.