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.

55 lines
1.3 KiB

2 years ago
  1. <template>
  2. <v-card outlined class="rounded-xl px-3">
  3. <v-card-title> {{ $t('Show Status')}} </v-card-title>
  4. <v-card-text>
  5. <v-checkbox v-for="(Status, idx) in statuses" :key="idx" v-model="selectedTwoWay" :label="Status.status"
  6. :value="Status.id" color="#F5CDA8" class="my-n2"></v-checkbox>
  7. </v-card-text>
  8. </v-card>
  9. </template>
  10. <script>
  11. export default {
  12. props: ["statuses"],
  13. data() {
  14. return {
  15. StatusList: ["Postponed", "Cancelled", "Upcoming", "Ongoing", "Finished"],
  16. selected: [],
  17. };
  18. },
  19. computed: {
  20. selectedComputed() {
  21. return this.$store.state.myStore.selected;
  22. },
  23. selectedTwoWay: {
  24. get() {
  25. return this.$store.state.myStore.selected;
  26. },
  27. set(value) {
  28. this.$store.commit("setSelected", value);
  29. this.$emit("selectStatus", value);
  30. },
  31. },
  32. },
  33. // watch: {
  34. // selected(newStatus, oldStatus) {
  35. // this.$store.commit("setSelected", newStatus);
  36. // if (newStatus !== oldStatus.length) this.$emit("selectStatus", newStatus);
  37. // },
  38. // },
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. :deep() {
  43. .v-input--selection-controls__input {
  44. i {
  45. color: #f5cda8 !important;
  46. }
  47. }
  48. .v-label {
  49. color: #232323 !important;
  50. margin-left: 20px;
  51. }
  52. }
  53. </style>