feat: allow filter profit range
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s
This commit is contained in:
parent
9bd24b5a83
commit
5d78166047
1 changed files with 1 additions and 2 deletions
|
|
@ -316,7 +316,6 @@ export class StatsController extends Controller {
|
||||||
@Get("profit")
|
@Get("profit")
|
||||||
async profit(
|
async profit(
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
@Query() limit?: number,
|
|
||||||
@Query() startDate?: Date,
|
@Query() startDate?: Date,
|
||||||
@Query() endDate?: Date,
|
@Query() endDate?: Date,
|
||||||
) {
|
) {
|
||||||
|
|
@ -367,9 +366,9 @@ export class StatsController extends Controller {
|
||||||
registeredBranch: {
|
registeredBranch: {
|
||||||
OR: permissionCondCompany(req.user),
|
OR: permissionCondCompany(req.user),
|
||||||
},
|
},
|
||||||
|
createdAt: { gte: startDate, lte: endDate },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
take: limit,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = record.map((v) => {
|
const data = record.map((v) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue