admin user and ui panel
This commit is contained in:
@@ -65,6 +65,14 @@ export class AdminCustomersController {
|
||||
return this.customers.listSingle(query, admin.branchId ?? undefined);
|
||||
}
|
||||
|
||||
/** Legacy `POST single` — singleCustomer.vue, the retail customer form. */
|
||||
@Post('single')
|
||||
@HttpCode(200)
|
||||
@RequirePermission('persons.create')
|
||||
createSingle(@Body() data: Record<string, unknown>) {
|
||||
return this.customers.createSingle(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy `GET query/reagent` — the sales-expert picker used by the customer
|
||||
* form. Returns a plain array of {id, name}, as legacy did.
|
||||
@@ -104,6 +112,13 @@ export class AdminCustomersController {
|
||||
return this.customers.listReagents(query);
|
||||
}
|
||||
|
||||
/** A sales agent's own detail screen — see reagentDetail()'s header comment. */
|
||||
@Get('reagent/:id')
|
||||
@RequirePermission('persons.list.sellers.view')
|
||||
reagentDetail(@Param('id') id: string) {
|
||||
return this.customers.reagentDetail(id);
|
||||
}
|
||||
|
||||
/** Legacy `GET single/order/{id}` — that customer's orders. */
|
||||
@Get(':id/orders')
|
||||
@RequirePermission('persons.list.client.omde.view.orders')
|
||||
|
||||
Reference in New Issue
Block a user