Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
severinbeauvais committed Aug 28, 2023
1 parent b084357 commit b52e46c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
5 changes: 2 additions & 3 deletions src/components/new-request/business-fetch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ export default class BusinessFetch extends Vue {
return {
identifier: this.searchField,
legalType: CorpTypeCd.BC_COMPANY,
bn: '',
status: EntityStates.ACTIVE,
name: this.searchField
name: this.searchField,
status: EntityStates.ACTIVE
}
}
Expand Down
41 changes: 17 additions & 24 deletions src/components/new-request/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,21 @@
</v-col>

<!-- Business Lookup/Fetch -->
<v-col v-if="showBusinessLookup" cols="12" md="6">
<v-col v-if="showBusinessLookup" cols="12" md="6" class="business-lookup">
<template v-if="!business">
<BusinessLookup v-if="getIsAuthenticated" @business="onBusiness($event)"/>
<BusinessFetch v-else @business="onBusiness($event)"/>
</template>
<div v-else class="d-flex justify-space-between align-center">
<v-text-field
append-icon="mdi-close"
readonly
filled
hide-details
:value="business.name"
@click:append="onBusiness(null)"
/>
<!-- <div @click="onBusiness(null)" class="business-close-container">
<v-icon color="primary">mdi-close</v-icon>
</div> -->
</div>
<v-text-field
v-else
append-icon="mdi-close"
readonly
filled
hide-details
:value="business.name"
@click:append="onBusiness(null)"
@keydown.delete="onBusiness(null)"
/>
</v-col>

<!-- once an entity type is selected (or Federal)... -->
Expand Down Expand Up @@ -284,7 +281,7 @@ import BusinessLookup from '@/components/new-request/business-lookup.vue'
import BusinessFetch from '@/components/new-request/business-fetch.vue'
// Interfaces / Enums / List Data
import { BusinessLookupResultIF, ConversionTypesI, EntityI, FormType, RequestActionsI } from '@/interfaces'
import { ConversionTypesI, EntityI, FormType, RequestActionsI } from '@/interfaces'
import { ActionBindingIF } from '@/interfaces/store-interfaces'
import { AccountType, CompanyType, EntityType, Location, NrRequestActionCodes, NrRequestTypeCodes } from '@/enums'
import { CommonMixin, NrAffiliationMixin } from '@/mixins'
Expand Down Expand Up @@ -466,7 +463,7 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin) {
if (type && this.isConversion) {
// convert NrRequestTypeCodes -> EntityType
const value = type as unknown as NrRequestTypeCodes
let { entity_type_cd } = ConversionTypes.find(conv => conv.value === value)
let { entity_type_cd } = ConversionTypes.find(conv => conv.value === value) || { entity_type_cd: null }
this.setEntityTypeCd(entity_type_cd)
this.setConversionType(type)
return
Expand Down Expand Up @@ -619,6 +616,7 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin) {
this.setRequestAction(this.request?.value || null)
// clear previous state
this.business = null
this.jurisdiction = null
this.setLocation(null)
this.setJurisdictionCd(null)
Expand Down Expand Up @@ -680,14 +678,9 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin) {
display: none;
}
// place this container on top of the (disabled) business name text field
.business-close-container {
position: absolute;
right: 52px;
:hover {
cursor: pointer;
}
// make the business lookup close button always blue
::v-deep .business-lookup button.mdi-close {
color: $app-blue;
}
// set content colour when hovering over list items
Expand Down

0 comments on commit b52e46c

Please sign in to comment.