Skip to content

Commit

Permalink
Improved: code to fetch only required fields from api (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Nov 22, 2023
1 parent eb5aaa3 commit 77733d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/FacilityAddressModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
</ion-item>
<ion-item @keyup.enter.stop>
<ion-label>{{ translate("State") }}</ion-label>
{{ address.countryGeoId }}
<ion-select interface="popover" :placeholder="translate('Select')" v-model="address.stateGeoId">
<ion-select-option v-for="(state, index) in states[address.countryGeoId]" :key="index" :value="state.geoId">{{ state.geoName }}</ion-select-option>
</ion-select>
Expand Down
2 changes: 1 addition & 1 deletion src/components/FacilityGeoPointModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default defineComponent({
}
try {
resp = await FacilityService.updateFacilityPostalAddress({...payload})
resp = await FacilityService.updateFacilityPostalAddress(payload)
if(!hasError(resp)) {
showToast(translate("Facility latitude & longitude updated successfully."))
Expand Down
3 changes: 3 additions & 0 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const actions: ActionTree<UtilState, RootState> = {
geoIdTo: "DBIC"
},
entityName: 'GeoAssocAndGeoFrom',
fieldList: ['geoName', 'geoId'],
noConditionFind: 'Y',
} as any

Expand Down Expand Up @@ -138,6 +139,7 @@ const actions: ActionTree<UtilState, RootState> = {
geoIdFrom: payload.geoId
},
entityName: 'GeoAssocAndGeoTo',
fieldList: ['geoName', 'geoId'],
noConditionFind: 'Y',
viewSize: 100
} as any
Expand All @@ -147,6 +149,7 @@ const actions: ActionTree<UtilState, RootState> = {

if(!hasError(resp)) {
states = resp.data.docs

} else {
throw resp.data
}
Expand Down

0 comments on commit 77733d7

Please sign in to comment.