WithdrawConfirmDialog.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <q-dialog ref="dialogRef" @hide="onDialogHide">
  3. <q-card class="withdraw-card bg-surface" :flat="false">
  4. <div class="row justify-end q-pt-sm q-pr-sm">
  5. <q-btn flat round dense icon="close" color="grey-6" size="sm" @click="onDialogCancel" />
  6. </div>
  7. <q-card-section class="column items-center q-pt-xs q-pb-sm q-px-lg">
  8. <q-icon name="mdi-bank-transfer-out" color="secondary" size="42px" class="q-mb-sm" />
  9. <div class="text-text text-center font16 fontbold q-mb-xs">
  10. {{ $t('provider.payments.withdraw_confirm_title') }}
  11. </div>
  12. <div class="withdraw-amount font28 fontbold text-secondary text-center">
  13. {{ formatCurrency(amount) }}
  14. </div>
  15. <div class="text-grey-6 text-center font12 q-mt-xs">
  16. {{ $t('provider.payments.withdraw_confirm_message', { amount: formatCurrency(amount) }) }}
  17. </div>
  18. </q-card-section>
  19. <q-card-section class="row q-gutter-x-sm q-pt-xs q-pb-lg q-px-lg">
  20. <q-btn
  21. unelevated
  22. rounded
  23. no-caps
  24. color="grey-4"
  25. text-color="grey-8"
  26. class="col"
  27. :label="$t('provider.payments.anticipation_confirm_cancel')"
  28. @click="onDialogCancel"
  29. />
  30. <q-btn
  31. unelevated
  32. rounded
  33. no-caps
  34. color="secondary"
  35. class="col"
  36. :label="$t('provider.payments.anticipation_confirm_ok')"
  37. @click="onDialogOK()"
  38. />
  39. </q-card-section>
  40. </q-card>
  41. </q-dialog>
  42. </template>
  43. <script setup>
  44. import { useDialogPluginComponent } from 'quasar';
  45. import { formatCurrency } from 'src/helpers/utils';
  46. defineProps({
  47. amount: {
  48. type: Number,
  49. required: true,
  50. },
  51. });
  52. defineEmits([...useDialogPluginComponent.emits]);
  53. const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent();
  54. </script>
  55. <style scoped>
  56. .withdraw-card {
  57. width: 320px;
  58. max-width: 96vw;
  59. border-radius: 20px !important;
  60. }
  61. .withdraw-amount {
  62. line-height: 1.2;
  63. }
  64. </style>