update
This commit is contained in:
@ -19,18 +19,18 @@
|
||||
<div class="card-header">
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="col">
|
||||
<p class="card-title text-bold mb-0">Transaksi</p>
|
||||
<p class="card-subtitle text-muted">Daftar Transaksi</p>
|
||||
<p class="card-title text-bold mb-0">Transaction</p>
|
||||
<p class="card-subtitle text-muted">Transaction List</p>
|
||||
</div>
|
||||
{{-- <div class="col-auto text-end ps-0">
|
||||
<a href="#" id="btnMdlMrgTrx" class="btn btn-sm btn-danger">Merge Transaksi</a>
|
||||
</div>
|
||||
<div class="col-auto text-end ps-0">
|
||||
<a href="{{ route('view_transactions_spc_add') }}" class="btn btn-sm btn-warning">Transaksi Khusus</a>
|
||||
</div>
|
||||
<div class="col-auto text-end ps-0">
|
||||
<a href="{{ route('view_transactions_add') }}" class="btn btn-sm btn-danger">Tambah Transaksi</a>
|
||||
</div> --}}
|
||||
<div class="col-auto text-end ps-0">
|
||||
<a href="{{ route('view_transactions_add') }}" class="btn btn-sm btn-danger">Add New Job</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@ -39,20 +39,20 @@
|
||||
<thead>
|
||||
<tr class="">
|
||||
<th class="">#</th>
|
||||
<th class="text-nowrap text-center">Tindakan</th>
|
||||
<th class="text-nowrap">Kode Order</th>
|
||||
<th class="text-nowrap">Nama Client</th>
|
||||
<th class="text-nowrap">Waktu Pemesanan</th>
|
||||
<th class="text-nowrap">Vendor</th>
|
||||
<th class="text-nowrap">Kendaraan</th>
|
||||
<th class="text-nowrap">Pengemudi</th>
|
||||
<th class="text-nowrap">Lokasi Penjemputan</th>
|
||||
<th class="text-nowrap">Lokasi Pengantaran</th>
|
||||
<th class="text-nowrap text-center">Action</th>
|
||||
<th class="text-nowrap">Order Code</th>
|
||||
<th class="text-nowrap">Company</th>
|
||||
<th class="text-nowrap">Order Time</th>
|
||||
{{-- <th class="text-nowrap">Vendor</th> --}}
|
||||
<th class="text-nowrap">Vehicle</th>
|
||||
<th class="text-nowrap">Driver</th>
|
||||
<th class="text-nowrap">Origin</th>
|
||||
<th class="text-nowrap">Destination</th>
|
||||
<th class="text-nowrap text-center">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="">
|
||||
{{-- <tr class="">
|
||||
<td class="text-nowrap">1</td>
|
||||
<td class="text-nowrap">SiCepat</td>
|
||||
<td class="text-nowrap">Feb 20, 2022 17:29:50</td>
|
||||
@ -75,7 +75,7 @@
|
||||
<span class="icon ion-eye text-danger fz-16"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr> --}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -434,29 +434,71 @@
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
render: function(data, type, row, meta) {
|
||||
console.log("rows: ", row)
|
||||
let action = ``;
|
||||
// if (row.confirm_at === 0) {
|
||||
if (!row.vdr_name) {
|
||||
action += `<a href="${State.url_conf_order}?code=${row.ord_code}"
|
||||
class="text-decoration-none me-1" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="Tindak Lanjuti">
|
||||
<span class="icon ion-forward text-danger fz-16"></span>
|
||||
</a>`;
|
||||
} else {
|
||||
let ord_codes = row.ord_code;
|
||||
if (typeof row.childs != 'undefined' && row.childs.length > 0) {
|
||||
for (const child of row.childs) {
|
||||
ord_codes += ',' + child.ord_code;
|
||||
}
|
||||
// if (!row.vdr_name) {
|
||||
// action += `<a href="${State.url_conf_order}?code=${row.ord_code}"
|
||||
// class="text-decoration-none me-1" data-bs-toggle="tooltip"
|
||||
// data-bs-placement="bottom" title="Tindak Lanjuti">
|
||||
// <span class="icon ion-forward text-danger fz-16"></span>
|
||||
// </a>`;
|
||||
// } else {
|
||||
// let ord_codes = row.ord_code;
|
||||
// if (typeof row.childs != 'undefined' && row.childs.length > 0) {
|
||||
// for (const child of row.childs) {
|
||||
// ord_codes += ',' + child.ord_code;
|
||||
// }
|
||||
// }
|
||||
// action += `
|
||||
// <a href="${State.url_view_order}?code=${ord_codes}"
|
||||
// class="text-decoration-none me-1" data-bs-toggle="tooltip"
|
||||
// data-bs-placement="bottom" title="Lihat">
|
||||
// <span class="icon ion-eye text-danger fz-16"></span>
|
||||
// </a>
|
||||
// `;
|
||||
// action += `
|
||||
// <a href="#"
|
||||
// class="text-decoration-none me-1 btnTrackOrder" data-bs-toggle="tooltip"
|
||||
// data-bs-placement="bottom" title="Tracking #${row.ord_code}"
|
||||
// data-id="${row.ord_id}" data-code="${row.ord_code}">
|
||||
// <span class="icon ion-map text-danger fz-16"></span>
|
||||
// </a>
|
||||
// `;
|
||||
// // data-bs-toggle="modal" data-bs-target="#mdlPantau"
|
||||
// for (const child of row.childs) {
|
||||
// action += `
|
||||
// <a href="#"
|
||||
// class="text-decoration-none me-1 btnTrackOrder" data-bs-toggle="tooltip"
|
||||
// data-bs-placement="bottom" title="Tracking #${child.ord_code}"
|
||||
// data-id="${child.ord_id}" data-code="${child.ord_code}">
|
||||
// <span class="icon ion-map text-danger fz-16"></span>
|
||||
// </a>
|
||||
// `;
|
||||
// }
|
||||
// }
|
||||
// action += `
|
||||
// <a href="#"
|
||||
// class="text-decoration-none me-1 btnDelOrder" data-bs-toggle="tooltip"
|
||||
// data-bs-placement="bottom" title="Delete Order"
|
||||
// data-id="${row.ord_id}" data-code="${row.ord_code}">
|
||||
// <span class="icon ion-ios-trash text-danger fz-16"></span>
|
||||
// </a>
|
||||
// `;
|
||||
let ord_codes = row.ord_code;
|
||||
if (typeof row.childs != 'undefined' && row.childs.length > 0) {
|
||||
for (const child of row.childs) {
|
||||
ord_codes += ',' + child.ord_code;
|
||||
}
|
||||
action += `
|
||||
}
|
||||
action += `
|
||||
<a href="${State.url_view_order}?code=${ord_codes}"
|
||||
class="text-decoration-none me-1" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="Lihat">
|
||||
<span class="icon ion-eye text-danger fz-16"></span>
|
||||
</a>
|
||||
`;
|
||||
action += `
|
||||
action += `
|
||||
<a href="#"
|
||||
class="text-decoration-none me-1 btnTrackOrder" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="Tracking #${row.ord_code}"
|
||||
@ -464,9 +506,9 @@
|
||||
<span class="icon ion-map text-danger fz-16"></span>
|
||||
</a>
|
||||
`;
|
||||
// data-bs-toggle="modal" data-bs-target="#mdlPantau"
|
||||
for (const child of row.childs) {
|
||||
action += `
|
||||
// data-bs-toggle="modal" data-bs-target="#mdlPantau"
|
||||
for (const child of row.childs) {
|
||||
action += `
|
||||
<a href="#"
|
||||
class="text-decoration-none me-1 btnTrackOrder" data-bs-toggle="tooltip"
|
||||
data-bs-placement="bottom" title="Tracking #${child.ord_code}"
|
||||
@ -474,7 +516,6 @@
|
||||
<span class="icon ion-map text-danger fz-16"></span>
|
||||
</a>
|
||||
`;
|
||||
}
|
||||
}
|
||||
action += `
|
||||
<a href="#"
|
||||
@ -506,7 +547,7 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
data: 'c_name',
|
||||
data: 'c_pt_name',
|
||||
className: 'text-start',
|
||||
visible: true,
|
||||
orderable: true,
|
||||
@ -520,8 +561,9 @@
|
||||
// },
|
||||
render: function(data, type, row, meta) {
|
||||
let txt = data;
|
||||
console.log("row:", row);
|
||||
for (const child of row.childs) {
|
||||
txt += '<br>' + child.c_name;
|
||||
txt += '<br>' + child.c_pt_name;
|
||||
}
|
||||
return txt;
|
||||
},
|
||||
@ -540,29 +582,29 @@
|
||||
return txt;
|
||||
},
|
||||
},
|
||||
{
|
||||
data: 'vdr_name',
|
||||
className: 'text-start',
|
||||
visible: true,
|
||||
orderable: true,
|
||||
searchable: true,
|
||||
render: function(data, type, row, meta) {
|
||||
let txt = '';
|
||||
if (data) {
|
||||
txt += data;
|
||||
} else {
|
||||
txt += `<span class="text-danger">belum ditugaskan</span>`;
|
||||
}
|
||||
for (const child of row.childs) {
|
||||
if (child.vdr_name) {
|
||||
txt += '<br>' + child.vdr_name;
|
||||
} else {
|
||||
txt += `<br><span class="text-danger">belum ditugaskan</span>`;
|
||||
}
|
||||
}
|
||||
return txt;
|
||||
},
|
||||
},
|
||||
// {
|
||||
// data: 'vdr_name',
|
||||
// className: 'text-start',
|
||||
// visible: true,
|
||||
// orderable: true,
|
||||
// searchable: true,
|
||||
// render: function(data, type, row, meta) {
|
||||
// let txt = '';
|
||||
// if (data) {
|
||||
// txt += data;
|
||||
// } else {
|
||||
// txt += `<span class="text-danger">belum ditugaskan</span>`;
|
||||
// }
|
||||
// for (const child of row.childs) {
|
||||
// if (child.vdr_name) {
|
||||
// txt += '<br>' + child.vdr_name;
|
||||
// } else {
|
||||
// txt += `<br><span class="text-danger">belum ditugaskan</span>`;
|
||||
// }
|
||||
// }
|
||||
// return txt;
|
||||
// },
|
||||
// },
|
||||
{
|
||||
data: 'vhc_nopol1',
|
||||
className: 'text-start',
|
||||
|
||||
Reference in New Issue
Block a user