modifications of file upload and tender upload
parent
20f1d829ea
commit
0625d414ed
@ -1,4 +1,14 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller,UseGuards } from '@nestjs/common';
|
||||
import { TenderDetailDto } from 'src/dto/tender-master.dto';
|
||||
import { PcdTransactionController } from 'src/framework/beans/pcd-transaction.controller';
|
||||
import { TenderService } from './tender.service';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@UseGuards(AuthGuard())
|
||||
@Controller('tender')
|
||||
export class TenderController {}
|
||||
export class TenderController extends PcdTransactionController<TenderDetailDto> {
|
||||
constructor(
|
||||
private tenderService: TenderService
|
||||
) {
|
||||
super(tenderService);
|
||||
}}
|
||||
|
||||
@ -1,7 +1,33 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { TenderDetailDto } from 'src/dto/tender-master.dto';
|
||||
import { PcdTransactionService } from 'src/framework/beans/pcd-transaction.service';
|
||||
import { TransactionDetailDto } from 'src/framework/custom/transaction-detail.dto';
|
||||
import { tenderDocRepository } from 'src/tables/tender-documents/tender-doc.repository';
|
||||
import { TenderMasterRepository } from 'src/tables/tender-master/tender-master.repository';
|
||||
import { Connection } from 'typeorm';
|
||||
|
||||
@Injectable()
|
||||
export class TenderService{}
|
||||
export class TenderService extends PcdTransactionService<TenderDetailDto>{
|
||||
MAIN_KEY: string = 'id';
|
||||
|
||||
DETAIL_DATA_FORMAT: TransactionDetailDto[] = [
|
||||
{
|
||||
detailName: "tenderDoc", repo: this.conn.getCustomRepository(tenderDocRepository),
|
||||
filter: [{ columnName: "tenderId", headerColumn: "id" }],
|
||||
foreignKeyColumnName: "tenderId",
|
||||
childDetail: [],
|
||||
addtionalSettingOfRowsInInsertion: [],
|
||||
orderByColumn: { columnName: "id", sort: "DESC" }
|
||||
}
|
||||
];
|
||||
constructor(
|
||||
private conn: Connection,
|
||||
@InjectRepository(TenderMasterRepository)
|
||||
private tenderMasterRepository: TenderMasterRepository,
|
||||
){
|
||||
super(conn, conn.getCustomRepository(TenderMasterRepository));
|
||||
// this.TenderMasterRepository = conn.getCustomRepository(SisPaymentDetailRepository)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue