diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d38a9c70c3..15367c5ead3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v9.3.75 (2024-10-17) +------------------------- + * Add Shortcuts UI + * Normal menu navigation for tickets + v9.3.74 (2024-10-17) ------------------------- * Remove pre-spa days code from flow list view diff --git a/package.json b/package.json index b7f433c82ce..3f912df4323 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@nyaruka/flow-editor": "1.35.2", - "@nyaruka/temba-components": "0.108.7", + "@nyaruka/temba-components": "0.109.0", "codemirror": "5.18.2", "colorette": "1.2.2", "fa-icons": "0.2.0", diff --git a/pyproject.toml b/pyproject.toml index e071e02bdc1..3b7e4fcdabe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "temba" -version = "9.3.74" +version = "9.3.75" description = "Hosted service for visually building interactive messaging applications" authors = ["Nyaruka "] diff --git a/static/js/frame.js b/static/js/frame.js index f787fd2c52d..828d7b2dcef 100644 --- a/static/js/frame.js +++ b/static/js/frame.js @@ -376,12 +376,6 @@ function handleMenuClicked(event) { return; } - if (!item.popup && selection.length > 1 && selection[0] == 'ticket') { - if (window.handleTicketsMenuChanged) { - handleTicketsMenuChanged(item); - } - } - // posterize if called for if (item.href && item.posterize) { posterize(item.href); diff --git a/temba/__init__.py b/temba/__init__.py index 03f2700b8c7..11527a14941 100644 --- a/temba/__init__.py +++ b/temba/__init__.py @@ -1,4 +1,4 @@ -__version__ = "9.3.74" +__version__ = "9.3.75" # This will make sure the app is always imported when # Django starts so that shared_task will use this app. diff --git a/temba/tickets/tests.py b/temba/tickets/tests.py index 16f61618bd7..63c8628aef4 100644 --- a/temba/tickets/tests.py +++ b/temba/tickets/tests.py @@ -528,7 +528,7 @@ def test_menu(self): "My Tickets (2)", "Unassigned (1)", "All (3)", - # "Shortcuts (0)", + "Shortcuts (0)", "Export", "New Topic", "General (3)", diff --git a/temba/tickets/views.py b/temba/tickets/views.py index 26d35dbe0f0..4fdce5d3ea1 100644 --- a/temba/tickets/views.py +++ b/temba/tickets/views.py @@ -278,19 +278,20 @@ def derive_menu(self): "name": folder.name, "icon": folder.icon, "count": counts[folder.id], + "href": f"/ticket/{folder.id}/open/", } ) menu.append(self.create_divider()) - # menu.append( - # self.create_menu_item( - # menu_id="shortcuts", - # name=_("Shortcuts"), - # icon="shortcut", - # count=org.shortcuts.filter(is_active=True).count(), - # href="tickets.shortcut_list", - # ) - # ) + menu.append( + self.create_menu_item( + menu_id="shortcuts", + name=_("Shortcuts"), + icon="shortcut", + count=org.shortcuts.filter(is_active=True).count(), + href="tickets.shortcut_list", + ) + ) menu.append(self.create_modax_button(_("Export"), "tickets.ticket_export", icon="export")) menu.append( self.create_modax_button(_("New Topic"), "tickets.topic_create", icon="add", on_submit="refreshMenu()") @@ -307,6 +308,7 @@ def derive_menu(self): "name": topic.name, "icon": "topic", "count": counts[topic], + "href": f"/ticket/{topic.uuid}/open/", } ) diff --git a/templates/frame.html b/templates/frame.html index ccbfcdb2351..101f1ba10ec 100644 --- a/templates/frame.html +++ b/templates/frame.html @@ -155,6 +155,7 @@ fields="/api/v2/fields.json" groups="/api/v2/groups.json" workspace="/api/v2/workspace.json" + shortcuts="/api/internal/shortcuts.json" users="/api/v2/users.json"> {% else %} diff --git a/templates/msgs/broadcast_create_compose.html b/templates/msgs/broadcast_create_compose.html index 83910ef8fb3..66e0b6ea600 100644 --- a/templates/msgs/broadcast_create_compose.html +++ b/templates/msgs/broadcast_create_compose.html @@ -5,8 +5,8 @@ {{ block.super }} {% endblock extra-style %} diff --git a/templates/tickets/shortcut_list.html b/templates/tickets/shortcut_list.html index be12b26247a..dba009e388a 100644 --- a/templates/tickets/shortcut_list.html +++ b/templates/tickets/shortcut_list.html @@ -15,9 +15,19 @@ {% block table-body %} {% for obj in object_list %} - {{ obj.name }} + {{ obj.name }} -
{{ obj.text|truncatechars:100 }}
+
{{ obj.text }}
{% if org_perms.tickets.shortcut_delete %} @@ -39,6 +49,9 @@ {% block extra-script %} {{ block.super }}