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.

60 lines
1.6 KiB

2 years ago
2 years ago
2 years ago
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.toLocaleString() + 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. total:{
  37. type: Number,
  38. },
  39. currency: {
  40. type: String,
  41. }
  42. },
  43. data() {
  44. return {};
  45. },
  46. computed: {
  47. // total() {
  48. // return (parseInt(this.subTotal)).toLocaleString();
  49. // },
  50. },
  51. methods: {
  52. payNow() {
  53. this.$emit('payNowClick');
  54. },
  55. },
  56. };
  57. </script>
  58. <style lang="scss" scoped>
  59. </style>