Skip to content

Commit

Permalink
16637 Don't show numbered flow for CP + variable Incorporate Now butt…
Browse files Browse the repository at this point in the history
…on label (bcgov#639)

* 16637-Continuation in flow 1

* 16637-Continuation in flow 2

* 16637-update package version

* 16637-fix css class and remove unused css

* 16637-remove unused css

* 16637-update package version
  • Loading branch information
ketaki-deodhar authored and JazzarKarim committed Aug 24, 2023
1 parent 35ad377 commit 8cbb1fc
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.0.14",
"version": "5.0.15",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
23 changes: 19 additions & 4 deletions src/components/common/bullets-colin-link.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-row id="bullets-colin-link">
<v-col cols="12" sm="3">
<v-col cols="12" sm="3" v-if="companyRadioBtnApplicable">
<v-radio-group
v-model="selectedCompanyType"
flat
Expand All @@ -18,7 +18,7 @@
/>
</v-radio-group>
</v-col>
<v-col cols="12" sm="9">
<v-col cols="12" :sm="companyRadioBtnApplicable ? 9 : 12" :class="{ 'px-6' : !companyRadioBtnApplicable}">
<div v-if="selectedCompanyType === CompanyType.NAMED_COMPANY">
<v-row>
<slot name="name-input-slot">Name Input</slot>
Expand All @@ -44,7 +44,7 @@
id="incorporate-now-button"
@click="incorporateNowClicked()"
>
Incorporate Now
{{ incorporateNowButtonText }}
</v-btn>
</div>
</div>
Expand Down Expand Up @@ -75,11 +75,17 @@ export default class BulletsColinLink extends Mixins(CommonMixin, NrAffiliationM
/** Show Designation Dropdown. */
@Prop({ default: false }) readonly showDesignation!: boolean
/** Hide Company Radio buttons */
@Prop({ default: true }) readonly showCompanyRadioBtn!: boolean
/** Button text based on selected action/flow */
@Prop({ default: '' }) readonly incorporateNowButtonText!: string
/** Whether user is authenticated. */
@Getter getIsAuthenticated!: boolean
// Local properties
selectedCompanyType: CompanyType = null
selectedCompanyType = null as CompanyType
bulletPoints = [
'Your business name will be the Incorporation Number assinged by the Registry.',
'You can change your business name at a later date.',
Expand All @@ -98,6 +104,15 @@ export default class BulletsColinLink extends Mixins(CommonMixin, NrAffiliationM
}
}
get companyRadioBtnApplicable (): boolean {
if (!this.showCompanyRadioBtn) {
this.selectedCompanyType = CompanyType.NAMED_COMPANY
return false
}
return true
}
/**
* If user is authenticated, create draft business and redirect to Dashboard.
* If user is not authenticated, redirect to login screen then redirect back.
Expand Down
39 changes: 35 additions & 4 deletions src/components/new-request/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@
:businessType="entity_type_cd"
:colinButton="showColinButton"
:showDesignation="showDesignationSelect"
:showCompanyRadioBtn="showCompanyRadioBtn"
:incorporateNowButtonText="incorporateNowButtonText"
@radioButtonChange="selectedCompanyType = $event"
>
<template v-slot:name-input-slot>
Expand Down Expand Up @@ -515,11 +517,32 @@ export default class Search extends Mixins(CommonMixin) {
return (this.selectedCompanyType === CompanyType.NAMED_COMPANY)
}
/** Whether to show "Colin" or "Incorporate Now" button based on FF. */
/** Whether to show "Colin" or "Incorporate Now" button based on FF for Incorporation or Registration. */
get showColinButton (): boolean {
const supportedEntites = GetFeatureFlag('supported-incorporation-registration-entities')
const isIncorporateEntity = supportedEntites.includes(this.entity_type_cd)
return !isIncorporateEntity
// Contuniation In - returning true because Continuation In application are not yet implemented
// FUTURE: FF created already for Continuation In, use showContinueInButton
if (this.isContinuationIn) {
return true
} else {
const supportedEntites = GetFeatureFlag('supported-incorporation-registration-entities')
const isIncorporateEntity = supportedEntites.includes(this.entity_type_cd)
return !isIncorporateEntity
}
}
get showContinueInButton (): boolean {
const supportedContInEntites = GetFeatureFlag('supported-continuation-in-entities')
const isContInEntity = supportedContInEntites.includes(this.entity_type_cd)
return !isContInEntity
}
/** Retrieve text based on selected action/flow */
get incorporateNowButtonText (): string {
if (this.isContinuationIn) {
return 'Continue In Now'
} else {
return 'Incorporate Now'
}
}
get showDesignationSelect (): boolean {
Expand All @@ -530,6 +553,13 @@ export default class Search extends Mixins(CommonMixin) {
return false
}
get showCompanyRadioBtn (): boolean {
if (this.getEntityTypeCd === EntityType.CP) {
this.selectedCompanyType = CompanyType.NAMED_COMPANY
}
return this.getEntityTypeCd !== EntityType.CP
}
get jurisdictionOptions () {
return (this.getLocation === Location.CA)
? CanJurisdictions.filter(jur => jur.value !== Location.BC)
Expand Down Expand Up @@ -669,6 +699,7 @@ export default class Search extends Mixins(CommonMixin) {
.mobile-btn {
width: 17rem !important;
}
/* Deep Vuetify overrides */
::v-deep {
.theme--light.v-btn.v-btn--disabled:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
tabindex="0"
>
<v-icon v-if="!isMobile" class="mr-2">mdi-magnify</v-icon>
<span :class="[tabNumber === 0 ? 'h5' : 'h5-lt', { 'mobile-font' : isMobile }]">Request a Business Name</span>
<span :class="[tabNumber === 0 ? 'h5' : 'h5-lt', { 'mobile-font' : isMobile }]">Get a Business Name or Start a
Numbered Business</span>
</v-tab>

<v-tab :ripple="false"
Expand Down

0 comments on commit 8cbb1fc

Please sign in to comment.