mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 17:03:59 +00:00
135 lines
6.4 KiB
Vue
135 lines
6.4 KiB
Vue
<template>
|
|
<div class="row m-b-10 parentContainer">
|
|
<div class="col">
|
|
<div class="row p-b-10 b-b b-grey">
|
|
<div class="col-2">{{ item.posting_date }}</div>
|
|
<div class="col-2">{{ item.transaction_description_1 + ' - ' + item.transaction_description_2 }}</div>
|
|
<div class="col-5" v-if="item.owners.length === 1">
|
|
<div class="row">
|
|
<div class="col">{{item.owners[0].system}}</div>
|
|
<div class="col">{{ typeString(item.owners[0].type) }}</div>
|
|
<div class="col"><a :href="item.owners[0].reference_link" target="_blank">{{item.owners[0].reference}}</a></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-5" v-if="item.owners.length > 1">
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="row" v-for="owner in item.owners">
|
|
<div class="col">
|
|
{{ owner.system }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="row" v-for="owner in item.owners">
|
|
<div class="col">
|
|
{{ typeString(owner.type) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="row parentContainer" v-for="owner in item.owners">
|
|
<div class="col d-flex justify-content-between">
|
|
<a :href="owner.reference_link" target="_blank">{{ owner.reference }}</a>
|
|
<div v-if="stage === 2">
|
|
<button class="btn btn-xs btn-outline-primary b-rad-none m-r-5 requestModal" data-type="approveCorrectMappingTransaction">
|
|
<i class="fa fa-check fa-fw"></i>
|
|
</button>
|
|
<modal-component class="animate__animated animate__fast animate__fadeIn" type="approveCorrectMappingTransaction">
|
|
<general-confirmation-form-component
|
|
:contentText="returnTextWithVariable(owner.reference)"
|
|
modalType="confirm"
|
|
class="text-center"
|
|
:apiRoute="route('api.company.delete', 1)"
|
|
apiMethod="post"
|
|
section="statementTransactionComponent"
|
|
>
|
|
</general-confirmation-form-component>
|
|
</modal-component>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-5" v-if="!item.owners.length">
|
|
<div class="row">
|
|
<div class="col">N/A</div>
|
|
<div class="col">N/A</div>
|
|
<div class="col">N/A</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-1">{{ item.amount }}</div>
|
|
<div class="col-1" v-if="stage === 1">
|
|
<button class="btn btn-xs btn-outline-danger b-rad-none m-r-5 requestModal" data-type="deleteMappingTransaction">
|
|
<i class="fa fa-times fa-fw"></i>
|
|
</button>
|
|
<modal-component class="animate__animated animate__fast animate__fadeIn" type="deleteMappingTransaction">
|
|
<general-confirmation-form-component
|
|
contentText="Are you sure you want to reject this mapping?"
|
|
modalType="delete"
|
|
class="text-center"
|
|
:apiRoute="route('api.company.delete', 1)"
|
|
apiMethod="post"
|
|
section="statementTransactionComponent"
|
|
>
|
|
</general-confirmation-form-component>
|
|
</modal-component>
|
|
</div>
|
|
</div>
|
|
<!-- <span v-for="owner in item.owners">{{owner.system + ' - ' + owner.owner_id}}</span>-->
|
|
<!-- [0].system + ' - ' + item.owner_guess[0].bill_no-->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import componentHandler from '../../../general/mixins/componentHandler';
|
|
export default {
|
|
props: {
|
|
stage: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
},
|
|
methods: {
|
|
typeString(type){
|
|
switch(type) {
|
|
case 1:
|
|
return 'Sales';
|
|
case 2:
|
|
return 'Wallet Top Up';
|
|
case 3:
|
|
return 'Wallet Withdrawal';
|
|
case 4:
|
|
return 'Payment Refund';
|
|
case 5:
|
|
return 'Supplier Payment';
|
|
case 6:
|
|
return 'Internal Bank Transfer Out';
|
|
case 7:
|
|
return 'Internal Bank Transfer In';
|
|
case 8:
|
|
return 'Salary Payment';
|
|
case 9:
|
|
return 'Statutory Payment';
|
|
case 10:
|
|
return 'FPX Charges';
|
|
case 11:
|
|
return 'FPX Charges Refund';
|
|
case 12:
|
|
return 'Bank Charges';
|
|
case 13:
|
|
return 'Credit Card Payment';
|
|
case 14:
|
|
return 'Non-Operational Payment';
|
|
}
|
|
},
|
|
returnTextWithVariable(variable) {
|
|
return "Are you sure you want to choose this mapping " + variable + "?";
|
|
}
|
|
},
|
|
mixins: [componentHandler]
|
|
}
|
|
</script>
|