Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: support to add,update and display an address and latitude, longitude for a facility (#20) #22

Merged
merged 21 commits into from
Nov 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
24dbbf3
Implemented: action, service and state for fetching facility contact …
amansinghbais Nov 20, 2023
12ee9f7
Improved: added support to fetch and display facility contact informa…
amansinghbais Nov 20, 2023
7915e74
Implemented: services for adding and updating address, generating lat…
amansinghbais Nov 21, 2023
b0a41c6
Improved: code for generating geopoints, methods name (#20)
amansinghbais Nov 21, 2023
1c9a328
Improved: code syntax, removed unused mutations, alphabetical entries…
amansinghbais Nov 21, 2023
6196d88
Implemented: logic to add/update geoPoints, disable lat&long buttons …
amansinghbais Nov 21, 2023
f229af1
Merge branch 'main' of https://github.com/hotwax/facilities into faci…
amansinghbais Nov 21, 2023
ce5af3d
Improved: code for unused getter, error message, rendering postalCode…
amansinghbais Nov 21, 2023
aa9bf61
Merge branch 'main' of https://github.com/hotwax/facilities into faci…
amansinghbais Nov 21, 2023
abf6695
Implemented: state & countries dropdown accessibility and lat-long up…
amansinghbais Nov 22, 2023
bb7d313
Implemented: cacheing for states to avoid multiple api calls (#20)
amansinghbais Nov 22, 2023
eb5aaa3
Improved: code to add keyboard accessibility to form modals (#20)
amansinghbais Nov 22, 2023
77733d7
Improved: code to fetch only required fields from api (#20)
amansinghbais Nov 22, 2023
bf87bfe
Improved: geoPoint modal variable name (#20)
amansinghbais Nov 22, 2023
3935f50
Improved: ion-select looping logic, states type, payload entries (#20)
amansinghbais Nov 23, 2023
cf64836
Merge branch 'main' of https://github.com/hotwax/facilities into faci…
amansinghbais Nov 23, 2023
58d7029
Improved: code to showToast and return when we save modal without cha…
amansinghbais Nov 23, 2023
348fa5a
Improved: payload mapping reduced for optimized code(#20)
amansinghbais Nov 28, 2023
6a351ef
Improved: added translation to placeholder (#20)
amansinghbais Nov 28, 2023
e47b178
Merge branch 'main' of https://github.com/hotwax/facilities into faci…
amansinghbais Nov 28, 2023
125231e
Improved: added facilityId in payload for updating lat-long (#20)
amansinghbais Nov 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved: ion-select looping logic, states type, payload entries (#20)
amansinghbais committed Nov 23, 2023

Verified

This commit was signed with the committer’s verified signature.
caixw caixw
commit 3935f5093170331b1285cdc2aef2b81483937e45
6 changes: 2 additions & 4 deletions src/components/FacilityAddressModal.vue
Original file line number Diff line number Diff line change
@@ -27,13 +27,13 @@
<ion-item @keyup.enter.stop>
<ion-label>{{ translate("Country") }}</ion-label>
<ion-select interface="popover" :placeholder="translate('Select')" @ionChange="updateState($event)" v-model="address.countryGeoId">
<ion-select-option v-for="(country, index) in countries" :key="index" :value="country.geoId">{{ country.geoName }}</ion-select-option>
<ion-select-option v-for="country in countries" :key="country.geoId" :value="country.geoId">{{ country.geoName }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item @keyup.enter.stop>
<ion-label>{{ translate("State") }}</ion-label>
<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-option v-for="state in states[address.countryGeoId]" :key="state.geoId" :value="state.geoId">{{ state.geoName }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
@@ -131,10 +131,8 @@ export default defineComponent({
address2: this.address.address2,
city: this.address.city,
countryGeoId: this.address.countryGeoId,
countryGeoName: this.address.countryGeoName,
facilityId: this.facilityId,
postalCode: this.address.postalCode,
stateGeoName: this.address.stateGeoName,
stateProvinceGeoId: this.address.stateGeoId
}

2 changes: 1 addition & 1 deletion src/store/modules/util/UtilState.ts
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@ export default interface UtilState {
facilityTypes: object;
locationTypes: object;
countries: any[];
states: any[];
states: any;
}
2 changes: 1 addition & 1 deletion src/store/modules/util/index.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ const utilModule: Module<UtilState, RootState> = {
facilityTypes: {},
locationTypes: {},
countries: [],
states: []
states: {}
},
getters,
actions,