Skip to content

Commit

Permalink
Merge pull request hotwax#381 from amansinghbais/fulfillment-pwa/hotw…
Browse files Browse the repository at this point in the history
…ax#380

Implemented: copy utility and text wrap in shippingLabelError modal (hotwax#380)
  • Loading branch information
ravilodhi authored Dec 28, 2023
2 parents 4e4fe67 + 7fe3ff0 commit ed17aa5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/ShippingLabelErrorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
</ion-button>
</ion-buttons>
<ion-title>{{ translate("Shipping label error") }}</ion-title>
<ion-buttons slot="end">
<!-- Copying first message, assuming only one message will be received -->
<ion-button @click="copyToClipboard(shipmentLabelErrorMessages[0], 'Copied to clipboard')">
<ion-icon slot="icon-only" :icon="copyOutline" />
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list lines="none">
<ion-item v-for="message, index in shipmentLabelErrorMessages" :key="index">
<ion-label>{{ message }}</ion-label>
<ion-label class="ion-text-wrap">{{ message }}</ion-label>
</ion-item>
<ion-item v-if="!shipmentLabelErrorMessages.length">
{{ translate("No shipping label error received from carrier") }}
Expand All @@ -36,9 +42,10 @@ import {
IonList
} from "@ionic/vue";
import { defineComponent } from "vue";
import { closeOutline } from "ionicons/icons";
import { closeOutline, copyOutline } from "ionicons/icons";
import { OrderService } from "@/services/OrderService";
import { translate } from "@hotwax/dxp-components";
import { copyToClipboard } from "@/utils";
export default defineComponent({
name: "ShippingLabelErrorModal",
Expand Down Expand Up @@ -72,6 +79,8 @@ export default defineComponent({
setup() {
return {
closeOutline,
copyOutline,
copyToClipboard,
translate
};
},
Expand Down

0 comments on commit ed17aa5

Please sign in to comment.