diff --git a/core/tickets/serializers.py b/core/tickets/serializers.py index 00acff6..897fdf8 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -127,7 +127,8 @@ class IssueSerializer(serializers.ModelSerializer): 'type': 'shipping_code', 'id': shipping_code.id, 'timestamp': shipping_code.used_at, - 'code': ShippingCodeSerializer(shipping_code).data, + 'code': shipping_code.code, + 'code_type': shipping_code.type, }) return sorted(timeline, key=lambda x: x['timestamp']) diff --git a/web/src/components/TimelineShippingCode.vue b/web/src/components/TimelineShippingCode.vue new file mode 100644 index 0000000..9f5ef02 --- /dev/null +++ b/web/src/components/TimelineShippingCode.vue @@ -0,0 +1,110 @@ + + + + + \ No newline at end of file diff --git a/web/src/store.js b/web/src/store.js index 0dcb2bb..c9ad60f 100644 --- a/web/src/store.js +++ b/web/src/store.js @@ -50,6 +50,15 @@ const store = createStore({ showAddBoxModal: false, test: ['foo', 'bar', 'baz'], + + shippingCodeTypes: { + '2kg-de': '2kg Paket (DE)', + '5kg-de': '5kg Paket (DE)', + '10kg-de': '10kg Paket (DE)', + '2kg-eu': '2kg Paket (EU)', + '5kg-eu': '5kg Paket (EU)', + '10kg-eu': '10kg Paket (EU)', + } }, getters: { route: state => router.currentRoute.value, @@ -497,6 +506,7 @@ const store = createStore({ "loadedItems", "messageTemplates", "messageTemplatesVariables", + "shippingCodes", ], watch: [ "test", @@ -509,6 +519,7 @@ const store = createStore({ "loadedItems", "messageTemplates", "messageTemplatesVariables", + "shippingCodes", ], mutations: [ //"replaceTickets", diff --git a/web/src/views/admin/Shipping.vue b/web/src/views/admin/Shipping.vue index 227dfe8..20d7341 100644 --- a/web/src/views/admin/Shipping.vue +++ b/web/src/views/admin/Shipping.vue @@ -1,42 +1,36 @@