Skip to content

Commit

Permalink
16634 Implemented new actions menu + cleanup (#616)
Browse files Browse the repository at this point in the history
* - app version = 5.0.2
- imported latest shared enums
- changed RequestCode to shared NrRequestActionCodes enum
- fixed some whitespace and alignment
- fixed some property/method visibilities
- cleanup up Pick Request Type dialog (removed blurbs, reformatted layout, filtered items)
- implemented new v-select with list items for nested menus
- implemented NameType enum for extraprovincial / assumed names
- updated RequestActions data structure to support nested groups (and new text, etc)
- fixed mobile spacing above nav buttons
- fixed mobile spacing above existing NR buttons
- misc cleanup
- deleted obsolete code

* - fixed slot item variable issues

* - renamed new enum
- reverted declarations

* - removed await from non-async function
- fixed another property visibility issue
- fixed up PickRequestType modal
- implemented some unit tests
- moved and renamed some unit tests
- misc cleanup
  • Loading branch information
severinbeauvais authored and JazzarKarim committed Sep 11, 2023
1 parent 849dba1 commit f958514
Show file tree
Hide file tree
Showing 50 changed files with 452 additions and 364 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
}
},
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
setupFiles: ['<rootDir>/tests/unit/setup.ts'],
setupFiles: ['<rootDir>/tests/setup.ts'],
// notify: true,
// notifyMode: 'always',
transformIgnorePatterns: []
Expand Down
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.0.1",
"version": "5.0.2",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand All @@ -14,7 +14,7 @@
},
"dependencies": {
"@babel/compat-data": "^7.12.13",
"@bcrs-shared-components/enums": "1.0.13",
"@bcrs-shared-components/enums": "1.0.40",
"@bcrs-shared-components/genesys-web-message": "1.0.0",
"@bcrs-shared-components/interfaces": "1.0.22",
"@bcrs-shared-components/staff-payment": "1.0.29",
Expand Down
7 changes: 4 additions & 3 deletions src/components/common/applicant-info-2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
</span>
</v-tooltip>
</v-col>

<ApplicantInfoNav @nextAction="nextAction()" />
</v-row>
</v-container>
Expand All @@ -213,7 +214,7 @@ import ApplicantInfoNav from '@/components/common/applicant-info-nav.vue'
import { Action, Getter } from 'vuex-class'
import { ApplicantI } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { CorpNumRequests, NrState, RequestCode } from '@/enums'
import { CorpNumRequests, NrRequestActionCodes, NrState } from '@/enums'
import { GetFeatureFlag } from '@/plugins'
@Component({
Expand All @@ -229,7 +230,7 @@ export default class ApplicantInfo2 extends Vue {
@Getter getEditMode!: boolean
@Getter getNrData!: any
@Getter getNrState!: string
@Getter getRequestActionCd!: RequestCode
@Getter getRequestActionCd!: NrRequestActionCodes
@Getter getShowPriorityRequest!: boolean
@Getter getShowCorpNum!: string
@Getter isMobile!: boolean
Expand Down Expand Up @@ -292,7 +293,7 @@ export default class ApplicantInfo2 extends Vue {
mounted () {
// Apply optional corpNum validations for Amalgamations as they are NOT a required field but require COLIN lookup.
if (this.getRequestActionCd === RequestCode.AML) {
if (this.getRequestActionCd === NrRequestActionCodes.AMALGAMATE) {
this.corpNumFieldLabel += ' (Optional)'
this.corpNumRules = [
v => (!v || v.length > 3) || 'Must be at least 4 characters'
Expand Down
17 changes: 14 additions & 3 deletions src/components/common/applicant-info-3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

<v-row class="mt-0">
<v-col cols="12" md="2" lg="2" />

<!--PHONE NUMBER-->
<v-col cols="12" md="5" lg="5">
<v-text-field :messages="messages['phone']"
Expand All @@ -42,6 +43,7 @@
hide-details="auto"
label="Phone Number" />
</v-col>

<!--FAX NUMBER-->
<v-col cols="12" md="5" lg="5">
<v-text-field :messages="messages['fax']"
Expand All @@ -57,6 +59,7 @@

<v-row>
<v-col cols="12" md="2" lg="2" class="h6">Client</v-col>

<!--FIRST NAME-->
<v-col cols="12" md="5" lg="5">
<v-text-field :messages="messages['clientFirst']"
Expand All @@ -67,6 +70,7 @@
hide-details="auto"
label="First Name (Optional)" />
</v-col>

<!--LAST NAME-->
<v-col cols="12" md="5" lg="5">
<v-text-field :messages="messages['clientLast']"
Expand All @@ -81,6 +85,7 @@

<v-row v-if="!getEditMode && !isRoleStaff" class="mt-0">
<v-col cols="12" md="2" lg="2"></v-col>

<!--FOLIO NUMBER-->
<v-col cols="12" md="5" lg="5">
<FolioNumberInput
Expand All @@ -94,6 +99,7 @@

<v-row v-if="showAllFields">
<v-col cols="12" md="2" lg="2" class="h6">About The Business</v-col>

<!--NATURE OF BUSINESS-->
<v-col cols="12" md="5" lg="5" align-self="start">
<v-tooltip top
Expand Down Expand Up @@ -121,6 +127,7 @@
</span>
</v-tooltip>
</v-col>

<!--ADDITIONAL INFORMATION-->
<v-col cols="12" md="5" lg="5" align-self="start">
<v-tooltip top
Expand Down Expand Up @@ -152,6 +159,7 @@

<v-row class="mt-0">
<v-col cols="12" md="2" lg="2" />

<!--CORP NUMBER-->
<v-col cols="12" md="5" lg="5" v-if="getShowCorpNum === CorpNumRequests.COLIN">
<v-tooltip top
Expand All @@ -177,6 +185,7 @@
</span>
</v-tooltip>
</v-col>

<!--TRADEMARK-->
<v-col cols="12" md="5" lg="5">
<v-tooltip top
Expand Down Expand Up @@ -205,6 +214,7 @@

<v-row class="align-center mt-2 mb-0">
<v-col cols="12" md="2" lg="2" />

<!--PRIORITY REQUEST-->
<v-col cols="12" md="5" lg="5">
<v-tooltip top
Expand Down Expand Up @@ -234,6 +244,7 @@
</span>
</v-tooltip>
</v-col>

<ApplicantInfoNav @nextAction="nextAction()" />
</v-row>
</v-container>
Expand All @@ -248,7 +259,7 @@ import ApplicantInfoNav from '@/components/common/applicant-info-nav.vue'
import { FolioNumberInput } from '@bcrs-shared-components/folio-number-input'
import { ApplicantI, SubmissionTypeT } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { CorpNumRequests, Location, NrState, RequestCode } from '@/enums'
import { CorpNumRequests, Location, NrRequestActionCodes, NrState } from '@/enums'
import { GetFeatureFlag } from '@/plugins'
@Component({
Expand All @@ -266,7 +277,7 @@ export default class ApplicantInfo3 extends Vue {
@Getter getLocation!: Location
@Getter getNrData!: any
@Getter getNrState!: string
@Getter getRequestActionCd!: RequestCode
@Getter getRequestActionCd!: NrRequestActionCodes
@Getter getShowPriorityRequest!: boolean
@Getter getShowCorpNum!: string
@Getter getSubmissionType!: SubmissionTypeT
Expand Down Expand Up @@ -333,7 +344,7 @@ export default class ApplicantInfo3 extends Vue {
mounted () {
// Apply optional corpNum validations for Amalgamations as they are NOT a required field but require COLIN lookup.
if (this.getRequestActionCd === RequestCode.AML) {
if (this.getRequestActionCd === NrRequestActionCodes.AMALGAMATE) {
this.corpNumFieldLabel += ' (Optional)'
this.corpNumRules = [
v => (!v || v.length > 3) || 'Must be at least 4 characters'
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/applicant-info-nav.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-col cols="12" md="5" lg="5" class="py-0" :class="isMobile ? 'text-center' : 'text-right'">
<v-col cols="12" md="5" lg="5" class="py-0" :class="isMobile ? 'mt-6 text-center' : 'text-right'">
<v-btn x-large
id="submit-back-btn"
:class="isMobile ? 'mobile-btn' : 'mr-3'"
Expand Down Expand Up @@ -75,7 +75,7 @@ export default class ApplicantInfoNav extends Vue {
}
@Emit('nextAction')
private nextAction () : void {}
nextAction () : void {}
}
</script>

Expand Down
14 changes: 7 additions & 7 deletions src/components/common/names-capture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ import ApplicantInfoNav from '@/components/common/applicant-info-nav.vue'
import { EntityI, NameChoicesIF, NameRequestI, RequestActionsI } from '@/interfaces'
import { sanitizeName } from '@/plugins'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EntityType, Location, RequestCode } from '@/enums'
import { EntityType, Location, NrRequestActionCodes } from '@/enums'
import { CommonMixin } from '@/mixins'
/** This component is used for EDITING a Name Request. */
Expand All @@ -313,7 +313,7 @@ export default class NamesCapture extends Mixins(CommonMixin) {
@Getter getName!: string
@Getter getNameChoices!: NameChoicesIF
@Getter getNr!: Partial<NameRequestI>
@Getter getRequestActionCd!: RequestCode
@Getter getRequestActionCd!: NrRequestActionCodes
@Getter getRequestTypeOptions!: RequestActionsI[]
@Getter getSubmissionTabNumber!: number
@Getter isMobile!: boolean
Expand Down Expand Up @@ -704,13 +704,13 @@ export default class NamesCapture extends Mixins(CommonMixin) {
return this.getNameChoices
}
get request_action_cd (): RequestCode {
get request_action_cd (): NrRequestActionCodes {
return this.getRequestActionCd
}
set request_action_cd (value: RequestCode) {
set request_action_cd (value: NrRequestActionCodes) {
this.setRequestAction(value)
if (value === RequestCode.INFO) {
if (value === NrRequestActionCodes.INFO) {
this.setPickRequestTypeModalVisible(true)
}
}
Expand Down Expand Up @@ -881,8 +881,8 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
@Watch('request_action_cd')
updateLocationOnAssumedName (newVal: RequestCode, oldVal: RequestCode) {
if (newVal === RequestCode.ASSUMED && this.location === Location.BC) {
updateLocationOnAssumedName (val: NrRequestActionCodes) {
if (val === NrRequestActionCodes.ASSUMED && this.location === Location.BC) {
this.location = Location.CA
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/pick-entity-or-conversion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class PickEntityOrConversionDialog extends Vue {
@Action setEntityTypeAddToSelect!: ActionBindingIF
@Action setPickEntityModalVisible!: ActionBindingIF
private showSocietiesInfo = false
showSocietiesInfo = false
@Watch('showModal')
handleModalClose (newVal) {
Expand Down
Loading

0 comments on commit f958514

Please sign in to comment.