Skip to content

Commit

Permalink
fix: refactor styling
Browse files Browse the repository at this point in the history
  • Loading branch information
AbleKSaju committed Oct 18, 2024
1 parent ac8310c commit 3eb1338
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/pages/POS/CouponCodeModal.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<Modal class="h-96 w-96" :set-close-listener="false">
<p class="text-center py-3">Apply Coupon Code</p>
<Modal class="h-auto w-96" :set-close-listener="false">
<p class="text-center font-semibold py-3">Apply Coupon Code</p>
<div class="px-10">
<hr class="dark:border-gray-800" />
<p v-if="appliedCoupons.length" class="text-xs ml-1 mb-1 text-gray-500">
Applied Coupon Codes
<p v-if="appliedCoupons.length" class="text-xs m-2 text-gray-500">
{{ t`Applied Coupon Codes` }}
</p>
<div
v-if="appliedCoupons.length"
class="overflow-y-auto mt-2 custom-scroll custom-scroll-thumb2"
:style="{ height: appliedCoupons.length > 2 ? '11vh' : '10vh' }"
:style="{ height: appliedCoupons.length >= 2 ? '11vh' : '8vh' }"
>
<Row
v-for="(coupon,index) in appliedCoupons as any"
Expand Down Expand Up @@ -72,7 +72,7 @@
<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto mb-2">
<div class="col-span-2">
<Button
class="w-full bg-green-500"
class="w-full bg-green-500 dark:bg-green-700"
style="padding: 1.35rem"
:disabled="validationError"
@click="setCouponCode()"
Expand All @@ -86,12 +86,12 @@
</div>
</div>

<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto">
<div class="row-start-6 grid grid-cols-2 gap-4 mt-auto mb-8">
<div class="col-span-2">
<Button
class="w-full bg-red-500"
class="w-full bg-red-500 dark:bg-red-700"
style="padding: 1.35rem"
@click="$emit('toggleModal', 'CouponCode')"
@click="cancelApplyCouponCode()"
>
<slot>
<p class="uppercase text-lg text-white font-semibold">
Expand Down Expand Up @@ -205,6 +205,10 @@ export default defineComponent({
await updatePricingRule(this.sinvDoc);
this.$emit('setCouponsCount', this.sinvDoc.coupons?.length);
},
cancelApplyCouponCode() {
this.couponCode = '';
this.$emit('toggleModal', 'CouponCode');
},
},
});
</script>

0 comments on commit 3eb1338

Please sign in to comment.