feat: paginate customer orders and polish the dashboard hero
Add paged orders API and infinite scroll, short order numbers, and align the guest invite card with the logged-in hero shell. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -97,8 +97,19 @@ export class CustomerAuthController {
|
||||
|
||||
@CustomerAuth()
|
||||
@Get('me/orders')
|
||||
myOrders(@CurrentCustomer() me: AuthenticatedCustomer) {
|
||||
return this.customers.getOrders(me.id);
|
||||
myOrders(
|
||||
@CurrentCustomer() me: AuthenticatedCustomer,
|
||||
@Query('page') page?: string,
|
||||
@Query('limit') limit?: string,
|
||||
@Query('status') status?: string,
|
||||
@Query('q') q?: string,
|
||||
) {
|
||||
return this.customers.getOrders(me.id, {
|
||||
page: Number(page) || 1,
|
||||
limit: limit !== undefined && limit !== '' ? Number(limit) : undefined,
|
||||
status,
|
||||
q,
|
||||
});
|
||||
}
|
||||
|
||||
@CustomerAuth()
|
||||
|
||||
Reference in New Issue
Block a user