feat; add query string to include customer on get list

This commit is contained in:
Methapon2001 2024-06-10 09:41:24 +07:00
parent dcfa543479
commit 43b97be4f1

View file

@ -111,6 +111,7 @@ export class CustomerBranchController extends Controller {
async list(
@Query() zipCode?: string,
@Query() customerId?: string,
@Query() includeCustomer?: boolean,
@Query() query: string = "",
@Query() page: number = 1,
@Query() pageSize: number = 30,
@ -128,6 +129,7 @@ export class CustomerBranchController extends Controller {
prisma.customerBranch.findMany({
orderBy: { createdAt: "asc" },
include: {
customer: includeCustomer,
province: true,
district: true,
subDistrict: true,