66 lines
2.5 KiB
HTML
Executable File
66 lines
2.5 KiB
HTML
Executable File
{% put scripts %}
|
|
|
|
<script>
|
|
getOrders(`{{sellerId}}`);
|
|
// console.log("qqq");
|
|
function getOrders(sellerId) {
|
|
let formData = new FormData()
|
|
formData.append('user', "romanah_")
|
|
formData.append('password', "bt110226$$")
|
|
formData.append('seller_id', sellerId)
|
|
|
|
$(document).ready(function () {
|
|
$.ajax({
|
|
url: `https://nurgul.com.tm/app/api/seller/orders`,
|
|
type: 'POST',
|
|
data: formData,
|
|
cache: false,
|
|
contentType: false,
|
|
processData: false,
|
|
beforeSend: function () {
|
|
// $('#products_{{id}}').hide();
|
|
// $('#loader_{{id}}').show();
|
|
},
|
|
success: function (data, textStatus, xhr) {
|
|
// $('#loader_{{id}}').hide();
|
|
// $('#products_{{id}}').show();
|
|
|
|
|
|
console.log(data.data);
|
|
|
|
var orders = data.data;
|
|
|
|
for (var order of orders) {
|
|
$('#seller_order').append(`
|
|
<tr class="intro-x">
|
|
|
|
<td class="w-40 !py-4"> <a href=""
|
|
class="underline decoration-dotted whitespace-nowrap">#{{'order.title'|_}} `+ order.order_id + `</a> </td>
|
|
<td class="w-40">
|
|
<a href="" class="font-medium whitespace-nowrap">Keanu Reeves</a>
|
|
<div class="text-slate-500 text-xs whitespace-nowrap mt-0.5">Ohio, Ohio</div>
|
|
</td>
|
|
<td class="text-center">
|
|
<div class="flex items-center justify-center whitespace-nowrap text-success"> <i
|
|
data-lucide="check-square" class="w-4 h-4 mr-2"></i> `+ order.status + ` </div>
|
|
</td>
|
|
<td class="w-40 text-right">
|
|
<div class="pr-16">`+ order.base_seller_total + ` TMT</div>
|
|
</td>
|
|
<td class="w-40 text-right">
|
|
`+ order.total_qty_ordered + `
|
|
</td>
|
|
|
|
</tr>
|
|
`);
|
|
}
|
|
},
|
|
error: function (xhr, textStatus, errorThrown) {
|
|
console.log('Error in Operation');
|
|
}
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
{% endput %}
|