Skip to content

Commit

Permalink
add redirect to Bounded Context tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jotaesteves committed Nov 6, 2023
1 parent 5597054 commit d469c80
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend-vue/src/pages/domain-details/DomainDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
import { Menu, MenuButton, MenuItem, MenuItems, Tab, TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/vue";
import { useRouteParams, useRouteQuery } from "@vueuse/router";
import { storeToRefs } from "pinia";
import { computed, ComputedRef, ref } from "vue";
import { computed, ComputedRef, ref, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import ContextureCreateBoundedContextModal from "~/components/domains/details/ContextureCreateBoundedContextModal.vue";
import CreateSubdomainModal from "~/components/domains/details/ContextureCreateSubdomainModal.vue";
Expand Down Expand Up @@ -288,4 +288,10 @@ async function onSave(values: UpdateDomain) {
editMode.value = false;
}
}
watchEffect(() => {
if (subdomains.value.length === 0) {
onTabChange(viewOptions.indexOf(viewOptions[1])); // Set the second tab as active
}
});
</script>

0 comments on commit d469c80

Please sign in to comment.