diff --git a/src/app.css b/src/app.css index 3ff1bf1..19697bf 100644 --- a/src/app.css +++ b/src/app.css @@ -2,4 +2,9 @@ table td { vertical-align: top; text-align: left; + word-wrap: break-word; + overflow-wrap: break-word; + /* word-break: break-all; */ + white-space: pre-line; + max-width: 20rem; /* adjust as needed */ } \ No newline at end of file diff --git a/src/lib/Pagination.svelte b/src/lib/Pagination.svelte new file mode 100644 index 0000000..d0c6c85 --- /dev/null +++ b/src/lib/Pagination.svelte @@ -0,0 +1,65 @@ + + +
+ + + + + {#each pageWindow as page, i} + {#if page === "..."} + ... + {:else} + + {/if} + {/each} + + + +
diff --git a/src/routes/backoffice/project/+page.svelte b/src/routes/backoffice/project/+page.svelte index 4ea5d13..41245e7 100644 --- a/src/routes/backoffice/project/+page.svelte +++ b/src/routes/backoffice/project/+page.svelte @@ -1,6 +1,7 @@ @@ -571,9 +571,13 @@ {:else} toggleSort(col.key)} > + {col.title} + {#if sortColumn === col.key} + {sortOrder === 'asc' ? ' 🔼' : ' 🔽'} + {/if} {/if} {/each} @@ -634,7 +638,15 @@ row[ col.key as keyof TimesheetDisplay ] as string | number | Date, - ).toLocaleDateString() + ).toLocaleDateString("en-GB", { + timeZone: "Asia/Singapore", + day: "2-digit", + month: "2-digit", + year: "numeric", + hour: "2-digit", + minute: "2-digit", + hour12: false, + }) : "N/A"} {:else if col.key === "total_hours_work"} @@ -646,7 +658,18 @@ {row[col.key] !== undefined ? new Date( row[col.key]!, - ).toLocaleDateString() + ).toLocaleDateString( + "en-GB", + { + timeZone: "Asia/Singapore", + day: "2-digit", + month: "2-digit", + year: "numeric", + hour: "2-digit", + minute: "2-digit", + hour12: false, + }, + ) : "N/A"} {:else if col.key === "villa_name"} @@ -684,12 +707,13 @@ ? new Date(row[col.key]).toLocaleString( "en-GB", { - day: "2-digit", - month: "2-digit", - year: "numeric", - hour: "2-digit", - minute: "2-digit", - hour12: false, + timeZone: "Asia/Singapore", + day: "2-digit", + month: "2-digit", + year: "numeric", + hour: "2-digit", + minute: "2-digit", + hour12: false, }, ) : "N/A"} @@ -709,39 +733,11 @@
- Showing {(currentPage - 1) * rowsPerPage + 1}– - {Math.min(currentPage * rowsPerPage, allRows.length)} of {allRows.length} + Showing {(currentPage - 1) * rowsPerPage + 1}–{Math.min(currentPage * rowsPerPage, allRows.length)} + of {allRows.length}
-
- - {#each Array(totalPages) - .fill(0) - .map((_, i) => i + 1) as page} - - {/each} - -
-
+ +