timeline icon colors for ticket
\according to state
This commit is contained in:
parent
54a8445cd4
commit
affd6f6c86
2 changed files with 28 additions and 6 deletions
|
@ -8,8 +8,8 @@
|
|||
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'comment'">
|
||||
<font-awesome-icon icon="comment"/>
|
||||
</span>
|
||||
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'">
|
||||
<font-awesome-icon icon="check"/>
|
||||
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'" :class="'bg-' + colorLookup(item.state)">
|
||||
<font-awesome-icon :icon="iconLookup(item.state)"/>
|
||||
</span>
|
||||
<span class="timeline-item-icon faded-icon" v-else>
|
||||
<font-awesome-icon icon="pen"/>
|
||||
|
@ -58,8 +58,30 @@ export default {
|
|||
sendMail() {
|
||||
this.$emit('sendMail', this.newMail);
|
||||
this.newMail = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
iconLookup: function (state) {
|
||||
if (state.startsWith('closed_')) {
|
||||
return 'check';
|
||||
} else if (state.startsWith('pending_')) {
|
||||
return 'exclamation';
|
||||
} else if (state.startsWith('waiting_')) {
|
||||
return 'hourglass';
|
||||
} else {
|
||||
return 'exclamation';
|
||||
}
|
||||
},
|
||||
colorLookup: function (state) {
|
||||
if (state.startsWith('closed_')) {
|
||||
return 'secondary';
|
||||
} else if (state.startsWith('pending_')) {
|
||||
return 'warning';
|
||||
} else if (state.startsWith('waiting_')) {
|
||||
return 'primary';
|
||||
} else {
|
||||
return 'danger';
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue