Skip to content

Commit

Permalink
17206 implement society NR flows (#651)
Browse files Browse the repository at this point in the history
* implement society NR flows

* implement society

* update version

* according to code review

* according to code review

* according to code review

* FF enable-society value is disabled

* according to code review

* remove '/' from url
  • Loading branch information
eve-git authored and JazzarKarim committed Sep 11, 2023
1 parent 9b00528 commit 6681ccb
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 11 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ VUE_APP_DASHBOARD_URL="https://dev.business.bcregistry.gov.bc.ca/"
VUE_APP_ENTITY_SELECTOR_URL="https://entity-selection-dev.apps.silver.devops.gov.bc.ca/"
VUE_APP_PAYMENT_PORTAL_URL="https://dev.account.bcregistry.gov.bc.ca/makepayment/"
VUE_APP_SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi"
VUE_APP_SOCIETIES_ONLINE_HOME_URL="https://dev.bcregistry.ca/societies/"

#vaults API
VUE_APP_AUTH_API_URL="https://auth-api-dev.apps.silver.devops.gov.bc.ca"
Expand Down
1 change: 1 addition & 0 deletions devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ VUE_APP_DASHBOARD_URL="op://web-url/$APP_ENV/business/DASHBOARD_URL"
VUE_APP_ENTITY_SELECTOR_URL="op://web-url/$APP_ENV/entity-selector/ENTITY_SELECTOR_URL"
VUE_APP_PAYMENT_PORTAL_URL="op://web-url/$APP_ENV/pay/PAYMENT_PORTAL_URL"
VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOUT_URL"
VUE_APP_SOCIETIES_ONLINE_HOME_URL="op://web-url/$APP_ENV/bcregistry/SOCIETIES_URL"

#vaults API
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/names-capture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export default class NamesCapture extends Mixins(CommonMixin) {
get entityPhraseRequired (): boolean {
if (!this.entity_type_cd) return false
return [EntityType.CC, EntityType.CP].includes(this.entity_type_cd)
return [EntityType.CC, EntityType.CP, EntityType.SO].includes(this.entity_type_cd)
}
get entityPhraseText (): string {
Expand Down
8 changes: 5 additions & 3 deletions src/components/dialogs/pick-entity-or-conversion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,16 @@
</template>

<script lang="ts">
import { Component, Vue, Watch } from 'vue-property-decorator'
import { Component, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
import { ConversionTypesI, EntityI, SelectOptionsI } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EntityType, Location } from '@/enums'
import { ConversionTypes } from '@/list-data'
import { CommonMixin } from '@/mixins'
@Component({})
export default class PickEntityOrConversionDialog extends Vue {
export default class PickEntityOrConversionDialog extends CommonMixin {
// enum for template
readonly ConversionTypes = ConversionTypes
Expand Down Expand Up @@ -229,7 +230,8 @@ export default class PickEntityOrConversionDialog extends Vue {
}
chooseType (entity: SelectOptionsI) {
if (entity.value === EntityType.SO || entity.value === EntityType.XSO) {
// show an URL of creating society NR if Societies NR needs to be released AFTER the way of navigating changes
if (!this.isSocietyEnabled() && (entity.value === EntityType.SO || entity.value === EntityType.XSO)) {
this.showSocietiesInfo = true
this.clearEntitySelection()
return
Expand Down
18 changes: 17 additions & 1 deletion src/components/existing-request/existing-request-display.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@
:emailAddress="nr && nr.applicants && nr.applicants.emailAddress"
:showIncorporateNowButton="showIncorporateButton"
:showRegisterButton="showRegisterButton"
:showGoToSocietiesButton="showGoToSocietiesButton"
:disabled="disableUnfurnished"
@incorporateRegisterYourBusiness="incorporateRegisterYourBusiness()"
@goToSocietiesOnline="goToSocietiesOnline"
/>

<NrNotApprovedGrayBox
Expand All @@ -221,7 +223,7 @@ import CheckStatusGrayBox from './check-status-gray-box.vue'
import NrApprovedGrayBox from './nr-approved-gray-box.vue'
import NrNotApprovedGrayBox from './nr-not-approved-gray-box.vue'
import { NameState, NrAction, NrState, PaymentStatus, SbcPaymentStatus, PaymentAction, Furnished,
NrRequestActionCodes } from '@/enums'
NrRequestActionCodes, EntityType } from '@/enums'
import { Sleep, GetFeatureFlag, Navigate } from '@/plugins'
import NamexServices from '@/services/namex-services'
import ContactInfo from '@/components/common/contact-info.vue'
Expand Down Expand Up @@ -425,6 +427,14 @@ export default class ExistingRequestDisplay extends Mixins(
this.isConsentUnRequired)
}
/** True if the Go To Societies Online button should be shown. */
get showGoToSocietiesButton (): boolean {
return this.nr?.entity_type_cd === EntityType.SO &&
this.nr.request_action_cd === NrRequestActionCodes.NEW_BUSINESS &&
(NrState.APPROVED === this.nr.state ||
this.isConsentUnRequired)
}
get isConsentUnRequired (): boolean {
return NrState.CONDITIONAL === this.nr.state &&
(this.nr.consentFlag === null ||
Expand Down Expand Up @@ -704,6 +714,12 @@ export default class ExistingRequestDisplay extends Mixins(
}
}
// redirect to Societies Online
goToSocietiesOnline () {
const societyHomeUrl = sessionStorage.getItem('SOCIETIES_ONLINE_HOME_URL')
Navigate(`${societyHomeUrl}`)
}
private cancelledUpgrade (status: string, payments: any): string {
let paymentId = null
if (status === 'PAYMENT_CANCELLED') {
Expand Down
16 changes: 16 additions & 0 deletions src/components/existing-request/nr-approved-gray-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
</v-btn>
</div>

<div v-else-if="showGoToSocietiesButton" class="d-flex justify-center my-1 pb-1">
<v-btn
class="societies-online-btn"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToSocietiesOnline')"
>
<strong>Go to Societies Online to Register</strong>
&nbsp;
<v-icon small>mdi-open-in-new</v-icon>
</v-btn>
</div>

<p v-else>
Your Name Request <strong>{{nrNum}}</strong> for <strong>{{approvedName}}</strong> has been
approved for use. An email has been sent to <strong>{{emailAddress}}</strong> with instructions
Expand Down Expand Up @@ -62,6 +75,9 @@ export default class NrApprovedGrayBox extends Vue {
@Prop({ default: false })
readonly showIncorporateNowButton: boolean
@Prop({ default: false })
readonly showGoToSocietiesButton: boolean
@Prop({ default: false })
readonly disabled: boolean
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/new-request/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,13 @@ export default class Search extends Mixins(CommonMixin) {
}
get showCompanyRadioBtn (): boolean {
if (!this.isBcCcCrUl) {
const isSociety = this.isSocietyEnabled() && this.getEntityTypeCd === EntityType.SO
// society NR name is required and no numbered name allowed
const showButton = this.isBcCcCrUl && !isSociety
if (!showButton) {
this.selectedCompanyType = CompanyType.NAMED_COMPANY
}
return this.isBcCcCrUl
return showButton
}
get jurisdictionOptions () {
Expand Down
18 changes: 17 additions & 1 deletion src/list-data/designations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,23 @@ export const Designations = {
end: true
},
SO: {
words: [],
words: [
'ASSOCIATION',
'ASSN.',
'CHAMBER OF COMMERCE',
'CHURCH',
'EGLISE',
'CLUB',
'CHRISTIAN SCHOOL',
'FELLOWSHIP',
'FOUNDATION',
'FONDATION',
'GUILD',
'PARISH',
'SOCIETY',
'SOCIETE',
'WATERSHED'
],
end: false
},
UL: {
Expand Down
6 changes: 4 additions & 2 deletions src/list-data/request-action-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ export const BcMapping: RequestActionMappingI = {
EntityType.CC,
EntityType.UL,
EntityType.FI,
EntityType.BC
EntityType.BC,
EntityType.SO
],
REH: [
EntityType.CR,
EntityType.CP,
EntityType.CC,
EntityType.UL,
EntityType.FI,
EntityType.BC
EntityType.BC,
EntityType.SO
],
CHG: entityTypesBC.filter(ent => ent !== EntityType.PAR && ent !== EntityType.PA),
MVE: [
Expand Down
5 changes: 5 additions & 0 deletions src/mixins/common-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export class CommonMixin extends Vue {
return supportedEntites.includes(nr?.entity_type_cd)
}

/** in case Societies NR needs to be released AFTER the way of navigating changes (feature branch) */
isSocietyEnabled (): boolean {
return GetFeatureFlag('enable-society')
}

/** Returns true if the specified NR is for a firm (SP/GP). */
isFirm (nr: any): boolean {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const defaultFlagSet: LDFlagSet = {
'sentry-enable': false, // by default, no sentry logs
'banner-text': '', // by default, there is no banner text
'enable-web-chat': false, // by default, old webchat is disabled
'enable-genesys-web-message': false // by default, genesys web message is disabled
'enable-genesys-web-message': false, // by default, genesys web message is disabled
'enable-society': false // by default society is disabled
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export async function getConfig (): Promise<EnvConfigI> {
const registryHomeUrl: string = process.env.VUE_APP_REGISTRY_HOME_URL
sessionStorage.setItem('REGISTRY_HOME_URL', registryHomeUrl)

const societiesOnlineHomeUrl: string = process.env.VUE_APP_SOCIETIES_ONLINE_HOME_URL
sessionStorage.setItem('SOCIETIES_ONLINE_HOME_URL', societiesOnlineHomeUrl)

// for system alert banner (sbc-common-components)
const statusApiUrl: string = process.env.VUE_APP_STATUS_API_URL + process.env.VUE_APP_STATUS_API_VERSION
sessionStorage.setItem('STATUS_API_URL', statusApiUrl)
Expand Down

0 comments on commit 6681ccb

Please sign in to comment.