chore: add announcement logic
This commit is contained in:
@@ -7,10 +7,10 @@ import { Invoice } from "../entities/invoice.entity";
|
||||
|
||||
export class InvoicesRepository extends EntityRepository<Invoice> {
|
||||
//
|
||||
async getInvoicesForAdmin(queryDto: InvoicesSearchQueryDto) {
|
||||
async getInvoicesForAdmin(queryDto: InvoicesSearchQueryDto, businessId: string) {
|
||||
const { limit, skip } = PaginationUtils(queryDto);
|
||||
|
||||
const where: FilterQuery<Invoice> = {};
|
||||
const where: FilterQuery<Invoice> = { business: { id: businessId } };
|
||||
|
||||
if (queryDto.q) {
|
||||
where.$or = [
|
||||
@@ -25,7 +25,7 @@ export class InvoicesRepository extends EntityRepository<Invoice> {
|
||||
}
|
||||
|
||||
if (queryDto.companyId) {
|
||||
where.company = queryDto.companyId;
|
||||
where.company = { id: queryDto.companyId };
|
||||
}
|
||||
|
||||
if (queryDto.since || queryDto.to) {
|
||||
|
||||
Reference in New Issue
Block a user