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'">
|
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'comment'">
|
||||||
<font-awesome-icon icon="comment"/>
|
<font-awesome-icon icon="comment"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'">
|
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'" :class="'bg-' + colorLookup(item.state)">
|
||||||
<font-awesome-icon icon="check"/>
|
<font-awesome-icon :icon="iconLookup(item.state)"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="timeline-item-icon faded-icon" v-else>
|
<span class="timeline-item-icon faded-icon" v-else>
|
||||||
<font-awesome-icon icon="pen"/>
|
<font-awesome-icon icon="pen"/>
|
||||||
|
@ -58,8 +58,30 @@ export default {
|
||||||
sendMail() {
|
sendMail() {
|
||||||
this.$emit('sendMail', this.newMail);
|
this.$emit('sendMail', this.newMail);
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ import {
|
||||||
faUser,
|
faUser,
|
||||||
faComments,
|
faComments,
|
||||||
faArchive,
|
faArchive,
|
||||||
faMinus,
|
faMinus, faHourglass, faExclamation,
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ import vueDebounce from 'vue-debounce';
|
||||||
|
|
||||||
library.add(faPlus, faCheckCircle, faEdit, faTrash, faCat, faSyncAlt, faSort, faSortUp, faSortDown, faTh, faList,
|
library.add(faPlus, faCheckCircle, faEdit, faTrash, faCat, faSyncAlt, faSort, faSortUp, faSortDown, faTh, faList,
|
||||||
faWindowClose, faCamera, faStop, faPen, faCheck, faTimes, faSave, faEye, faComment, faUser, faComments, faEnvelope,
|
faWindowClose, faCamera, faStop, faPen, faCheck, faTimes, faSave, faEye, faComment, faUser, faComments, faEnvelope,
|
||||||
faArchive, faMinus);
|
faArchive, faMinus, faExclamation, faHourglass);
|
||||||
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
||||||
|
|
||||||
sync(store, router);
|
sync(store, router);
|
||||||
|
|
Loading…
Reference in a new issue