admin user and ui panel

This commit is contained in:
s.esmaeili
2026-09-21 08:32:31 +03:30
parent 79226c9f13
commit ef1d4638cc
341 changed files with 2270 additions and 657 deletions
@@ -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')