refactor: change condition for active only filter
This commit is contained in:
parent
9426a6b3ba
commit
a62d729ce6
1 changed files with 3 additions and 3 deletions
|
|
@ -273,13 +273,13 @@ export class EmployeeController extends Controller {
|
|||
AND: {
|
||||
...filterStatus(activeOnly ? Status.ACTIVE : status),
|
||||
customerBranch: {
|
||||
...filterStatus(activeOnly ? Status.ACTIVE : status),
|
||||
status: activeOnly ? { not: Status.INACTIVE } : undefined,
|
||||
id: customerBranchId,
|
||||
customerId,
|
||||
customer: isSystem(req.user)
|
||||
? filterStatus(activeOnly ? Status.ACTIVE : status)
|
||||
? { status: activeOnly ? { not: Status.INACTIVE } : undefined }
|
||||
: {
|
||||
...filterStatus(activeOnly ? Status.ACTIVE : status),
|
||||
status: activeOnly ? { not: Status.INACTIVE } : undefined,
|
||||
registeredBranch: {
|
||||
OR: permissionCond(req.user, { activeOnly: activeOnly }),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue