new modifications

main
sajan 3 years ago
parent 9f881ed54e
commit 809566a2ef

@ -0,0 +1,13 @@
export class PurchaseDto {
amount: number;
application: number;
mobile: string;
email: string;
type: string;
}

@ -108,12 +108,18 @@ export class LoginComponent implements OnInit {
localStorage.setItem('username', res.username); localStorage.setItem('username', res.username);
localStorage.setItem('userId', res.userId); localStorage.setItem('userId', res.userId);
localStorage.setItem('mobile', res.mobile);
localStorage.setItem('seculevel', res.secuLevel); localStorage.setItem('seculevel', res.secuLevel);
}, (err) => { }, (err) => {
console.log("err=1=", err); console.log("err=1=", err);
this._ui.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi')); this._ui.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi'));
}); });
let returnUrl = localStorage.getItem('returnUrl')
if(returnUrl){
this.router.navigate([returnUrl]);
localStorage.removeItem('returnUrl')
}
else
this.router.navigate([routePath.dashboard]); this.router.navigate([routePath.dashboard]);
// this.service.patchToken() // this.service.patchToken()
this.user.password = ''; this.user.password = '';

@ -169,35 +169,35 @@
<tbody> <tbody>
<tr> <tr>
<th >Published Date</th> <th >Published Date</th>
<td class="col-md-6" >{{tenderData.publishDate}}</td> <td class="col-md-6" >{{tenderData.publishDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Document Download / Sale Start Date</th> <th>Document Download / Sale Start Date</th>
<td>{{tenderData.saleStartDate}}</td> <td>{{tenderData.saleStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Clarification Start Date</th> <th>Clarification Start Date</th>
<td>{{tenderData.clarificationStartDate}}</td> <td>{{tenderData.clarificationStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Document Download / Sale End Date</th> <th>Document Download / Sale End Date</th>
<td>{{tenderData.saleEndDate}}</td> <td>{{tenderData.saleEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Clarification End Date</th> <th>Clarification End Date</th>
<td>{{tenderData.clarificationEndDate}}</td> <td>{{tenderData.clarificationEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Submission Start Date</th> <th>Bid Submission Start Date</th>
<td>{{tenderData.bidSubStartDate}}</td> <td>{{tenderData.bidSubStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Submission End Date</th> <th>Bid Submission End Date</th>
<td>{{tenderData.bidSubEndDate}}</td> <td>{{tenderData.bidSubEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Opening Date</th> <th>Bid Opening Date</th>
<td>{{tenderData.bidOpenDate}}</td> <td>{{tenderData.bidOpenDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -269,7 +269,7 @@
</tr> </tr>
<tr> <tr>
<th>Pre Bid Meeting Date</th> <th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidDate}}</td> <td>{{tenderData.preBidDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<!-- <tr> <!-- <tr>
@ -312,7 +312,7 @@
<tr > <tr >
<th colspan="12">Drawings <button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="DownloadDrawings()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th> <th colspan="12">Drawings <button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="goToView()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th>
</tr> </tr>
@ -341,7 +341,7 @@
</tr> </tr>
<tr> <tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th> <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="goToView()"> <i class="bi bi-file-earmark-zip" ></i> Download </button> </th>
</tr> </tr>
</tbody> </tbody>
@ -362,7 +362,7 @@
</tr> </tr>
<tr> <tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th> <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="DownloadNIT()"> <i class="bi bi-file-earmark-zip" ></i> Download </button> </th>
</tr> </tr>
</tbody> </tbody>
@ -392,7 +392,7 @@
</tr> </tr>
<tr> <tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th> <!-- <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th> -->
</tr> </tr>

@ -2,7 +2,9 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties'; import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { MasterService } from 'src/app/_providers/_services/master.service'; import { MasterService } from 'src/app/_providers/_services/master.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
@Component({ @Component({
@ -23,7 +25,9 @@ export class ViewComponent implements OnInit {
constructor(private router: Router, constructor(private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private _masterService: MasterService) { private _masterService: MasterService,
private _ui:UiService,
private _errorTranslate:ErrorTranslateService) {
this.tenderId = +this.route.snapshot.paramMap.get('id'); this.tenderId = +this.route.snapshot.paramMap.get('id');
} }
ngOnInit(): void { ngOnInit(): void {
@ -64,42 +68,28 @@ filterDataByCategory() {
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
} }
DownloadDrawings(){ DownloadDrawingsZIP(){
const id = this.tenderId; const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{ this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{
})
}
downloadZip() {
console.log('clicked');
const id = this.tenderId;
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 10);
this._masterService.getMasterDatabyId(apiUrl.bankDocs, id).then(res => {
}, err => { }, err => {
console.log('res===>', err); console.log('res===>', err);
if (err.status == 200) { if (err.status == 200) {
console.log('start >>>'); console.log('start >>>');
// window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`); // window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`); let newWindow = window.open(`${environment.apiUrl}/${apiUrl.drawingsDownloadDocs}/${id}`);
setTimeout(() => { setTimeout(() => {
newWindow.close(); newWindow.close();
}, 100); }, 100);
} }
if (err.status == 404) { if (err.status == 404) {
alert('No Bank Document Found for the selected Tender.'); alert('No Drawings Document Found for the selected Tender.');
} }
if (err.status == 500) { if (err.status == 500) {
alert(`${err.message}`); alert(`${err.message}`);
} }
else { else {
alert(`An error Occured`); // alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`); // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => { // setTimeout(() => {
// newWindow.close(); // newWindow.close();
@ -107,9 +97,58 @@ filterDataByCategory() {
} }
}) })
// window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
} }
DownloadNIT(){
const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.noticeDownlaod,id).then((res)=>{
})
}
// downloadWITZip() {
// console.log('clicked');
// const id = this.tenderId;
// // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// // setTimeout(() => {
// // newWindow.close();
// // }, 10);
// this._masterService.getMasterDatabyId(apiUrl.bankDocs, id).then(res => {
// }, err => {
// console.log('res===>', err);
// if (err.status == 200) {
// console.log('start >>>');
// // window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
// }
// if (err.status == 404) {
// alert('No Bank Document Found for the selected Tender.');
// }
// if (err.status == 500) {
// alert(`${err.message}`);
// }
// else {
// // alert(`An error Occured`);
// // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// // setTimeout(() => {
// // newWindow.close();
// // }, 100);
// }
// })
// // window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
// }
goToView(){
this._ui.toastMessage(this._errorTranslate.translate('pleaseLogin'));
localStorage.setItem('returnUrl',`tender-view/${this.tenderId}`)
this.navigateTo('auth/login')
}
} }

@ -219,21 +219,17 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-6">
<label for="title">Title</label> <label for="title">Title</label>
<input type="text" class="form-control" id="title" <input type="text" class="form-control" id="title"
[(ngModel)]="tenderData.title" name="title"> [(ngModel)]="tenderData.title" name="title">
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-6">
<label for="workDesc">Work Description</label> <label for="workDesc">Work Description</label>
<input type="text" class="form-control" id="workDesc" <input type="text" class="form-control" id="workDesc"
[(ngModel)]="tenderData.workDesc" name="workDesc"> [(ngModel)]="tenderData.workDesc" name="workDesc">
</div> </div>
<div class="form-group col-md-4">
<label for="ndaPreQualification">Pre Qualification</label>
<input type="text" class="form-control" id="ndaPreQualification"
[(ngModel)]="tenderData.ndaPreQualification" name="ndaPreQualification">
</div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
@ -257,8 +253,17 @@
<input type="text" class="form-control" id="subCategory" <input type="text" class="form-control" id="subCategory"
[(ngModel)]="tenderData.subCategory" name="subCategory"> [(ngModel)]="tenderData.subCategory" name="subCategory">
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4">
<label for="ndaPreQualification">Pre Qualification</label>
<input type="text" class="form-control" id="ndaPreQualification"
[(ngModel)]="tenderData.ndaPreQualification" name="ndaPreQualification">
</div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="bidValidity">Bid Validity(Days)</label> <label for="bidValidity">Bid Validity(Days)</label>
<input type="number" class="form-control" id="bidValidity" <input type="number" class="form-control" id="bidValidity"
@ -269,15 +274,17 @@
<input type="number" class="form-control" id="periodOfWork" <input type="number" class="form-control" id="periodOfWork"
[(ngModel)]="tenderData.periodOfWork" name="periodOfWork"> [(ngModel)]="tenderData.periodOfWork" name="periodOfWork">
</div> </div>
</div>
<div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="location">Location</label> <label for="location">Location</label>
<input type="text" class="form-control" id="location" <input type="text" class="form-control" id="location"
[(ngModel)]="tenderData.location" name="location"> [(ngModel)]="tenderData.location" name="location">
</div> </div>
</div>
<div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="pincode">Pincode</label> <label for="pincode">Pincode</label>
@ -289,20 +296,21 @@
<input type="text" class="form-control" id="bidOpeningPlace" <input type="text" class="form-control" id="bidOpeningPlace"
[(ngModel)]="tenderData.bidOpeningPlace" name="bidOpeningPlace"> [(ngModel)]="tenderData.bidOpeningPlace" name="bidOpeningPlace">
</div> </div>
</div>
<div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="preBidMeetPlace">Pre Bid Meeting Place</label> <label for="preBidMeetPlace">Pre Bid Meeting Place</label>
<input type="text" class="form-control" id="preBidMeetPlace" <input type="text" class="form-control" id="preBidMeetPlace"
[(ngModel)]="tenderData.preBidMeetPlace" name="preBidMeetPlace"> [(ngModel)]="tenderData.preBidMeetPlace" name="preBidMeetPlace">
</div> </div>
</div> <div class="form-group col-md-4">
<div class="form-row">
<div class="form-group col-md-6">
<label for="preBidMeetAdd">Pre Bid Meeting Address</label> <label for="preBidMeetAdd">Pre Bid Meeting Address</label>
<input type="text" class="form-control" id="preBidMeetAdd" <input type="text" class="form-control" id="preBidMeetAdd"
[(ngModel)]="tenderData.preBidMeetAdd" name="preBidMeetAdd"> [(ngModel)]="tenderData.preBidMeetAdd" name="preBidMeetAdd">
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-4">
<label for="input21">Pre Bid Meeting Date</label> <label for="input21">Pre Bid Meeting Date</label>
<input type="date" class="form-control" id="input23" <input type="date" class="form-control" id="input23"
[(ngModel)]="tenderData.preBidDate" name="preBidDate"> [(ngModel)]="tenderData.preBidDate" name="preBidDate">
@ -333,7 +341,7 @@
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="Critical Dates" [disabled]="false"> <br><br> <mat-tab label="Critical Dates" [disabled]="true"> <br><br>
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="form-row"> <div class="form-row">

@ -95,7 +95,7 @@ export class AddTendersComponent implements OnInit {
this.coverDocs = this.tenderData.covers this.coverDocs = JSON.parse(JSON.stringify(this.tenderData.covers));
this.newCvrROW =true this.newCvrROW =true
this.newDRWROW =true this.newDRWROW =true
@ -364,6 +364,7 @@ export class AddTendersComponent implements OnInit {
deleteCoverRow(id, index: number){ deleteCoverRow(id, index: number){
let removeRow = Object.assign({}, (this.coverDocs).splice(index, 1)[0]); let removeRow = Object.assign({}, (this.coverDocs).splice(index, 1)[0]);
this.tenderData.covers[index].crud = 'D';
} }
@ -491,9 +492,7 @@ export class AddTendersComponent implements OnInit {
else if(this.tenderData.workDesc =='' || this.tenderData.workDesc == null || this.tenderData.workDesc == undefined){ else if(this.tenderData.workDesc =='' || this.tenderData.workDesc == null || this.tenderData.workDesc == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("workDescriptionCantBeBlank"),2000,true); this._ui.toastMessage(this.errorTranslateService.translate("workDescriptionCantBeBlank"),2000,true);
} }
else if(this.tenderData.ndaPreQualification =='' || this.tenderData.ndaPreQualification == null || this.tenderData.ndaPreQualification == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("preQualificationCantBeBlank"),2000,true);
}
else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){ else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true); this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true);
} }
@ -503,6 +502,9 @@ export class AddTendersComponent implements OnInit {
else if(this.tenderData.subCategory =='' || this.tenderData.subCategory == null || this.tenderData.subCategory == undefined){ else if(this.tenderData.subCategory =='' || this.tenderData.subCategory == null || this.tenderData.subCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("subCategoryCantBeBlank"),2000,true); this._ui.toastMessage(this.errorTranslateService.translate("subCategoryCantBeBlank"),2000,true);
} }
else if(this.tenderData.ndaPreQualification =='' || this.tenderData.ndaPreQualification == null || this.tenderData.ndaPreQualification == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("preQualificationCantBeBlank"),2000,true);
}
else if( this.tenderData.bidValidity == null || this.tenderData.bidValidity == undefined){ else if( this.tenderData.bidValidity == null || this.tenderData.bidValidity == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidValidityCantBeBlank"),2000,true); this._ui.toastMessage(this.errorTranslateService.translate("bidValidityCantBeBlank"),2000,true);
} }
@ -658,7 +660,7 @@ return true
} }
if(this.RequiredDocumentsPreCheck() ){ if(this.RequiredDocumentsPreCheck() ){
this.tenderData.covers = this.coverDocs // this.tenderData.covers = this.coverDocs
this.nextTab() this.nextTab()
} }
} }
@ -690,7 +692,7 @@ return true
'success' 'success'
) )
this.router.navigate(['/dashboard']);
} }

@ -12,6 +12,8 @@ const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' }, { path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent }, { path: 'dashboard', component: DashboardComponent },
{path:'tender-view/:id', component:HomeViewComponent}, {path:'tender-view/:id', component:HomeViewComponent},
{path:'tender-view/:id/:pay', component:HomeViewComponent},
{path:'tender-upload/:id',component:HomeUploadComponent}, {path:'tender-upload/:id',component:HomeUploadComponent},
{ path: 'add-tenders', component: AddTendersComponent}, { path: 'add-tenders', component: AddTendersComponent},
{ path: 'add-tenders/:id', component: AddTendersComponent} { path: 'add-tenders/:id', component: AddTendersComponent}

@ -95,11 +95,12 @@
</span> </span>
<button mat-raised-button style="color: #46AC9E;" (click)="search()"> {{ 'go' | translate }} <button mat-raised-button style="color: #46AC9E;" (click)="search()"> {{ 'go' | translate }}
</button> </button>
</div> <button mat-raised-button style="color: #46AC9E;" (click)="reset()"> {{ 'clear' | translate }}
<div class="top-right-float">
<button mat-raised-button style="color: #46AC9E;" (click)="reset()"> {{ 'reset' | translate }}
</button> </button>
</div> </div>
<!-- <div class="top-left-float">
</div> -->
</div> </div>
<br> <br>
<br> <br>
@ -188,14 +189,30 @@
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="report">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'report' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary"
(click)="goToReport(element.id)" >
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
assessment
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="upload"> <ng-container matColumnDef="upload">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px"> <th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'upload' | translate }} {{ 'upload' | translate }}
<!-- <mat-icon>sort</mat-icon> --> <!-- <mat-icon>sort</mat-icon> -->
</th> </th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content"> <td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary" <button *ngIf="!element.hide" style="padding: 0;" mat-button color="primary"
(click)="goToUpload(element.id)" [disabled]="false"> (click)="goToUpload(element.id)" >
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}"> <mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
cloud_upload cloud_upload
</mat-icon> </mat-icon>

@ -16,6 +16,7 @@ import { routes } from 'src/app/consts';
import { MasterService } from 'src/app/_providers/_services/master.service'; import { MasterService } from 'src/app/_providers/_services/master.service';
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service'; import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { DatePipe } from '@angular/common';
@Component({ @Component({
selector: 'app-dashboard', selector: 'app-dashboard',
@ -50,6 +51,10 @@ export class DashboardComponent implements OnInit {
searchTerm:any; searchTerm:any;
newDate = new Date();
enableDownload: boolean = true
@ViewChild('paginator') paginator: MatPaginator; @ViewChild('paginator') paginator: MatPaginator;
@ViewChild(MatSort, { static: false }) sort: MatSort; @ViewChild(MatSort, { static: false }) sort: MatSort;
@ -63,7 +68,8 @@ export class DashboardComponent implements OnInit {
private emailService: EmailService, private emailService: EmailService,
private authenticationService: AuthService, private authenticationService: AuthService,
private _masterService: MasterService, private _masterService: MasterService,
private errorService:ErrorTranslateService private errorService:ErrorTranslateService,
private datePipe: DatePipe
) { ) {
// this.user$ = this.getUser(); // this.user$ = this.getUser();
this.seculevel = localStorage.getItem('seculevel') this.seculevel = localStorage.getItem('seculevel')
@ -72,7 +78,7 @@ export class DashboardComponent implements OnInit {
// this.emails$ = this.emailService.loadEmails(); // this.emails$ = this.emailService.loadEmails();
// this.getSchoolLogo(); // this.getSchoolLogo();
if(this.seculevel == 'B'){ if(this.seculevel == 'B'){
this.displayedColumns = ['actions','title','publishedDate','bidOpenDate','view']; this.displayedColumns = ['actions','title','publishedDate','bidOpenDate','view','report'];
} }
else{ else{
this.displayedColumns = ['slno','title','publishedDate','bidOpenDate','view','upload']; this.displayedColumns = ['slno','title','publishedDate','bidOpenDate','view','upload'];
@ -89,7 +95,7 @@ export class DashboardComponent implements OnInit {
async ngOnInit() { async ngOnInit() {
this.enableDownload = true;
this.getData(); this.getData();
@ -100,10 +106,31 @@ export class DashboardComponent implements OnInit {
} }
getData(){ getData(){
let newDate = new Date();
// let currentDate = this.datePipe.transform(newDate, 'yyyy-MM-ddTHH:mm:ss')
if(this.seculevel != 'B') if(this.seculevel != 'B')
this._masterService.getMasterData(apiUrl.getTender).then((res) =>{ this._masterService.getMasterData(apiUrl.getTender).then((res) =>{
console.log("tenderData=1=",res); console.log("tenderData=1=",res);
this.tenderData = res; this.tenderData = res;
for(let element of res){
const bidSubStartDate: Date = new Date(element.bidSubStartDate);
const bidSubEndDate: Date = new Date(element.bidSubEndDate);
if(newDate >= bidSubStartDate && newDate <= bidSubEndDate){
// console.log('1111111 ',element.bidSubStartDate);
// console.log('2222222 ',element.bidSubEndDate);
element.hide = false
}
else
element.hide = true
}
this.dataCopy = res; this.dataCopy = res;
this.pageLength = this.tenderData.length; this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData); this.dataSource = new MatTableDataSource(this.tenderData);
@ -118,6 +145,7 @@ export class DashboardComponent implements OnInit {
this._masterService.getMasterData(apiUrl.adminTenderView).then((res) =>{ this._masterService.getMasterData(apiUrl.adminTenderView).then((res) =>{
console.log("tenderData=2=",res); console.log("tenderData=2=",res);
this.tenderData = res; this.tenderData = res;
this.dataCopy = res; this.dataCopy = res;
this.pageLength = this.tenderData.length; this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData); this.dataSource = new MatTableDataSource(this.tenderData);
@ -128,6 +156,24 @@ export class DashboardComponent implements OnInit {
},err=>{ },err=>{
console.error(err) console.error(err)
}) })
// const bidSubStartDate = new Date(this.tenderData.bidSubStartDate);
// const bidSubEndDate = new Date(this.tenderData.bidSubEndDate);
// if (this.currentDate >= bidSubStartDate && this.currentDate <= bidSubEndDate) {
// this.enableDownload = false; // Enable the button
// console.log("enabled");
// } else {
// this.enableDownload = true; // Disable the button
// console.log("disabled");
// }
}
convertDateFormat(dateString: string): string {
const date = new Date(dateString);
return this.datePipe.transform(date, 'yyyy-MM-ddTHH:mm');
} }
addNewTender(){ addNewTender(){
@ -298,7 +344,9 @@ export class DashboardComponent implements OnInit {
} }
goToReport(id){
this.navigateTo(`bid-final-report/${id}`)
}
} }
function compare(a: any, b: any, isAsc: boolean): number { function compare(a: any, b: any, isAsc: boolean): number {
return (a < b ? -1 : 1) * (isAsc ? 1 : -1); return (a < b ? -1 : 1) * (isAsc ? 1 : -1);

@ -29,6 +29,9 @@ import { MatMomentDateModule } from '@angular/material-moment-adapter';
import {MatTooltipModule} from '@angular/material/tooltip'; import {MatTooltipModule} from '@angular/material/tooltip';
// import { NgxMatTimepickerModule } from 'ngx-mat-timepicker'; // import { NgxMatTimepickerModule } from 'ngx-mat-timepicker';
import { LOCALE_ID } from '@angular/core'; import { LOCALE_ID } from '@angular/core';
import { MatDialogModule } from '@angular/material/dialog';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { DialogComponent } from './dialog/dialog.component';
// import { MatTimepickerModule } from 'mat-timepicker'; // import { MatTimepickerModule } from 'mat-timepicker';
// import { MatTimepickerModule } from '@angular/material/timepicker'; // import { MatTimepickerModule } from '@angular/material/timepicker';
@ -43,6 +46,7 @@ const lang = 'en-US';
HomeUploadComponent, HomeUploadComponent,
TenderHomeComponent, TenderHomeComponent,
AddTendersComponent, AddTendersComponent,
DialogComponent,
], ],
imports: [ imports: [
@ -66,7 +70,9 @@ const lang = 'en-US';
MatNativeDateModule, MatNativeDateModule,
MatDatepickerModule, MatDatepickerModule,
MatMomentDateModule, MatMomentDateModule,
MatTooltipModule MatTooltipModule,
MatDialogModule,
MatCheckboxModule,
// NgxMatTimepickerModule.setLocale(lang), // NgxMatTimepickerModule.setLocale(lang),
// NgxMaterialTimepickerModule // NgxMaterialTimepickerModule
// MatTimepickerModule // MatTimepickerModule

@ -0,0 +1,40 @@
/* Custom styles for the dialog component */
h2.mat-dialog-title {
font-family: 'Arial', sans-serif; /* Change the font family for the title */
font-size: 24px; /* Increase the font size */
font-weight: bold; /* Make the title bold */
}
mat-dialog-content {
font-family: 'Arial', sans-serif; /* Change the font family for the content */
font-size: 16px; /* Adjust the font size */
}
ul {
list-style-type: disc; /* Use disc bullets for the list items */
padding-left: 20px; /* Add some padding to the left for better alignment */
}
mat-dialog-actions {
justify-content: flex-end; /* Align the buttons to the right */
}
// button.mat-dialog-button.mat-primary {
// background-color: #4CAF50; /* Change the background color of the Accept button */
// color: #ffffff; /* Change the text color of the Accept button */
// }
div.checkbox-container {
display: flex;
align-items: center; /* Center align the contents vertically */
}
.view-terms-link {
cursor: pointer;
font-size: 14px;
color: #007bff; /* Change the color of the link (you can choose a different color if needed) */
text-decoration: underline;
margin-left: 10px; /* Add some space between the checkbox and the link */
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DialogComponent } from './dialog.component';
describe('DialogComponent', () => {
let component: DialogComponent;
let fixture: ComponentFixture<DialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DialogComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(DialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,43 @@
import { Component, OnInit,Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@Component({
selector: 'app-dialog-component',
template: `
<h2 mat-dialog-title>Terms and Conditions</h2>
<mat-dialog-content>
<ul>
<li *ngFor="let detail of details">{{ detail }}</li>
</ul>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button style=" background-color: gold;" (click)="onAccept()">Accept</button>
<button mat-button (click)="onClose()">Close</button>
</mat-dialog-actions>
`,
styleUrls: ['./dialog.component.scss']
})
export class DialogComponent implements OnInit {
details: string[];
constructor(
public dialogRef: MatDialogRef<DialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: { details: string[] }
) {
this.details = data.details;
}
onAccept() {
// You can perform any actions needed when the user accepts the terms and conditions here.
this.dialogRef.close('accepted');
}
onClose() {
// You can perform any actions needed when the user closes the dialog without accepting the terms and conditions here.
this.dialogRef.close('closed');
}
ngOnInit(): void {
}
}

@ -46,12 +46,17 @@
<div class="container"> <div class="container">
<div class="row resp" > <div class="row resp" >
<div class="col-sm-6 offset-sm-3"> <div class="col-sm-8 offset-sm-2">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="form-group"> <div class="form-group">
<form #myForm="ngForm"> <form #myForm="ngForm">
<mat-form-field class="input-style" appearance="outline" style="width: 100%;">
<mat-label class="font-weight-bold">Bid Final Amount </mat-label>
<input matInput placeholder="Enter Bid Amount" type="number" [(ngModel)]="bidAmount" [ngModelOptions]="{standalone: true}"/>
</mat-form-field>
<table id="customers"> <table id="customers">
<tr> <tr>
<th style="width:30%;text-align: center;">Description</th> <th style="width:30%;text-align: center;">Description</th>
@ -68,7 +73,7 @@
<!-- <label for="file1">File 1:</label> --> <!-- <label for="file1">File 1:</label> -->
<div class="input-group"> <div class="input-group">
<mat-form-field class="columns" appearance="outline" style="height: 15px;margin-top: -10px;width:90%;"> <mat-form-field class="columns" appearance="outline" style="height: 15px;margin-top: -18px;width:90%;">
<mat-label *ngIf="tenderData?.covers[i].file; else assetImageLabel"> <mat-label *ngIf="tenderData?.covers[i].file; else assetImageLabel">
{{tenderData?.covers[i].file}}</mat-label> {{tenderData?.covers[i].file}}</mat-label>
<ng-template #assetImageLabel> <ng-template #assetImageLabel>
@ -97,7 +102,53 @@
</tr> </tr>
</table> </table><br><br>
<!-- <div style="margin-bottom: 20px;">
<mat-checkbox [(ngModel)]="agreeToTerms" style="white-space: normal;"></mat-checkbox>&nbsp;
I have thoroughly read and understood all the details provided on the official website of
Thrickodithanam SCB related to the tendering process.
</div>
<div>
<mat-checkbox [(ngModel)]="agreeToTerms" style="white-space: normal;"></mat-checkbox>&nbsp;
I confirm that all the information I have provided in connection with this tender is accurate,
complete, and valid to the best of my knowledge.I also understand that any misrepresentation
or omission of relevant information may result in the rejection of my application/participation
or the termination of any subsequent contract awarded to me.
</div>
-->
<!-- <div class="checkbox-container">
<mat-checkbox [(ngModel)]="agreeToTerms1" (change)="updateTerms($event, 1)" style="margin-right: 10px;"></mat-checkbox>
<div class="checkbox-text">
I have thoroughly read and understood all the details provided on the official website of Thrickodithanam SCB related to the tendering process.
</div>
</div>
<div class="checkbox-container">
<mat-checkbox [(ngModel)]="agreeToTerms2" (change)="updateTerms($event, 2)" style="margin-right: 10px;"></mat-checkbox>
<div class="checkbox-text">
I confirm that all the information I have provided in connection with this tender is accurate, complete, and valid to the best of my knowledge. I also understand that any misrepresentation or omission of relevant information may result in the rejection of my application/participation or the termination of any subsequent contract awarded to me.
</div>
</div> -->
<div class="container" >
<mat-checkbox [(ngModel)]="agreeToTerms" (change)="updateTerms($event)" style="margin-right: 10px;">
<div class="checkbox-text">
I agree to the Terms and Conditions <span style="cursor: pointer;"> </span>
</div>
</mat-checkbox>&nbsp;
<div class="text-center font-weight-bold" (click)="openDialog()">*View Terms and Conditions <i class="bi bi-shield-fill-check"></i></div>
</div>
<button type="submit" style="margin-top: 10px;" class="btn btn-outline-dark float-right" (click)="submit()">Submit</button> <button type="submit" style="margin-top: 10px;" class="btn btn-outline-dark float-right" (click)="submit()">Submit</button>
</form> </form>

@ -31,3 +31,15 @@
min-height: 460px; min-height: 460px;
} }
} }
.checkbox-container {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.checkbox-text {
flex: 1;
font-family: 'Arial', sans-serif;
font-size: 16px;
}

@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { log } from 'console'; import { log } from 'console';
import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto'; import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto';
@ -8,6 +9,7 @@ import { ErrorTranslateService } from 'src/app/_providers/_services/error-transl
import { MasterService } from 'src/app/_providers/_services/master.service'; import { MasterService } from 'src/app/_providers/_services/master.service';
import { UiService } from 'src/app/_providers/_services/ui.service'; import { UiService } from 'src/app/_providers/_services/ui.service';
import Swal from 'sweetalert2' import Swal from 'sweetalert2'
import { DialogComponent } from '../dialog/dialog.component';
@Component({ @Component({
selector: 'app-home-upload', selector: 'app-home-upload',
@ -30,6 +32,12 @@ export class HomeUploadComponent implements OnInit {
tenderId: number; tenderId: number;
bidAmount:number;
agreeToTerms1: boolean = false;
agreeToTerms2: boolean = false;
showError: boolean = false;
tenderData: any; tenderData: any;
@ -37,6 +45,8 @@ export class HomeUploadComponent implements OnInit {
userId: string; userId: string;
agreeToTerms: boolean = false;
fileSelected: boolean[] fileSelected: boolean[]
DEFAULT_COVER_COUNT: any; DEFAULT_COVER_COUNT: any;
@ -52,7 +62,8 @@ export class HomeUploadComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private _ui: UiService, private _ui: UiService,
private _errorTranslate: ErrorTranslateService, private _errorTranslate: ErrorTranslateService,
private _masterService: MasterService private _masterService: MasterService,
public dialog: MatDialog
) { ) {
this.secuLevel = localStorage.getItem('seculevel'); this.secuLevel = localStorage.getItem('seculevel');
this.userId = localStorage.getItem('userId'); this.userId = localStorage.getItem('userId');
@ -62,11 +73,34 @@ export class HomeUploadComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.loading = true; this.loading = true;
this.agreeToTerms = false;
this.getData(); this.getData();
this.getFileFormatLov(); this.getFileFormatLov();
} }
openDialog() {
const dialogRef = this.dialog.open(DialogComponent, {
width: '500px',
data: {
details: [
'I have thoroughly read and understood all the details provided on the official website of Thrickodithanam SCB related to the tendering process.',
'I confirm that all the information I have provided in connection with this tender is accurate, complete, and valid to the best of my knowledge. I also understand that any misrepresentation or omission of relevant information may result in the rejection of my application/participation or the termination of any subsequent contract awarded to me.'
]
}
});
dialogRef.afterClosed().subscribe((result) => {
// Handle any logic after the dialog is closed (if needed)
// For example, you can update the agreeToTerms variable based on the user's choice.
});
}
getData() { getData() {
this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => { this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => {
// console.log("tenderData", res); // console.log("tenderData", res);
@ -125,6 +159,10 @@ export class HomeUploadComponent implements OnInit {
navigateTo(destination: any) { navigateTo(destination: any) {
this.router.navigate([destination]) this.router.navigate([destination])
} }
updateTerms(event: any) {
this.agreeToTerms = event.checked;
}
goToHome() { goToHome() {
@ -134,6 +172,11 @@ export class HomeUploadComponent implements OnInit {
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
} }
preSave() { preSave() {
if(this.bidAmount == 0 || this.bidAmount == null || this.bidAmount == undefined){
this._ui.toastMessage(this._errorTranslate.translate("pleaseEnterBidFinalAmount"),2000,true);
return false;
}
for (let element of this.UploadedFile) { for (let element of this.UploadedFile) {
if (!element.docName) { if (!element.docName) {
this._ui.toastMessage(this._errorTranslate.translate("pleaseAddfiles"),2000,true); this._ui.toastMessage(this._errorTranslate.translate("pleaseAddfiles"),2000,true);
@ -142,17 +185,49 @@ export class HomeUploadComponent implements OnInit {
} }
} }
if (!this.agreeToTerms) {
this._ui.toastMessage(this._errorTranslate.translate("pleaseAgreeToTheTermsandCondition"), 2000, true);
return false;
}
return true; return true;
} }
// openDialog(): void {
// this.showDialog = true;
// }
// closeDialog(): void {
// this.showDialog = false;
// }
submit() { submit() {
if(!this.preSave()) if(!this.preSave())
return return
// console.log('this.tenderData.covers========',this.tenderData.covers); let id ={
tenderId : this.tenderId,
userId : this.userId,
}
let body= {
bidAmount:this.bidAmount
}
this._masterService.postMasterData(apiUrl.UploadBidAmount,body,`${this.userId}/${this.tenderId}`).then((res)=>{
console.log(res);
})
// console.log('this.UploadedFile========',this.UploadedFile); //console.log('this.tenderId========',body);
// console.log('this.userId========',this.userId);
Swal.fire({ Swal.fire({
title: 'Are you sure?', title: 'Are you sure?',

@ -169,35 +169,35 @@
<tbody> <tbody>
<tr> <tr>
<th>Published Date</th> <th>Published Date</th>
<td class="col-md-6">{{tenderData.publishDate}}</td> <td class="col-md-6">{{tenderData.publishDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Document Download / Sale Start Date</th> <th>Document Download / Sale Start Date</th>
<td>{{tenderData.saleStartDate}}</td> <td>{{tenderData.saleStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Clarification Start Date</th> <th>Clarification Start Date</th>
<td>{{tenderData.clarificationStartDate}}</td> <td>{{tenderData.clarificationStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Document Download / Sale End Date</th> <th>Document Download / Sale End Date</th>
<td>{{tenderData.saleEndDate}}</td> <td>{{tenderData.saleEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Clarification End Date</th> <th>Clarification End Date</th>
<td>{{tenderData.clarificationEndDate}}</td> <td>{{tenderData.clarificationEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Submission Start Date</th> <th>Bid Submission Start Date</th>
<td>{{tenderData.bidSubStartDate}}</td> <td>{{tenderData.bidSubStartDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Submission End Date</th> <th>Bid Submission End Date</th>
<td>{{tenderData.bidSubEndDate}}</td> <td>{{tenderData.bidSubEndDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<tr> <tr>
<th>Bid Opening Date</th> <th>Bid Opening Date</th>
<td>{{tenderData.bidOpenDate}}</td> <td>{{tenderData.bidOpenDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -269,7 +269,7 @@
</tr> </tr>
<tr> <tr>
<th>Pre Bid Meeting Date</th> <th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidDate}}</td> <td>{{tenderData.preBidDate | date: 'MMM d, y, h:mm:ss a'}}</td>
</tr> </tr>
<!-- <tr> <!-- <tr>
@ -306,7 +306,7 @@
<tr> <tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm"
(click)="DownloadDrawingsZIP()"> <i class="bi bi-file-earmark-zip"></i> Download as Zip (click)="DownloadDrawingsZIP()" > <i class="bi bi-file-earmark-zip"></i> Download as Zip
File</button> </th> File</button> </th>
</tr> </tr>
@ -337,7 +337,7 @@
<tr> <tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm"
(click)="downloadZip()"> <i class="bi bi-file-earmark-zip"></i> Download as Zip File</button> > <i class="bi bi-file-earmark-zip"></i> Download as Zip File</button>
</th> </th>
</tr> </tr>
@ -359,7 +359,7 @@
</tr> </tr>
<tr> <tr>
<th colspan="12">Drawings <button mat-raised-button id="zipFile" class=" float-right btn-sm" <th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm"
(click)="DownloadNIT()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th> (click)="DownloadNIT()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th>
</tr> </tr>

@ -1,9 +1,13 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { PurchaseDto } from 'src/app/_dto/purchase.dto';
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto'; import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties'; import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { MasterService } from 'src/app/_providers/_services/master.service'; import { MasterService } from 'src/app/_providers/_services/master.service';
import { TransactionService } from 'src/app/_providers/_services/transaction.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
@Component({ @Component({
@ -14,26 +18,55 @@ import { environment } from 'src/environments/environment';
export class HomeViewComponent implements OnInit { export class HomeViewComponent implements OnInit {
tenderId: number; tenderId: number;
tenderData: any; tenderData: any;
nitItemDocuments: any ; nitItemDocuments: any ;
workItemDocuments: any; workItemDocuments: any;
drawingsDocuments: any; drawingsDocuments: any;
tenderDocuments: any; tenderDocuments: any;
constructor(private router: Router, paymentDetails: PurchaseDto;
tempID: any;
newPaymentRow: any;
currentDate = new Date();
enableDownload: boolean = true
paymentStatus: string;
constructor(
private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private _masterService: MasterService) { private _masterService: MasterService,
private _transactionService: TransactionService,
private _ui:UiService,
private _errorTranslateService: ErrorTranslateService
) {
this.tenderId = +this.route.snapshot.paramMap.get('id'); this.tenderId = +this.route.snapshot.paramMap.get('id');
this.paymentStatus = this.route.snapshot.paramMap.get('pay');
this.getData() this.getData()
} }
ngOnInit(): void { ngOnInit(): void {
this.tenderData = new TenderDetailDto() this.tenderData = new TenderDetailDto()
console.log("this.tenderId", this.tenderId); console.log("this.tenderId", this.tenderId);
this.enableDownload = true;
this.getData() this.getData()
} }
getData() { getData() {
this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => { this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => {
console.log("tenderData", res); console.log("tenderData", res);
@ -41,6 +74,17 @@ export class HomeViewComponent implements OnInit {
this.tenderDocuments = this.tenderData['tenderDoc'] this.tenderDocuments = this.tenderData['tenderDoc']
console.log("data",this.tenderDocuments); console.log("data",this.tenderDocuments);
const saleStartDate = new Date(this.tenderData.saleStartDate);
const saleEndDate = new Date(this.tenderData.saleEndDate);
if (this.currentDate >= saleStartDate && this.currentDate <= saleEndDate) {
this.enableDownload = false; // Enable the button
console.log("enabled");
} else {
this.enableDownload = true; // Disable the button
console.log("disabled");
}
this.filterDataByCategory(); this.filterDataByCategory();
@ -66,18 +110,72 @@ export class HomeViewComponent implements OnInit {
} }
DownloadDrawingsZIP(){ DownloadDrawingsZIP(){
this.paymentGateway()
const id = this.tenderId; const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{ this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{
}, err => {
console.log('res===>', err);
if (err.status == 200) {
console.log('start >>>');
// window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
let newWindow = window.open(`${environment.apiUrl}/${apiUrl.drawingsDownloadDocs}/${id}`);
setTimeout(() => {
newWindow.close();
}, 100);
}
if (err.status == 404) {
alert('No Bank Document Found for the selected Tender.');
}
if (err.status == 500) {
alert(`${err.message}`);
}
else {
// alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
}
}) })
} }
DownloadNIT(){ DownloadNIT(){
const id = this.tenderId; const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.noticeDownlaod,id).then((res)=>{
// }, err => {
// console.log('res===>', err);
// if (err.status == 200) {
// console.log('start >>>');
// // window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.noticeDownlaod}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
// }
// if (err.status == 404) {
// alert('No Bank Document Found for the selected Tender.');
// }
// if (err.status == 500) {
// alert(`${err.message}`);
// }
// else {
// //alert(`An error Occured`);
// // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// // setTimeout(() => {
// // newWindow.close();
// // }, 100);
// }
})
} }
downloadZip() { downloadWITZip() {
console.log('clicked'); console.log('clicked');
const id = this.tenderId; const id = this.tenderId;
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`); // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
@ -104,7 +202,7 @@ export class HomeViewComponent implements OnInit {
alert(`${err.message}`); alert(`${err.message}`);
} }
else { else {
alert(`An error Occured`); //alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`); // let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => { // setTimeout(() => {
// newWindow.close(); // newWindow.close();
@ -115,4 +213,46 @@ export class HomeViewComponent implements OnInit {
// window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id); // window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
} }
async paymentGateway() {
this.paymentDetails = new PurchaseDto();
this.paymentDetails.application = this.tenderId;
this.paymentDetails.mobile = localStorage.getItem('mobile')
this.paymentDetails.email = "accuratesoftware2022@gmail.com";
this.paymentDetails.amount = this.tenderData.tenderFee;
this.paymentDetails.type = "I"
// this.paymentDetails.email=this.issueApplicationData.motherEmail
// console.log('this.newPaymentRow.paymentMethod ====',this.newPaymentRow);
// let paymentMethod = this.paymentMethodLovData.find(x=> x.id==this.newPaymentRow.paymentMethod)
console.log('this.paymentDetails===',this.paymentDetails);
this._transactionService.createPayment(this.paymentDetails).then(
res => {
this.onSuccessPayment(res);
},
err => {
this.onFailurePayment(err);
console.log("==er====", err);
}
);
}
onSuccessPayment(response) {
if (response.url) {
// Render PayUmoney payment gateway page
window.location.href = response.url;
}
}
onFailurePayment(err) {
console.log('Failure Payment : ' + err);
this._ui.toastMessage(err.message ? err.message : this._errorTranslateService.translate('errInSave'), 3000);
}
} }

@ -0,0 +1,226 @@
<!-- <p>bid-final-report works!</p>
<div class="header">
<h6> <a (click)="navigateTo('dashboard')"> Home </a> \ <a (click)="navigateTo('report/report-activities')">Report
</a> \ </h6>
<h4><b>{{title | translate}}</b></h4>
</div> -->
<div class="row">
<div>
<button mat-raised-button color="primary" (click)="backButton()"
style="float: left;margin-top: 5px;margin-bottom: 5px;background-color: #46AC9E;">
Back
</button>
<button mat-raised-button color="primary" (click)="printScreen()"
style="float: right;margin-top: 5px;margin-bottom: 5px;background-color: #46AC9E;">
Print
</button>
<!-- <select class="select" [(ngModel)]="printType" style="float: right;margin-top: 5px;margin-bottom: 5px;margin-right: 5px;">
<option *ngFor="let size of printSize" >
{{size.name}}
</option>
</select> -->
<button mat-raised-button color="primary" (click)="excelDownload()"
style="float: right;margin-top: 5px;margin-bottom: 5px;margin-right: 5px;background-color: #46AC9E;">
Excel Download
</button>
</div>
</div>
<div id="section-to-print" class="container" style="background-color: white;">
<h6>
<b>
{{title | translate}}
<br>
<span >
<br>
{{'tender'|translate}} :
<span >
{{headerData?.title}}
</span>
</span>
<span >
<br>
<br>
{{'publishedDate'|translate}} :
<span>
{{headerData?.publishDate | date: 'MMM d, y, h:mm:ss a'}}
</span>
</span>
<span >
<br>
<br>
{{'bidOpenDate'|translate}} :
<span >
{{headerData?.bidOpenDate | date: 'MMM d, y, h:mm:ss a'}}
</span>
</span>
</b>
</h6>
<h6>{{'currentDate'|translate}}: {{today | date: 'MMM d, y, h:mm:ss a'}}</h6>
<div class="table-container" #table>
<table hidden="true">
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th>{{title | translate}}</th>
</tr>
<tr >
<td></td>
<td></td>
<td></td>
<td>Tender</td>
<td>
{{headerData?.publishDate}}
</td>
</tr>
<tr >
<td></td>
<td></td>
<td></td>
<td>Published Date</td>
<td >
{{headerData?.bidOpenDate }}
</td>
</tr>
<tr >
<td></td>
<td></td>
<td></td>
<td>Bid Open Date</td>
<td>
{{headerData?.sectionName}}
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Current Date: </td>
<td>
{{today | date: 'dd MMMM YYYY'}}
</td>
</tr>
<tr></tr>
</table>
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8" matSort matSortDisableClear="true"
(matSortChange)="sortData($event)">
<ng-container matColumnDef="slNo">
<th mat-header-cell *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'slNo'|translate}}.
</div>
</th>
<td mat-cell *matCellDef="let element let i=index" class="col-body">
{{i+1}}
</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell mat-sort-header *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'name'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
{{element?.userName}}
</td>
</ng-container>
<ng-container matColumnDef="admissionNo">
<th mat-header-cell mat-sort-header *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'admissionNo'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
{{element.rollNo }}
</td>
</ng-container>
<ng-container matColumnDef="mobileNumber">
<th mat-header-cell mat-sort-header *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'mobileNumber'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
{{element?.mobileNumber}}
</td>
</ng-container>
<ng-container matColumnDef="email">
<th mat-header-cell mat-sort-header *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'emailId'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
{{element?.email}}
</td>
</ng-container>
<ng-container matColumnDef="finalBidAmt">
<th mat-header-cell mat-sort-header *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'totalBidAmount'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
{{element?.finalBidAmt}}
</td>
</ng-container>
<ng-container matColumnDef="aadharNo">
<th mat-header-cell *matHeaderCellDef style="text-align: center;" class="col-header">
<div>
{{'documents'|translate}}
<!-- <mat-icon>sort</mat-icon> -->
</div>
</th>
<td mat-cell *matCellDef="let element" class="col-body">
<button mat-stroked-button (click)="downloadUserDocs(element?.userId)">
<mat-icon style="color: black;">file_download</mat-icon></button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displaycolumns ;sticky: true;"></tr>
<tr mat-row *matRowDef="let row; columns: displaycolumns;"></tr>
</table>
</div>
</div>

@ -0,0 +1,125 @@
h4 {
width: 100%;
text-align: center;
}
.header {
padding: 20px;
width: 100%;
min-width: 350px;
}
.header>h6>a {
text-decoration: none;
color: #262627;
}
.header>h6>a:hover {
text-decoration: underline;
cursor: pointer;
}
#section-to-print h6 {
text-align: center;
}
table {
width: 100%;
}
.table-container {
width: calc(100vw - 50px);
overflow-x: scroll;
border: 1px solid grey;
// height: 50vh;
}
.col-header {
color: #000000;
font-weight: bolder;
font-size: medium;
text-align: center;
background-color: #46AC9E;
padding: 5px;
border: 1px solid #000000;
}
.col-body {
padding: 5px;
text-align: center;
border: 1px solid #000000;
}
.col-footer {
padding: 5px;
text-align: center;
font-weight: bolder;
// border: 1px solid #000000;
background-color: rgb(212, 212, 212);
}
.row {
margin: 5px;
}
.container {
margin: 5px;
}
.hide {
display: none;
}
mat-icon {
vertical-align: middle;
opacity: .6;
}
:host ::ng-deep {
.mat-sort-header-arrow {
color: #000000;
}
.mat-sort-header-container {
display: flex;
justify-content: center;
}
.mat-table {
tr {
th,
td {
vertical-align: middle;
}
}
}
}
@media print{
.header{
display: none;
}
.row{
display: none;
}
* {
font-size: 17px !important;
}
}
.select{
padding: 10px;
font-size: 16px;
border-radius: 5px;
background-color: #f2f2f2;
border: none;
box-shadow: none;
}
.select:focus {
outline: none;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BidFinalReportComponent } from './bid-final-report.component';
describe('BidFinalReportComponent', () => {
let component: BidFinalReportComponent;
let fixture: ComponentFixture<BidFinalReportComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ BidFinalReportComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(BidFinalReportComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,139 @@
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { MatSort, Sort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { MasterService } from 'src/app/_providers/_services/master.service';
import { environment } from 'src/environments/environment';
import * as XLSX from 'xlsx';
@Component({
selector: 'app-bid-final-report',
templateUrl: './bid-final-report.component.html',
styleUrls: ['./bid-final-report.component.scss']
})
export class BidFinalReportComponent implements OnInit {
printSize = [{ name: "landscape" }, { name: "portrait" }]
printType: any;
title = 'Bid Final Report';
today: Date = new Date();
@ViewChild('table', { static: false }) table: ElementRef;
@ViewChild(MatSort, { static: false }) sort: MatSort;
displaycolumns: string[] = ['slNo', 'name', 'mobileNumber', 'email', 'finalBidAmt', 'aadharNo'];
dataSource: MatTableDataSource<unknown>;
tenderId: number;
headerData: any;
tableData: any;
constructor(
private route: ActivatedRoute,
private _router: Router,
private _masterService:MasterService
) {
this.tenderId = +this.route.snapshot.paramMap.get('id');
}
ngOnInit(): void {
this.getHeaderData(this.tenderId);
this.getTableData(this.tenderId);
this.printType = 'portrait';
}
navigateTo(destination) {
this._router.navigate([destination])
}
backButton() {
this.navigateTo('/dashboard')
// this.backClick.emit()
}
getHeaderData(id) {
this._masterService.getMasterDatabyId(apiUrl.getTender,id).then(res=>{
this.headerData = res;
})
}
getTableData(id){
this._masterService.getMasterDatabyId(apiUrl.bidReport,id).then(res=>{
this.tableData = res.filter(element=> element.status == 'S');
this.dataSource = new MatTableDataSource(this.tableData);
this.dataSource.sort = this.sort;
})
}
printScreen() {
if (this.printType.trim() == 'landscape') {
var css = `@page { size: ${this.printType}; }`,
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
style.media = 'print';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
}
// this._menuService.isShowSidebar = false
setTimeout(() => {
window.print();
}, 1000);
}
excelDownload() {
const ws: XLSX.WorkSheet = XLSX.utils.table_to_sheet(this.table.nativeElement);
const merge = [
{ s: { r: 0, c: 4 }, e: { r: 0, c: 7 } }
];
ws["!merges"] = merge;
const wb: XLSX.WorkBook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
XLSX.writeFile(wb, 'Bid-final-Report.xlsx');
}
sortData(sort: Sort) {
// console.log('sorting...');
// const data = this.tableData.slice();
// if (!sort.active || sort.direction === '') {
// this.dataSource.data = data;
// return;
// }
// this.dataSource.data = data.sort((a, b) => {
// const isAsc = sort.direction === 'asc';
// switch (sort.active) {
// case 'title':
// return compare(a.title, b.title, isAsc);
// case 'publishedDate':
// return compare(a.publishDate, b.publishDate, isAsc);
// case 'bidOpenDate':
// return compare(a.bidOpenDate, b.bidOpenDate, isAsc);
// default:
// return 0;
// }
// });
}
downloadUserDocs(userId){
let newWindow = window.location.href = `${environment.apiUrl}/${apiUrl.userBidDoc}/${this.tenderId}/${userId}`
}
}
function compare(a: any, b: any, isAsc: boolean): number {
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
}

@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LayoutComponentComponent } from '../dashboard/layout-component/layout-component.component';
import { BidFinalReportComponent } from './bid-final-report/bid-final-report.component';
import { ReportComponent } from './report.component';
const routes: Routes = [
{
path: '', component: LayoutComponentComponent, children: [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
// { path: '', component: ReportComponent },
{path:'bid-final-report/:id', component:BidFinalReportComponent},
]
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ReportRoutingModule { }

@ -0,0 +1,16 @@
import { Component, OnInit, EventEmitter, Input, Output, ViewChild } from '@angular/core';
@Component({
selector: 'app-report',
templateUrl: './report.component.html',
styleUrls: ['./report.component.scss']
})
export class ReportComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -0,0 +1,55 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReportRoutingModule } from './report-routing.module';
import { ReportComponent } from './report.component';
import { BidFinalReportComponent } from './bid-final-report/bid-final-report.component';
import { SharedModule } from 'src/app/shared/shared.module';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatButtonModule } from '@angular/material/button';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { FormsModule } from '@angular/forms';
import { MatSortModule } from '@angular/material/sort';
import { TranslateModule } from '@ngx-translate/core';
import { ReactiveFormsModule } from '@angular/forms';
import { MatTabsModule } from '@angular/material/tabs';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatNativeDateModule } from '@angular/material/core';
import { MatSelectModule } from '@angular/material/select';
import { MatMomentDateModule } from '@angular/material-moment-adapter';
import {MatTooltipModule} from '@angular/material/tooltip';
// import { NgxMatTimepickerModule } from 'ngx-mat-timepicker';
import { LOCALE_ID } from '@angular/core';
@NgModule({
declarations: [ReportComponent, BidFinalReportComponent],
imports: [
CommonModule,
ReportRoutingModule,
SharedModule,
MatProgressBarModule,
MatCardModule,
MatIconModule,
MatTableModule,
MatInputModule,
MatButtonModule,
MatPaginatorModule,
MatSlideToggleModule,
FormsModule,
MatSortModule,
TranslateModule,
ReactiveFormsModule,
MatTabsModule,
MatSelectModule,
MatNativeDateModule,
MatDatepickerModule,
MatMomentDateModule,
MatTooltipModule
]
})
export class ReportModule { }

@ -23,7 +23,7 @@ export const apiUrl = {
tenderDoc:"tender-doc", tenderDoc:"tender-doc",
fileFormat:"file-format-lov", fileFormat:"file-format-lov",
docUpload: "file-upload/Bank-documents", docUpload: "file-upload/Bank-documents",
paymentGateway: "payment-gateway",
userImageUpload: "file-upload/user", userImageUpload: "file-upload/user",
changePassword: 'iuser/change-password', changePassword: 'iuser/change-password',
cryptoEncrypt: "crypto/encrypt", cryptoEncrypt: "crypto/encrypt",
@ -36,7 +36,12 @@ export const apiUrl = {
adminTenderView:'tender/admin', adminTenderView:'tender/admin',
drawingsDelete: "file-upload/R-drawing", drawingsDelete: "file-upload/R-drawing",
widDelete:"file-upload/R-bankDoc", widDelete:"file-upload/R-bankDoc",
noticeDelete:"file-upload/R-notice" noticeDelete:"file-upload/R-notice",
feePaymentCancel: "fee-payment/cancel",
noticeDownlaod:"file-upload/notice",
bidReport:"payment-master/bid-report",
userBidDoc:"file-upload/user-doc-arc",
UploadBidAmount:"payment-master/finalBidAmt"
}; };

@ -3,6 +3,7 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { apiUrl } from '../_resources/api-url.properties'; import { apiUrl } from '../_resources/api-url.properties';
import { PurchaseDto } from 'src/app/_dto/purchase.dto';
/************************** /**************************
Created by Ajith A Pradeep Created by Ajith A Pradeep
@ -57,6 +58,21 @@ export class TransactionService {
return await this.http.delete<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise(); return await this.http.delete<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise();
} }
// async getFormNo(prefix): Promise<any> {
// return await this.http.get<any>(`${environment.apiUrl}/${apiUrl.admissionFormNo}?where[prefix]=${prefix}`).toPromise();
// }
// async getAdmissionNo(filter): Promise<any> {
// return await this.http.get<any>(`${environment.apiUrl}/${apiUrl.admissionNo}${filter}`).toPromise();
// }
// async saveDiscount(body): Promise<any[]> {
// return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.applyDiscount}`, body).toPromise();
// }
// async saveSection(body): Promise<any[]> {
// return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.studentUpdateSection}`, body).toPromise();
// }
async encryptedCode(code): Promise<any> { async encryptedCode(code): Promise<any> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.cryptoEncrypt}`, { data: code }).toPromise(); return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.cryptoEncrypt}`, { data: code }).toPromise();
@ -74,11 +90,17 @@ export class TransactionService {
return await this.http.post<any>(`${environment.apiUrl}/${"sms-api/verifyOtp"}/${FR}`, body).toPromise(); return await this.http.post<any>(`${environment.apiUrl}/${"sms-api/verifyOtp"}/${FR}`, body).toPromise();
} }
async saveMultipleData(apiUrl, body): Promise<any[]> { async createPayment(paymentRequest: PurchaseDto): Promise<any> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl}`, body).toPromise(); return await this.http.post(`${environment.apiUrl}/${apiUrl.paymentGateway}`, paymentRequest).toPromise();
} }
// async createPublicPayment(paymentRequest: PurchaseDto): Promise<any> {
// return await this.http.post(`${environment.apiUrl}/${apiUrl.publicPaymenGateway}`, paymentRequest).toPromise();
// }
async cancelPayment(id: number): Promise<any> {
return await this.http.post(`${environment.apiUrl}/${apiUrl.feePaymentCancel}`, { id: id }).toPromise();
}
} }

@ -66,6 +66,8 @@ import { BsDatepickerModule, BsDatepickerConfig } from 'ngx-bootstrap/datepicker
// import ngx-translate and the http loader // import ngx-translate and the http loader
import {TranslateLoader, TranslateModule } from '@ngx-translate/core'; import {TranslateLoader, TranslateModule } from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader'; import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import { ReportModule } from './_modules/report/report.module';
import { MatDialogModule } from '@angular/material/dialog';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -80,6 +82,7 @@ import {TranslateHttpLoader} from '@ngx-translate/http-loader';
NgOtpInputModule, NgOtpInputModule,
AuthModule, AuthModule,
DashboardModule, DashboardModule,
ReportModule,
BrowserAnimationsModule, BrowserAnimationsModule,
RouterModule, RouterModule,
AppRoutingModule, AppRoutingModule,
@ -102,6 +105,7 @@ import {TranslateHttpLoader} from '@ngx-translate/http-loader';
MatRadioModule, MatRadioModule,
MatTooltipModule, MatTooltipModule,
ReactiveFormsModule, ReactiveFormsModule,
MatDialogModule,
FormsModule, FormsModule,
ProvidersModule.forRoot(environment), ProvidersModule.forRoot(environment),
MatSnackBarModule, MatSnackBarModule,

@ -21,7 +21,7 @@
</li> </li>
<li class="nav-item" id="imageHead"> <li class="nav-item" id="imageHead">
<!-- <p class="nav-link" (click)="goToHome()">Home</p> --> <!-- <p class="nav-link" (click)="goToHome()">Home</p> -->
<img src="assets/img/home.png" alt="" (click)="goToHome()" class="img-fluid" style="height: 31px;transform: translateX(-23px);cursor: pointer;opacity: 90%;"> <img src="assets/img/home.png" alt="" (click)="goToHome(this.router.url)" class="img-fluid" style="height: 31px;transform: translateX(-23px);cursor: pointer;opacity: 90%;">
</li> </li>
<li class="nav-item" *ngIf="this.router.url.includes('auth') &&this.router.url != '/auth/login'"> <li class="nav-item" *ngIf="this.router.url.includes('auth') &&this.router.url != '/auth/login'">

@ -57,11 +57,17 @@ export class HeaderComponent {
} }
goToHome(){ goToHome(currentLoc){
this.authenticationService.logOut().then(res=>{ console.log('current Location = ',currentLoc);
if(currentLoc.includes('auth')){
this.router.navigate(['/auth/admin-home']) this.router.navigate(['/auth/admin-home'])
}
else{
this.router.navigate(['/dashboard'])
}
})
} }
goToSignIn(){ goToSignIn(){
this.router.navigate(['/auth/login']) this.router.navigate(['/auth/login'])

@ -132,7 +132,10 @@
"TenderCreatedSuccessfully":"Tender Created Successfully", "TenderCreatedSuccessfully":"Tender Created Successfully",
"pleaseEnableDrawingDocuments": "Please Enable Drawing Documents", "pleaseEnableDrawingDocuments": "Please Enable Drawing Documents",
"pleaseEnableNoticeDocuments" : "Please Enable Notice Documents", "pleaseEnableNoticeDocuments" : "Please Enable Notice Documents",
"pleaseAddfiles":"Please Add The Remaining Files" "pleaseAddfiles":"Please Add The Remaining Files",
"pleaseEnterBidFinalAmount":"Please Enter Bid Final Amount",
"pleaseLogin":"Please Login for Downloading",
"pleaseAgreeToTheTermsandCondition":"Please Agree To The Terms and Condition"
} }

@ -174,6 +174,7 @@
"reprintReceipt": "Reprint Receipt", "reprintReceipt": "Reprint Receipt",
"resend": "Resend", "resend": "Resend",
"reset": "Reset", "reset": "Reset",
"clear": "Clear",
"residentialAddress": "Residential Address", "residentialAddress": "Residential Address",
"residentialAddress1": "Residential Address 1", "residentialAddress1": "Residential Address 1",
"residentialAddress2": "Residential Address 2", "residentialAddress2": "Residential Address 2",
@ -344,5 +345,11 @@
"publishedDate":"Published Date", "publishedDate":"Published Date",
"upload":"Upload", "upload":"Upload",
"slno":"Sl no", "slno":"Sl no",
"bidOpenDate":"Bid Open Date" "bidOpenDate":"Bid Open Date",
"bidEndDate":"Bid End Date",
"report":"Report",
"totalBidAmount":"Total Bid Amount",
"documents": "Documents",
"tender":"Tender"
} }
Loading…
Cancel
Save