From c0388e2b5405393b17b3de998cf897c6099604e6 Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 3 Nov 2024 19:31:12 +0100 Subject: [PATCH 1/5] stash --- .gitmodules | 3 +++ .../0005_alter_eventaddress_event.py | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .gitmodules create mode 100644 core/mail/migrations/0005_alter_eventaddress_event.py diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f3f3038 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "web/extras"] + path = web/extras + url = https://git.neulandlabor.de/j3d1/vue-extras.git diff --git a/core/mail/migrations/0005_alter_eventaddress_event.py b/core/mail/migrations/0005_alter_eventaddress_event.py new file mode 100644 index 0000000..30b79bf --- /dev/null +++ b/core/mail/migrations/0005_alter_eventaddress_event.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.7 on 2024-11-03 18:30 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('inventory', '0004_alter_event_created_at_alter_item_created_at'), + ('mail', '0004_alter_emailattachment_file'), + ] + + operations = [ + migrations.AlterField( + model_name='eventaddress', + name='event', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='addresses', to='inventory.event'), + ), + ] -- 2.39.5 From cf48428a4c492c39149acf991bb5ed958da95c29 Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 1 Nov 2024 22:48:24 +0100 Subject: [PATCH 2/5] disable Assigned Ticket butten in ticket view until they would actually do something --- web/src/components/AsyncLoader.vue | 2 +- web/src/views/Ticket.vue | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/components/AsyncLoader.vue b/web/src/components/AsyncLoader.vue index 00bf841..06c5908 100644 --- a/web/src/components/AsyncLoader.vue +++ b/web/src/components/AsyncLoader.vue @@ -130,4 +130,4 @@ export default { transform: translate(24px, 0); } } - \ No newline at end of file + diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue index 39f5a71..560811f 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -18,8 +18,10 @@ -
@@ -124,4 +126,4 @@ export default { \ No newline at end of file + -- 2.39.5 From 24bd2bdd0a311960fcc20445ebb6e7b26bbe5bf6 Mon Sep 17 00:00:00 2001 From: bton Date: Sat, 2 Nov 2024 01:13:21 +0100 Subject: [PATCH 3/5] state button has the state pre selected --- web/src/views/Ticket.vue | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue index 560811f..2872185 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -15,23 +15,25 @@ Delete
-
- -
@@ -71,11 +73,20 @@ export default { name: 'Ticket', components: {AsyncLoader, ClipboardButton, Timeline}, data() { - return { - shipping_voucher_type: null + return { + selected_state: null, + Selected_assignee: null, + shipping_voucher_type: null, } }, - computed: { + watch: { + ticket(val) { + if (this.selected_state == null){ + this.selected_state = val.state; + } + } + }, + computed: { ...mapState(['tickets', 'state_options', 'users']), ...mapGetters(['availableShippingVoucherTypes']), ticket() { @@ -87,7 +98,7 @@ export default { const domain = document.location.hostname; return `ticket+${this.ticket.uuid}@${domain}`; } - }, + }, methods: { ...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']), ...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']), @@ -105,15 +116,17 @@ export default { }) }, changeTicketStatus(ticket) { - this.updateTicketPartial({ + ticket.state = this.selected_state; + this.updateTicketPartial({ id: ticket.id, - state: ticket.state + state: this.selected_state, }) }, assignTicket(ticket) { - this.updateTicketPartial({ + ticket.assigned_to = this.selected_assignee; + this.updateTicketPartial({ id: ticket.id, - assigned_to: ticket.assigned_to + assigned_to: this.selected_assignee }) }, }, -- 2.39.5 From 4dbe364e6dc93051a8b2f0bb6d0b8483f28bf8d5 Mon Sep 17 00:00:00 2001 From: bton Date: Sat, 2 Nov 2024 01:24:12 +0100 Subject: [PATCH 4/5] assigned ticket button is pre selected and deisabled if selected person == asigned person --- web/src/views/Ticket.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue index 2872185..629ede8 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -20,7 +20,7 @@
@@ -75,7 +75,7 @@ export default { data() { return { selected_state: null, - Selected_assignee: null, + selected_assignee: null, shipping_voucher_type: null, } }, @@ -83,7 +83,10 @@ export default { ticket(val) { if (this.selected_state == null){ this.selected_state = val.state; - } + }; + if(this.selected_assignee == null){ + this.selected_assignee = val.assigned_to + } } }, computed: { -- 2.39.5 From 487aa7d61fb1c786fd3194ab2461562fee2836f4 Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 1 Nov 2024 23:40:55 +0100 Subject: [PATCH 5/5] add dev docker --- deploy/dev/.backend.env | 1 + 1 file changed, 1 insertion(+) create mode 100644 deploy/dev/.backend.env diff --git a/deploy/dev/.backend.env b/deploy/dev/.backend.env new file mode 100644 index 0000000..bfddc4a --- /dev/null +++ b/deploy/dev/.backend.env @@ -0,0 +1 @@ +HTTP_HOST=core \ No newline at end of file -- 2.39.5