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,
|
registeredBranchId,
|
||||||
registeredBranch: branchActiveOnlyCond(activeRegisBranchOnly),
|
registeredBranch: branchActiveOnlyCond(activeRegisBranchOnly),
|
||||||
|
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||||
registeredBranch: {
|
registeredBranch: {
|
||||||
AND: { id: registeredBranchId },
|
AND: { id: registeredBranchId },
|
||||||
OR: company
|
OR: company
|
||||||
|
|
@ -225,7 +227,7 @@ export class CustomerBranchController extends Controller {
|
||||||
},
|
},
|
||||||
customerId,
|
customerId,
|
||||||
subDistrict: zipCode ? { zipCode } : undefined,
|
subDistrict: zipCode ? { zipCode } : undefined,
|
||||||
...filterStatus(status),
|
...filterStatus(activeRegisBranchOnly ? Status.ACTIVE : status),
|
||||||
},
|
},
|
||||||
} satisfies Prisma.CustomerBranchWhereInput;
|
} satisfies Prisma.CustomerBranchWhereInput;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue