Skip to content

Commit

Permalink
- package lock version 2
Browse files Browse the repository at this point in the history
- added whitespace between some template blocks
- added some comment to describe what some components do
- removed some accessors
- renamed search.vue -> new-search.vue
- updated some component IDs
- fixed template errors in pick-request-type
  • Loading branch information
severinbeauvais committed Jul 21, 2023
1 parent 92172b3 commit bc4778f
Show file tree
Hide file tree
Showing 11 changed files with 25,737 additions and 493 deletions.
26,141 changes: 25,678 additions & 463 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/components/common/names-capture.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<v-form @keydown="validate" id="send-to-examination-form">
<v-container fluid class="pa-0" id="send-to-examination-container">
<v-form @keydown="validate" id="names-capture-form">
<v-container fluid class="pa-0" id="names-capture-container">
<!-- *** EDIT MODE DISPLAYS ITS MENUS HERE *** -->
<!-- *** WHEREAS NEW NR SHOWED THEM IN A TAB IN A PREVIOUS STEP *** -->
<template v-if="getEditMode">
<v-row class="mt-5">
<v-col cols="6" class="font-weight-bold py-0">I need a name to:</v-col>
Expand Down Expand Up @@ -293,6 +295,10 @@ import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EntityType, Location, RequestCode } from '@/enums'
import { CommonMixin } from '@/mixins'
/*
* This is the component that displays the name choices.
* It also shows the menu here when editing a NR.
*/
@Component({
components: {
ApplicantInfoNav
Expand Down
16 changes: 8 additions & 8 deletions src/components/dialogs/pick-request-type.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
<v-row>
<v-col cols="6">
<v-simple-table class="text-left">
<tr v-for="type in tableData.col1" :key="type.value+'-tr'">
<td class="clickable-cell" :id="type.value" @click="chooseType(type)">
<tr v-for="(item, i) in tableData.col1" :key="`col1-${i}`">
<td class="clickable-cell" :id="item.value" @click="chooseType(item)">
<v-tooltip bottom max-width="500" :disabled="isMobile">
<template v-slot:activator="scope">
<button class="link-sm-sans-ul" v-on="scope.on">{{ type.text }}</button>
<button class="link-sm-sans-ul" v-on="scope.on">{{ item.text }}</button>
</template>
<span>{{ type.blurb }}</span>
<span>{{ item['blurb'] }}</span>
</v-tooltip>
</td>
</tr>
</v-simple-table>
</v-col>
<v-col cols="6">
<v-simple-table class="text-left">
<tr v-for="type in tableData.col2" :key="type.value+'-tr'">
<td class="clickable-cell" :id="type.value" @click="chooseType(type)">
<tr v-for="(item, i) in tableData.col2" :key="`col2-${i}`">
<td class="clickable-cell" :id="item.value" @click="chooseType(item)">
<v-tooltip bottom max-width="500" :disabled="isMobile">
<template v-slot:activator="scope">
<button class="link-sm-sans-ul" v-on="scope.on">{{ type.text }}</button>
<button class="link-sm-sans-ul" v-on="scope.on">{{ item.text }}</button>
</template>
<span>{{ type.blurb }}</span>
<span>{{ item['blurb'] }}</span>
</v-tooltip>
</td>
</tr>
Expand Down
13 changes: 9 additions & 4 deletions src/components/existing-request/existing-request-edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{{ editModeHeader }}
</v-col>
</template>

<template v-slot:content>
<v-tabs v-model="submissionTabNumber" id="applicant-info-slider">
<v-tabs-items v-model="submissionTabNumber" touchless>
Expand All @@ -13,12 +14,16 @@
<EntityCannotBeAutoAnalyzed />
</keep-alive>
</v-tab-item>

<v-tab-item>
<!-- Names Capture also shows the menus -->
<NamesCapture />
</v-tab-item>

<v-tab-item>
<ApplicantInfo1 />
</v-tab-item>

<v-tab-item>
<ApplicantInfo2 v-if="getActingOnOwnBehalf" />
<ApplicantInfo3 v-else />
Expand All @@ -43,7 +48,7 @@ import ApplicantInfo3 from '@/components/common/applicant-info-3.vue'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
/**
* This is the component container for editing an existing NR.
* This is the component for the steps when editing an existing NR.
*/
@Component({
components: {
Expand All @@ -64,7 +69,7 @@ export default class ExistingRequestEdit extends Vue {
// Global Action
@Action setSubmissionTabNumber!: ActionBindingIF
private get editModeHeader (): string {
get editModeHeader (): string {
// safety check
if (!this.getEditMode) return ''
Expand All @@ -75,11 +80,11 @@ export default class ExistingRequestEdit extends Vue {
}
}
private get submissionTabNumber (): number {
get submissionTabNumber (): number {
return this.getSubmissionTabNumber
}
private set submissionTabNumber (value: number) {
set submissionTabNumber (value: number) {
this.setSubmissionTabNumber(value)
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/new-request/main-container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<v-container fluid class="white rounded copy-normal pa-10">
<v-row justify="space-between" class="submission-tabs-top" no-gutters>
<slot name="container-header" />

<v-col cols="auto" class="py-0" v-if="displayedComponent !== 'Success'">
<button id="back-to-search-btn"
class="modal-activator link-std-sans-ul"
Expand All @@ -17,7 +18,8 @@
</button>
</v-col>
</v-row>
<slot name="content"/>

<slot name="content" />
</v-container>
</template>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid id="new-request-container" class="copy-normal pa-10">
<v-container fluid id="new-search-container" class="copy-normal pa-10">
<v-row no-gutters>
<v-col cols="12" class="pt-0 font-weight-bold h6"><span>I need a name to:</span></v-col>
</v-row>
Expand Down Expand Up @@ -37,6 +37,7 @@
<span>{{ getRequestText }}</span>
</v-tooltip>
</v-col>

<!--location (aka jurisdiction)-->
<v-col cols="12" md="4" lg="4" :class="{'px-3': !isMobile }">
<v-tooltip id="location-options-select"
Expand Down Expand Up @@ -79,6 +80,7 @@
<span>{{ getLocationText }}</span>
</v-tooltip>
</v-col>

<!--entity_type_cd-->
<v-col cols="12" md="4" lg="4">
<v-tooltip id="entity-type-options-select"
Expand Down Expand Up @@ -143,6 +145,7 @@
</template>
</v-select>
</v-col>

<v-col :class="{
'pl-3': (getIsXproMras && !isFederal && !isMobile),
'pr-3': (!getIsXproMras && showDesignationSelect && !isMobile)
Expand All @@ -158,6 +161,7 @@
<p v-else class="pl-3 text-body-2">Federally incorporated businesses do not need a Name Request. You may
register your extraprovincial business immediately using its existing name at Corporate Online.</p>
</v-col>

<v-col v-if="showDesignationSelect" cols="12" md="4" lg="4">
<v-select :class="!entity_type_cd ? 'disabled-custom' : ''"
:error-messages="getErrors.includes('designation') ? 'Please select a designation' : ''"
Expand Down Expand Up @@ -217,6 +221,7 @@
</v-btn>
</v-col>
</v-row>

<v-row v-if="isPremium" class="pt-7" justify="center" no-gutters>
<v-col cols="auto">
<v-btn id="name-check-skip-btn" class="outlined pa-0" :ripple="false" text @click="handleSubmit(false)">
Expand All @@ -226,6 +231,7 @@
</v-col>
</v-row>
</div>

<div v-else class="mt-3 text-center">
<v-btn id="goto-corporate-btn" :href="corpOnlineLink" target="_blank">
Go to Corporate Online to Register <v-icon small class="ml-1">mdi-open-in-new</v-icon>
Expand All @@ -235,7 +241,7 @@
</template>

<script lang="ts">
import { Component, Mixins, Vue, Watch } from 'vue-property-decorator'
import { Component, Mixins, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
// bcregistry common
Expand All @@ -251,6 +257,9 @@ import { AccountType, EntityType, Location, RequestCode } from '@/enums'
import { CommonMixin } from '@/mixins'
import { CanJurisdictions, IntlJurisdictions } from '@/list-data'
/*
* This is the component that displays the New NR menus and flows.
*/
@Component({
components: { NameInput }
})
Expand Down
14 changes: 10 additions & 4 deletions src/components/new-request/submit-request/submission-tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{{ submissionModeHeader }}
</v-col>
</template>

<template v-slot:content>
<v-tabs v-model="submissionTabNumber" id="applicant-info-slider" class="mt-2">
<v-tabs-items v-model="submissionTabNumber" touchless>
Expand All @@ -13,19 +14,24 @@
<EntityCannotBeAutoAnalyzed />
</keep-alive>
</v-tab-item>

<v-tab-item>
<NamesCapture />
</v-tab-item>

<v-tab-item>
<ApplicantInfo1 />
</v-tab-item>

<v-tab-item>
<ApplicantInfo2 v-if="getActingOnOwnBehalf" />
<ApplicantInfo3 v-else />
</v-tab-item>

<v-tab-item>
<InvalidActionMessage />
</v-tab-item>

<v-tab-item>
<Timeout />
</v-tab-item>
Expand All @@ -50,7 +56,7 @@ import Timeout from './timeout.vue'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
/**
* This is the component container for a new submission.
* This is the component for the steps when creating a new NR.
*/
@Component({
components: {
Expand Down Expand Up @@ -80,7 +86,7 @@ export default class SubmissionTabs extends Vue {
document.head.appendChild(link)
}
private get submissionModeHeader (): string {
get submissionModeHeader (): string {
// safety check
if (this.getEditMode) return ''
Expand All @@ -91,11 +97,11 @@ export default class SubmissionTabs extends Vue {
}
}
private get submissionTabNumber (): number {
get submissionTabNumber (): number {
return this.getSubmissionTabNumber
}
private set submissionTabNumber (value: number) {
set submissionTabNumber (value: number) {
this.setSubmissionTabNumber(value)
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
hide-slider
height="64"
centered
grow>
grow
>
<v-tab :ripple="false"
id="new-tab"
class="upper-border"
Expand All @@ -15,6 +16,7 @@
<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>
</v-tab>

<v-tab :ripple="false"
id="existing-tab"
class="upper-border"
Expand All @@ -23,6 +25,7 @@
<v-icon v-if="!isMobile" class="mr-2">mdi-file-document-edit-outline</v-icon>
<span :class="[tabNumber === 1 ? 'h5' : 'h5-lt', { 'mobile-font' : isMobile }]">Manage My Name Request</span>
</v-tab>

<v-tabs-items class="rounded-b tab-items" v-model="tabNumber" touchless>
<v-tab-item>
<NewSearch />
Expand All @@ -41,7 +44,7 @@ import { Component, Mixins, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
// Components
import NewSearch from '@/components/new-request/search.vue'
import NewSearch from '@/components/new-request/new-search.vue'
import ExistingRequestSearch from './existing-request/existing-request-search.vue'
import LinkRow from '@/components/common/link-row.vue'
import { CommonMixin } from '@/mixins'
Expand Down
8 changes: 3 additions & 5 deletions src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import { routes } from './routes'

/**
* Configures and returns Vue Router.
*/

let appBaseURL = process.env.VUE_APP_NAMEX_API_URL + process.env.VUE_APP_NAMEX_API_VERSION // Global variable to store the custom base URL
// Global variable to store the custom base URL
const appBaseURL = process.env.VUE_APP_NAMEX_API_URL + process.env.VUE_APP_NAMEX_API_VERSION

/** Configures and returns Vue Router. */
export function getVueRouter () {
Vue.use(VueRouter)
return new VueRouter({
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/new-request.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createLocalVue, shallowMount } from '@vue/test-utils'
// import newReqModule from '@/store/new-request-module'
import Search from '@/components/new-request/search.vue'
import Search from '@/components/new-request/new-search.vue'
import Vuetify from 'vuetify'

const localVue = createLocalVue()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/new-search.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createLocalVue, mount, shallowMount } from '@vue/test-utils'
import NewSearch from '@/components/new-request/search.vue'
import NewSearch from '@/components/new-request/new-search.vue'
// import newReqModule from '@/store/new-request-module'
import Vuetify from 'vuetify'

Expand Down

0 comments on commit bc4778f

Please sign in to comment.