-
Notifications
You must be signed in to change notification settings - Fork 16
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
24659 - Implement Withdraw Action in Ledger #119
Merged
meawong
merged 7 commits into
bcgov:main
from
meawong:24659-Implement-Withdraw-File-Action
Jan 14, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b4ca29b
24659-Implement-withdraw-action-for-reg-and-temp-business
meawong 8912d9e
24659-Enable-view-documents-for-bootstrap-business
meawong 2115259
24659-Revert-lock-file
meawong cb83a0b
24659-Remove-conditional-for-displaying-document-button
meawong 8e0802b
24659-Update navigate function and bump version
meawong 675f5c3
Merge branch 'bcgov:main' into 24659-Implement-Withdraw-File-Action
meawong f5618dc
24659-Update-version
meawong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,6 @@ | |
</BcrosDialog> | ||
<!-- the main button --> | ||
<UButton | ||
v-if="!isBootstrapFiling || !isExpanded" | ||
severinbeauvais marked this conversation as resolved.
Show resolved
Hide resolved
|
||
variant="ghost" | ||
class="px-3 py-2" | ||
data-cy="filing-main-action-button" | ||
|
@@ -64,7 +63,7 @@ | |
<strong v-if="!isExpanded">{{ $t('button.filing.actions.requestACopy') }}</strong> | ||
<strong v-else>{{ $t('button.filing.actions.close') }}</strong> | ||
</template> | ||
<template v-else-if="isTypeStaff || isBootstrapFiling"> | ||
<template v-else-if="isTypeStaff"> | ||
severinbeauvais marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<strong v-if="!isExpanded">{{ $t('button.filing.actions.view') }}</strong> | ||
<strong v-else>{{ $t('button.filing.actions.hide') }}</strong> | ||
</template> | ||
|
@@ -76,7 +75,7 @@ | |
|
||
<!-- the drop-down menu --> | ||
<UDropdown | ||
v-if="!isDisableNonBenCorps() && hasRoleStaff && isBusiness" | ||
v-if="!isDisableNonBenCorps() && hasRoleStaff" | ||
severinbeauvais marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:items="actions" | ||
:popper="{ placement: 'bottom-end' }" | ||
padding="p-3" | ||
|
@@ -96,15 +95,16 @@ | |
<script setup lang="ts"> | ||
import { FilingTypes } from '@bcrs-shared-components/enums' | ||
import { z } from 'zod' | ||
import { type ApiResponseFilingI, FilingStatusE, isFilingStatus, isStaffFiling } from '#imports' | ||
import { type ApiResponseFilingI, FilingStatusE, isFilingStatus, isStaffFiling, isFutureEffective } from '#imports' | ||
import { FilingCorrectionTypesE } from '~/enums/filing-correction-types-e' | ||
|
||
const { getStoredFlag } = useBcrosLaunchdarkly() | ||
const { hasRoleStaff } = storeToRefs(useBcrosKeycloak()) | ||
const { isAllowedToFile, isBaseCompany, isDisableNonBenCorps, isEntityCoop, isEntityFirm } = useBcrosBusiness() | ||
const { currentBusiness } = storeToRefs(useBcrosBusiness()) | ||
const { bootstrapFiling } = storeToRefs(useBcrosBusinessBootstrap()) | ||
const { isBootstrapFiling } = useBcrosBusinessBootstrap() | ||
const { goToEditPage } = useBcrosNavigate() | ||
const { goToFilingUI, goToEditPage } = useBcrosNavigate() | ||
const ui = useBcrosDashboardUi() | ||
|
||
const isCommentOpen = ref(false) | ||
|
@@ -116,7 +116,11 @@ const filing = defineModel('filing', { type: Object as PropType<ApiResponseFilin | |
|
||
const t = useNuxtApp().$i18n.t | ||
|
||
const currentBusinessIdentifier = computed(() => currentBusiness.value.identifier) | ||
const tempBusinessIdentifier = computed(() => bootstrapFiling.value.filing.business.identifier) | ||
const filingId = computed(() => filing.value.filingId) | ||
const isTypeStaff = computed(() => isStaffFiling(filing.value)) | ||
const isFutureEffectiveFiling = computed(() => isFutureEffective(filing.value)) | ||
|
||
const setShowFilingModal = (value: boolean) => { | ||
showFilingModal.value = value | ||
|
@@ -147,7 +151,7 @@ const correctionFormSubmit = async function () { | |
{ | ||
comment: '', | ||
correctedFilingDate: dateToYyyyMmDd(new Date(filing.value.submittedDate)), | ||
correctedFilingId: filing.value.filingId, | ||
correctedFilingId: filingId.value, | ||
correctedFilingType: filing.value.name, | ||
type: correctionType | ||
}, | ||
|
@@ -167,7 +171,7 @@ const correctionFormSubmit = async function () { | |
filingError.value = 'Unable to get correction filing id' | ||
return | ||
} | ||
const path = `/${currentBusiness.value.identifier}/correction/` | ||
const path = `/${currentBusinessIdentifier.value}/correction/` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please call out this fix in your ticket so that QA knows to verify this. |
||
const params = { 'correction-id': draftFilingId } | ||
goToEditPage(path, params) | ||
|
||
|
@@ -310,6 +314,16 @@ const showCommentDialog = (show?: boolean) => { | |
isCommentOpen.value = show | ||
} | ||
|
||
const goToNoticeOfWithdrawal = () => { | ||
const businessIdentifier = isBootstrapFiling ? tempBusinessIdentifier.value : currentBusinessIdentifier.value | ||
const path = `/${businessIdentifier}/notice-of-withdrawal/` | ||
const params = { | ||
filingToBeWithdrawn: filingId.value.toString(), | ||
filingId: '0' | ||
} | ||
goToFilingUI(path, params) | ||
} | ||
|
||
const actions: any[][] = [[ | ||
{ | ||
label: t('button.filing.actions.fileACorrection'), | ||
|
@@ -323,6 +337,12 @@ const actions: any[][] = [[ | |
click: showCommentDialog, | ||
disabled: !(isBusiness && hasRoleStaff), | ||
icon: 'i-mdi-comment-plus' | ||
}, | ||
{ | ||
label: t('button.filing.actions.fileAWithdrawal'), | ||
click: goToNoticeOfWithdrawal, | ||
disabled: !(hasRoleStaff && isFutureEffectiveFiling.value), | ||
icon: 'i-mdi-undo' | ||
} | ||
]] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase again. The version is already 1.0.2.
https://github.com/bcgov/business-dashboard-ui/blob/main/package.json