fix(encounter): add guard for encounter home
This commit is contained in:
@@ -44,9 +44,12 @@ const activeTab = computed({
|
||||
})
|
||||
|
||||
const id = typeof route.params.id == 'string' ? parseInt(route.params.id) : 0
|
||||
|
||||
const data = ref<any>(null)
|
||||
|
||||
if (activePosition.value === 'none') { // if user position is none, redirect to home page
|
||||
router.push('/')
|
||||
}
|
||||
|
||||
// Function to check if date is invalid (like "0001-01-01T00:00:00Z")
|
||||
function isValidDate(dateString: string | null | undefined): boolean {
|
||||
if (!dateString) return false
|
||||
|
||||
Reference in New Issue
Block a user