Tabla de inventario agregada
This commit is contained in:
11
apps/web/feactures/inventory/utils/date-utils.ts
Normal file
11
apps/web/feactures/inventory/utils/date-utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export function formatDate(date: Date): string {
|
||||
return new Intl.DateTimeFormat('es-ES', {
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
year: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
}).format(date);
|
||||
}
|
||||
|
||||
|
||||
16
apps/web/feactures/inventory/utils/searchparams.ts
Normal file
16
apps/web/feactures/inventory/utils/searchparams.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
createSearchParamsCache,
|
||||
createSerializer,
|
||||
parseAsInteger,
|
||||
parseAsString,
|
||||
} from 'nuqs/server';
|
||||
|
||||
export const searchParams = {
|
||||
page: parseAsInteger.withDefault(1),
|
||||
limit: parseAsInteger.withDefault(10),
|
||||
q: parseAsString,
|
||||
type: parseAsString,
|
||||
};
|
||||
|
||||
export const searchParamsCache = createSearchParamsCache(searchParams);
|
||||
export const serialize = createSerializer(searchParams);
|
||||
Reference in New Issue
Block a user