Skip to content

Commit

Permalink
Merge pull request #697 from bcgov/feature-search-refactor
Browse files Browse the repository at this point in the history
Merge feature branch into main
  • Loading branch information
severinbeauvais authored Sep 15, 2023
2 parents b39ea2b + 35086b5 commit 3cabd78
Show file tree
Hide file tree
Showing 38 changed files with 1,575 additions and 951 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.44",
"version": "5.1.10",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/nested-select.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-select
class="request-action-select"
class="nested-select"
filled
hide-details="auto"
item-value="[group,value]"
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class NestedSelect extends Vue {
@Prop({ default: null }) readonly value!: any
@Prop() readonly maxHeight!: string
// data
// variables
activeActionGroup = NaN
// computed
Expand All @@ -93,13 +93,13 @@ export default class NestedSelect extends Vue {
}
// methods
@Emit('change')
emitChangeEvent (item: any): void {}
toggleActionGroup (group: number): void {
// if current group is active, deactivate it, otherwise activate it
this.activeActionGroup = (this.activeActionGroup === group) ? NaN : group
}
@Emit('change')
emitChangeEvent (item: any): void {}
}
</script>

Expand Down
5 changes: 1 addition & 4 deletions src/components/dialogs/mras-search-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
<p>{{ resultDesc }}</p>
<p>{{ resultAct }}</p>

<NameInput
id="name-input-component"
:is-mras-search="!isNameSearch"
/>
<NameInput :is-mras-search="!isNameSearch" />
</v-card-text>

