-
Notifications
You must be signed in to change notification settings - Fork 38
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: added the functionality to the popover buttons in the mobile view of completed orders page (#244) #256
Closed
amansinghbais
wants to merge
15
commits into
hotwax:main
from
amansinghbais:fulfillment-pwa/#244-completedpage
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2731188
Implemented: added the functionality to the buttons in mobile view in…
amansinghbais 6cb5b87
Fixed: added the event parameter in shippingPopover to position the p…
amansinghbais 234d6e5
Merge branch 'fulfillment-pwa/#244-completedpage' of https://github.c…
amansinghbais 7755b1d
Fixed: removed the icons from the mobile view popover and update the …
amansinghbais d71cdf0
Fixed: update the shipping label error case and its translation (#244)
amansinghbais 1f55c7d
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
amansinghbais 4039e58
Merge branch 'fulfillment-pwa/#244-completedpage' of https://github.c…
amansinghbais 30ec930
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
amansinghbais d452472
Improved: code for mobile view of completed page (#244)
amansinghbais 02b4f4d
Improved: shipped button styling in mobile view (#244)
amansinghbais 99f8cd7
Improved: called methods after dismissing popover instead of passing …
amansinghbais 8c0348f
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
amansinghbais f3dba0c
Improved: making async await shipping function call (#244)
amansinghbais b9f48de
Improved: logic to handle if no popover button selected (#244)
amansinghbais 914ed05
Merge branch 'main' of https://github.com/hotwax/fulfillment-pwa into…
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,16 +1,16 @@ | ||||||
<template> | ||||||
<ion-content> | ||||||
<ion-list> | ||||||
<ion-item button :disabled="order.hasMissingShipmentInfo || order.hasMissingPackageInfo" @click="regenerateShippingLabel(order)"> | ||||||
<ion-item button :disabled="order.hasMissingShipmentInfo || order.hasMissingPackageInfo" @click="closeModal('regenerateShippingLabel')"> | ||||||
{{ $t("Regenerate shipping label") }} | ||||||
</ion-item> | ||||||
<ion-item button :disabled="order.hasMissingShipmentInfo || order.hasMissingPackageInfo" @click="printPackingSlip(order)"> | ||||||
<ion-item button :disabled="order.hasMissingShipmentInfo || order.hasMissingPackageInfo" @click="closeModal('printPackingSlip')"> | ||||||
{{ $t("Print customer letter") }} | ||||||
</ion-item> | ||||||
<ion-item button :disabled="!hasPermission(Actions.APP_UNPACK_ORDER) || order.hasMissingShipmentInfo || order.hasMissingPackageInfo || !hasPackedShipments(order)" @click="unpackOrder(order)"> | ||||||
<ion-item button :disabled="!hasPermission(Actions.APP_UNPACK_ORDER) || order.hasMissingShipmentInfo || order.hasMissingPackageInfo || !hasPackedShipments" @click="closeModal('unpackOrder')"> | ||||||
{{ $t("Unpack") }} | ||||||
</ion-item> | ||||||
<ion-item button v-if="order.missingLabelImage" lines="none" @click="showShippingLabelErrorModal(order)"> | ||||||
<ion-item button v-if="order.missingLabelImage" lines="none" @click="closeModal('showShippingLabelErrorModal')"> | ||||||
{{ $t("Shipping label error") }} | ||||||
</ion-item> | ||||||
</ion-list> | ||||||
|
@@ -26,13 +26,21 @@ import { | |||||
import { defineComponent } from "vue"; | ||||||
import { printOutline, lockOpenOutline, receiptOutline, warningOutline } from 'ionicons/icons' | ||||||
import { Actions, hasPermission } from '@/authorization' | ||||||
import { popoverController } from "@ionic/core"; | ||||||
export default defineComponent({ | ||||||
name: "ShippingPopover", | ||||||
components: { | ||||||
IonContent, | ||||||
IonItem, | ||||||
IonList, | ||||||
}, | ||||||
props: ['hasPackedShipments', 'order'], | ||||||
methods: { | ||||||
closeModal(eventName: string) { | ||||||
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.
Suggested change
|
||||||
// Sending function name to be called after popover dismiss. | ||||||
popoverController.dismiss({selectedMethod: eventName}) | ||||||
} | ||||||
}, | ||||||
setup() { | ||||||
return { | ||||||
Actions, | ||||||
|
@@ -42,14 +50,6 @@ export default defineComponent({ | |||||
receiptOutline, | ||||||
warningOutline | ||||||
} | ||||||
}, | ||||||
props: [ | ||||||
'hasPackedShipments', | ||||||
'order', | ||||||
'printPackingSlip', | ||||||
'regenerateShippingLabel', | ||||||
'showShippingLabelErrorModal', | ||||||
'unpackOrder' | ||||||
] | ||||||
} | ||||||
}); | ||||||
</script> |
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.
Functions can be async also.