Skip to content

Commit

Permalink
small myPage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Nov 6, 2023
1 parent 2f69fa2 commit 383bf0f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/features/need/need.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,6 @@ export class NeedService {
ngoIds: number[],
needWithSignatures: number[],
): Promise<Paginated<Need>> {
// console.log(ngoIds);
console.log(swIds);
// return

const queryBuilder = this.flaskNeedRepository
.createQueryBuilder('need')
.leftJoinAndMapOne(
Expand Down Expand Up @@ -727,7 +723,7 @@ export class NeedService {
swIds: socialWorker ? [socialWorker] : [...swIds],
})
.andWhere('child.id_ngo IN (:...ngoIds)', { ngoIds: ngoIds }) // it should be on here since the last column of myPage we do not need to show ngo supervisors the other sw's needs / no need to sign by ngo supervisor

// .andWhere('need_receipt.deleted = :receiptDeleted', { receiptDeleted: null })
.andWhere('need.isDeleted = :needDeleted', { needDeleted: false })
.andWhere(
new Brackets((qb) => {
Expand Down Expand Up @@ -789,7 +785,7 @@ export class NeedService {
.cache(60000);
return await nestPaginate<Need>(options, queryBuilder, {
sortableColumns: ['id'],
defaultSortBy: [['updated', 'DESC']],
defaultSortBy: [['type', 'DESC']],
nullSort: 'last',
});
}
Expand Down Expand Up @@ -858,9 +854,9 @@ export class NeedService {
startDate: new Date(2019, 1, 1),
})
.andWhere('need.confirmDate < :endDate', { endDate: date })
.andWhere('need.status = :statusNotPaid', {
statusNotPaid: PaymentStatusEnum.NOT_PAID,
})
// .andWhere('need.status = :statusNotPaid', {
// statusNotPaid: PaymentStatusEnum.NOT_PAID,
// })
.select([
'need.id',
'need.status',
Expand Down

0 comments on commit 383bf0f

Please sign in to comment.