new modifications
parent
9f881ed54e
commit
809566a2ef
@ -0,0 +1,13 @@
|
|||||||
|
export class PurchaseDto {
|
||||||
|
|
||||||
|
amount: number;
|
||||||
|
|
||||||
|
application: number;
|
||||||
|
|
||||||
|
mobile: string;
|
||||||
|
|
||||||
|
email: string;
|
||||||
|
|
||||||
|
type: string;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<p>dialog works!</p>
|
||||||
@ -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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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 @@
|
|||||||
|
<p>report worked</p>
|
||||||
@ -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 { }
|
||||||
Loading…
Reference in New Issue