mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
refactor(nestjs): add sale receipts retrieval and metadata configuration
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
ParseIntPipe,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
} from '@nestjs/common';
|
||||
import { SaleReceiptApplication } from './SaleReceiptApplication.service';
|
||||
import { ApiOperation, ApiParam, ApiTags } from '@nestjs/swagger';
|
||||
@@ -15,6 +16,7 @@ import {
|
||||
CreateSaleReceiptDto,
|
||||
EditSaleReceiptDto,
|
||||
} from './dtos/SaleReceipt.dto';
|
||||
import { ISalesReceiptsFilter } from './types/SaleReceipts.types';
|
||||
|
||||
@Controller('sale-receipts')
|
||||
@ApiTags('sale-receipts')
|
||||
@@ -80,6 +82,12 @@ export class SaleReceiptsController {
|
||||
return this.saleReceiptApplication.getSaleReceipt(id);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'Retrieves the sale receipts paginated list' })
|
||||
getSaleReceipts(@Query() filterDTO: Partial<ISalesReceiptsFilter>) {
|
||||
return this.saleReceiptApplication.getSaleReceipts(filterDTO);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@ApiOperation({ summary: 'Delete the given sale receipt.' })
|
||||
@ApiParam({
|
||||
|
||||
Reference in New Issue
Block a user