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

21138 Fetch and display expro data from COLIN + UI updates + fixed misc states and validations, etc #691

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ VUE_APP_SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi"
#vaults API
VUE_APP_AUTH_API_URL="https://auth-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_AUTH_API_VERSION="/api/v1"
VUE_APP_COLIN_API_URL="https://colin-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_COLIN_API_VERSION="/api/v1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For calling COLIN API to fetch expro business info.

VUE_APP_LEGAL_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_LEGAL_API_VERSION_2="/api/v2"
VUE_APP_NAICS_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca"
Expand Down
2 changes: 2 additions & 0 deletions devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOU
#vaults API
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"
VUE_APP_AUTH_API_VERSION="op://API/$APP_ENV/auth-api/AUTH_API_VERSION"
VUE_APP_COLIN_API_URL="op://API/$APP_ENV/colin-api-entity/COLIN_API_URL"
VUE_APP_COLIN_API_VERSION="op://API/$APP_ENV/colin-api-entity/COLIN_API_VERSION"
VUE_APP_LEGAL_API_URL="op://API/$APP_ENV/legal-api/LEGAL_API_URL"
VUE_APP_LEGAL_API_VERSION_2="op://API/$APP_ENV/legal-api/LEGAL_API_VERSION_2"
VUE_APP_NAICS_API_URL="op://API/$APP_ENV/naics-api/NAICS_API_URL"
Expand Down
65 changes: 29 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.10.11",
"version": "5.10.12",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand All @@ -17,25 +17,25 @@
"@bcrs-shared-components/approval-type": "1.0.19",
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/breadcrumb": "2.1.15",
"@bcrs-shared-components/business-lookup": "1.3.1",
"@bcrs-shared-components/business-lookup": "1.3.3",
"@bcrs-shared-components/certify": "2.1.15",
"@bcrs-shared-components/completing-party": "2.1.30",
"@bcrs-shared-components/confirm-dialog": "1.2.1",
"@bcrs-shared-components/contact-info": "1.2.15",
"@bcrs-shared-components/corp-type-module": "1.0.16",
"@bcrs-shared-components/correct-name": "1.0.46",
"@bcrs-shared-components/court-order-poa": "3.0.11",
"@bcrs-shared-components/date-picker": "1.2.15",
"@bcrs-shared-components/date-picker": "1.3.0",
"@bcrs-shared-components/document-delivery": "1.2.0",
"@bcrs-shared-components/effective-date-time": "1.1.15",
"@bcrs-shared-components/enums": "1.1.10",
"@bcrs-shared-components/expandable-help": "1.0.1",
"@bcrs-shared-components/genesys-web-message": "1.0.0",
"@bcrs-shared-components/help-business-number": "1.1.1",
"@bcrs-shared-components/interfaces": "1.1.13",
"@bcrs-shared-components/jurisdiction": "1.1.2",
"@bcrs-shared-components/interfaces": "1.1.15",
"@bcrs-shared-components/jurisdiction": "1.1.3",
"@bcrs-shared-components/limited-restoration-panel": "1.0.5",
"@bcrs-shared-components/mixins": "1.1.44",
"@bcrs-shared-components/mixins": "1.1.46",
"@bcrs-shared-components/nature-of-business": "1.2.14",
"@bcrs-shared-components/relationships-panel": "1.0.9",
"@bcrs-shared-components/staff-comments": "1.3.15",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ p {
font-size: $px-14;
}

.font-15 {
font-size: $px-15;
}

.error-text {
color: $app-red !important;
}
Expand Down
18 changes: 11 additions & 7 deletions src/components/ContinuationIn/ContinuationAuthorization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
lazy-validation
@submit.prevent
>
<!-- Authorization Date -->
<v-row no-gutters>
<v-col
cols="12"
Expand Down Expand Up @@ -40,6 +41,7 @@
</v-col>
</v-row>

