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

18449 - GP/SP registration modify #582

Merged
merged 24 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 21 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
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": "business-create-ui",
"version": "5.6.0",
"version": "5.6.1",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
11 changes: 8 additions & 3 deletions src/components/Registration/HelpContactUs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
</header>

<p class="my-4">
If you require further assistance adding a business or corporation, please contact us.
If you require further assistance adding a business, please contact us.
</p>

<RegistriesContactInfo />
<FirmContactInfo />

<div
class="help-btn bottom"
Expand All @@ -51,14 +51,19 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import RegistriesContactInfo from '@/components/common/RegistriesContactInfo.vue'
import FirmContactInfo from '@/components/common/FirmContactInfo.vue'
import { Getter } from 'pinia-class'
import { useStore } from '@/store/store'

@Component({
components: {
RegistriesContactInfo
RegistriesContactInfo,
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
FirmContactInfo
}
})
export default class HelpContactUs extends Vue {
helpToggle = false
@Getter(useStore) isTypeFirm!: boolean
JazzarKarim marked this conversation as resolved.
Show resolved Hide resolved
}
</script>

Expand Down
57 changes: 57 additions & 0 deletions src/components/common/FirmContactInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<ul class="contact-info pl-0">
<li class="contact-container">
<v-icon
class="contact-icon"
size="18px"
>
mdi-phone
</v-icon>
<span class="px-2">Canada and U.S. Toll Free:</span>
<a
href="tel:+1-877-370-1033"
class="contact-value"
>1-877-370-1033</a>
</li>
<li class="contact-container">
<v-icon
class="contact-icon"
size="18px"
>
mdi-phone
</v-icon>
<span class="px-2">Victoria Office:</span>
<a
href="tel:+1-250-370-1033"
class="contact-value"
>250-370-1033</a>
</li>
</ul>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component({})
export default class RegistriesContactInfo extends Vue {}
</script>

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';

.contact-container {
font-size: $px-15;
color: $gray7;
display: flex;

.contact-icon {
JazzarKarim marked this conversation as resolved.
Show resolved Hide resolved
flex: 0 0 1.375rem;
justify-content: flex-start;
color: $app-dk-blue;
}

.contact-value {
flex: 1 1;
}
}
</style>
85 changes: 77 additions & 8 deletions src/components/common/RegAddEditOrgPerson.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,30 @@
class="add-org-header"
:class="{'error-text': !addPersonOrgFormValid}"
>
<span v-if="isNaN(activeIndex)">Add Business or Corporation</span>
<span v-else>Edit Business or Corporation</span>
<div v-if="isRoleStaff">
<span v-if="isNaN(activeIndex)">Add Business or Corporation</span>
<span v-else>Edit Business or Corporation</span>
</div>

<div v-else>
<template v-if="isNaN(activeIndex)">
<template v-if="isTypePartnership">
Add a Business as a Partner
</template>
<template v-else>
Add a Business as the Proprietor
</template>
</template>

<template v-else>
<template v-if="isTypePartnership">
Edit a Business as a Partner
</template>
<template v-else>
Edit a Business as the Proprietor
</template>
</template>
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use computed properties here instead when checking isTypePartnership.

Copy link
Collaborator

Choose a reason for hiding this comment

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

James and I discussed this, and he's right, but I think leaving the code like this is also acceptable as it's clear what's going on.

</div>
</label>

<!-- Title for person -->
Expand Down Expand Up @@ -104,9 +126,9 @@

<!-- Business or Corporation -->
<template v-if="isOrg">
<!-- Business or Corporation Unregistered in B.C. -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove "business or corporation unregistered in B.C." since we do not want this section now, only "existing B.C. business" now
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Check with Mihai if we are ever going to use this again. I think we might so I recommend disabling this code instead of deleting it, but confirm first.

Copy link
Collaborator

@severinbeauvais severinbeauvais Nov 16, 2023

Choose a reason for hiding this comment

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

Also, I see in the uxpin, "Don't make changes for Registries staff. Make the changes for SBC staff and clients."

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM

<!-- Business or Corporation Unregistered in B.C. (Registries Staff Only) -->
<article
v-if="!orgPerson.isLookupBusiness"
v-if="!orgPerson.isLookupBusiness && isRoleStaff"
class="manual-add-article"
>
<label>
Expand Down Expand Up @@ -136,7 +158,7 @@
</template>
</p>

<HelpContactUs class="mt-6" />
<HelpContactUs class="help" />

<!-- Confirm checkbox (org only) -->
<v-checkbox
Expand Down Expand Up @@ -188,9 +210,9 @@
<v-divider class="mt-8" />
</article>

