| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template>
- <div>
- <DefaultHeaderPage
- title="Contratos"
- show-filter-icon
- @show-filter="handleShowFilter"
- />
- <div class="q-px-sm">
- <div class="row">
- <q-select
- v-if="showFilter"
- v-model="statusSelected"
- label="Selecione o Status"
- :options="statusOptions"
- option-value="value"
- option-label="label"
- class="col-3"
- bg-color="white"
- hide-dropdown-icon
- emit-value
- map-options
- color="secondary"
- outlined
- >
- <template #append>
- <q-icon name="mdi-chevron-down" color="secondary" />
- </template>
- </q-select>
- </div>
- <DefaultTable
- :columns
- no-api-call
- :rows
- title="Lista de Contratos"
- description="Contratos"
- :female="false"
- />
- </div>
- </div>
- </template>
- <script setup>
- import DefaultTable from "src/components/defaults/DefaultTable.vue";
- import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
- import { ref } from "vue";
- const rows = ref([]);
- const showFilter = ref(false);
- const statusSelected = ref(null);
- const columns = ref([
- {
- name: "student_name",
- field: "student_name",
- label: "Nome",
- align: "left",
- },
- {
- name: "unit_name",
- field: "unit_name",
- label: "Unidade",
- align: "left",
- },
- {
- name: "signature_date",
- field: "signature_date",
- label: "Data da Assinatura",
- align: "left",
- },
- {
- name: "status",
- field: "status",
- label: "Status",
- align: "center",
- },
- {
- name: "actions",
- label: "Ações",
- align: "center",
- },
- ]);
- const statusOptions = ref([
- { label: "Selecione", value: null },
- { label: "Ativo", value: "active" },
- { label: "Inativo", value: "inactive" },
- { label: "Congelado", value: "frozen" },
- { label: "Encerrado", value: "closed" },
- ]);
- const handleShowFilter = () => {
- showFilter.value == false
- ? (showFilter.value = true)
- : (showFilter.value = false);
- };
- </script>
|