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

fix: Use ion-list in modals(#85zrptxr9) #197

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 25 additions & 21 deletions src/components/BulkAdjustmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@
</ion-header>

<ion-content>
<ion-item lines="full">
<ion-label>{{ $t("Buffer days") }}</ion-label>
<ion-input v-model="bufferDays" type="number" :placeholder = "$t('Lead time')" min="1" />
</ion-item>
<ion-list>
<ion-item lines="full">
<ion-label>{{ $t("Buffer days") }}</ion-label>
<ion-input v-model="bufferDays" type="number" :placeholder = "$t('Lead time')" min="1" />
</ion-item>

<ion-item lines="full">
<ion-label>{{ $t("Order buffer") }}</ion-label>
<ion-input v-model="orderBuffer" type="number" :placeholder = "$t('Safety stock')" min="1" />
</ion-item>
<ion-item lines="full">
<ion-label>{{ $t("Order buffer") }}</ion-label>
<ion-input v-model="orderBuffer" type="number" :placeholder = "$t('Safety stock')" min="1" />
</ion-item>

<ion-item>
<ion-label>{{ $t("Catalog") }}</ion-label>
<ion-select interface="popover" v-model="isNewProduct">
<ion-select-option value="N">{{ $t("Backorder") }}</ion-select-option>
<ion-select-option value="Y">{{ $t("Preorder") }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ $t("Catalog") }}</ion-label>
<ion-select interface="popover" v-model="isNewProduct">
<ion-select-option value="N">{{ $t("Backorder") }}</ion-select-option>
<ion-select-option value="Y">{{ $t("Preorder") }}</ion-select-option>
</ion-select>
</ion-item>

<ion-item>
<ion-label>{{ $t("Facility") }}</ion-label>
<ion-select interface="popover" v-model="facilityId">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ $t("Facility") }}</ion-label>
<ion-select interface="popover" v-model="facilityId">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
</ion-list>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="save">
Expand All @@ -55,6 +57,7 @@ import {
IonIcon,
IonInput,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand All @@ -81,6 +84,7 @@ export default defineComponent({
IonItem,
IonInput,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand Down
24 changes: 14 additions & 10 deletions src/components/BulkInventoryAdjustmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
</ion-header>

<ion-content>
<ion-item lines="full">
<ion-label>{{ $t("Buffer quantity") }}</ion-label>
<ion-input v-model="quantityBuffer" type="number" min="0" :placeholder = "$t('Quantity')" />
</ion-item>
<ion-list>
<ion-item lines="full">
<ion-label>{{ $t("Buffer quantity") }}</ion-label>
<ion-input v-model="quantityBuffer" type="number" min="0" :placeholder = "$t('Quantity')" />
</ion-item>

<ion-item>
<ion-label>{{ $t("Facility") }}</ion-label>
<ion-select interface="popover" v-model="facilityId">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ $t("Facility") }}</ion-label>
<ion-select interface="popover" v-model="facilityId">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
</ion-list>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="save">
Expand All @@ -42,6 +44,7 @@ import {
IonIcon,
IonInput,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand All @@ -67,6 +70,7 @@ export default defineComponent({
IonItem,
IonInput,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand Down
23 changes: 13 additions & 10 deletions src/components/MissingFacilitiesModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
</ion-header>

<ion-content>

<ion-item v-for="(items, facilityId) in itemsByFacilityId" :key="facilityId" lines="full">
<ion-label>
{{ facilityId }}
<p>{{ items?.length }} {{ $t("line items") }}</p>
</ion-label>
<ion-select interface="popover" slot="end" :placeholder="$t('Map facility')" @ionChange="updateFacility($event, facilityId)">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
<ion-list>
<ion-item v-for="(items, facilityId) in itemsByFacilityId" :key="facilityId" lines="full">
<ion-label>
{{ facilityId }}
<p>{{ items?.length }} {{ $t("line items") }}</p>
</ion-label>
<ion-select interface="popover" slot="end" :placeholder="$t('Map facility')" @ionChange="updateFacility($event, facilityId)">
<ion-select-option v-for="facility in facilities" :key="facility.facilityId" :value="facility.facilityId">{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
</ion-list>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="save">
Expand All @@ -41,6 +42,7 @@ import {
IonItem,
IonIcon,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand All @@ -65,6 +67,7 @@ export default defineComponent({
IonIcon,
IonItem,
IonLabel,
IonList,
IonSelect,
IonSelectOption,
IonTitle,
Expand Down
30 changes: 17 additions & 13 deletions src/components/ProductPopover.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<template>
<ion-content>
<ion-item lines="none">
<ion-label>{{ this.isVirtual ? item.parentProductName : item.pseudoId }}</ion-label>
</ion-item>
<ion-item button lines="none" @click="revert">
<ion-icon slot="start" :icon="arrowUndoOutline" />
<ion-label>{{ $t('Reset') }}</ion-label>
</ion-item>
<ion-item button lines="none" @click="onlySelect">
<ion-icon slot="start" :icon="checkboxOutline" />
<ion-label>{{ $t('Only select') }}</ion-label>
</ion-item>
<ion-list>
<ion-item lines="none">
<ion-label>{{ this.isVirtual ? item.parentProductName : item.pseudoId }}</ion-label>
</ion-item>

<ion-item button lines="none" @click="revert">
<ion-icon slot="start" :icon="arrowUndoOutline" />
<ion-label>{{ $t('Reset') }}</ion-label>
</ion-item>

<ion-item button lines="none" @click="onlySelect">
<ion-icon slot="start" :icon="checkboxOutline" />
<ion-label>{{ $t('Only select') }}</ion-label>
</ion-item>
</ion-list>
</ion-content>
</template>

<script>
import { IonContent, IonIcon, IonLabel, IonItem, popoverController } from '@ionic/vue';
import { IonContent, IonIcon, IonLabel, IonList, IonItem, popoverController } from '@ionic/vue';
import { defineComponent } from 'vue';
import { mapGetters, useStore } from "vuex";
import {
Expand All @@ -25,7 +29,7 @@ import {
export default defineComponent({
props: ['id', 'isVirtual', 'item', 'poId', 'type'],
name: 'parentProductPopover',
components: { IonContent, IonIcon, IonLabel, IonItem },
components: { IonContent, IonIcon, IonLabel, IonList, IonItem },
computed: {
...mapGetters({
stockItems: 'stock/getStockItems',
Expand Down