-
Notifications
You must be signed in to change notification settings - Fork 37
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: mobile view support for the inprogress page of fulfillment app (#244) #258
Closed
amansinghbais
wants to merge
7
commits into
hotwax:main
from
amansinghbais:fulfillment-pwa/#244-inprogresspage
Closed
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6dcc15c
Implemented: mobile view support for the inprogress page of fulfillme…
amansinghbais dc18768
Fixed: indentation and alphabetical order (#244)
amansinghbais fb2f713
Merge branch 'main' of https://github.com/amansinghbais/fulfillment-p…
amansinghbais 44a89bc
Improved: used shopifyImg component from dxp instead of Image compone…
amansinghbais 363a3de
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
amansinghbais aab091b
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
amansinghbais 6156659
Implemented: box type changing support for mobile view(#244)
amansinghbais File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ | |
</ion-button> | ||
</ion-buttons> | ||
<ion-title>{{ $t("Edit packaging") }}</ion-title> | ||
<ion-buttons slot="end"> | ||
<ion-button fill="clear">{{ $t("Save") }}</ion-button> | ||
<ion-buttons slot="end" @click="save(order)"> | ||
<ion-button color="primary" fill="clear">{{ $t("Save") }}</ion-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
@@ -17,47 +17,45 @@ | |
<ion-card> | ||
<div class="card-header"> | ||
<div class="order-tags"> | ||
<ion-chip outline> | ||
<ion-chip @click="copyToClipboard(order.orderName, 'Copied to clipboard')" outline> | ||
<ion-icon :icon="pricetag" /> | ||
<ion-label>NN10584</ion-label> | ||
<ion-label>{{ order.orderName }}</ion-label> | ||
</ion-chip> | ||
</div> | ||
|
||
<div class="order-primary-info"> | ||
<ion-label> | ||
Darooty Magwood | ||
<p>{{ $t("Ordered") }} 27th January 2020 9:24 PM EST</p> | ||
<strong>{{ order.customerName }}</strong> | ||
<p>{{ $t("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}</p> | ||
</ion-label> | ||
</div> | ||
|
||
<div class="order-metadata"> | ||
<ion-label> | ||
Next Day Shipping | ||
<p>{{ $t("Ordered") }} 28th January 2020 2:32 PM EST</p> | ||
<strong>{{ order.shipmentMethodTypeDesc }}</strong> | ||
<p v-if="order.reservedDatetime">{{ $t("Last brokered") }} {{ formatUtcDate(order.reservedDatetime, 'dd MMMM yyyy t a ZZZZ') }}</p> | ||
</ion-label> | ||
</div> | ||
</div> | ||
|
||
<div class="order-item"> | ||
<div v-for="(item, index) in order.items" :key="index" class="order-item"> | ||
<div class="product-info"> | ||
<ion-item lines="none"> | ||
<ion-thumbnail slot="start"> | ||
<img src="https://dev-resources.hotwax.io/resources/uploads/images/product/m/j/mj08-blue_main.jpg" /> | ||
<Image :src="getProduct(item.productId).mainImageUrl" /> | ||
</ion-thumbnail> | ||
<ion-label> | ||
<p class="overline">WJ06-XL-PURPLE</p> | ||
Juno Jacket | ||
<p>Blue XL</p> | ||
<p class="overline">{{ item.productSku }}</p> | ||
{{ item.productName }} | ||
<p>{{ getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')}}</p> | ||
</ion-label> | ||
</ion-item> | ||
</div> | ||
|
||
<div class="product-metadata"> | ||
<ion-item lines="none"> | ||
<ion-label>{{ $t("Select box") }}</ion-label> | ||
<ion-select> | ||
<ion-select-option>Box A Type 3</ion-select-option> | ||
<ion-select-option>Box B Type 2</ion-select-option> | ||
<ion-item lines="none"> | ||
<ion-select aria-label="Select box" interface="popover" @ionChange="updateBox($event, item, order)" :value="item.selectedBox"> | ||
<ion-select-option v-for="shipmentPackage in order.shipmentPackages" :key="shipmentPackage.shipmentId" :value="shipmentPackage.packageName"> {{ $t("Box") }} {{ shipmentPackage.packageName }}</ion-select-option> | ||
</ion-select> | ||
</ion-item> | ||
</div> | ||
|
@@ -67,14 +65,16 @@ | |
<ion-list> | ||
<ion-item lines="none"> | ||
<ion-note slot="start">{{ $t('Boxes') }}</ion-note> | ||
<ion-button fill="clear" slot="end"> | ||
<ion-button :disabled="addingBoxForOrderIds.includes(order.orderId)" @click="addShipmentBox(order)" fill="clear" slot="end"> | ||
{{ $t("Add") }} | ||
<ion-icon :icon="addCircleOutline"/> | ||
</ion-button> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label>Box A</ion-label> | ||
<ion-select value="3"> | ||
|
||
<!-- Todo: Need to add the box type changing functionality --> | ||
<ion-item v-for="shipmentPackage in order.shipmentPackages" :key="shipmentPackage.shipmentId"> | ||
<ion-label>{{ shipmentPackage.packageName }}</ion-label> | ||
<ion-select interface="popover" value="3"> | ||
<ion-select-option value="1">Type 1</ion-select-option> | ||
<ion-select-option value="2">Type 2</ion-select-option> | ||
<ion-select-option value="3">Type 3</ion-select-option> | ||
|
@@ -105,6 +105,9 @@ import { | |
modalController } from "@ionic/vue"; | ||
import { defineComponent } from "vue"; | ||
import { addCircleOutline, closeOutline, pricetag } from "ionicons/icons"; | ||
import { mapGetters } from 'vuex'; | ||
import { copyToClipboard, formatUtcDate, getFeature} from '@/utils'; | ||
import Image from '@/components/Image.vue' | ||
export default defineComponent({ | ||
name: "EditPackagingModal", | ||
components: { | ||
|
@@ -124,17 +127,27 @@ export default defineComponent({ | |
IonThumbnail, | ||
IonTitle, | ||
IonToolbar, | ||
Image | ||
}, | ||
computed: { | ||
...mapGetters({ | ||
getProduct: 'product/getProduct' | ||
}), | ||
}, | ||
methods: { | ||
closeModal() { | ||
modalController.dismiss({ dismissed: true }); | ||
}, | ||
} | ||
}, | ||
props: ['order', 'updateBox', 'addingBoxForOrderIds', 'addShipmentBox', 'save'], | ||
setup() { | ||
return { | ||
addCircleOutline, | ||
closeOutline, | ||
pricetag | ||
pricetag, | ||
copyToClipboard, | ||
formatUtcDate, | ||
getFeature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Follow alphabetical order for exports |
||
}; | ||
}, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,10 @@ | |
<ion-icon slot="start" :icon="pencil" /> | ||
{{ $t("Edit packaging") }} | ||
</ion-item> | ||
<ion-item button @click="reportIssue"> | ||
<ion-item button @click="reportIssue" lines="none"> | ||
<ion-icon slot="start" :icon="warning" /> | ||
{{ $t("Report an issue") }} | ||
</ion-item> | ||
<ion-item button lines="none"> | ||
<ion-icon slot="start" :icon="refresh" /> | ||
{{ $t("Reject order") }} | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
</template> | ||
|
@@ -41,22 +37,35 @@ export default defineComponent({ | |
methods: { | ||
async editPackaging() { | ||
const editmodal = await modalController.create({ | ||
component: EditPackagingModal | ||
component: EditPackagingModal, | ||
componentProps: { | ||
order: this.order, | ||
updateBox: this.updateBox, | ||
addingBoxForOrderIds: this.addingBoxForOrderIds, | ||
addShipmentBox: this.addShipmentBox, | ||
save: this.save | ||
} | ||
}); | ||
return editmodal.present(); | ||
}, | ||
async reportIssue() { | ||
async reportIssue() { | ||
const reportmodal = await modalController.create({ | ||
component: ReportIssueModal | ||
component: ReportIssueModal, | ||
componentProps: { | ||
order: this.order, | ||
save: this.save, | ||
updateRejectReason: this.updateRejectReason | ||
} | ||
}); | ||
return reportmodal.present(); | ||
} | ||
}, | ||
props: ['order', 'updateBox', 'addingBoxForOrderIds', 'addShipmentBox', 'save', 'updateRejectReason'], | ||
setup() { | ||
return { | ||
pencil, | ||
warning, | ||
refresh | ||
refresh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix indentation and follow alphabetical sorting |
||
} | ||
} | ||
}); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the ShopifyImage component with the image size as small.