Skip to content

Commit

Permalink
Improved: code by changing the logic to get group names in system groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritika-Patel08 committed Mar 12, 2024
1 parent c88d935 commit ead5498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/FindGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ion-label>
{{ groupType.description ? groupType.description : groupType.facilityGroupTypeId }}
</ion-label>
<ion-select v-if="groups.length" :placeholder="translate('Select')" :selectedText="getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId).length > 1 ? translate('groups', { count: getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId).length }) : getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId)[0]" :value="getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId)" @ionChange="updateFacilityGroupAssociation($event, getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId), groupType.facilityGroupTypeId)" :multiple="true">
<ion-select v-if="groups.length" :placeholder="translate('Select')" :selectedText="getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId).length > 1 ? translate('groups', { count: getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId).length }) : getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId).map[0]" :value="getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId)" @ionChange="updateFacilityGroupAssociation($event, getAssociatedFacilityGroupIds(groupType.facilityGroupTypeId), groupType.facilityGroupTypeId)" :multiple="true">
<ion-select-option :value="group.facilityGroupId" :disabled="group.facilityGroupTypeId && group.facilityGroupTypeId !== groupType.facilityGroupTypeId" :key="group.facilityGroupId" v-for="group in groups">
{{ group.facilityGroupName ? group.facilityGroupName : group.facilityGroupId }}
</ion-select-option>
Expand Down Expand Up @@ -236,7 +236,7 @@ export default defineComponent({
this.groups.map((group: any) => {
if(group.facilityGroupTypeId && group.facilityGroupTypeId === facilityGroupTypeId) {
associatedfacilityGroupIds.push(group.facilityGroupName)
associatedfacilityGroupIds.push(group.facilityGroupId)
}
})
return associatedfacilityGroupIds
Expand Down

0 comments on commit ead5498

Please sign in to comment.