feat: refactor sales invoice services and introduce pagination and filtering
- Added SharedSaleInvoicePaginationService for handling pagination logic. - Introduced SharedSaleInvoiceFilterService to centralize filtering logic for sales invoices. - Updated SalesInvoicesService to utilize the new pagination and filtering services. - Refactored findAll methods in SalesInvoicesService, CustomerSaleInvoicesService, and other related services to support pagination and filtering. - Enhanced DTOs for sales invoice filtering to extend shared filter properties. - Updated module imports to include new services. - Cleaned up redundant code related to filtering and pagination across various services.
This commit is contained in:
@@ -2,6 +2,7 @@ import { QUERY_CONSTANTS } from '@/common/queryConstants'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { UpdateBusinessActivityDto } from './dto/poses.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PosesService {
|
||||
@@ -43,7 +44,7 @@ export class PosesService {
|
||||
})
|
||||
}
|
||||
|
||||
async update(consumer_id: string, id: string, data: any) {
|
||||
async update(consumer_id: string, id: string, data: UpdateBusinessActivityDto) {
|
||||
const pos = await this.prisma.pos.update({
|
||||
where: { ...this.defaultWhere(consumer_id), id },
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user