@@ -122,69 +122,35 @@
initiateTable() {
self = this;
this.itemDatatable = $('#userDatatable').DataTable({
- "data": this.items,
+ "data": this.userList,
"columns": [
{
- "title": "Unique Id",
- "data": "uniqueID",
+ "title": "UID",
+ "data": "id",
"createdCell": function (td, cellData, rowData, row, col) {
// Assign a unique ID to the
element
$(td).attr('id', `qr${cellData}`);
},
},
{
- "title": "Serial Number",
- "data": "serialNumber",
+ "title": "Email",
+ "data": "email",
},
{
- "title": "Quantity",
- "data": "quantity",
+ "title": "Company Name",
+ "data": "company",
},
{
- "title": "Supplier",
- "data": "supplier",
+ "title": "Department",
+ "data": "department",
},
{
- "title": "Purchase Date",
- "data": "purchaseDate",
- },
- {
- "title": "Price After Convert(RM)",
- "data": "convertPrice",
- },
- {
- "title": "Invoice Date",
- "data": "invoiceDate",
- },
- {
- "title": "Warranty Until",
- "data": "warranty",
- "render": function (data, type, full, meta) {
- if (data > 0) { return full.endWDate }
- else { return data }
- }
- },
- // {
- // "title": "Image",
- // "data": "imageProduct",
- // "render": function (data, type, full, meta) {
- // var image = `
- //
- // `;
- // return image;
- // },
- // },
- {
- "title": "Print",
- "data": "uniqueID",
- "render": function (data) {
- var printButton = ``;
- return printButton;
- },
+ "title": "Role",
+ "data": "role",
},
{
"title": "Delete",
- "data": "productId",
+ "data": "id",
"render": function (data) {
var deleteButton = ``;
return deleteButton;
|