TbrPage.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script setup>
  2. import { defineAsyncComponent, ref } from "vue";
  3. import CustomTabComponent from "src/components/shared/CustomTabComponent.vue";
  4. import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
  5. const SettingsTab = defineAsyncComponent(() => import("./tabs/SettingsTab.vue"));
  6. const ContractsTab = defineAsyncComponent(() => import("./tabs/ContractsTab.vue"));
  7. const BillingsTab = defineAsyncComponent(() => import("./tabs/BillingsTab.vue"));
  8. const InhabitantClassificationsTab = defineAsyncComponent(() => import("./tabs/InhabitantClassificationsTab.vue"));
  9. const currentTab = ref("settings");
  10. const tabs = [
  11. { name: "settings", label: "Configurações" },
  12. { name: "inhabitant_classifications", label: "Faixas" },
  13. { name: "contracts", label: "Contratos" },
  14. { name: "billings", label: "Cobranças" },
  15. ];
  16. </script>
  17. <template>
  18. <div>
  19. <DefaultHeaderPage title="TBR - Configurações" />
  20. <div class="q-px-sm">
  21. <CustomTabComponent v-model:active-tab="currentTab" :tabs="tabs" class="q-mb-md" />
  22. <div v-show="currentTab === 'settings'">
  23. <SettingsTab />
  24. </div>
  25. <div v-show="currentTab === 'contracts'">
  26. <ContractsTab />
  27. </div>
  28. <div v-show="currentTab === 'billings'">
  29. <BillingsTab />
  30. </div>
  31. <div v-show="currentTab === 'inhabitant_classifications'">
  32. <InhabitantClassificationsTab />
  33. </div>
  34. </div>
  35. </div>
  36. </template>