fix: active regis branch only not work
This commit is contained in:
parent
3f04bd045d
commit
db3bdfb25d
1 changed files with 3 additions and 1 deletions
|
|
@ -214,8 +214,10 @@ export class CustomerBranchController extends Controller {
|
|||
? {
|
||||
registeredBranchId,
|
||||
registeredBranch: branchActiveOnlyCond(activeRegisBranchOnly),
|
||||
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||
}
|
||||
: {
|
||||
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||
registeredBranch: {
|
||||
AND: { id: registeredBranchId },
|
||||
OR: company
|
||||
|
|
@ -225,7 +227,7 @@ export class CustomerBranchController extends Controller {
|
|||
},
|
||||
customerId,
|
||||
subDistrict: zipCode ? { zipCode } : undefined,
|
||||
...filterStatus(status),
|
||||
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||
},
|
||||
} satisfies Prisma.CustomerBranchWhereInput;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue