Files
exchange-2.0/resources/assets/vue/components/bookings/forms/PaymentVerificationFormComponent.vue
T

135 lines
12 KiB
Vue

<template>
<div class="row" @keyup.enter="submitForm">
<div class="col">
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
<div class="row" v-show="!$store.getters.isLoading(section)">
<div class="col">
<div class="row m-b-10">
<div class="col">
<div class="font-heading fs-16 all-caps bold m-b-15">Payment Verification</div>
</div>
</div>
<div class="row align-items-center m-b-10">
<div class="col-auto p-r-0">
<div class="icon-thumbnail icon-50 bg-master-lightest">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="35" height="35"
viewBox="0 0 172 172"
style=" fill:#000000; margin-top: -2px; margin-bottom: 2px;"><defs><linearGradient x1="86" y1="35.8405" x2="86" y2="60.92294" gradientUnits="userSpaceOnUse" id="color-1_77151_gr1"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="129" y1="126.46031" x2="129" y2="137.97356" gradientUnits="userSpaceOnUse" id="color-2_77151_gr2"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="149.15625" y1="18.58944" x2="149.15625" y2="172.31712" gradientUnits="userSpaceOnUse" id="color-3_77151_gr3"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient><linearGradient x1="111.53125" y1="18.58944" x2="111.53125" y2="172.31712" gradientUnits="userSpaceOnUse" id="color-4_77151_gr4"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient><linearGradient x1="107.5" y1="18.58944" x2="107.5" y2="172.31712" gradientUnits="userSpaceOnUse" id="color-5_77151_gr5"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient><linearGradient x1="129" y1="18.58944" x2="129" y2="172.31712" gradientUnits="userSpaceOnUse" id="color-6_77151_gr6"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient><linearGradient x1="86" y1="18.58944" x2="86" y2="172.31712" gradientUnits="userSpaceOnUse" id="color-7_77151_gr7"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M86,37.63037c-5.93706,0 -10.75,4.81294 -10.75,10.75c0,5.93706 4.81294,10.75 10.75,10.75c5.93706,0 10.75,-4.81294 10.75,-10.75c0,-5.93706 -4.81294,-10.75 -10.75,-10.75z" fill="url(#color-1_77151_gr1)"></path><path d="M88.6875,126.3125h80.625v10.75h-80.625z" fill="url(#color-2_77151_gr2)"></path><path d="M139.75,150.5h18.8125v5.375h-18.8125z" fill="url(#color-3_77151_gr3)"></path><path d="M99.4375,142.4375h24.1875v5.375h-24.1875z" fill="url(#color-4_77151_gr4)"></path><path d="M99.4375,153.1875h16.125v5.375h-16.125z" fill="url(#color-5_77151_gr5)"></path><path d="M161.25,112.875h-64.5c-5.92863,0 -10.75,4.82137 -10.75,10.75v37.625c0,5.92863 4.82137,10.75 10.75,10.75h64.5c5.92863,0 10.75,-4.82137 10.75,-10.75v-37.625c0,-5.92863 -4.82137,-10.75 -10.75,-10.75zM166.625,161.25c0,2.96431 -2.41069,5.375 -5.375,5.375h-64.5c-2.96431,0 -5.375,-2.41069 -5.375,-5.375v-37.625c0,-2.96431 2.41069,-5.375 5.375,-5.375h64.5c2.96431,0 5.375,2.41069 5.375,5.375z" fill="url(#color-6_77151_gr6)"></path><path d="M153.50463,61.47388c-59.30238,-39.96313 -60.65419,-40.83119 -60.84231,-40.94137c-3.74369,-2.2145 -9.59169,-2.20913 -13.31925,-0.00538c-0.16663,0.09675 -0.67187,0.39506 -60.85306,40.94675c-1.48081,0.99975 -2.365,2.666 -2.365,4.45587v1.25775c0,2.96431 2.41069,5.375 5.375,5.375h2.6875c0,0.7095 0,1.58831 0,2.6875c0,3.49912 2.25481,6.45538 5.375,7.568v43.49987c-4.44513,0 -8.0625,3.61738 -8.0625,8.0625v3.182c-3.12019,1.11531 -5.375,4.06888 -5.375,7.568v8.05713h72.5625v-5.375h-67.1875v-2.68212c0,-1.4835 1.204,-2.69288 2.6875,-2.69288h64.5v-5.375h-61.8125v-2.68212c0,-1.4835 1.204,-2.69288 2.6875,-2.69288h59.125v-5.375h-8.0625v-43h10.75v32.25h5.375v-32.7445c3.12019,-1.11263 5.375,-4.06888 5.375,-7.568c0,-1.09919 0,-1.978 0,-2.6875h13.4375c0,0.7095 0,1.58831 0,2.6875c0,3.49912 2.25481,6.45538 5.375,7.568v32.7445h5.375v-32.25h10.75v32.25h5.375v-32.7445c3.12019,-1.11263 5.375,-4.06888 5.375,-7.568c0,-1.09919 0,-1.978 0,-2.6875h2.6875c2.96431,0 5.375,-2.41069 5.375,-5.375v-1.25775c0,-1.78987 -0.88419,-3.45612 -2.37037,-4.45587zM45.6875,126.3125h-10.75v-43h10.75zM48.375,77.9375h-16.125c-1.4835,0 -2.6875,-1.204 -2.6875,-2.6875c0,-0.62619 0,-1.677 0,-2.6875h21.5c0,1.0105 0,2.06131 0,2.6875c0,1.4835 -1.204,2.6875 -2.6875,2.6875zM75.25,126.3125h-24.1875v-43.4945c3.12019,-1.11263 5.375,-4.06888 5.375,-7.568c0,-1.09919 0,-1.978 0,-2.6875h13.4375c0,0.7095 0,1.58831 0,2.6875c0,3.49912 2.25481,6.45538 5.375,7.568zM96.75,75.25c0,1.4835 -1.204,2.6875 -2.6875,2.6875h-16.125c-1.4835,0 -2.6875,-1.204 -2.6875,-2.6875c0,-0.62619 0,-1.677 0,-2.6875h21.5c0,1.0105 0,2.06131 0,2.6875zM142.4375,75.25c0,1.4835 -1.204,2.6875 -2.6875,2.6875h-16.125c-1.4835,0 -2.6875,-1.204 -2.6875,-2.6875c0,-0.62619 0,-1.677 0,-2.6875h21.5c0,1.0105 0,2.06131 0,2.6875zM150.5,67.1875h-129l-0.00269,-1.25775c37.10363,-25.00181 59.76731,-40.25337 60.57894,-40.77475c1.05619,-0.6235 2.44831,-0.9675 3.92375,-0.9675c1.462,0 2.84337,0.33862 3.89419,0.95137c1.16369,0.7525 23.76825,15.96912 60.60581,40.79356z" fill="url(#color-7_77151_gr7)"></path></g></g></svg>
</div>
</div>
<div class="col-auto p-l-0">
<div class="row">
<div class="col">
<div class="font-heading all-caps fs-10 text-primary bold">{{data.booking.service.configurations.bank_info.holder_name}}</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="font-heading all-caps fs-10 bold">{{data.booking.service.configurations.bank_info.bank_name}}: <span class="text-complete">{{ data.booking.service.configurations.bank_info.account_no}}</span></div>
</div>
</div>
</div>
</div>
<div class="row m-b-10">
<div class="col">
<div class="row align-items-top">
<div class="col">
<div class="font-heading fs-10 muted all-caps">You are Paying</div>
<div class="font-heading fs-16 bold text-success">
{{data.currency.short_code}} {{(Math.round((data.amount + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
</div>
</div>
<div class="col-auto">
<div class="font-heading fs-10 muted all-caps">Rate</div>
<div class="font-heading fs-12 bold">
{{(Math.round((data.currency_rate + Number.EPSILON) * 10000) / 10000).toFixed(5)}}
</div>
</div>
<div class="col-auto">
<div class="font-heading fs-10 muted all-caps">Recipient Gets</div>
<div class="font-heading fs-12 bold">
{{data.original_currency.short_code}} {{(Math.round((data.original_amount + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
</div>
</div>
</div>
</div>
</div>
<error-message-component class="m-b-20" :error="error"></error-message-component>
<div class="row">
<div class="col">
<file-input-component :validator="$v.files" v-model="files">
<template slot="label">
<div class="font-heading fs-11 text-primary all-caps">Payment Proof</div>
</template>
<template slot="tips">
<div class="row">
<div class="col">
<div class="row m-b-10">
<div class="col">
<div class="font-heading fs-11 text-warning m-b-10">Your payment total shown in the photo should tally with payment booking total.</div>
</div>
</div>
</div>
</div>
</template>
</file-input-component>
</div>
</div>
<div class="row m-t-20">
<div class="col">
<div class="row">
<div class="col-auto">
<button type="button" class="btn btn-sm bg-master-lighter p-t-10 p-b-10 p-r-35 p-l-35 btn-default b-rad-none" data-dismiss="modal">Cancel</button>
</div>
<div class="col text-right">
<button type="button" class="btn btn-sm p-t-10 p-b-10 p-r-35 p-l-35 btn-success b-rad-none" @click="submitForm">Save and continue</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import ModalFromHandler from '../../../general/mixins/modalFormHandler'
import { required } from "vuelidate/lib/validators";
export default {
props: {
id: {
required: true,
type: Number
}
},
data(){
return {
files: [],
parameters: {}
}
},
validations: {
files: {
required
}
},
methods: {
submitForm(){
this.parameters = {
files: this.files,
booking_id: this.id,
company_id: this.data.booking.company.id,
payment_id: this.data.id,
};
this.submit(this.route('api.booking.payment.verification.create', this.id, this.data.id), 'post', this.section, true, true);
}
},
mixins: [ModalFromHandler]
}
</script>