diff --git a/core/tickets/shared_serializers.py b/core/tickets/shared_serializers.py index ac16d81..3d46013 100644 --- a/core/tickets/shared_serializers.py +++ b/core/tickets/shared_serializers.py @@ -9,6 +9,7 @@ class RelationSerializer(serializers.ModelSerializer): class Meta: model = ItemRelation fields = ('id', 'status', 'timestamp', 'item', 'issue_thread') + read_only_fields = ('id', 'timestamp') class BasicIssueSerializer(serializers.ModelSerializer): diff --git a/web/src/views/Ticket.vue b/web/src/views/Ticket.vue index 220ec3f..50d9d2d 100644 --- a/web/src/views/Ticket.vue +++ b/web/src/views/Ticket.vue @@ -17,7 +17,7 @@ <textarea placeholder="add comment..." v-model="newComment" class="form-control"> </textarea> - <AsyncButton class="btn btn-primary float-right" :task="addCommentAndClear"> + <AsyncButton class="btn btn-secondary float-right" :task="addCommentAndClear"> <font-awesome-icon icon="comment"/> Save Comment </AsyncButton> @@ -25,7 +25,7 @@ </div> </template> <template v-slot:timeline_action2> - <span class="timeline-item-icon | faded-icon"> + <span class="timeline-item-icon | filled-icon"> <font-awesome-icon icon="envelope"/> </span> <div class="new-mail card bg-dark"> @@ -83,8 +83,8 @@ </ClipboardButton> <div class="btn-group"> <input type="text" class="form-control" v-model="item_id"> - <button class="form-control btn btn-success" - @click="linkTicketItem({ticket_id: ticket.id, item_id: item_id}).then(()=>item_id='')"> + <button class="form-control btn btn-success" :disabled="!item_id" + @click="linkTicketItem({ticket_id: ticket.id, item_id: parseInt(item_id)}).then(()=>item_id='')"> Link Item </button> </div>