From 8fb058ee5010b2b636e303f8a8aa9e47bcc4b24b Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 6 Dec 2023 06:47:30 +0100 Subject: [PATCH] stash --- core/mail/protocol.py | 2 + web/src/components/Navbar.vue | 5 +- web/src/components/Timeline.vue | 230 +++------------------ web/src/components/TimelineComment.vue | 79 +++++++ web/src/components/TimelineMail.vue | 199 ++++++++++++++++++ web/src/components/TimelineStateChange.vue | 77 +++++++ web/src/views/Ticket.vue | 5 +- 7 files changed, 396 insertions(+), 201 deletions(-) create mode 100644 web/src/components/TimelineComment.vue create mode 100644 web/src/components/TimelineMail.vue create mode 100644 web/src/components/TimelineStateChange.vue diff --git a/core/mail/protocol.py b/core/mail/protocol.py index 39a4c63..1c95f03 100644 --- a/core/mail/protocol.py +++ b/core/mail/protocol.py @@ -125,6 +125,8 @@ class LMTPHandler: log.info(f"Created email {email.id}") systemevent = await sync_to_async(SystemEvent.objects.create)(type='email received', reference=email.id) log.info(f"Created system event {systemevent.id}") + state_change = await sync_to_async( + active_issue_thread.state_changes.create)(state='new', issue_thread=active_issue_thread) channel_layer = get_channel_layer() await channel_layer.group_send( 'general', {"type": "generic.event", "name": "send_message_to_frontend", "event_id": systemevent.id, diff --git a/web/src/components/Navbar.vue b/web/src/components/Navbar.vue index 7b3f67a..e3dc6c6 100644 --- a/web/src/components/Navbar.vue +++ b/web/src/components/Navbar.vue @@ -13,13 +13,13 @@