Compare commits
No commits in common. "487aa7d61fb1c786fd3194ab2461562fee2836f4" and "a7af4f9cddb9e8a04b02f1fbb26337c57e0aa68b" have entirely different histories.
487aa7d61f
...
a7af4f9cdd
5 changed files with 15 additions and 57 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "web/extras"]
|
|
||||||
path = web/extras
|
|
||||||
url = https://git.neulandlabor.de/j3d1/vue-extras.git
|
|
|
@ -1,20 +0,0 @@
|
||||||
# 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'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1 +0,0 @@
|
||||||
HTTP_HOST=core
|
|
|
@ -15,25 +15,21 @@
|
||||||
Delete
|
Delete
|
||||||
</button-->
|
</button-->
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<select class="form-control" v-model="selected_assignee">
|
<select class="form-control" v-model="ticket.assigned_to">
|
||||||
<option v-for="user in users" :value="user.username">{{ user.username }}</option>
|
<option v-for="user in users" :value="user.username">{{ user.username }}</option>
|
||||||
</select>
|
</select>
|
||||||
<button class="form-control btn btn-success"
|
<button class="form-control btn btn-success" @click="assignTicket(ticket)">
|
||||||
@click="assignTicket(ticket)"
|
Assign Ticket
|
||||||
:disabled="!selected_assignee || (selected_assignee == ticket.assigned_to)">
|
|
||||||
Assign Ticket
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<select class="form-control" v-model="selected_state">
|
<select class="form-control" v-model="ticket.state">
|
||||||
<option v-for="status in state_options" :value="status.value">{{
|
<option v-for="status in state_options" :value="status.value">{{
|
||||||
status.text
|
status.text
|
||||||
}}
|
}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<button class="form-control btn btn-success"
|
<button class="form-control btn btn-success" @click="changeTicketStatus(ticket)">
|
||||||
@click="changeTicketStatus(ticket)"
|
|
||||||
:disabled="(selected_state == ticket.state)">
|
|
||||||
Change Status
|
Change Status
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,23 +69,11 @@ export default {
|
||||||
name: 'Ticket',
|
name: 'Ticket',
|
||||||
components: {AsyncLoader, ClipboardButton, Timeline},
|
components: {AsyncLoader, ClipboardButton, Timeline},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selected_state: null,
|
shipping_voucher_type: null
|
||||||
selected_assignee: null,
|
|
||||||
shipping_voucher_type: null,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
computed: {
|
||||||
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']),
|
...mapState(['tickets', 'state_options', 'users']),
|
||||||
...mapGetters(['availableShippingVoucherTypes']),
|
...mapGetters(['availableShippingVoucherTypes']),
|
||||||
ticket() {
|
ticket() {
|
||||||
|
@ -101,7 +85,7 @@ export default {
|
||||||
const domain = document.location.hostname;
|
const domain = document.location.hostname;
|
||||||
return `ticket+${this.ticket.uuid}@${domain}`;
|
return `ticket+${this.ticket.uuid}@${domain}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']),
|
...mapActions(['deleteItem', 'markItemReturned', 'sendMail', 'updateTicketPartial', 'postComment']),
|
||||||
...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']),
|
...mapActions(['loadTickets', 'fetchTicketStates', 'loadUsers', 'scheduleAfterInit']),
|
||||||
|
@ -119,17 +103,15 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTicketStatus(ticket) {
|
changeTicketStatus(ticket) {
|
||||||
ticket.state = this.selected_state;
|
this.updateTicketPartial({
|
||||||
this.updateTicketPartial({
|
|
||||||
id: ticket.id,
|
id: ticket.id,
|
||||||
state: this.selected_state,
|
state: ticket.state
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
assignTicket(ticket) {
|
assignTicket(ticket) {
|
||||||
ticket.assigned_to = this.selected_assignee;
|
this.updateTicketPartial({
|
||||||
this.updateTicketPartial({
|
|
||||||
id: ticket.id,
|
id: ticket.id,
|
||||||
assigned_to: this.selected_assignee
|
assigned_to: ticket.assigned_to
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue