fix: branch under headquarter display condition
This commit is contained in:
parent
2151123897
commit
0d41f60829
1 changed files with 3 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ export class BranchController extends Controller {
|
|||
branch: tree
|
||||
? {
|
||||
where: {
|
||||
AND: { OR: permissionCond(req.user, true) },
|
||||
AND: { OR: permissionCond(req.user) },
|
||||
OR: [
|
||||
{ nameEN: { contains: query } },
|
||||
{ name: { contains: query } },
|
||||
|
|
@ -321,6 +321,7 @@ export class BranchController extends Controller {
|
|||
@Get("{branchId}")
|
||||
@Security("keycloak")
|
||||
async getBranchById(
|
||||
@Request() req: RequestWithUser,
|
||||
@Path() branchId: string,
|
||||
@Query() includeSubBranch?: boolean,
|
||||
@Query() includeContact?: boolean,
|
||||
|
|
@ -333,6 +334,7 @@ export class BranchController extends Controller {
|
|||
createdBy: true,
|
||||
updatedBy: true,
|
||||
branch: includeSubBranch && {
|
||||
where: { AND: { OR: permissionCond(req.user) } },
|
||||
include: {
|
||||
province: true,
|
||||
district: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue