Compare commits
5 commits
a7af4f9cdd
...
487aa7d61f
Author | SHA1 | Date | |
---|---|---|---|
487aa7d61f | |||
4dbe364e6d | |||
24bd2bdd0a | |||
cf48428a4c | |||
c0388e2b54 |
5 changed files with 57 additions and 15 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "web/extras"]
|
||||
path = web/extras
|
||||
url = https://git.neulandlabor.de/j3d1/vue-extras.git
|
20
core/mail/migrations/0005_alter_eventaddress_event.py
Normal file
20
core/mail/migrations/0005_alter_eventaddress_event.py
Normal file
|
@ -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'),
|
||||
),
|
||||
]
|
1
deploy/dev/.backend.env
Normal file
1
deploy/dev/.backend.env
Normal file
|
@ -0,0 +1 @@
|
|||
HTTP_HOST=core
|
|
@ -15,21 +15,25 @@
|
|||
Delete
|
||||
</button-->
|
||||
<div class="btn-group">
|
||||
<select class="form-control" v-model="ticket.assigned_to">
|
||||
<select class="form-control" v-model="selected_assignee">
|
||||
<option v-for="user in users" :value="user.username">{{ user.username }}</option>
|
||||
</select>
|
||||
<button class="form-control btn btn-success" @click="assignTicket(ticket)">
|
||||
<button class="form-control btn btn-success"
|
||||
@click="assignTicket(ticket)"
|
||||
:disabled="!selected_assignee || (selected_assignee == ticket.assigned_to)">
|
||||
Assign Ticket
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<select class="form-control" v-model="ticket.state">
|
||||
<select class="form-control" v-model="selected_state">
|
||||
<option v-for="status in state_options" :value="status.value">{{
|
||||
status.text
|
||||
}}
|
||||
</option>
|
||||
</select>
|
||||
<button class="form-control btn btn-success" @click="changeTicketStatus(ticket)">
|
||||
<button class="form-control btn btn-success"
|
||||
@click="changeTicketStatus(ticket)"
|
||||
:disabled="(selected_state == ticket.state)">
|
||||
Change Status
|
||||
</button>
|
||||
</div>
|
||||
|
@ -70,7 +74,19 @@ export default {
|
|||
components: {AsyncLoader, ClipboardButton, Timeline},
|
||||
data() {
|
||||
return {
|
||||
shipping_voucher_type: null
|
||||
selected_state: null,
|
||||
selected_assignee: null,
|
||||
shipping_voucher_type: null,
|
||||
}
|
||||
},
|
||||
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: {
|
||||
|
@ -103,15 +119,17 @@ export default {
|
|||
})
|
||||
},
|
||||
changeTicketStatus(ticket) {
|
||||
ticket.state = this.selected_state;
|
||||
this.updateTicketPartial({
|
||||
id: ticket.id,
|
||||
state: ticket.state
|
||||
state: this.selected_state,
|
||||
})
|
||||
},
|
||||
assignTicket(ticket) {
|
||||
ticket.assigned_to = this.selected_assignee;
|
||||
this.updateTicketPartial({
|
||||
id: ticket.id,
|
||||
assigned_to: ticket.assigned_to
|
||||
assigned_to: this.selected_assignee
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue