seller api

This commit is contained in:
Kerim 2023-08-31 14:46:41 +05:00
parent 370ca1f91f
commit f10b3e71aa
3 changed files with 145 additions and 7 deletions

View File

@ -25,7 +25,6 @@ checkToken = 0
<link href="{{'assets/seller/images/logo.svg'|theme}}" rel="shortcut icon">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NURGUL-{{ this.page.meta_title }}</title>
<!-- BEGIN: CSS Assets-->
<link rel="stylesheet" href="{{'assets/seller/css/app.css'|theme}}" />
@ -85,4 +84,4 @@ checkToken = 0
{% endif %}
</html>
</html>

View File

@ -2,4 +2,103 @@ title = "seller/Orders"
url = "/seller/orders"
meta_title = "Sargytlar"
layout = "seller-master"
==
==
<div class="intro-y flex flex-col sm:flex-row items-center mt-8">
<h2 class="text-lg font-medium mr-auto">
Tabulator
</h2>
<div class="w-full sm:w-auto flex mt-4 sm:mt-0">
<button class="btn btn-primary shadow-md mr-2">Add New Product</button>
<div class="dropdown ml-auto sm:ml-0">
<button class="dropdown-toggle btn px-2 box" aria-expanded="false" data-tw-toggle="dropdown">
<span class="w-5 h-5 flex items-center justify-center"> <i class="w-4 h-4" data-lucide="plus"></i>
</span>
</button>
<div class="dropdown-menu w-40">
<ul class="dropdown-content">
<li>
<a href="" class="dropdown-item"> <i data-lucide="file-plus" class="w-4 h-4 mr-2"></i> New
Category </a>
</li>
<li>
<a href="" class="dropdown-item"> <i data-lucide="users" class="w-4 h-4 mr-2"></i> New Group
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- BEGIN: HTML Table Data -->
<div class="intro-y box p-5 mt-5">
<div class="flex flex-col sm:flex-row sm:items-end xl:items-start">
<form id="tabulator-html-filter-form" class="xl:flex sm:mr-auto">
<div class="sm:flex items-center sm:mr-4">
<label class="w-12 flex-none xl:w-auto xl:flex-initial mr-2">Field</label>
<select id="tabulator-html-filter-field"
class="form-select w-full sm:w-32 2xl:w-full mt-2 sm:mt-0 sm:w-auto">
<option value="name">Name</option>
<option value="category">Category</option>
<option value="remaining_stock">Remaining Stock</option>
</select>
</div>
<div class="sm:flex items-center sm:mr-4 mt-2 xl:mt-0">
<label class="w-12 flex-none xl:w-auto xl:flex-initial mr-2">Type</label>
<select id="tabulator-html-filter-type" class="form-select w-full mt-2 sm:mt-0 sm:w-auto">
<option value="like" selected>like</option>
<option value="=">=</option>
<option value="<">&lt;</option>
<option value="<=">&lt;=</option>
<option value=">">></option>
<option value=">=">>=</option>
<option value="!=">!=</option>
</select>
</div>
<div class="sm:flex items-center sm:mr-4 mt-2 xl:mt-0">
<label class="w-12 flex-none xl:w-auto xl:flex-initial mr-2">Value</label>
<input id="tabulator-html-filter-value" type="text" class="form-control sm:w-40 2xl:w-full mt-2 sm:mt-0"
placeholder="Search...">
</div>
<div class="mt-2 xl:mt-0">
<button id="tabulator-html-filter-go" type="button" class="btn btn-primary w-full sm:w-16">Go</button>
<button id="tabulator-html-filter-reset" type="button"
class="btn btn-secondary w-full sm:w-16 mt-2 sm:mt-0 sm:ml-1">Reset</button>
</div>
</form>
<div class="flex mt-5 sm:mt-0">
<button id="tabulator-print" class="btn btn-outline-secondary w-1/2 sm:w-auto mr-2"> <i
data-lucide="printer" class="w-4 h-4 mr-2"></i> Print </button>
<div class="dropdown w-1/2 sm:w-auto">
<button class="dropdown-toggle btn btn-outline-secondary w-full sm:w-auto" aria-expanded="false"
data-tw-toggle="dropdown"> <i data-lucide="file-text" class="w-4 h-4 mr-2"></i> Export <i
data-lucide="chevron-down" class="w-4 h-4 ml-auto sm:ml-2"></i> </button>
<div class="dropdown-menu w-40">
<ul class="dropdown-content">
<li>
<a id="tabulator-export-csv" href="javascript:;" class="dropdown-item"> <i
data-lucide="file-text" class="w-4 h-4 mr-2"></i> Export CSV </a>
</li>
<li>
<a id="tabulator-export-json" href="javascript:;" class="dropdown-item"> <i
data-lucide="file-text" class="w-4 h-4 mr-2"></i> Export JSON </a>
</li>
<li>
<a id="tabulator-export-xlsx" href="javascript:;" class="dropdown-item"> <i
data-lucide="file-text" class="w-4 h-4 mr-2"></i> Export XLSX </a>
</li>
<li>
<a id="tabulator-export-html" href="javascript:;" class="dropdown-item"> <i
data-lucide="file-text" class="w-4 h-4 mr-2"></i> Export HTML </a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto scrollbar-hidden">
<div id="tabulator" class="mt-5 table-report table-report--tabulator"></div>
</div>
</div>
<!-- END: HTML Table Data -->

View File

@ -47,9 +47,10 @@
</div>
<div class="mt-3 mb-3">
<label>{{'product.short_description'|_}}</label>
<div action="#" class="dropzone">
<div class="fallback"> <input name="images[files][]" type="file" multiple id="prodImgs" />
<label>{{'product.file.upload'|_}}</label>
<div action="#" class="dropzone" id="upload-widget">
<div class="fallback">
<input name="images[files][]" type="file" multiple id="prodImgs" onchange="getFile(this)" />
</div>
<div class="dz-message" data-dz-message>
<div class="text-lg font-medium">Drop files here or click to upload.</div>
@ -132,9 +133,48 @@
{% put scripts %}
<script>
Dropzone.options.uploadWidget = {
paramName: 'file',
maxFilesize: 2, // MB
maxFiles: 1,
dictDefaultMessage: 'Drag an image here to upload, or click to select one',
headers: {
'x-csrf-token': document.querySelectorAll('meta[name=csrf-token]')[0].getAttributeNode('content').value,
},
acceptedFiles: 'image/*',
init: function () {
this.on('success', function (file, resp) {
console.log(file);
console.log(resp);
});
this.on('thumbnail', function (file) {
if (file.accepted !== false) {
if (file.width < 640 || file.height < 480) {
file.rejectDimensions();
}
else {
file.acceptDimensions();
}
}
});
},
accept: function (file, done) {
file.acceptDimensions = done;
file.rejectDimensions = function () {
done('The image must be at least 640 x 480px')
};
}
};
</script>
<script src="{{'assets/seller/js/ckeditor-classic.js'|theme}}"></script>
<script>
function getFile(fileq) {
var value = fileq.value;
console.log(value);
}
getProduct();
// console.log("qqq");
function getProduct() {