Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24821 - fix for no documents on expanded screen. #112

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/components/bcros/filing/CommonTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ if (filing.value.commentsCount && filing.value.commentsLink) {
const isStatusPaid = computed(() => isFilingStatus(filing.value, FilingStatusE.PAID))
const isStatusApproved = computed(() => isFilingStatus(filing.value, FilingStatusE.APPROVED))

const url = useRequestURL()
const expandedFilingId = url.searchParams.get('filing_id')
const isShowBody = ref(expandedFilingId && expandedFilingId === filing?.value?.filingId?.toString())
const isShowBody = ref(false)

const showDetails = () => {
if (filing.value.documents === undefined && filing.value.documentsLink) {
Expand All @@ -118,6 +116,13 @@ const showDetails = () => {
isShowBody.value = !isShowBody.value
}

// auto expand item if expandedFilingId is in URL & item is not expanded
const url = useRequestURL()
const expandedFilingId = url.searchParams.get('filing_id')
if (!isShowBody.value && expandedFilingId && expandedFilingId === filing?.value?.filingId?.toString()) {
showDetails()
}

/** The title of this filing. */
const title =
isFilingType(filing.value, FilingTypes.ALTERATION)
Expand Down