ajaxify the product admin page

This commit is contained in:
imperosol
2024-12-14 00:10:34 +01:00
parent 3fc260a12c
commit 39b36aa509
8 changed files with 188 additions and 67 deletions

View File

@ -22,10 +22,13 @@ type PaginatedEndpoint<T> = <ThrowOnError extends boolean = false>(
// TODO : If one day a test workflow is made for JS in this project
// please test this function. A all cost.
/**
* Load complete dataset from paginated routes.
*/
export const paginated = async <T>(
endpoint: PaginatedEndpoint<T>,
options?: PaginatedRequest,
) => {
): Promise<T[]> => {
const maxPerPage = 199;
const queryParams = options ?? {};
queryParams.query = queryParams.query ?? {};

View File

@ -198,6 +198,9 @@ body {
margin: 20px auto 0;
/*---------------------------------NAV---------------------------------*/
a.btn {
display: inline-block;
}
.btn {
font-size: 15px;
font-weight: normal;
@ -409,6 +412,11 @@ body {
}
}
.row {
display: flex;
flex-wrap: wrap;
}
/*---------------------------------NEWS--------------------------------*/
#news {
display: flex;