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

17206 implement society NR flows #651

Merged
merged 10 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 9 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
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/"
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved

#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/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

You need to remove the '/' at the end of string.


#vaults API
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"
Expand Down
2 changes: 1 addition & 1 deletion 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.21",
"version": "5.0.22",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
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 {
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -571,10 +571,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
9 changes: 6 additions & 3 deletions src/list-data/request-action-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,26 @@ export const BcMapping: RequestActionMappingI = {
EntityType.UL,
EntityType.CC,
EntityType.CP,
EntityType.BC
EntityType.BC,
EntityType.SO
],
REN: [
EntityType.CR,
EntityType.CP,
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),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any change needed for CHG? (I see PAR in there, which is a designation....?

Why is SO already part of MVE list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry I am not familiar with this part. It is old code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you test around this code to see what it might do and whether it works correctly? Ask Mihai for help if needed.

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) */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool!

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
Loading