<!-- Expiry Date -->
<v-row
class="mt-2"
no-gutters
Expand Down Expand Up @@ -91,6 +93,7 @@

<div class="pt-4" />

<!-- file upload components -->
<v-row
v-for="(num, index) in numUploads"
:key="authorization.files[index]?.fileKey"
Expand Down Expand Up @@ -128,6 +131,7 @@
<script lang="ts">
import { Component, Emit, Mixins, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'pinia-class'
import { StatusCodes } from 'http-status-codes'
import { useStore } from '@/store/store'
import { DocumentMixin } from '@/mixins'
import { ContinuationAuthorizationIF, FormIF, PresignedUrlIF } from '@/interfaces'
Expand All @@ -149,6 +153,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
expiryDateRef: DatePickerShared,
formRef: FormIF
}

readonly PdfPageSize = PdfPageSize

@Getter(useStore) getContinuationAuthorization!: ContinuationAuthorizationIF
Expand All @@ -169,10 +174,8 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
return [
() => !!this.authorization.date ||
'Authorization Date is required',
() => {
return (this.authorization.date <= this.getCurrentDate) ||
'Authorization Date cannot be in the future'
}
() => (this.authorization.date <= this.getCurrentDate) ||
'Authorization Date cannot be in the future'
]
}

Expand All @@ -189,6 +192,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
return Math.min((this.authorization.files.length + 1), 5)
}

/** Called when this component is mounted. */
mounted (): void {
// set or initialize authorization object
this.authorization = this.getContinuationAuthorization || { files: [] } as ContinuationAuthorizationIF
Expand All @@ -211,7 +215,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
// verify that file is valid
if (!this.fileValidity) {
// NB: as this is validity according to the component, do not overwrite current error message
return // don't add to list
return // don't add to array
}

// verify that file doesn't already exist
Expand All @@ -227,12 +231,12 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) {
try {
psu = await this.getPresignedUrl(file.name)
const res = await this.uploadToUrl(psu.preSignedUrl, file, psu.key, this.getKeycloakGuid)
if (!res || res.status !== 200) throw new Error()
if (!res || res.status !== StatusCodes.OK) throw new Error()
} catch {
// put file uploader into manual error mode by setting custom error message
this.customErrorMessage[index] = this.UPLOAD_FAILED_MESSAGE
this.$forceUpdate() // force file upload component to react
return // don't add to list
return // don't add to array
}

// add file to array
Expand Down
10 changes: 7 additions & 3 deletions src/components/ContinuationIn/ExtraproBusinessLookup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
cols="3"
class="result-identifier d-inline-flex"
>
{{ item.identifier }}
<!-- *** TODO: remove after testing: -->
({{ item.status?.charAt(0) }})
<span>{{ item.identifier }}</span>
<span v-if="showBusinessSearchStatus">&nbsp;({{ item.status?.charAt(0) }})</span>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the Active/Historical indicator but feature-flagged it. It's super useful for testing but we don't want to show it in Prod.

</v-col>

<v-col
Expand Down Expand Up @@ -64,6 +63,7 @@ import { Component, Emit, Watch } from 'vue-property-decorator'
import { debounce } from 'lodash'
import { BusinessLookupResultIF } from '@/interfaces'
import { BusinessLookupServices } from '@/services'
import { GetFeatureFlag } from '@/utils/feature-flag-utils'
/* eslint-disable no-unused-vars */
enum States {
Expand Down Expand Up @@ -91,6 +91,10 @@ export default class ExtraproBusinessLookup extends Vue {
readonly businessLookupLabel = 'Extraprovincial registration number or name of the business in B.C.'
get showBusinessSearchStatus (): boolean {
return Boolean(GetFeatureFlag('show-business-search-status'))
JazzarKarim marked this conversation as resolved.
Show resolved Hide resolved
}
/** Called when Search Input has been updated. */
onSearchInput (searchInput: string) {
this.onSearchInputDebounced(this, searchInput)
Expand Down
Loading
Loading