You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

2 years ago
  1. <template>
  2. <div class="total-info tw-p-5 tw-mb-[20px] tw-bg-neutrals-0 tw-rounded-xl">
  3. <div class="element tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-mb-[12px]">
  4. <div class="label tw-body-4 tw-text-black tw-font-bold">
  5. {{ $t("Subtotal") }}
  6. </div>
  7. <div class="content tw-body-4 tw-text-black tw-font-bold">
  8. ${{ subTotal.toLocaleString() + currency }}
  9. </div>
  10. </div>
  11. <div
  12. class="element total tw-flex tw-justify-between tw-items-center tw-flex-nowrap tw-pt-[12px] tw-border-0 tw-border-t tw-border-solid tw-border-neutrals-200">
  13. <div class="label tw-body-2 tw-text-black tw-font-bold">
  14. {{ $t("Total Amount") }}
  15. </div>
  16. <div class="content tw-body-2 tw-text-primary-1 tw-font-bold">
  17. ${{ total + currency }}
  18. </div>
  19. </div>
  20. <div class="element tw-flex tw-justify-center tw-items-center tw-mt-[30px] xl:tw-hidden xl:tw-mt-0">
  21. <button
  22. class="btnPay tw-transition tw-btn-md tw-bg-primary-1 tw-px-[30px] tw-py-[9.5px] tw-rounded-2xl hover:tw-bg-primary-2"
  23. @click="payNow">
  24. {{ $t("Pay now") }}
  25. </button>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. export default {
  31. name: "TotalPrice",
  32. props: {
  33. subTotal: {
  34. type: Number,
  35. },
  36. currency: {
  37. type: String,
  38. }
  39. },
  40. data() {
  41. return {};
  42. },
  43. computed: {
  44. total() {
  45. return (parseInt(this.subTotal)).toLocaleString();
  46. },
  47. },
  48. methods: {
  49. payNow() {
  50. this.$emit('payNowClick');
  51. },
  52. },
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. </style>