<v-card-actions class="justify-center">
Expand Down
8 changes: 4 additions & 4 deletions src/components/dialogs/nr-not-required.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<ol>
<li>
<b>You are already Federally Incorporated.</b><br>
You do not require a name request. Please go to <a :href="corpOnlineLink" target="_blank">
You do not require a name request. Please go to <a :href="colinLink" target="_blank">
Corporate Online</a> to extra-provincially register your business.
</li>
<li class="my-3">
<b>You want a numbered company. The business does not need a name.</b><br>
You do not require a name request. If you are incorporating a Benefit company go to
<a :href="businessRegistryLink" target="_blank">BC Business Registry</a>, otherwise go to
<a :href="corpOnlineLink" target="_blank">Corporate Online</a>. A number will be assigned
<a :href="colinLink" target="_blank">Corporate Online</a>. A number will be assigned
upon registering your business.
</li>
<li>
Expand Down Expand Up @@ -44,8 +44,8 @@ export default class NrNotRequiredDialog extends Vue {
@Getter getNrRequiredModalVisible!: boolean
@Action setNrRequiredModalVisible!: ActionBindingIF
private corpOnlineLink = 'https://www.corporateonline.gov.bc.ca/'
private businessRegistryLink = 'https://www.bcregistry.ca/business'
readonly colinLink = sessionStorage.getItem('CORPORATE_ONLINE_URL')
readonly businessRegistryLink = 'https://www.bcregistry.ca/business'
get showModal () {
return this.getNrRequiredModalVisible
Expand Down
23 changes: 7 additions & 16 deletions src/components/dialogs/pick-entity-or-conversion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</template>

<!-- Category tables - xpro (amalgamation only) -->
<template v-if="isAmalgamation">
<template v-if="isAmalgamation && !showSocietiesInfo">
<v-row class="pt-4">
<v-col cols="12">
<span class="copy-small">Extraprovincial:</span>
Expand Down Expand Up @@ -129,6 +129,7 @@ import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EntityTypes, Location } from '@/enums'
import { ConversionTypes } from '@/list-data'
import { CommonMixin } from '@/mixins'
import { isAmalgamation } from '@/store/getters'
@Component({})
export default class PickEntityOrConversionDialog extends CommonMixin {
Expand Down Expand Up @@ -156,6 +157,7 @@ export default class PickEntityOrConversionDialog extends CommonMixin {
@Action setEntityTypeAddToSelect!: ActionBindingIF
@Action setPickEntityModalVisible!: ActionBindingIF
// Local variable
showSocietiesInfo = false
closeIconClicked () {
Expand All @@ -171,16 +173,9 @@ export default class PickEntityOrConversionDialog extends CommonMixin {
}
}
get entity_type_cd (): EntityTypes {
return this.getEntityTypeCd
}
set entity_type_cd (value: EntityTypes) {
this.setEntityTypeCd(value)
}
get tableData (): any[] {
if (this.getLocation === Location.BC) {
// default table data for amalgamation is always BC
if (this.getLocation === Location.BC || isAmalgamation) {
return this.tableDataBC
} else {
return this.tableDataXPRO
Expand Down Expand Up @@ -244,10 +239,6 @@ export default class PickEntityOrConversionDialog extends CommonMixin {
return this.getEntityBlurbs.find(type => type.value === entity_type_cd)?.blurbs || []
}
clearEntitySelection (): void {
this.entity_type_cd = EntityTypes.INFO
}
chooseConversion (conversion) {
let index = this.getConversionTypeOptions.findIndex((conv: any) => conv.value === conversion.value)
if (index === -1) {
Expand All @@ -262,12 +253,12 @@ export default class PickEntityOrConversionDialog extends CommonMixin {
}
chooseType (entity: SelectOptionsI) {
// show an URL of creating society NR if Societies NR needs to be released AFTER the way of navigating changes
// special case for Society: if FF is not enabled then show society info panel and don't set the type
if (!this.isSocietyEnabled() && (entity.value === EntityTypes.SO || entity.value === EntityTypes.XSO)) {
this.showSocietiesInfo = true
this.clearEntitySelection()
return
}
// if not already there, save selected entry for later addition to menu list
let index = this.getEntityTypeOptions.findIndex((ent: any) => ent.value === entity.value)
if (index === -1) {
this.setEntityTypeAddToSelect(entity)
Expand Down
12 changes: 6 additions & 6 deletions src/components/existing-request/existing-request-display.vue
Original file line number Diff line number Diff line change
Expand Up @@ -678,16 +678,16 @@ export default class ExistingRequestDisplay extends Mixins(
}
}
// redirect to Societies Online
/** Opens Societies Online in a new tab. */
goToSocietiesOnline () {
const societyHomeUrl = sessionStorage.getItem('SOCIETIES_ONLINE_HOME_URL')
Navigate(`${societyHomeUrl}`)
const url = sessionStorage.getItem('SOCIETIES_ONLINE_HOME_URL')
window.open(url, '_blank')
}
// redirect to Corporate Online
/** Opens Corporate Online in a new tab. */
goToCorpOnline () {
const corporateHomeUrl = sessionStorage.getItem('CORPORATE_ONLINE_URL')
Navigate(`${corporateHomeUrl}`)
const url = sessionStorage.getItem('CORPORATE_ONLINE_URL')
window.open(url, '_blank')
}
private cancelledUpgrade (status: string, payments: any): string {
Expand Down
30 changes: 12 additions & 18 deletions src/components/existing-request/nr-approved-gray-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@

<div v-else-if="showAmalgamateNowButton" class="d-flex justify-center my-1">
<v-btn
class="alter-now-external-btn mt-30"
v-if="showOpenExternalIcon"
class="amalgamate-now-external-btn mt-30"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToCorpOnline')"
>
<strong>Alter Now</strong>
<strong>Amalgamate Now</strong>
&nbsp;
<v-icon small>mdi-open-in-new</v-icon>
</v-btn>
<v-btn
v-else
class="alter-now-btn mt-30"
class="amalgamate-now-btn mt-30"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToEntityDashboard')"
Expand All @@ -62,8 +62,8 @@
<div v-else-if="showAlterNowButton" class="my-1">
<div v-if="isAllowAlterOnline" class="d-flex justify-center">
<v-btn
class="alter-now-external-btn mt-30"
v-if="showOpenExternalIcon"
class="alter-now-external-btn mt-30"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToCorpOnline')"
Expand Down Expand Up @@ -163,15 +163,19 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
return (this.isConversion && this.isApprovedOrConsentUnRequired)
}
/** True if the Amalgamate Now button should be shown. */
get showAmalgamateNowButton (): boolean {
return (this.isAmalgamate && this.isApprovedOrConsentUnRequired)
}
get isAllowAlterOnline (): boolean {
return this.isAlterOnline(this.getNr.requestTypeCd)
}
get showOpenExternalIcon (): boolean {
return (
this.showAlterNowButton &&
!this.isSupportedAlteration(this.getNr.requestTypeCd)
)
if (this.showAmalgamateNowButton && !this.isSupportedAmalgamation(this.getNr.requestTypeCd)) return true
if (this.showAlterNowButton && !this.isSupportedAlteration(this.getNr.requestTypeCd)) return true
return false
}
/** True if the Go To Societies Online button should be shown. */
Expand Down Expand Up @@ -202,16 +206,6 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
this.isApprovedOrConsentUnRequired
)
}
/** True if the Amalgamate Now button should be shown. */
// *** TODO: verify this logic and when we show this button vs external link
get showAmalgamateNowButton (): boolean {
return (
this.isAmalgamate &&
this.isSupportedAmalgamation(this.getNr.entity_type_cd) &&
this.isApprovedOrConsentUnRequired
)
}
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/lower-info-area/lower-container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ import { Component, Vue } from 'vue-property-decorator'
components: { NameBuildInfo, NewAndBetterWay }
})
export default class LowerContainer extends Vue {
private needMoreInfo = 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/' +
'permits-licences/businesses-incorporated-companies/approval-business-name'
readonly needMoreInfo = 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/' +
'permits-licences/businesses-incorporated-companies/approval-business-name'
}
</script>

Expand Down
14 changes: 5 additions & 9 deletions src/components/new-request/grey-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ export default class GreyBox extends Vue {
get isAssumedNameEntityType () {
return (
this.entity_type_cd !== EntityTypes.XLP &&
this.entity_type_cd !== EntityTypes.XLL &&
this.entity_type_cd !== EntityTypes.XCP &&
this.entity_type_cd !== EntityTypes.XSO
this.getEntityTypeCd !== EntityTypes.XLP &&
this.getEntityTypeCd !== EntityTypes.XLL &&
this.getEntityTypeCd !== EntityTypes.XCP &&
this.getEntityTypeCd !== EntityTypes.XSO
)
}
Expand Down Expand Up @@ -278,10 +278,6 @@ export default class GreyBox extends Vue {
return null
}
get entity_type_cd (): EntityTypes {
return this.getEntityTypeCd
}
get isDesignationIssueType () {
if (this.getDesignationIssueTypes.includes(this.issueType)) {
return true
Expand Down Expand Up @@ -504,7 +500,7 @@ export default class GreyBox extends Vue {
}
extractInnerDesignation (name, designation = null) {
let { words } = Designations[this.entity_type_cd]
let { words } = Designations[this.getEntityTypeCd]
if (!designation) {
for (let word of words) {
name = replaceWord(name, word)
Expand Down
5 changes: 1 addition & 4 deletions src/components/new-request/name-input.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-text-field
id="name-input-text-field"
id="name-input-component"
ref="nameInputRef"
:error-messages="message"
autocomplete="chrome-off"
Expand All @@ -22,7 +22,6 @@
<script lang="ts">
import { Component, Prop, Vue, Watch, Emit } from 'vue-property-decorator'
import { Getter, Action } from 'vuex-class'
import { Location, NrRequestActionCodes } from '@/enums'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { sanitizeName } from '@/plugins'
import { MRAS_MAX_LENGTH } from '@/components/new-request/constants'
Expand All @@ -42,9 +41,7 @@ export default class NameInput extends Vue {
@Getter getCorpSearch!: string
@Getter getErrors!: string[]
@Getter getHasNoCorpNum!: boolean
@Getter getLocation!: Location
@Getter getName!: string
@Getter getRequestActionCd!: NrRequestActionCodes
@Getter isMrasJurisdiction!: boolean
@Getter isXproFlow!: boolean
Expand Down
Loading

0 comments on commit 3cabd78

Please sign in to comment.