Skip to content

Commit

Permalink
feat: [develop] fix #444
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos1195 committed Oct 8, 2024
1 parent 4ccf14e commit 79b4f0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { DocumentContractEntity } from '../entities/document-contract.entity';
import { InjectRepository } from '@nestjs/typeorm';
import { LessThanOrEqual, MoreThanOrEqual, Repository } from 'typeorm';
import { In, LessThanOrEqual, MoreThanOrEqual, Not, Repository } from 'typeorm';
import { RepositoryWithPagination } from 'src/infrastructure/base/repository-with-pagination.class';
import {
CreateDocumentContractOptions,
Expand Down Expand Up @@ -75,6 +75,12 @@ export class DocumentContractRepositoryService extends RepositoryWithPagination<
volunteerId: options.volunteerId,
documentStartDate: LessThanOrEqual(options.documentEndDate),
documentEndDate: MoreThanOrEqual(options.documentStartDate),
status: Not(
In([
DocumentContractStatus.REJECTED_NGO,
DocumentContractStatus.REJECTED_VOLUNTEER,
]),
),
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export class DocumentPDFGenerator {
documentContractId,
);

console.log(documentContract);

const contractPDFVariables: ContractPDFVariables = {
documentContractNumber: documentContract.documentNumber,
documentContractDate: format(documentContract.documentDate, 'dd-MM-yyyy'),
Expand Down

0 comments on commit 79b4f0e

Please sign in to comment.