You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
808 B

2 years ago
  1. <template>
  2. <v-btn
  3. class="rounded-lg px-2 no-text-transform text-space-1 text-capitalize" elevation="0"
  4. :color="statusColor[status]"
  5. :outlined="!isPostponed"
  6. :plain="!isPostponed"
  7. :ripple="false"
  8. small
  9. >
  10. {{ $t(StatusText[status]) }}
  11. </v-btn>
  12. </template>
  13. <script>
  14. import { StatusText } from '~/utils/constant'
  15. export default {
  16. name: 'CardStatus',
  17. props: {
  18. status: {
  19. type: String,
  20. },
  21. },
  22. data: () => ({
  23. statusColor: {
  24. "201": '#e99e9e',
  25. "102": 'error',
  26. "101": 'warning',
  27. },
  28. StatusText: {
  29. "100": "Upcoming",
  30. "101": "Ongoing",
  31. "102": "Postponed",
  32. "200": "Finished",
  33. "201": "Cancelled",
  34. },
  35. }),
  36. computed: {
  37. isPostponed() {
  38. return this.status === 'Postponed'
  39. },
  40. },
  41. }
  42. </script>