Skip to content

Commit

Permalink
Improved: code by using ion-fab to add new group
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritika-Patel08 committed Mar 1, 2024
1 parent aa91c1a commit f70a6a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/components/CreateFacilityGroupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="createFacilityGroup" @keyup.enter.stop>
<ion-icon :icon="addOutline" />
<ion-icon :icon="saveOutline" />
</ion-fab-button>
</ion-fab>
</form>
Expand Down Expand Up @@ -75,7 +75,7 @@ import {
modalController
} from "@ionic/vue";
import { defineComponent } from "vue";
import { addOutline, closeOutline } from "ionicons/icons";
import { closeOutline, saveOutline } from "ionicons/icons";
import { translate } from '@hotwax/dxp-components'
import { FacilityService } from "@/services/FacilityService";
import { mapGetters, useStore } from 'vuex'
Expand Down Expand Up @@ -196,8 +196,8 @@ export default defineComponent({
const store = useStore();
return {
addOutline,
closeOutline,
saveOutline,
store,
translate
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateVirtualFacilityModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {
modalController
} from "@ionic/vue";
import { defineComponent } from "vue";
import { addOutline, closeOutline } from "ionicons/icons";
import { closeOutline, saveOutline } from "ionicons/icons";
import { translate } from '@hotwax/dxp-components'
import { FacilityService } from "@/services/FacilityService";
import { mapGetters, useStore } from 'vuex'
Expand Down
11 changes: 5 additions & 6 deletions src/views/FindGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@
<ion-label>{{ group.description }}</ion-label>
</ion-item>
</ion-card>
<ion-card class="button-card">
<ion-button color="medium" fill="clear" @click="openCreateFacilityGroupModal()">
<ion-icon :icon="addOutline" slot="start"/>
{{ translate('Create group') }}
</ion-button>
</ion-card>
</main>
<main v-else>
<p class="empty-state">{{ translate("No groups found") }}</p>
Expand All @@ -73,6 +67,11 @@
:loading-text="translate('Loading')"
/>
</ion-infinite-scroll>
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="openCreateFacilityGroupModal()">
<ion-icon :icon="addOutline" />
</ion-fab-button>
</ion-fab>
</ion-content>
</ion-page>
</template>
Expand Down

0 comments on commit f70a6a7

Please sign in to comment.