Merge pull request #69 from R0m1k3/1.1

Add pagination to orders and center the difference column with right-…
This commit is contained in:
LogiFlow authored and GitHub committed 2025-08-13 08:51:46 +02:00
commit bdc3b0dac6
2 files changed
+5 -2

No files matched your search

+3 -1
View File
@@ -434,6 +434,7 @@ export default function BLReconciliation() {
</div> </div>
</td> </td>
<td className="px-6 py-4 whitespace-nowrap text-center"> <td className="px-6 py-4 whitespace-nowrap text-center">
<div className="flex justify-center">
{(() => { {(() => {
const blAmount = delivery.blAmount ? parseFloat(delivery.blAmount) : 0; const blAmount = delivery.blAmount ? parseFloat(delivery.blAmount) : 0;
const invoiceAmount = delivery.invoiceAmount ? parseFloat(delivery.invoiceAmount) : 0; const invoiceAmount = delivery.invoiceAmount ? parseFloat(delivery.invoiceAmount) : 0;
@@ -441,7 +442,7 @@ export default function BLReconciliation() {
const diff = blAmount - invoiceAmount; const diff = blAmount - invoiceAmount;
const diffAbs = Math.abs(diff); const diffAbs = Math.abs(diff);
return ( return (
<div className={`font-medium ${ <div className={`font-medium text-right ${
diff === 0 ? 'text-green-600' : diff === 0 ? 'text-green-600' :
diffAbs > 10 ? 'text-red-600' : 'text-orange-600' diffAbs > 10 ? 'text-red-600' : 'text-orange-600'
}`}> }`}>
@@ -451,6 +452,7 @@ export default function BLReconciliation() {
} }
return <span className="text-gray-400 italic text-xs">-</span>; return <span className="text-gray-400 italic text-xs">-</span>;
})()} })()}
</div>
</td> </td>
<td className="px-6 py-4 whitespace-nowrap"> <td className="px-6 py-4 whitespace-nowrap">
<div className="text-sm text-gray-900"> <div className="text-sm text-gray-900">
+2 -1
View File
@@ -411,6 +411,7 @@ export default function Orders() {
</div> </div>
{/* Pagination */} {/* Pagination */}
<div className="p-4 border-t border-gray-200">
<Pagination <Pagination
currentPage={currentPage} currentPage={currentPage}
totalPages={totalPages} totalPages={totalPages}
@@ -418,10 +419,10 @@ export default function Orders() {
itemsPerPage={itemsPerPage} itemsPerPage={itemsPerPage}
onPageChange={setCurrentPage} onPageChange={setCurrentPage}
onItemsPerPageChange={setItemsPerPage} onItemsPerPageChange={setItemsPerPage}
className="mt-4 p-4 border-t border-gray-200"
/> />
</div> </div>
</div> </div>
</div>
)} )}
</div> </div>