<template>
<div class="selectedCard">
<div class="allPaymentsDelete"
v-for="payment in this.debtorPayments" :key="payment.id">
<a class="deletePaymentX" @click="deletePaymentFormat(payment.id)">X</a>
{{ formatDateMDY(payment.paymentdate.split("T")[0]) }}
{{ payment.assignedto }}
{{ payment.paymentstatus }}
</div>
</div>
</template>
<script>
methods: {
deletePaymentFormat(pid) {
let url = `${this.baseURL}deletepaymentbypid`;
let params = {
pid: pid,
host: this.serverDBase,
user: this.userDBase,
password: this.passDBase,
schema: this.schemaDBase,
};
this.deletePaymentByPid(url, params);
},
deletePaymentByPid(url, params) {
axios
.post(url, params)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.error(err);
});
},
}
</script>
<style>
.deletePaymentX {
color: red;
font-weight: bold;
text-decoration: none;
}
</style>