changes of dashboard and order , requests
This commit is contained in:
BIN
public/invoices/invoice-INV-2025-000051.pdf
Normal file
BIN
public/invoices/invoice-INV-2025-000051.pdf
Normal file
Binary file not shown.
@@ -48,7 +48,7 @@ body {
|
||||
|
||||
/* top actions row */
|
||||
.top-actions {
|
||||
display:flex; align-items:center; justify-content:space-between;
|
||||
align-items:center; justify-content:space-between;
|
||||
gap:12px; margin:16px 0 20px 0; flex-wrap:wrap;
|
||||
}
|
||||
.top-actions .left {
|
||||
@@ -67,7 +67,7 @@ body {
|
||||
cursor:pointer; transition: transform .15s ease, box-shadow .15s;
|
||||
}
|
||||
.btn.ghost { background: transparent; color:var(--primary-1); border:1.5px solid #dbe4f5; box-shadow:none; }
|
||||
.btn:hover{ transform: translateY(-3px); box-shadow: 0 8px 26px rgba(36,58,114,0.12); }
|
||||
.btn:hover{ transform: translateY(-3px); box-shadow: 0 8px 26px rgba(227, 229, 234, 0.12); }
|
||||
|
||||
/* account panels */
|
||||
.account-panels {
|
||||
@@ -89,12 +89,12 @@ body {
|
||||
background: var(--card-bg);
|
||||
border-radius:12px;
|
||||
box-shadow:0 8px 20px rgba(25,40,80,0.06);
|
||||
padding:22px;
|
||||
padding:20px; /* 005 */
|
||||
box-sizing:border-box;
|
||||
overflow-x:auto;
|
||||
transition: transform .12s, box-shadow .12s;
|
||||
min-height: 520px;
|
||||
display: flex;
|
||||
/* display: flex; */ /* 005 */
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
@@ -205,8 +205,8 @@ tr:hover td{ background:#fbfdff; }
|
||||
.toggle-switch-btn {
|
||||
appearance:none;
|
||||
-webkit-appearance:none;
|
||||
width:60px;
|
||||
height:24px;
|
||||
width:64px;
|
||||
height:26.5px; /* 005 */
|
||||
background:#f25b5b;
|
||||
border:2px solid #f25b5b;
|
||||
border-radius:999px;
|
||||
@@ -313,7 +313,7 @@ tr:hover td{ background:#fbfdff; }
|
||||
margin-top: 15px;
|
||||
padding: 12px 0;
|
||||
border-top: 1px solid #eef3fb;
|
||||
margin-right:550px;
|
||||
/* margin-right:550px; */
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
@@ -326,14 +326,15 @@ tr:hover td{ background:#fbfdff; }
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-right:-1050px;
|
||||
position: absolute;
|
||||
right: 16px; /* 005 */
|
||||
|
||||
}
|
||||
.pagination-controls1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-right:-550px;
|
||||
/* margin-right:-550px; */
|
||||
|
||||
}
|
||||
|
||||
@@ -563,7 +564,7 @@ tr:hover td{ background:#fbfdff; }
|
||||
|
||||
/* Combined filters row styling */
|
||||
.combined-filters-row {
|
||||
display: flex;
|
||||
display: ruby; /* 005 */
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
@@ -576,8 +577,8 @@ tr:hover td{ background:#fbfdff; }
|
||||
}
|
||||
|
||||
.right{
|
||||
margin-left:auto;
|
||||
margin-top:-16px;
|
||||
/* margin-left:auto;
|
||||
margin-top:-16px; */ /* 005 */
|
||||
}
|
||||
|
||||
.filter-group1 {
|
||||
@@ -953,6 +954,15 @@ tr:hover td{ background:#fbfdff; }
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.combined-top-row .btn:hover {
|
||||
color: #ffffff !important;
|
||||
background-color: inherit !important;
|
||||
border-color: inherit !important;
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
|
||||
.remove-order-btn:hover {
|
||||
background: #d42c3f;
|
||||
}
|
||||
@@ -1314,7 +1324,7 @@ html, body {
|
||||
<div class="create-order-modal" id="createOrderModal">
|
||||
<div class="modal-box">
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;">
|
||||
<div style="font-size:20px; font-weight:800; color:var(--primary-1)">Create New Installment</div>
|
||||
<div style="font-size:20px; font-weight:800;">Create New Installment</div>
|
||||
<button class="btn ghost" id="closeCreateModal" title="Close create form">✕</button>
|
||||
</div>
|
||||
|
||||
@@ -2774,85 +2784,76 @@ async function submitEditEntry(e) {
|
||||
}
|
||||
|
||||
|
||||
function openEntryOrdersModal(entryNo) {
|
||||
// header la entry no show kar
|
||||
document.getElementById('entryOrdersEntryNo-span').textContent = `(${entryNo})`;
|
||||
function openEntryOrdersModal(entryNo) {
|
||||
document.getElementById('entryOrdersEntryNo-span').textContent = `(${entryNo})`;
|
||||
|
||||
// table clean / loading state
|
||||
const tbody = document.getElementById('entryOrdersTableBody');
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Loading orders...</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
// API call: /admin/account/entry-orders/{entryno}
|
||||
jsonFetch(`/admin/account/entry-orders/${encodeURIComponent(entryNo)}`, {
|
||||
method: 'GET'
|
||||
})
|
||||
.then(res => {
|
||||
if (!res.success) {
|
||||
const tbody = document.getElementById('entryOrdersTableBody');
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Failed to load orders</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Loading orders...</td>
|
||||
</tr>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
const orders = res.orders || [];
|
||||
if (!orders.length) {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">No orders associated with this entry</td>
|
||||
</tr>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
jsonFetch(`/admin/account/entry-orders/${encodeURIComponent(entryNo)}`, {
|
||||
method: 'GET'
|
||||
})
|
||||
.then(res => {
|
||||
if (!res.success) {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Failed to load orders</td>
|
||||
</tr>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
tbody.innerHTML = '';
|
||||
orders.forEach(order => {
|
||||
const tr = document.createElement('tr');
|
||||
const orders = res.orders || [];
|
||||
if (!orders.length) {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">No orders associated with this entry</td>
|
||||
</tr>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
|
||||
const idString = (order.orderid ?? order.id ?? '').toString().trim();
|
||||
const numericId = parseInt(idString, 10);
|
||||
const formattedId = isNaN(numericId)
|
||||
? escapeHtml(idString)
|
||||
: 'KNT-25-' + String(numericId).padStart(8, '0');
|
||||
tbody.innerHTML = '';
|
||||
|
||||
// इथे वेगवेगळी शक्य keys try कर
|
||||
const amountValue =
|
||||
order.ttl_amount ??
|
||||
order.ttlamount ??
|
||||
order.total_amount ??
|
||||
order.order_amount ??
|
||||
order.amount ??
|
||||
0;
|
||||
orders.forEach(order => {
|
||||
const tr = document.createElement('tr');
|
||||
|
||||
tr.innerHTML = `
|
||||
<td>${formattedId}</td>
|
||||
<td>${escapeHtml(order.markno ?? order.mark_no ?? '')}</td>
|
||||
<td>${escapeHtml(order.origin ?? '')}</td>
|
||||
<td>${escapeHtml(order.destination ?? '')}</td>
|
||||
<td>${escapeHtml(order.ctn ?? '')}</td>
|
||||
<td>${escapeHtml(order.qty ?? '')}</td>
|
||||
<td>${formatCurrency(amountValue)}</td>
|
||||
`;
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
const amountValue =
|
||||
order.ttl_amount ??
|
||||
order.ttlamount ??
|
||||
order.total_amount ??
|
||||
order.order_amount ??
|
||||
order.amount ??
|
||||
0;
|
||||
|
||||
tr.innerHTML = `
|
||||
<td>${escapeHtml(order.order_id)}</td>
|
||||
<td>${escapeHtml(order.mark_no ?? '')}</td>
|
||||
<td>${escapeHtml(order.origin ?? '')}</td>
|
||||
<td>${escapeHtml(order.destination ?? '')}</td>
|
||||
<td>${escapeHtml(order.ctn ?? '')}</td>
|
||||
<td>${escapeHtml(order.qty ?? '')}</td>
|
||||
<td>${formatCurrency(amountValue)}</td>
|
||||
`;
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Error loading orders</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
tbody.innerHTML = `
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">Error loading orders</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
document.getElementById('entryOrdersModal').classList.add('modal-open');
|
||||
}
|
||||
|
||||
document.getElementById('entryOrdersModal').classList.add('modal-open');
|
||||
}
|
||||
|
||||
function closeEntryOrdersModal() {
|
||||
document.getElementById('entryOrdersModal').classList.remove('modal-open');
|
||||
|
||||
@@ -1400,6 +1400,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@forelse($availableOrders as $order)
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user