Skip to content

Commit

Permalink
Edit UI - Address and App Validation Updates (#249)
Browse files Browse the repository at this point in the history
* Address and App Validation Updates

* Address ID's and PR updates

* removed .only test code

* pr updates, wrapper removals
  • Loading branch information
cameron-eyds authored Mar 17, 2022
1 parent 199be93 commit 535fa20
Show file tree
Hide file tree
Showing 29 changed files with 288 additions and 193 deletions.
183 changes: 91 additions & 92 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "2.0.5",
"version": "2.1.0",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand All @@ -27,9 +27,9 @@
"@bcrs-shared-components/fee-summary": "1.1.13",
"@bcrs-shared-components/folio-number": "1.0.0",
"@bcrs-shared-components/interfaces": "1.0.33",
"@bcrs-shared-components/nature-of-business": "1.0.2",
"@bcrs-shared-components/nature-of-business": "1.0.3",
"@bcrs-shared-components/share-structure": "1.0.20",
"@bcrs-shared-components/staff-payment": "1.0.22",
"@bcrs-shared-components/staff-payment": "1.0.35",
"@mdi/font": "^5.5.55",
"@sentry/browser": "^5.23.0",
"@sentry/integrations": "^5.23.0",
Expand Down
38 changes: 23 additions & 15 deletions src/components/Edit/NatureOfBusiness.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<template>
<div id="nature-of-business-info">
<NatureOfBusinessShared
v-if="haveNaics"
:showErrors="false"
:naics="getCurrentNaics"
:NaicsServices="NaicsServices"
:hasNaicsChanges="hasNatureOfBusinessChanged"
@undoNaics="setNaics(originalNaics)"
@setNaics="setNaics($event)"
/>
</div>
<NatureOfBusinessShared
v-if="haveNaics"
:showErrors="invalidSection"
:naics="getCurrentNaics"
:NaicsServices="NaicsServices"
:hasNaicsChanges="hasNatureOfBusinessChanged"
@valid="onEditingChanged($event)"
@undoNaics="setNaics(originalNaics)"
@setNaics="setNaics($event)"
/>
</template>

<script lang="ts">
import { Action, Getter } from 'vuex-class'
import { Component, Vue } from 'vue-property-decorator'
import { Component, Prop, Vue } from 'vue-property-decorator'
import { NaicsServices } from '@/services'
import { ActionBindingIF, BusinessInformationIF, EntitySnapshotIF, NaicsIF } from '@/interfaces'
import { NatureOfBusiness as NatureOfBusinessShared } from '@bcrs-shared-components/nature-of-business'
Expand All @@ -25,26 +24,35 @@ import { NatureOfBusiness as NatureOfBusinessShared } from '@bcrs-shared-compone
}
})
export default class NatureOfBusiness extends Vue {
private NaicsServices = NaicsServices
/** Whether to show invalid section styling. */
@Prop({ default: false })
readonly invalidSection!: boolean
readonly NaicsServices = NaicsServices
@Getter getBusinessInformation!: BusinessInformationIF
@Getter getCurrentNaics!: NaicsIF
@Getter getEntitySnapshot!: EntitySnapshotIF
@Getter hasNatureOfBusinessChanged!: boolean
@Action setNaics!: ActionBindingIF
@Action setValidComponent!: ActionBindingIF
/** The naics data on record for the business. */
private get originalNaics (): NaicsIF {
get originalNaics (): NaicsIF {
return {
naicsCode: this.getEntitySnapshot.businessInfo.naicsCode,
naicsDescription: this.getEntitySnapshot.businessInfo.naicsDescription
}
}
private get haveNaics (): boolean {
get haveNaics (): boolean {
return (!!this.getBusinessInformation.naicsCode && !!this.getBusinessInformation.naicsDescription)
}
onEditingChanged (event): void {
this.setValidComponent({ key: 'isValidNatureOfBusiness', value: event })
}
}
</script>
<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<v-col cols="2" class="align-right" v-if="!hasNameTranslationChange && !isSummaryMode">
<v-btn
id="correct-name-translation"
class="pr-0"
text color="primary"
@click="isEditing = true"
>
Expand Down
Loading

0 comments on commit 535fa20

Please sign in to comment.