Skip to content

Commit

Permalink
- app version = 5.0.10
Browse files Browse the repository at this point in the history
- replaced Vue.prototype data with direct references
- deleted obsolete app-config, etc
- misc cleanup
  • Loading branch information
severinbeauvais committed Jul 25, 2023
1 parent 700d0f6 commit 8c8e147
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 94 deletions.
18 changes: 9 additions & 9 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.9",
"version": "5.0.10",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand All @@ -15,7 +15,7 @@
"dependencies": {
"@babel/compat-data": "^7.12.13",
"@bcrs-shared-components/corp-type-module": "1.0.13",
"@bcrs-shared-components/enums": "1.0.43",
"@bcrs-shared-components/enums": "1.0.44",
"@bcrs-shared-components/breadcrumb": "2.1.24",
"@bcrs-shared-components/genesys-web-message": "1.0.0",
"@bcrs-shared-components/interfaces": "1.0.67",
Expand Down
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ export default class App extends Mixins(
@Action setDisplayedComponent!: ActionBindingIF
@Action toggleConfirmNrModal!: ActionBindingIF
@Action setCurrentJsDate!: ActionBindingIF
@Action setIncorporateNowErrorStatus!: ActionBindingIF
@Action setWindowWidth!: ActionBindingIF
readonly axios = axios
Expand Down
22 changes: 11 additions & 11 deletions src/components/advanced-search/advanced-search-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ export default class AdvancedSearchForm extends Vue {
@Prop() readonly advSearchDialogState: boolean
// Local Properties
private isValid = false
private dateDialog = false
isValid = false
dateDialog = false
// Local model
private compName = ''
private applicantFirstName = ''
private applicantLastName = ''
private startDate = ''
private endDate = ''
compName = ''
applicantFirstName = ''
applicantLastName = ''
startDate = ''
endDate = ''
/** Validation rules for Applicant last name. */
private applicantLastNameRules = []
applicantLastNameRules = []
/** Is true when start and End dates are applied. */
private get hasAppliedDates (): boolean {
get hasAppliedDates (): boolean {
return !!this.startDate && !!this.endDate
}
Expand All @@ -137,7 +137,7 @@ export default class AdvancedSearchForm extends Vue {
}
/** Apply the date selections to local model. */
private addDates (dates: StartEndDatesI): void {
addDates (dates: StartEndDatesI): void {
this.startDate = dates.startDate
this.endDate = dates.endDate
}
Expand All @@ -156,7 +156,7 @@ export default class AdvancedSearchForm extends Vue {
}
/** Clear local dates. */
private clearDates (): void {
clearDates (): void {
this.startDate = ''
this.endDate = ''
}
Expand Down
7 changes: 4 additions & 3 deletions src/components/common/applicant-info-1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
>
<label for="state" class="hidden">State</label>
<v-select
:items="$usaStateCodes"
:items="UsaStateCodes"
:messages="messages['State']"
:rules="requiredRules"
:value="applicant.stateProvinceCd"
Expand Down Expand Up @@ -404,7 +404,7 @@ import { ActionMixin } from '@/mixins'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EmptyApplicant, NameRequestI } from '@/interfaces'
import { removeExcessSpaces } from '@/plugins/utilities'
import { CanJurisdictions, IntlJurisdictions } from '@/list-data'
import { CanJurisdictions, IntlJurisdictions, UsaStateCodes } from '@/list-data'
import AuthServices from '@/services/auth-services'
@Component({
Expand All @@ -413,8 +413,9 @@ import AuthServices from '@/services/auth-services'
}
})
export default class ApplicantInfo1 extends Mixins(ActionMixin) {
// enum for template
// enums for template
readonly Location = Location
readonly UsaStateCodes = UsaStateCodes
// Global getters
@Getter getActingOnOwnBehalf!: boolean
Expand Down
24 changes: 15 additions & 9 deletions src/components/common/names-capture.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,19 @@
<script lang="ts">
import { Component, Mixins, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
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, NrRequestActionCodes } from '@/enums'
import { CommonMixin } from '@/mixins'
import { Designations } from '@/list-data'
/** This component is used for EDITING a Name Request. */
/**
* This component is used for confirming/entering name choices.
* When editing a Name Request, this component also displays menus for selecting
* a different request action, location, or entity type.
*/
@Component({
components: {
ApplicantInfoNav
Expand Down Expand Up @@ -452,8 +456,8 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
get designationAtEnd () {
if (this.entity_type_cd && this.$designations[this.entity_type_cd]) {
return this.$designations[this.entity_type_cd].end
if (this.entity_type_cd && Designations[this.entity_type_cd]) {
return Designations[this.entity_type_cd].end
}
return false
}
Expand Down Expand Up @@ -508,14 +512,14 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
get entityPhraseChoices () {
if (!this.entity_type_cd || !this.$designations[this.entity_type_cd]) {
if (!this.entity_type_cd || !Designations[this.entity_type_cd]) {
return []
}
let basePhrases = this.$designations[this.entity_type_cd].words
let basePhrases = Designations[this.entity_type_cd].words
// these are the inner phrases for the CCC and CP types. Filtering out CR designations from CPs has no effect
// and CCC designations are a mix of CR-type ending designations and CCC specific inner phrases so filter out
// the CR designations for the purposes of this getter
return basePhrases.filter(phrase => !this.$designations['CR'].words.includes(phrase))
return basePhrases.filter(phrase => !Designations['CR'].words.includes(phrase))
}
get entityPhraseRequired (): boolean {
Expand Down Expand Up @@ -600,6 +604,7 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
return true
}
function name2 () {
messages.name2 = ''
messages.des2 = ''
Expand All @@ -619,6 +624,7 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
return true
}
function name3 () {
messages.name3 = ''
messages.des3 = ''
Expand Down Expand Up @@ -685,9 +691,9 @@ export default class NamesCapture extends Mixins(CommonMixin) {
}
get items (): string[] {
let output: string[] = this.$designations[this.entity_type_cd].words
let output: string[] = Designations[this.entity_type_cd].words
if (this.entity_type_cd === EntityType.CC) {
output = this.$designations['CR'].words
output = Designations['CR'].words
}
return output
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/dialogs/pick-entity-or-conversion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<v-row class="category-bg">
<v-col cols="12" class="font-weight-bold">Alterations</v-col>
</v-row>
<v-row v-for="(conversion, i) in $conversionTypes" :key="'conv-' + i">
<v-row v-for="(conversion, i) in ConversionTypes" :key="'conv-' + i">
<v-col cols="12" class="clickable-cell"
:id="conversion.value"
@click="chooseConversion(conversion)">
Expand Down Expand Up @@ -88,13 +88,16 @@
<script lang="ts">
import { Component, Vue, 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'
@Component({})
export default class PickEntityOrConversionDialog extends Vue {
// enum for template
readonly ConversionTypes = ConversionTypes
// Global getters
@Getter getConversionTypeOptions!: ConversionTypesI[]
@Getter getEntityBlurbs!: Array<EntityI>
Expand Down
7 changes: 6 additions & 1 deletion src/components/dialogs/pick-request-type.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ import { Action, Getter } from 'vuex-class'
// Interfaces / enums / list data
import { RequestActionsI } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { RequestActions } from '@/list-data'
/*
* This is the dialog for picking a request type (when the menu doesn't
* display all the request actions).
*/
@Component({})
export default class PickRequestTypeDialog extends Vue {
// Global getter
Expand All @@ -65,7 +70,7 @@ export default class PickRequestTypeDialog extends Vue {
get tableData () {
// get just the selectable items
const items = this.$requestActions.filter(item => !item.isHeader)
const items = RequestActions.filter(item => !item.isHeader)
const length = items.length
const midIndex = length % 2 ? (length + 1) / 2 : (length / 2)
Expand Down
13 changes: 6 additions & 7 deletions src/components/new-request/grey-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:key="option.type + '-' + i + '-container-'">
<v-row no-gutters class="ma-0 pa-0">
<v-col cols="12">
<span class="title-bold-14" v-if="this.issue.setup.length > 1">Option {{ i + 1 }}:</span>
<span class="title-bold-14" v-if="issue.setup.length > 1">Option {{ i + 1 }}:</span>
<span class="ml-1 title-bold-16">{{ option.header }}</span>
</v-col>
<template v-if="issueType === 'user_cancelled'">
Expand All @@ -23,7 +23,7 @@
</template>
<template v-else>
<transition :name="i === 0 ? 'fade' : '' " mode="out-in">
<v-row :key="changesInBaseName+designationIsFixed+'key'+i"
<v-row :key="`${changesInBaseName}-${designationIsFixed}-key-${i}`"
align-content="start"
class="copy-small colour-p-blue-text">
<!-- Header, Line 1 and Line 2-->
Expand Down Expand Up @@ -138,13 +138,12 @@
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
import ReserveSubmit from '@/components/new-request/submit-request/reserve-submit.vue'
import { AnalysisJSONI, OptionI } from '@/interfaces'
import { replaceWord } from '@/plugins'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { EntityType } from '@/enums'
import { AllDesignationsList, Designations } from '@/list-data'
@Component({
components: { ReserveSubmit }
Expand Down Expand Up @@ -213,7 +212,7 @@ export default class GreyBox extends Vue {
this.originalNameBase = originalName
return
}
for (let word of this.$allDesignationsList) {
for (let word of AllDesignationsList) {
originalName = replaceWord(originalName, word)
}
this.originalNameBase = originalName
Expand Down Expand Up @@ -501,7 +500,7 @@ export default class GreyBox extends Vue {
}
extractInnerDesignation (name, designation = null) {
let { words } = this.$designations[this.entity_type_cd]
let { words } = Designations[this.entity_type_cd]
if (!designation) {
for (let word of words) {
name = replaceWord(name, word)
Expand Down Expand Up @@ -544,7 +543,7 @@ export default class GreyBox extends Vue {
}
stripAllDesignations (name) {
for (let word of this.$allDesignationsList) {
for (let word of AllDesignationsList) {
name = replaceWord(name, word)
}
return name
Expand Down
9 changes: 4 additions & 5 deletions src/components/new-request/name-check/name-check.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,17 @@
<script lang="ts">
import { Component, Vue, Watch } from 'vue-property-decorator'
import { Action, Getter } from 'vuex-class'
import NameCheckIssuesDialog from '@/components/dialogs/name-check-issues.vue'
import MainContainer from '@/components/new-request/main-container.vue'
import NameCheckConflicts from '@/components/new-request/name-check/name-check-conflicts.vue'
import NameCheckTabContent from '@/components/new-request/name-check/name-check-tab-content.vue'
import NameInput from '@/components/new-request/name-input.vue'
import QuickSearchNames from '@/components/new-request/name-check/quick-search-names.vue'
import { EntityType, NameCheckErrorType } from '@/enums'
import { ConditionalInstructionI, DialogOptionsI, NameCheckErrorI, NameCheckItemIF } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { baseItemsConflicts, baseItemsStructure } from './resources'
import { Designations } from '@/list-data'
@Component({
components: {
Expand Down Expand Up @@ -350,9 +349,9 @@ export default class NameCheck extends Vue {
this.setDesignation(value)
}
get designationOptions (): Array<string> {
let output: string[] = this.$designations[this.getEntityTypeCd]?.words
let output: string[] = Designations[this.getEntityTypeCd]?.words
if (this.getEntityTypeCd === EntityType.CC) {
output = this.$designations[EntityType.CR].words
output = Designations[EntityType.CR].words
}
return output
}
Expand Down Expand Up @@ -611,7 +610,7 @@ export default class NameCheck extends Vue {
return 'You can edit your name here and check it again'
}
get showDesignationSelect (): boolean {
return (this.$designations[this.getEntityTypeCd]?.end || false) && !this.getIsXproMras
return (Designations[this.getEntityTypeCd]?.end || false) && !this.getIsXproMras
}
get specialCharacters (): Array<string> {
return this.getSpecialCharacters
Expand Down
Loading

0 comments on commit 8c8e147

Please sign in to comment.