<!-- Business or Corporation Look up -->
<!-- Business or Corporation Look up with Registries Staff-->
<article
v-else
v-else-if="isRoleStaff"
class="business-lookup-article"
>
<label>Business or Corporation Registered in B.C.</label>
Expand Down Expand Up @@ -235,7 +257,7 @@
a bank or a railway, use the manual entry form. All other types of business cannot
be a partner.
</p>
<HelpContactUs class="mt-6" />
<HelpContactUs class="help" />
</div>
<div v-else>
<p class="mt-6 mb-0">
Expand All @@ -256,6 +278,48 @@
@undoBusiness="resetBusinessDetails()"
/>
</article>

<!-- Business or Corporation Look up with SBC Staff or Clients-->
<article
v-else
class="business-lookup-article"
>
<div
v-if="hasBusinessSelectedFromLookup"
class="mt-6"
>
<v-card
outlined
class="message-box rounded-0"
>
<p>
<strong>Important:</strong> If the addresses shown below are out of date, you
may update them here. The updates are applicable only to this application.
</p>
</v-card>
</div>
<div v-if="isProprietor">
<p class="mb-0">
Enter an existing B.C. business as the proprietor.
</p>
</div>
<div v-else>
<p class="mb-0">
Enter an existing B.C. business as a partner.
</p>
</div>

<HelpContactUs class="help" />

<BusinessLookup
:showErrors="enableRules"
:businessLookup="inProgressBusinessLookup"
:BusinessLookupServices="BusinessLookupServices"
label="Business Name or Incorporation/Registration Number"
@setBusiness="updateBusinessDetails($event)"
@undoBusiness="resetBusinessDetails()"
/>
</article>
</template>

<!-- Roles -->
Expand Down Expand Up @@ -540,6 +604,11 @@ div.three-column {
color: $gray7;
}

.help {
margin-top: 30px;
margin-bottom: 40px;
}

// align checkbox with top of its label
:deep(.v-input--checkbox .v-input__slot) {
align-items: flex-start;
Expand Down
1 change: 1 addition & 0 deletions src/mixins/add-edit-org-person-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class AddEditOrgPersonMixin extends Vue {
addPersonOrgFormValid = true
enableRules = false
inProgressBusinessLookup = EmptyBusinessLookup
businessLookupLabel = 'Business Name or Incorporation/Registration Number'

// Address related properties
inProgressMailingAddress = {} as AddressIF
Expand Down
21 changes: 21 additions & 0 deletions tests/unit/FirmContactInfo.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Vuetify from 'vuetify'
import { mount } from '@vue/test-utils'
import FirmContactInfo from '@/components/common/FirmContactInfo.vue'

const vuetify = new Vuetify({})

describe('FirmContactInfo', () => {
it('Displays expected content', () => {
const wrapper = mount(FirmContactInfo, { vuetify })

// verify content
const listItems = wrapper.findAll('.contact-container')
expect(listItems.length).toBe(2)
expect(listItems.at(0).find('span').text()).toBe('Canada and U.S. Toll Free:')
expect(listItems.at(0).find('.contact-value').text()).toBe('1-877-370-1033')
expect(listItems.at(1).find('span').text()).toBe('Victoria Office:')
expect(listItems.at(1).find('.contact-value').text()).toBe('250-370-1033')

wrapper.destroy()
})
})
6 changes: 3 additions & 3 deletions tests/unit/HelpContactUs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Vuetify from 'vuetify'
import { mount } from '@vue/test-utils'
import HelpContactUs from '@/components/Registration/HelpContactUs.vue'
import RegistriesContactInfo from '@/components/common/RegistriesContactInfo.vue'
import FirmContactInfo from '@/components/common/FirmContactInfo.vue'

const vuetify = new Vuetify({})

Expand Down Expand Up @@ -31,10 +31,10 @@
expect(wrapper.find('.help-header h2').text()).toBe('Contact BC Registries')

// verify paragraph
expect(wrapper.find('p').text()).toContain('If you require further assistance')
expect(wrapper.find('p').text()).toContain('If you require further assistance adding a business, please contact us.')

Check warning on line 34 in tests/unit/HelpContactUs.spec.ts

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

This line has a length of 121. Maximum allowed is 120
JazzarKarim marked this conversation as resolved.
Show resolved Hide resolved

// verify contact info component
expect(wrapper.findComponent(RegistriesContactInfo).exists()).toBe(true)
expect(wrapper.findComponent(FirmContactInfo).exists()).toBe(true)

wrapper.destroy()
})
Expand Down
Loading
Loading