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'), + ), + ] 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 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..629ede8 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -15,21 +15,25 @@ Delete
- -
- -
@@ -69,11 +73,23 @@ 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; + }; + if(this.selected_assignee == null){ + this.selected_assignee = val.assigned_to + } + } + }, + computed: { ...mapState(['tickets', 'state_options', 'users']), ...mapGetters(['availableShippingVoucherTypes']), ticket() { @@ -85,7 +101,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']), @@ -103,15 +119,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 }) }, }, @@ -124,4 +142,4 @@ export default { \ No newline at end of file +