|
| 1 | +<template> |
| 2 | + <div class="form-new-ticket"> |
| 3 | + <b-form @submit="onSubmit"> |
| 4 | + <b-form-group |
| 5 | + id="requestorGroup" |
| 6 | + label="Requestor:" |
| 7 | + label-for="requestor" |
| 8 | + description="Employee ID who submitted the ticket" |
| 9 | + > |
| 10 | + <b-form-input |
| 11 | + id="requestor" |
| 12 | + type="number" |
| 13 | + v-model="form.Requestor" |
| 14 | + required |
| 15 | + placeholder="Enter Requestor ID (number)" /> |
| 16 | + </b-form-group> |
| 17 | + |
| 18 | + <b-form-group id="requestor-seniority-group" label="Requestor Seniority:" label-for="requestor-seniority"> |
| 19 | + <b-form-select id="requestor-seniority" :options="requestorSeniorityArray" required v-model="form.RequestorSeniority" /> |
| 20 | + </b-form-group> |
| 21 | + |
| 22 | + <b-form-group |
| 23 | + id="ITOwnerGroup" |
| 24 | + label="IT Owner:" |
| 25 | + label-for="ITOwner" |
| 26 | + description="Employee ID of IT employee who serviced ticket" |
| 27 | + > |
| 28 | + <b-form-input |
| 29 | + id="ITOwner" |
| 30 | + type="number" |
| 31 | + v-model="form.ITOwner" |
| 32 | + required |
| 33 | + placeholder="Enter IT Owner ID (number)" /> |
| 34 | + </b-form-group> |
| 35 | + |
| 36 | + <b-form-group id="filed-against-group" label="Filed Against:" label-for="filed-against" |
| 37 | + description="Functional area the ticket was filed" |
| 38 | + > |
| 39 | + <b-form-select id="filed-aganinst" :options="FiledAgainstArray" required v-model="form.FiledAgainst" /> |
| 40 | + </b-form-group> |
| 41 | + |
| 42 | + <b-form-group id="ticket-type-group" label="Ticket Type:" label-for="ticket type" > |
| 43 | + <b-form-select id="ticket-type" :options="TicketTypeArray" required v-model="form.TicketType" /> |
| 44 | + </b-form-group> |
| 45 | + |
| 46 | + <b-form-group id="severity-group" label="Severity:" label-for="severity" description="Submitter assigned severity of ticket"> |
| 47 | + <b-form-select id="severity" :options="SeverityArray" required v-model="form.Severity" /> |
| 48 | + </b-form-group> |
| 49 | + |
| 50 | + <b-form-group id="priority-group" label="Priority:" label-for="priority" description="IT assigned priority of ticket"> |
| 51 | + <b-form-select id="priority" :options="PriorityArray" required v-model="form.Priority"></b-form-select> |
| 52 | + </b-form-group> |
| 53 | + |
| 54 | + <b-form-group |
| 55 | + id="days-open-group" |
| 56 | + label="Days Open:" |
| 57 | + label-for="days-open" |
| 58 | + > |
| 59 | + <b-form-input |
| 60 | + id="days-open" |
| 61 | + type="number" |
| 62 | + v-model="form.daysOpen" |
| 63 | + required |
| 64 | + placeholder="Enter the days the ticket is open for (number)" /> |
| 65 | + </b-form-group> |
| 66 | + |
| 67 | + <b-form-group id="satisfaction-group" label="Satisfaction:" label-for="satisfaction"> |
| 68 | + <b-form-select id="satisfaction" :options="SatisfactionArray" required v-model="form.Satisfaction"></b-form-select> |
| 69 | + </b-form-group> |
| 70 | + |
| 71 | + <div class="submit-button"> |
| 72 | + <b-button type="submit" variant="primary">Submit</b-button> |
| 73 | + </div> |
| 74 | + |
| 75 | + </b-form> |
| 76 | + </div> |
| 77 | +</template> |
| 78 | + |
| 79 | +<script> |
| 80 | +export default { |
| 81 | + name: "NewTicket", |
| 82 | + data: function() { |
| 83 | + return { |
| 84 | + form: { |
| 85 | + "Requestor": null, |
| 86 | + "RequestorSeniority": null, |
| 87 | + "ITOwner": null, |
| 88 | + "FiledAgainst": null, |
| 89 | + "TicketType": null, |
| 90 | + "Severity": null, |
| 91 | + "Priority": null, |
| 92 | + "daysOpen": null, |
| 93 | + "Satisfaction": null, |
| 94 | + "Ticket Creation Date": null |
| 95 | + }, |
| 96 | + requestorSeniorityArray: [ |
| 97 | + { text: "Select One", value: null }, |
| 98 | + { text: "Junior", value: "1 - Junior" }, |
| 99 | + { text: "Regular", value: "2 - Regular" }, |
| 100 | + { text: "Senior", value: "3 - Senior" }, |
| 101 | + { text: "Management", value: "4 - Management" } |
| 102 | + ], |
| 103 | + FiledAgainstArray: [{ text: "Select One", value: null }, "Access/Login", "Hardware", "Software", "Systems"], |
| 104 | + TicketTypeArray: [{ text: "Select One", value: null }, "Issue", "Request"], |
| 105 | + SeverityArray: [ |
| 106 | + { value: null, text: "Select One"}, |
| 107 | + { value: '1 - Minor', text: 'Minor' }, |
| 108 | + { value: '2 - Normal', text: 'Normal' }, |
| 109 | + { value: '3 - Major', text: 'Major' }, |
| 110 | + { value: '4 - Critical', text: 'Critical' } |
| 111 | + ], |
| 112 | + PriorityArray: [ |
| 113 | + { value: null, text: "Select One"}, |
| 114 | + { value: '0 - Unassigned', text: 'Unassigned' }, |
| 115 | + { value: '1 - Low', text: 'Low' }, |
| 116 | + { value: '2 - Medium', text: 'Medium' }, |
| 117 | + { value: '3 - High', text: 'High' } |
| 118 | + ], |
| 119 | + SatisfactionArray: [ |
| 120 | + { value: null, text: "Select One"}, |
| 121 | + { value: "0 - Unknown", text: 'Unknown' }, |
| 122 | + { value: "1 - Unsatisfied", text: 'Unsatisfied' }, |
| 123 | + { value: "2 - Satisfied", text: 'Satisfied' }, |
| 124 | + { value: "3 - Highly satisfied", text: 'Highly satisfied' } |
| 125 | + ] |
| 126 | + } |
| 127 | + }, |
| 128 | + methods: { |
| 129 | + onSubmit(evt) { |
| 130 | + evt.preventDefault(); |
| 131 | + this.$emit('new-ticket-data', this.form); |
| 132 | + this.form = { |
| 133 | + "Requestor": null, |
| 134 | + "RequestorSeniority": null, |
| 135 | + "ITOwner": null, |
| 136 | + "FiledAgainst": null, |
| 137 | + "TicketType": null, |
| 138 | + "Severity": null, |
| 139 | + "Priority": null, |
| 140 | + "daysOpen": null, |
| 141 | + "Satisfaction": null, |
| 142 | + "Ticket Creation Date": null |
| 143 | + }; |
| 144 | + } |
| 145 | + } |
| 146 | +} |
| 147 | +</script> |
| 148 | + |
| 149 | +<style lang="scss" scoped> |
| 150 | +.form-new-ticket { |
| 151 | + text-align: initial; |
| 152 | +
|
| 153 | + .submit-button { |
| 154 | + text-align: center; |
| 155 | + } |
| 156 | +} |
| 157 | +</style> |
0 commit comments