Skip to content

Commit

Permalink
Merge pull request #79 from kialj876/12255-12179-business-search-tiles
Browse files Browse the repository at this point in the history
added business search
  • Loading branch information
kialj876 authored Jun 1, 2022
2 parents ae5fbab + d13875a commit f191bf6
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ REGISTRY_ACCOUNT_CREATE_URL = "https://dev.bcregistry.ca/business/auth/choose-au
KEYCLOAK_CONFIG_PATH = "keycloak-dev.json"
AUTH_API_URL = "https://auth-api-dev.apps.silver.devops.gov.bc.ca/api/v1/"
STATUS_API_URL = "https://status-api-dev.apps.silver.devops.gov.bc.ca/api/v1/"
AUTH_LD_CLIENT_ID = "5ddc05785933410824ecf5ab"
AUTH_LD_CLIENT_ID = ""
RPT_URL="https://staging.www.etax.gov.bc.ca/bts/Web.BCOnl/WebServices/BCO/login"
BUSINESS_SEARCH_URL = "https://dev.bcregistry.ca/business/search"
BUS_SEARCH_LEARN_MORE = "https://www2.gov.bc.ca/gov/content?id=B75BE1375F084B138B60D62C0094D9E8"
72 changes: 72 additions & 0 deletions components/BCRegistriesAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,64 @@
</div>
</v-card-text>
</v-card>

<!-- Business Search -->
<v-card elevation="2">
<v-card-title>Business Search</v-card-title>
<span v-if="showBetaFlagBusSearch" class="card-title-badge-container">
<div class="card-title-badge font-weight-bold pt-2">BETA</div>
</span>
<span v-if="showComingSoonFlagBusSearch" class="card-title-badge-container">
<div class="card-title-badge font-weight-bold pt-2">COMING SOON</div>
</span>
<v-card-text>
<p>
Search for
<v-tooltip
top
content-class="top-tooltip pa-2 mr-2"
transition="fade-transition"
>
<template #activator="{ on }">
<span class="tool-tip-text" v-on="on">businesses</span>
</template>
<div class="pa-2" style="width: 250px">
Benefit Companies, Cooperative Associations, Sole Proprietorships and Partnerships
are currently available to search. Other business types will be added in the future.
</div>
</v-tooltip>
registered in B.C. and request copies of business
<v-tooltip
top
content-class="top-tooltip pa-2 mr-2"
transition="fade-transition"
>
<template #activator="{ on }">
<span class="tool-tip-text" v-on="on">documents.</span>
</template>
<div class="pa-2" style="width: 250px">
Business Summaries and electronic filing documents
are available to be downloaded. Other document types
will be added in the future.
</div>
</v-tooltip>
</p>
<p class="mt-6">
Available to use by end of summer 2022.
</p>
<div>
<a
class="link"
:href="$config.busSrchLearnMoreURL"
target="_blank"
rel="noopener noreferrer"
>
<span>Learn more about Business Search</span>
</a>
<v-icon dense color="primary">mdi-open-in-new</v-icon>
</div>
</v-card-text>
</v-card>
</div>

<div class="payment py-7">
Expand Down Expand Up @@ -239,6 +297,14 @@ export default class BCRegistriesAccount extends Vue {
return !!token
}
get showBetaFlagBusSearch (): boolean {
return getFeatureFlag('bcregistry-ui-bus-search-beta-chip') as boolean
}
get showComingSoonFlagBusSearch (): boolean {
return getFeatureFlag('bcregistry-ui-bus-search-coming-soon-chip') as boolean
}
get showNewFlagWills (): boolean {
return getFeatureFlag('bcregistry-ui-wills-new-chip') as boolean
}
Expand Down Expand Up @@ -268,6 +334,12 @@ img {
margin-bottom: -6px;
}
.tool-tip-text {
cursor: default;
text-decoration-line: underline;
text-decoration-style: dotted;
}
.v-btn,
::v-deep .sbc-signin-button {
margin: 0.5rem;
Expand Down
1 change: 1 addition & 0 deletions enums/productCode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export enum ProductCode {
BUSINESS = 'BUSINESS',
BUSINESS_SEARCH = 'BUSINESS_SEARCH',
CSO = 'CSO',
PPR = 'PPR',
RPT = 'RPT',
Expand Down
2 changes: 2 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export default {
signinBceidUrl: `${process.env.AUTH_URL}signin/bceid/`,
signinBcscUrl: `${process.env.AUTH_URL}signin/bcsc/`,
signinIdirUrl: `${process.env.AUTH_URL}signin/idir/`,
businessSearchUrl: process.env.BUSINESS_SEARCH_URL,
busSrchLearnMoreURL: process.env.BUS_SEARCH_LEARN_MORE
},

// Build Configuration: https://go.nuxtjs.dev/config-build
Expand Down
10 changes: 8 additions & 2 deletions pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { mapGetters } from 'vuex'
import UserProduct from '@/components/UserProduct.vue'
import { ProductCode, ProductStatus } from '@/enums'
import { fetchAccountProducts, fetchOrganization, getKeycloakRoles, getProductInfo, sleep,
setLogoutUrl } from '@/utils'
import {
fetchAccountProducts, fetchOrganization,
getFeatureFlag, getKeycloakRoles,
getProductInfo, sleep, setLogoutUrl
} from '@/utils'
export default Vue.extend ({
components: {
Expand Down Expand Up @@ -170,6 +173,9 @@ export default Vue.extend ({
// only show products with no placeholder
for (let i = 0; i < currentProducts.length; i++) {
if (currentProducts[i].code === ProductCode.BUSINESS_SEARCH) {
if (!getFeatureFlag('bcregistry-ui-bus-search-enabled')) continue
}
const thisProduct = getProductInfo(this.$config, currentProducts[i].code)
if (thisProduct.title !== 'placeholder_title') {
this.subscribedProducts.push(thisProduct)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions utils/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ declare const window: any
* Default flag values when LD is not available.
*/
const defaultFlagSet: LDFlagSet = {
'bcregistry-ui-bus-search-enabled': false,
'bcregistry-ui-bus-search-beta-chip': false,
'bcregistry-ui-bus-search-coming-soon-chip': false,
'bcregistry-ui-ppr-new-chip': true,
'bcregistry-ui-rpt-new-chip': true,
'bcregistry-ui-wills-new-chip': true
Expand Down
7 changes: 7 additions & 0 deletions utils/user-product-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ export function getProductInfo (config, type: ProductCode): ProductI {
text: 'Register or incorporate a business, manage name requests and keep business records up to date.',
title: 'My Business Registry'
} as ProductI
case ProductCode.BUSINESS_SEARCH:
return {
image: 'img/BusinessSearchFPO_dashboard_thumbnail_image.jpg',
link: appendAccountId(config?.businessSearchUrl) || 'link_not_configured',
text: 'Search for a business registered in B.C. and access business documents.',
title: 'Business Search'
} as ProductI
case ProductCode.CSO:
return {
image: 'placeholder_image',
Expand Down

0 comments on commit f191bf6

Please sign in to comment.