derm_oct/themes/dagdan/partials/sellerApi/getReport.htm

46 lines
1.3 KiB
HTML

{% put scripts %}
<script>
getReport(`{{sellerId}}`);
// console.log("qqq");
function getReport(sellerId) {
let formData = new FormData()
formData.append('user', "romanah_")
formData.append('password', "bt110226$$")
formData.append('seller_id', sellerId)
$(document).ready(function () {
$.ajax({
url: `http://216.250.11.229/derman/app/api/seller/report`,
type: 'POST',
data: formData,
cache: false,
contentType: false,
processData: false,
beforeSend: function () {
$('#report_content').hide();
$('#loader_seller_report').show();
},
success: function (data, textStatus, xhr) {
$('#loader_seller_report').hide();
$('#report_content').show();
console.log(data);
var report = data;
$('#dashboard_order').html(report.sellerOrders);
$('#dashboard_product').html(report.sellerProducts);
},
error: function (xhr, textStatus, errorThrown) {
console.log('Error in Operation');
}
});
});
}
</script>
{% endput %}