Skip to content

Commit

Permalink
Improved: code to handling null in party names(#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Nov 30, 2023
1 parent 73af426 commit 057b74b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/AddStaffMemberModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ion-list-header>{{ translate("Staff") }}</ion-list-header>
<ion-item v-for="(party, index) in parties" :key="index">
<ion-label>
{{ party.fullName ? party.fullName : '' }}
{{ party.fullName }}
<p>{{ party.partyId }}</p>
</ion-label>
<ion-select interface="popover" :placeholder="translate('Select')" :value="getPartyRoleTypeId(party.partyId)" @ion-change="updateSelectedParties($event, party.partyId)" required>
Expand Down Expand Up @@ -143,7 +143,7 @@ export default defineComponent({
let parties = resp.data.docs
parties.map((party: any) => {
party.fullName = party.groupName ? party.groupName : `${party.firstName} ${party.lastName}`
party.fullName = party.groupName ? party.groupName : party.firstName ? `${party.firstName} ${party.lastName}` : ''
})
this.parties = parties
} else {
Expand Down

0 comments on commit 057b74b

Please sign in to comment.