ContractPage.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div>
  3. <DefaultHeaderPage
  4. title="Contratos"
  5. show-filter-icon
  6. @show-filter="handleShowFilter"
  7. />
  8. <div class="q-px-sm">
  9. <div class="row">
  10. <q-select
  11. v-if="showFilter"
  12. v-model="statusSelected"
  13. label="Selecione o Status"
  14. :options="statusOptions"
  15. option-value="value"
  16. option-label="label"
  17. class="col-3"
  18. bg-color="white"
  19. hide-dropdown-icon
  20. emit-value
  21. map-options
  22. color="secondary"
  23. outlined
  24. >
  25. <template #append>
  26. <q-icon name="mdi-chevron-down" color="secondary" />
  27. </template>
  28. </q-select>
  29. </div>
  30. <DefaultTable
  31. :columns
  32. no-api-call
  33. :rows
  34. title="Lista de Contratos"
  35. description="Contratos"
  36. :female="false"
  37. />
  38. </div>
  39. </div>
  40. </template>
  41. <script setup>
  42. import DefaultTable from "src/components/defaults/DefaultTable.vue";
  43. import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
  44. import { ref } from "vue";
  45. const rows = ref([]);
  46. const showFilter = ref(false);
  47. const statusSelected = ref(null);
  48. const columns = ref([
  49. {
  50. name: "student_name",
  51. field: "student_name",
  52. label: "Nome",
  53. align: "left",
  54. },
  55. {
  56. name: "unit_name",
  57. field: "unit_name",
  58. label: "Unidade",
  59. align: "left",
  60. },
  61. {
  62. name: "signature_date",
  63. field: "signature_date",
  64. label: "Data da Assinatura",
  65. align: "left",
  66. },
  67. {
  68. name: "status",
  69. field: "status",
  70. label: "Status",
  71. align: "center",
  72. },
  73. {
  74. name: "actions",
  75. label: "Ações",
  76. align: "center",
  77. },
  78. ]);
  79. const statusOptions = ref([
  80. { label: "Selecione", value: null },
  81. { label: "Ativo", value: "active" },
  82. { label: "Inativo", value: "inactive" },
  83. { label: "Congelado", value: "frozen" },
  84. { label: "Encerrado", value: "closed" },
  85. ]);
  86. const handleShowFilter = () => {
  87. showFilter.value == false
  88. ? (showFilter.value = true)
  89. : (showFilter.value = false);
  90. };
  91. </script>