Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hotwax/facilities into #162
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Apr 1, 2024
2 parents 4ab4fe4 + 125b7c5 commit 0c6593d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/components/FacilityAddressModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@
</ion-select>
</ion-item>
<ion-item>
<ion-input label-placement="floating" :label="translate('Zipcode')" v-model="address.postalCode" />
<ion-input label-placement="floating" v-model="address.postalCode">
<div position="floating">{{ translate("Zipcode") }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item-divider color="light">
<ion-label>{{ translate("Contact details") }}</ion-label>
</ion-item-divider>
<ion-item>
<ion-input :label="translate('Contact number')" :label-placement="telecomNumberValue?.countryCode ? 'stacked' : 'floating'" v-model="telecomNumberValue.contactNumber">
<ion-text slot="start">{{ telecomNumberValue?.countryCode }}</ion-text>
<ion-text slot="start" v-if="telecomNumberValue?.countryCode">{{ telecomNumberValue?.countryCode }}</ion-text>
</ion-input>
</ion-item>
</form>
Expand Down Expand Up @@ -150,7 +152,7 @@ export default defineComponent({
async saveContact() {
let resp, postalAddress = '';
if(!this.address?.address1 || !this.address?.city) {
if(!this.address?.address1 || !this.address?.city || !this.address?.postalCode) {
showToast("Please fill all the required fields.")
return
}
Expand Down
8 changes: 5 additions & 3 deletions src/views/AddFacilityAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
</ion-input>
</ion-item>
<ion-item>
<ion-input :label="translate('Zipcode')" label-placement="floating" v-model="formData.postalCode" />
<ion-input label-placement="floating" v-model="formData.postalCode">
<div>{{ translate('Zipcode') }} <ion-text color="danger">*</ion-text></div>
</ion-input>
</ion-item>
<ion-item>
<ion-select :label="translate('Country')" label-placement="floating" interface="popover" :placeholder="translate('Select country')" @ionChange="updateState($event)" v-model="formData.countryGeoId">
Expand All @@ -48,7 +50,7 @@
</ion-item>
<ion-item lines="none">
<ion-input :label="translate('Contact number')" :label-placement="countryCode ? 'stacked' : 'floating'" v-model="contactNumber">
<ion-text slot="start">{{ countryCode }}</ion-text>
<ion-text slot="start" v-if=countryCode>{{ countryCode }}</ion-text>
</ion-input>
</ion-item>
</ion-list>
Expand Down Expand Up @@ -173,7 +175,7 @@ export default defineComponent({
methods: {
async addAddress() {
let resp;
if (!this.formData.address1 || !this.formData.city) {
if (!this.formData.address1 || !this.formData.city || !this.formData.postalCode) {
showToast("Please fill all the required fields.")
return
}
Expand Down

0 comments on commit 0c6593d

Please sign in to comment.