This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/tasks/partials/priorityLabel.vue

60 lines
1.3 KiB
Vue
Raw Normal View History

2019-11-24 13:16:24 +00:00
<template>
<span
:class="{'not-so-high': priority === priorities.HIGH, 'high-priority': priority >= priorities.HIGH}"
v-if="showAll || priority >= priorities.HIGH">
<span class="icon" v-if="priority >= priorities.HIGH">
2019-11-24 13:16:24 +00:00
<icon icon="exclamation"/>
</span>
<template v-if="priority === priorities.UNSET">Unset</template>
<template v-if="priority === priorities.LOW">Low</template>
<template v-if="priority === priorities.MEDIUM">Medium</template>
2019-11-24 13:16:24 +00:00
<template v-if="priority === priorities.HIGH">High</template>
<template v-if="priority === priorities.URGENT">Urgent</template>
<template v-if="priority === priorities.DO_NOW">DO NOW</template>
<span class="icon" v-if="priority === priorities.DO_NOW">
<icon icon="exclamation"/>
</span>
</span>
</template>
<script>
import priorites from '../../../models/priorities'
2019-11-24 13:16:24 +00:00
export default {
name: 'priorityLabel',
data() {
return {
priorities: priorites,
2019-11-24 13:16:24 +00:00
}
},
props: {
priority: {
default: 0,
type: Number,
},
showAll: {
type: Boolean,
default: false,
},
},
}
2019-11-24 13:16:24 +00:00
</script>
2019-12-18 21:38:26 +00:00
<style lang="scss">
@import '../../../styles/theme/variables';
2019-12-18 21:38:26 +00:00
span.high-priority {
color: $red;
width: auto !important; // To override the width set in tasks
2019-12-18 21:38:26 +00:00
.icon {
vertical-align: middle;
width: auto !important;
padding: 0 .5em;
}
2019-12-18 21:38:26 +00:00
&.not-so-high {
color: $orange;
2019-12-18 21:38:26 +00:00
}
}
2019-12-18 21:38:26 +00:00
</style>