From 9f881ed54e669bc192e93fcf29157c51253a7a52 Mon Sep 17 00:00:00 2001 From: sajan Date: Fri, 21 Jul 2023 18:30:30 +0530 Subject: [PATCH] mod --- package-lock.json | 95 +-- package.json | 3 +- src/app/_dto/tender-detail.dto.ts | 26 +- src/app/_dto/tender-documents.dto.ts | 11 +- .../auth/admin-home/admin-home.component.html | 10 - .../auth/admin-home/admin-home.component.ts | 26 - src/app/_modules/auth/auth.module.ts | 7 - .../_modules/auth/login/login.component.ts | 1 + .../_modules/auth/view/view.component.html | 215 ++----- .../_modules/auth/view/view.component.scss | 4 - src/app/_modules/auth/view/view.component.ts | 35 +- .../add-tenders/add-tenders.component.html | 554 +++++------------- .../add-tenders/add-tenders.component.scss | 6 +- .../add-tenders/add-tenders.component.ts | 403 +++++++------ .../dashboard/dashboard-routing.module.ts | 4 - .../dashboard/dashboard.component.html | 21 - .../_modules/dashboard/dashboard.component.ts | 39 -- .../_modules/dashboard/dashboard.module.ts | 10 - .../home-upload/home-upload.component.html | 91 +-- .../home-upload/home-upload.component.scss | 10 +- .../home-upload/home-upload.component.ts | 215 +++++-- .../home-view/home-view.component.html | 303 ++++------ .../home-view/home-view.component.scss | 4 - .../home-view/home-view.component.ts | 84 +-- .../_resources/api-url.properties.ts | 22 +- .../_providers/_services/master.service.ts | 3 + src/app/_providers/_services/ui.service.ts | 9 +- src/app/app.module.ts | 1 + .../components/user/user.component.html | 13 - .../header/components/user/user.component.ts | 12 - .../containers/header/header.component.html | 10 - src/assets/i18n/error/en.json | 11 +- src/assets/i18n/languages/en-sales.json | 6 +- src/environments/environment.ts | 2 +- src/index.html | 2 - yarn.lock | 63 +- 36 files changed, 839 insertions(+), 1492 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb2788a..2e6bce3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,6 @@ "ng-otp-input": "^1.8.1", "ngx-bootstrap": "^7.0.0", "ngx-echarts": "6.0.1", - "ngx-mat-timepicker": "^15.1.3", "ngx-toastr": "13.2.1", "ngx-trend": "6.1.1", "pdfmake": "^0.2.5", @@ -368,18 +367,14 @@ } }, "node_modules/@angular/cdk": { - "version": "11.2.13", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.13.tgz", - "integrity": "sha512-FkE4iCwoLbQxLDUOjV1I7M/6hmpyb7erAjEdWgch7nGRNxF1hqX5Bqf1lvLFKPNCbx5NRI5K7YVAdIUQUR8vug==", + "version": "11.2.12", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.12.tgz", + "integrity": "sha512-LImCQQ7n5OnTGXBAx1BaHgBBbdXiEtsNcHk5RvVURya9sswRcXRoa48EG3RyuT8mtqWsUdOX9+v4nCINLG4hZA==", "dependencies": { "tslib": "^2.0.0" }, "optionalDependencies": { "parse5": "^5.0.0" - }, - "peerDependencies": { - "@angular/common": "^11.0.0 || ^12.0.0-0", - "@angular/core": "^11.0.0 || ^12.0.0-0" } }, "node_modules/@angular/cdk/node_modules/parse5": { @@ -615,18 +610,11 @@ "dev": true }, "node_modules/@angular/material": { - "version": "11.2.13", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.13.tgz", - "integrity": "sha512-FqFdGSkOtqsmeLyTSousodDGUy2NqbtxCIKv2rwbsIRwHNKB0KpR/UQhA2gMRuGa5hxhMJ0DW0Tf9neMRuLCTg==", + "version": "11.2.12", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.12.tgz", + "integrity": "sha512-n3HDKoM552jLcmxtpTYzMUzV6V9vUBKyNs7SNdUfjuK00VJlTWMu03g/QWOj2Y9KftOuDUa8+N2XodwAr+jtCw==", "dependencies": { "tslib": "^2.0.0" - }, - "peerDependencies": { - "@angular/animations": "^11.0.0 || ^12.0.0-0", - "@angular/cdk": "11.2.13", - "@angular/common": "^11.0.0 || ^12.0.0-0", - "@angular/core": "^11.0.0 || ^12.0.0-0", - "@angular/forms": "^11.0.0 || ^12.0.0-0" } }, "node_modules/@angular/material-moment-adapter": { @@ -9614,28 +9602,6 @@ "tslib": "^2.0.0" } }, - "node_modules/ngx-mat-timepicker": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/ngx-mat-timepicker/-/ngx-mat-timepicker-15.1.3.tgz", - "integrity": "sha512-DqAzv9aLHPT316k+st9GV1QfUTNKE2SfEyCmOD2y86HqiTC5APKezVzQByH6kT3Jq46n7dzV6rtCoMsQ+LcBjQ==", - "dependencies": { - "ts-luxon": "^3.0.1", - "tslib": "^2.4.1" - }, - "engines": { - "node": ">=14.20.0" - }, - "peerDependencies": { - "@angular/animations": "^15.0.0", - "@angular/cdk": "^15.0.0", - "@angular/common": "^15.0.0", - "@angular/compiler": "^15.0.0", - "@angular/core": "^15.0.0", - "@angular/forms": "^15.0.0", - "@angular/material": "^15.0.0", - "@angular/platform-browser": "^15.0.0" - } - }, "node_modules/ngx-toastr": { "version": "13.2.1", "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-13.2.1.tgz", @@ -13977,14 +13943,6 @@ "tree-kill": "cli.js" } }, - "node_modules/ts-luxon": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ts-luxon/-/ts-luxon-3.5.2.tgz", - "integrity": "sha512-hO8viyesNP1zibJe/TFpRbHtbAWpCKYL7jN7248lvoubOCb31V+CzJHjhyI/HQCE1CgqxwKmqiFBl9T/gcvLJg==", - "engines": { - "node": ">=13" - } - }, "node_modules/ts-node": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", @@ -14014,9 +13972,9 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "node_modules/tslint": { "version": "6.1.3", @@ -16526,9 +16484,9 @@ } }, "@angular/cdk": { - "version": "11.2.13", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.13.tgz", - "integrity": "sha512-FkE4iCwoLbQxLDUOjV1I7M/6hmpyb7erAjEdWgch7nGRNxF1hqX5Bqf1lvLFKPNCbx5NRI5K7YVAdIUQUR8vug==", + "version": "11.2.12", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.12.tgz", + "integrity": "sha512-LImCQQ7n5OnTGXBAx1BaHgBBbdXiEtsNcHk5RvVURya9sswRcXRoa48EG3RyuT8mtqWsUdOX9+v4nCINLG4hZA==", "requires": { "parse5": "^5.0.0", "tslib": "^2.0.0" @@ -16729,9 +16687,9 @@ "dev": true }, "@angular/material": { - "version": "11.2.13", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.13.tgz", - "integrity": "sha512-FqFdGSkOtqsmeLyTSousodDGUy2NqbtxCIKv2rwbsIRwHNKB0KpR/UQhA2gMRuGa5hxhMJ0DW0Tf9neMRuLCTg==", + "version": "11.2.12", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.12.tgz", + "integrity": "sha512-n3HDKoM552jLcmxtpTYzMUzV6V9vUBKyNs7SNdUfjuK00VJlTWMu03g/QWOj2Y9KftOuDUa8+N2XodwAr+jtCw==", "requires": { "tslib": "^2.0.0" } @@ -19384,7 +19342,8 @@ "bootstrap": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", - "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==" + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", + "requires": {} }, "bootstrap-icons": { "version": "1.10.5", @@ -24357,15 +24316,6 @@ "tslib": "^2.0.0" } }, - "ngx-mat-timepicker": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/ngx-mat-timepicker/-/ngx-mat-timepicker-15.1.3.tgz", - "integrity": "sha512-DqAzv9aLHPT316k+st9GV1QfUTNKE2SfEyCmOD2y86HqiTC5APKezVzQByH6kT3Jq46n7dzV6rtCoMsQ+LcBjQ==", - "requires": { - "ts-luxon": "^3.0.1", - "tslib": "^2.4.1" - } - }, "ngx-toastr": { "version": "13.2.1", "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-13.2.1.tgz", @@ -27996,11 +27946,6 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, - "ts-luxon": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ts-luxon/-/ts-luxon-3.5.2.tgz", - "integrity": "sha512-hO8viyesNP1zibJe/TFpRbHtbAWpCKYL7jN7248lvoubOCb31V+CzJHjhyI/HQCE1CgqxwKmqiFBl9T/gcvLJg==" - }, "ts-node": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", @@ -28021,9 +27966,9 @@ "dev": true }, "tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "tslint": { "version": "6.1.3", diff --git a/package.json b/package.json index 32bf373..c9c07d3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "ng-otp-input": "^1.8.1", "ngx-bootstrap": "^7.0.0", "ngx-echarts": "6.0.1", - "ngx-mat-timepicker": "^15.1.3", "ngx-toastr": "13.2.1", "ngx-trend": "6.1.1", "pdfmake": "^0.2.5", @@ -66,4 +65,4 @@ "tslint": "~6.1.0", "typescript": "4.1.5" } -} \ No newline at end of file +} diff --git a/src/app/_dto/tender-detail.dto.ts b/src/app/_dto/tender-detail.dto.ts index ebf0358..471c266 100644 --- a/src/app/_dto/tender-detail.dto.ts +++ b/src/app/_dto/tender-detail.dto.ts @@ -1,12 +1,7 @@ -<<<<<<< HEAD import { TenderCoversDto } from "./tender-covers.dto"; import { TenderDocumentDto } from "./tender-documents.dto"; -======= -import { TenderDocumentDto } from "./tender-documents.dto"; - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 export class TenderDetailDto{ id: number ; orgChain: string ; @@ -39,20 +34,20 @@ export class TenderDetailDto{ productCategory: number ; bidValidity: number ; pincode: number ; - preBidDate: Date ; + preBidDate: Date |any; allowPreferencialBidder: string ; subCategory: string ; periodOfWork: number ; preBidMeetPlace: string ; bidOpeningPlace: string ; - publishDate: Date ; - saleStartDate: Date ; - clarificationStartDate: Date ; - bidSubStartDate: Date ; - bidOpenDate: Date ; - saleEndDate: Date ; - clarificationEndDate: Date ; - bidSubEndDate: Date ; + publishDate: Date |any ; + saleStartDate: Date |any ; + clarificationStartDate: Date |any ; + bidSubStartDate: Date |any; + bidOpenDate: Date |any ; + saleEndDate: Date |any ; + clarificationEndDate: Date |any ; + bidSubEndDate: Date |any ; tenderInvName: string ; tenderInvAddess: string ; tenderType: number ; @@ -67,9 +62,6 @@ export class TenderDetailDto{ File: any ; tenderDoc: TenderDocumentDto[] =[]; crud: any; -<<<<<<< HEAD covers : TenderCoversDto[] =[]; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } \ No newline at end of file diff --git a/src/app/_dto/tender-documents.dto.ts b/src/app/_dto/tender-documents.dto.ts index 84f2d2f..5a4c268 100644 --- a/src/app/_dto/tender-documents.dto.ts +++ b/src/app/_dto/tender-documents.dto.ts @@ -1,20 +1,13 @@ export class TenderDocumentDto{ - tenderId:string; + tenderId:string|any; docName:string; description:string; docType:string; documentSize:number; file: any; -<<<<<<< HEAD crud: any; documentCategory: any; docCategory: string; -======= - - crud: any; - - documentCategory: any; - docCategory: string; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + userId?:string; } \ No newline at end of file diff --git a/src/app/_modules/auth/admin-home/admin-home.component.html b/src/app/_modules/auth/admin-home/admin-home.component.html index f27dac3..3f3ecfc 100644 --- a/src/app/_modules/auth/admin-home/admin-home.component.html +++ b/src/app/_modules/auth/admin-home/admin-home.component.html @@ -150,11 +150,7 @@ CLOSING DATE BID OPEN DATE VIEW -<<<<<<< HEAD -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @@ -168,12 +164,6 @@ -<<<<<<< HEAD -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 --> diff --git a/src/app/_modules/auth/admin-home/admin-home.component.ts b/src/app/_modules/auth/admin-home/admin-home.component.ts index bec0990..9272c6d 100644 --- a/src/app/_modules/auth/admin-home/admin-home.component.ts +++ b/src/app/_modules/auth/admin-home/admin-home.component.ts @@ -3,16 +3,12 @@ import { Router } from '@angular/router'; import { apiUrl } from 'src/app/_providers/_resources/api-url.properties'; import { AuthService } from 'src/app/_providers/_services/auth.service'; import { MasterService } from 'src/app/_providers/_services/master.service'; -<<<<<<< HEAD import { MatPaginator } from '@angular/material/paginator'; import { MatSort, Sort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service'; import { UiService } from 'src/app/_providers/_services/ui.service'; -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @Component({ selector: 'app-admin-home', templateUrl: './admin-home.component.html', @@ -22,7 +18,6 @@ export class AdminHomeComponent implements OnInit { tenderData: any; -<<<<<<< HEAD dataSource: MatTableDataSource; displayedColumns = ['slno','title','publishedDate','bidOpenDate','view']; @@ -70,24 +65,6 @@ export class AdminHomeComponent implements OnInit { console.error(err) }) -======= - - displayedColumns: string[] = ['no', 'name','download']; - - tenderData: any; - - constructor(private authenticationService: AuthService, - private router: Router, - private _masterService: MasterService) { } - - ngOnInit(): void { - this._masterService.getMasterData(apiUrl.getTender).then((res) =>{ - console.log("tenderData",res); - this.tenderData = res - - - }) ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } public signOut(): void { @@ -108,7 +85,6 @@ export class AdminHomeComponent implements OnInit { goToView(tenderId:number) { this.router.navigate(['/auth/view',tenderId]); -<<<<<<< HEAD } goToUpload(tenderId){ @@ -141,8 +117,6 @@ export class AdminHomeComponent implements OnInit { this.pageLength = this.tenderData.length; this.dataSource = new MatTableDataSource(this.tenderData); this.loading = false; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } reset(){ diff --git a/src/app/_modules/auth/auth.module.ts b/src/app/_modules/auth/auth.module.ts index ce88607..66eab5b 100644 --- a/src/app/_modules/auth/auth.module.ts +++ b/src/app/_modules/auth/auth.module.ts @@ -17,13 +17,10 @@ import { ViewComponent } from './view/view.component'; import { UploadComponent } from './upload/upload.component'; import { RegisterComponent } from './register/register.component'; import { MatFormFieldModule } from '@angular/material/form-field'; -<<<<<<< HEAD import { MatTableModule } from '@angular/material/table'; import { MatPaginatorModule } from '@angular/material/paginator'; import { MatSortModule } from '@angular/material/sort'; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 // import { AdminHomeComponent } from './admin-home/admin-home.component'; @@ -50,14 +47,10 @@ import { MatSortModule } from '@angular/material/sort'; MatProgressBarModule, TranslateModule, NgOtpInputModule, -<<<<<<< HEAD MatFormFieldModule, MatTableModule, MatPaginatorModule, MatSortModule -======= - MatFormFieldModule ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 ] }) export class AuthModule { } diff --git a/src/app/_modules/auth/login/login.component.ts b/src/app/_modules/auth/login/login.component.ts index b017437..175d65e 100644 --- a/src/app/_modules/auth/login/login.component.ts +++ b/src/app/_modules/auth/login/login.component.ts @@ -107,6 +107,7 @@ export class LoginComponent implements OnInit { console.log("fFFf",res); localStorage.setItem('username', res.username); + localStorage.setItem('userId', res.userId); localStorage.setItem('seculevel', res.secuLevel); }, (err) => { console.log("err=1=", err); diff --git a/src/app/_modules/auth/view/view.component.html b/src/app/_modules/auth/view/view.component.html index 4ddc641..2718a4b 100644 --- a/src/app/_modules/auth/view/view.component.html +++ b/src/app/_modules/auth/view/view.component.html @@ -66,7 +66,6 @@ Tender Reference Number {{tenderData.tenderRefNo}} -<<<<<<< HEAD Tender ID @@ -83,32 +82,6 @@ Payment Mode {{tenderData?.paymentModeD?.paymentMode}} -======= - - - Tender ID - {{tenderData.productCategoryD.tenderId}} - - - Tender Type - {{tenderData.tenderCategoryD.tenderType}} - - - Tender Category - {{tenderData.tenderCategoryD.tenderCategory}} - - - Payment Mode - {{tenderData.paymentModeD.paymentMode}} - - - Form of Contract - {{tenderData.formOfContractD.formOfContract}} - - - No. of Covers - {{tenderData.NoCovers}} ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 Form of Contract @@ -144,13 +117,6 @@ Tender Fee Exemption Allowed {{tenderData.tenderFeeExemption}} -<<<<<<< HEAD -======= - - - Fee Payable At - {{tenderData.feePayableAt}} ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + + + + + + + + + + ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -377,40 +307,21 @@ -<<<<<<< HEAD -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - -<<<<<<< HEAD + - - - - - -======= - - - - - - - + + + - - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -423,47 +334,41 @@ - - - - + + + + -<<<<<<< HEAD -
- + - - - - + + + + -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
Drawings DocumentNIT Document
Drawings
Document NameDescription
{{document.description}}
Download
Document Name Description
{{document.documentTypeD.documentType}}{{document.docName}}{{document.description}}
NIT DocumentsNotice
Document Type Document Name Description
{{document.documentTypeD.documentType}}{{document.docName}}{{document.description}}
Download as Zip File
-<<<<<<< HEAD
@@ -480,10 +385,10 @@ Document Format - - - - + + {{ document.coverTypeD.coverType }} + {{ document.Description }} + {{ document.fileFormatD.fileFormat }} @@ -497,8 +402,6 @@
-======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
diff --git a/src/app/_modules/auth/view/view.component.scss b/src/app/_modules/auth/view/view.component.scss index 94a6be5..9c09c2d 100644 --- a/src/app/_modules/auth/view/view.component.scss +++ b/src/app/_modules/auth/view/view.component.scss @@ -43,9 +43,5 @@ // } thead{ -<<<<<<< HEAD background-color:#48746e; color: aliceblue; -======= - background-color: rgb(161, 42, 42); color: aliceblue; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } \ No newline at end of file diff --git a/src/app/_modules/auth/view/view.component.ts b/src/app/_modules/auth/view/view.component.ts index 1c46cc2..0f84fd0 100644 --- a/src/app/_modules/auth/view/view.component.ts +++ b/src/app/_modules/auth/view/view.component.ts @@ -1,14 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -<<<<<<< HEAD import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; 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 { apiUrl } from 'src/app/_providers/_resources/api-url.properties'; -import { MasterService } from 'src/app/_providers/_services/master.service'; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @Component({ selector: 'app-view', @@ -19,6 +14,11 @@ export class ViewComponent implements OnInit { tenderId: number; tenderData: any; + nitItemDocuments: any ; + workItemDocuments: any; + drawingsDocuments: any; + tenderDocuments: any; + constructor(private router: Router, @@ -27,24 +27,28 @@ export class ViewComponent implements OnInit { this.tenderId = +this.route.snapshot.paramMap.get('id'); } ngOnInit(): void { -<<<<<<< HEAD this.tenderData = new TenderDetailDto() -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 console.log("this.tenderId",this.tenderId); this.getData() } + getData(){ this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderId).then((res) =>{ console.log("tenderData",res); -<<<<<<< HEAD -======= - console.log("res",res.orgChain); - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - this.tenderData = res}) + this.tenderData = res + this.tenderDocuments = this.tenderData['tenderDoc'] + console.log("data",this.tenderDocuments); + }) +} + +filterDataByCategory() { + + + this.drawingsDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'D'); + this.workItemDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'WID'); + this.nitItemDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'NIT'); } @@ -60,7 +64,6 @@ getData(){ window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; } -<<<<<<< HEAD DownloadDrawings(){ const id = this.tenderId; this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{ @@ -108,7 +111,5 @@ getData(){ } -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } diff --git a/src/app/_modules/dashboard/add-tenders/add-tenders.component.html b/src/app/_modules/dashboard/add-tenders/add-tenders.component.html index 0d2d725..ed0fef1 100644 --- a/src/app/_modules/dashboard/add-tenders/add-tenders.component.html +++ b/src/app/_modules/dashboard/add-tenders/add-tenders.component.html @@ -24,17 +24,10 @@
-<<<<<<< HEAD
-======= - - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -138,19 +131,11 @@
-<<<<<<< HEAD -======= -
- - -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3

@@ -193,19 +178,11 @@
-<<<<<<< HEAD -======= -
- - -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -260,39 +237,11 @@
-<<<<<<< HEAD -======= - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD -======= - - -
-
-
-
- - -
-
- - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD
-======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -319,7 +265,6 @@ [(ngModel)]="tenderData.bidValidity" name="bidValidity">
-<<<<<<< HEAD @@ -343,30 +288,12 @@ -======= - - -
-
- - -
-
-
-
- - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD
@@ -389,13 +316,6 @@ -======= -
- - -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -413,21 +333,16 @@
-

+

-<<<<<<< HEAD
-======= -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 Published Date -<<<<<<< HEAD @@ -438,23 +353,12 @@
-======= - - - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 Document Download / Sale Start Date -<<<<<<< HEAD @@ -467,22 +371,11 @@
-======= - - - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -<<<<<<< HEAD Clarification Start Date @@ -496,24 +389,10 @@
-======= - - Clarification Start Date - - - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -<<<<<<< HEAD Document Download / Sale End Date @@ -529,25 +408,11 @@
-======= - - Document Download / Sale End Date - - - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -<<<<<<< HEAD Clarification End Date @@ -560,37 +425,16 @@
-======= - - Clarification End Date - - - - -
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 Bid Submission Start Date -<<<<<<< HEAD -======= - - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @@ -598,7 +442,6 @@ -->
-<<<<<<< HEAD
@@ -621,38 +464,10 @@
-======= - - - - -
- - - Bid Submission End Date - - - - -
- -
-
- - - -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -<<<<<<< HEAD Bid Opening Date @@ -663,17 +478,6 @@ [for]="bidOpenDate"> --> -======= - - Bid Opening Date - - - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -693,11 +497,151 @@
-<<<<<<< HEAD -

-======= + + +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Required Documents
Required + Document typeDescription + Document + Format
+
+ + + Document Type + + Select Document Type + + + {{coverType.coverType}} + + + + +
+
+
+ + +
+
+ + Document Type + + Select Document + Type + + {{fileFormat.fileFormat}} + + + + + +
+ +
+
+
+
+
+
+ + +
+
+
+ + +

+
+
+
+
+ + +
+ +
+ + +
+
+
+

+ +
+
+
+ + +
+
+ +
+ +

->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -706,7 +650,6 @@ -<<<<<<< HEAD @@ -858,29 +801,11 @@ (change)="UploadDrawingFiles($event,i)" (change)="readUrl($event)" [ngModelOptions]="{standalone: true}"> --> -======= - - NIT Document - - - Upload Files - Description - - - -
- ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD --> -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-======= - (click)="addNewNITDocRow()">Add Row ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -<<<<<<< HEAD @@ -954,22 +871,10 @@ style="min-width: 250px;text-align: center;">Document Type Description -======= - - - - Work Item Documents - - - Upload Files - Document Type - Description ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD @@ -995,20 +900,12 @@ [(ngModel)]="workItemDocuments[i].file" (change)="UploadFiles($event,i,'WID')" [ngModelOptions]="{standalone: true}"> --> -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD @@ -1026,24 +923,14 @@ -======= - *ngFor="let documentType of documentTypeLov"> - {{documentType.documentType}} - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -1084,8 +971,8 @@ -
@@ -1093,154 +980,9 @@ -<<<<<<< HEAD - -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Required Documents
Required - Document typeDescription - Document - Format
-
- - Document Type - - Select Document Type - - - {{coverType.coverType}} - - - - -
-
-
- - -
-
- - Document Type - - Select Document - Type - - {{fileFormat.fileFormat}} - - - - - -
- -
-
-
-
-
-
- - -
-
-
- -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -

-
-
-
-
- - -
- -
- - -
-
-
-

- -
-
-
- -<<<<<<< HEAD - -
-
- -
+ diff --git a/src/app/_modules/dashboard/add-tenders/add-tenders.component.scss b/src/app/_modules/dashboard/add-tenders/add-tenders.component.scss index b58e70e..4dd9228 100644 --- a/src/app/_modules/dashboard/add-tenders/add-tenders.component.scss +++ b/src/app/_modules/dashboard/add-tenders/add-tenders.component.scss @@ -23,7 +23,6 @@ min-width: 120px; /* adjust the value as per your requirements */ } -<<<<<<< HEAD .green-snackbar { background-color: green; @@ -43,7 +42,4 @@ .element-with-tooltip { cursor: pointer; /* Set the cursor style to pointer for the element */ - } -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + } \ No newline at end of file diff --git a/src/app/_modules/dashboard/add-tenders/add-tenders.component.ts b/src/app/_modules/dashboard/add-tenders/add-tenders.component.ts index bb9f701..dcd4b42 100644 --- a/src/app/_modules/dashboard/add-tenders/add-tenders.component.ts +++ b/src/app/_modules/dashboard/add-tenders/add-tenders.component.ts @@ -1,23 +1,16 @@ +import { DatePipe } from '@angular/common'; import { Component, OnInit,ViewChild } from '@angular/core'; -<<<<<<< HEAD import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatTabGroup } from '@angular/material/tabs'; import { ActivatedRoute, Router } from '@angular/router'; import { TenderCoversDto } from 'src/app/_dto/tender-covers.dto'; -======= -import { MatTabGroup } from '@angular/material/tabs'; -import { ActivatedRoute, Router } from '@angular/router'; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto'; 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 { UiService } from 'src/app/_providers/_services/ui.service'; -<<<<<<< HEAD import Swal from 'sweetalert2' -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @Component({ selector: 'app-add-tenders', @@ -40,7 +33,6 @@ export class AddTendersComponent implements OnInit { documentTypeLov: any; isNITDocUploaded: boolean = false; isWIDocUploaded: boolean = false; -<<<<<<< HEAD toggleValue : boolean = true; nitDocuments: TenderDocumentDto[] ; @@ -58,24 +50,17 @@ export class AddTendersComponent implements OnInit { addDrwROW: boolean= true showMessage: boolean = false; -======= - - nitDocuments: TenderDocumentDto[] ; - workItemDocuments: TenderDocumentDto[]; - selectedFiles: any; - tenderID: number; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + newDRWROW: boolean = false; + newCvrROW: boolean = false; + id: number; constructor(private router: Router, private _masterService : MasterService, private _ui:UiService, private route: ActivatedRoute, -<<<<<<< HEAD private errorTranslateService: ErrorTranslateService, + private datePipe: DatePipe, private snackBar: MatSnackBar) -======= - private errorTranslateService: ErrorTranslateService,) ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 { this.seculevel = localStorage.getItem('seculevel') @@ -86,7 +71,6 @@ export class AddTendersComponent implements OnInit { } ngOnInit(): void { -<<<<<<< HEAD // this.addnoticeROW= true; // this.addDrwROW = true; this.nitDocuments = []; @@ -97,7 +81,23 @@ export class AddTendersComponent implements OnInit { if(this.tenderID){ this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderID).then((res) =>{ - this.tenderData = res + this.tenderData = res + + + this.tenderData.publishDate = this.convertDateFormat(res.publishDate) ; + this.tenderData.saleStartDate = this.convertDateFormat(res.saleStartDate); + this.tenderData.clarificationStartDate = this.convertDateFormat(res.clarificationStartDate); + this.tenderData.saleEndDate = this.convertDateFormat(res.saleEndDate); + this.tenderData.clarificationEndDate = this.convertDateFormat(res.clarificationEndDate); + this.tenderData.bidSubStartDate = this.convertDateFormat(res.bidSubStartDate); + this.tenderData.bidSubEndDate = this.convertDateFormat(res.bidSubEndDate); + this.tenderData.bidOpenDate = this.convertDateFormat(res.bidOpenDate); + + + + this.coverDocs = this.tenderData.covers + this.newCvrROW =true + this.newDRWROW =true this.drawingsDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'D'); for(let i=0;i{ - console.log("gfgfgf",res); - this.tenderData = res - this.nitDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'NIT'); - this.workItemDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'WID'); - }) - - } ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 getData(){ // this._masterService.getMasterData(apiUrl).then((res) =>{ // this.AllTenderData = res @@ -176,13 +164,10 @@ export class AddTendersComponent implements OnInit { this._masterService.getMasterData(apiUrl.documentType).then((res) =>{ this.documentTypeLov = res console.log("res========================",res); -<<<<<<< HEAD this.filteredDocumentDrawingTypeLov = this.documentTypeLov.filter(docType => docType.docCategory === 'D'); this.filteredDocumentNITTypeLov = this.documentTypeLov.filter(docType => docType.docCategory === 'N'); this.filteredDocumentTypeLov = this.documentTypeLov.filter(docType => docType.docCategory == 'WID'); -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 }) @@ -204,7 +189,6 @@ export class AddTendersComponent implements OnInit { // console.log("productcategoryLov",res); }) -<<<<<<< HEAD this._masterService.getMasterData(apiUrl.coverslov).then((res) =>{ this.coverslov = res @@ -216,23 +200,22 @@ export class AddTendersComponent implements OnInit { } + + + + + addNewNitDocRow() { if(this.addnoticeROW){ this._ui.toastMessage(this.errorTranslateService.translate("pleaseEnableNoticeDocuments"),2000,false); }else { -======= - } - - addNewNITDocRow() { ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 const lastRow = new TenderDocumentDto(); let newRow = Object.assign({}, lastRow); newRow.documentCategory = 'NIT' newRow.crud = 'I' this.nitDocuments.push(newRow); console.log('===this.nitDocuments===',this.nitDocuments); -<<<<<<< HEAD } } @@ -250,8 +233,6 @@ export class AddTendersComponent implements OnInit { } -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } @@ -263,10 +244,10 @@ export class AddTendersComponent implements OnInit { newRow.documentCategory = 'WID' newRow.crud = 'I' this.workItemDocuments.push(newRow); + this.newDRWROW = true } -<<<<<<< HEAD addNewcoverDocRow() { const lastRow = new TenderCoversDto(); @@ -274,71 +255,26 @@ export class AddTendersComponent implements OnInit { // newRow.documentCategory = 'C' newRow.crud = 'I' this.coverDocs.push(newRow); + this.newCvrROW = true } - deleteDrawingsRow(id, index: number) { - - - let removeRow = Object.assign({}, (this.drawingsDocuments).splice(index, 1)[0]); - // this.nitDocuments.push(removeRow); - - } - deleteNITRow(id, index: number) { - - let removeRow = Object.assign({}, (this.nitDocuments).splice(index, 1)[0]); - // this.workItemDocuments.push(removeRow); - - } - deleteWIDRow(id, index: number) { - -======= - deleteNITRow(id, index: number) { - - // console.log('id for delete===', id); - console.log('index for delete===', index); - - let removeRow = Object.assign({}, (this.nitDocuments).splice(index, 1)[0]); - // this.nitDocuments.push(removeRow); - - } - deleteWIDRow(id, index: number) { - - console.log('id for delete===', id); - console.log('index for delete===', index); - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - let removeRow = Object.assign({}, (this.workItemDocuments).splice(index, 1)[0]); - // this.workItemDocuments.push(removeRow); - - } - -<<<<<<< HEAD - deleteCoverRow(id, index: number){ - - let removeRow = Object.assign({}, (this.coverDocs).splice(index, 1)[0]); - } UploadFiles(event,i,type){ -======= - UploadFiles(event,i,type){ - console.log(" this.tenderData.tenderId", this.tenderData.tenderId); ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 this.selectedFiles = event.target.files; let file = event.target.files[0] const fd = new FormData(); fd.append('file', file); - if(file && this.tenderData.tenderId) - this._masterService.postMasterData(apiUrl.docUpload,fd,this.tenderData.tenderId).then((res)=>{ + if(file && this.id) + this._masterService.postMasterData(apiUrl.docUpload,fd,this.id).then((res)=>{ console.log("res1===",res.fileName); console.log("res2===",res.fileSizeKB); console.log('======= this.tenderData.tenderDocs==========', this.tenderData.tenderDoc); -<<<<<<< HEAD if(type == 'WID'){ // this.nitDocuments[i].docName = res.fileName // this.nitDocuments[i].file = res.fileName @@ -361,8 +297,8 @@ export class AddTendersComponent implements OnInit { fd.append('file', file); - if(file && this.tenderData.tenderId) - this._masterService.postMasterData(apiUrl.nitUploadDoc,fd,this.tenderData.tenderId).then((res)=>{ + if(file && this.id) + this._masterService.postMasterData(apiUrl.nitUploadDoc,fd,this.id).then((res)=>{ console.log("res1===",res.fileName); console.log("res2===",res.fileSizeKB); console.log('======= this.tenderData.tenderDocs==========', this.tenderData.tenderDoc); @@ -391,9 +327,9 @@ export class AddTendersComponent implements OnInit { let file = event.target.files[0] const fd = new FormData(); fd.append('file', file); - if(file && this.tenderData.tenderId) + if(file && this.id) console.log(" this.drawingsDocuments", this.drawingsDocuments); - this._masterService.postMasterData(apiUrl.drawingUploadDoc,fd,this.tenderData.tenderId).then((res) =>{ + this._masterService.postMasterData(apiUrl.drawingUploadDoc,fd,this.id).then((res) =>{ console.log("drawings===",res); this.drawingsDocuments[i].docName = res.fileName this.drawingsDocuments[i].file = res.fileName; @@ -403,6 +339,34 @@ export class AddTendersComponent implements OnInit { } + + deleteDrawingsRow(id, index: number) { + + this._masterService.deleteMasterData(apiUrl.drawingsDelete,`${this.id}/${this.drawingsDocuments[index].docName}`) + + let removeRow = Object.assign({}, (this.drawingsDocuments).splice(index, 1)[0]); + // this.nitDocuments.push(removeRow); + + } + deleteNITRow(id, index: number) { + this._masterService.deleteMasterData(apiUrl.noticeDelete,`${this.id}/${this.nitDocuments[index].docName}`) + let removeRow = Object.assign({}, (this.nitDocuments).splice(index, 1)[0]); + // this.workItemDocuments.push(removeRow); + + } + deleteWIDRow(id, index: number) { + this._masterService.deleteMasterData(apiUrl.widDelete,`${this.id}/${this.workItemDocuments[index].docName}`) + let removeRow = Object.assign({}, (this.workItemDocuments).splice(index, 1)[0]); + // this.workItemDocuments.push(removeRow); + + } + + deleteCoverRow(id, index: number){ + + let removeRow = Object.assign({}, (this.coverDocs).splice(index, 1)[0]); + + } + // UploadCoverFiles(event,i){ // this.selectedFiles = event.target.files; // let file = event.target.files[0] @@ -414,25 +378,6 @@ export class AddTendersComponent implements OnInit { // } -======= - if(type == 'NIT'){ - this.nitDocuments[i].docName = res.fileName - this.nitDocuments[i].documentSize =res.fileSizeKB; - } - else{ - this.workItemDocuments[i].docName = res.fileName - this.workItemDocuments[i].documentSize =res.fileSizeKB; - } - - // this.tenderData.tenderDocs[i].docName = res.fileName; - // this.tenderData.tenderDocs[i].doc_size =res.fileSizeKB; - - }) - - - } - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 readUrl(event: any) { // console.log('size is high'); @@ -549,7 +494,6 @@ export class AddTendersComponent implements OnInit { else if(this.tenderData.ndaPreQualification =='' || this.tenderData.ndaPreQualification == null || this.tenderData.ndaPreQualification == undefined){ this._ui.toastMessage(this.errorTranslateService.translate("preQualificationCantBeBlank"),2000,true); } -<<<<<<< HEAD else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){ this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true); } @@ -593,44 +537,6 @@ export class AddTendersComponent implements OnInit { // this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingPlaceCantBeBlank"),2000,true); // } -======= - else if( this.tenderData.pincode == null || this.tenderData.pincode == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("pincodeCantBeBlank"),2000,true); - } - else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true); - } - else if(this.tenderData.contractType =='' || this.tenderData.contractType == null || this.tenderData.contractType == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("contractTypeCantBeBlank"),2000,true); - } - else if(this.tenderData.location =='' || this.tenderData.location == null || this.tenderData.location == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("locationCantBeBlank"),2000,true); - } - // else if( this.tenderData.preBidMeetAdd == '' || this.tenderData.preBidMeetAdd == null || this.tenderData.preBidMeetAdd == undefined){ - // this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingAddressCantBeBlank"),2000,true); - // } - else if( this.tenderData.productCategory == null || this.tenderData.productCategory == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("productCategoryCantBeBlank"),2000,true); - } - else if( this.tenderData.bidValidity == null || this.tenderData.bidValidity == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("bidValidityCantBeBlank"),2000,true); - } - // else if( this.tenderData.preBidDate == null || this.tenderData.preBidDate == undefined){ - // this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingDateCantBeBlank"),2000,true); - // } - else if(this.tenderData.subCategory =='' || this.tenderData.subCategory == null || this.tenderData.subCategory == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("subCategoryCantBeBlank"),2000,true); - } - else if( this.tenderData.periodOfWork == null || this.tenderData.periodOfWork == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("periodOfWorkCantBeBlank"),2000,true); - } - // else if(this.tenderData.preBidMeetPlace == '' || this.tenderData.preBidMeetPlace == null || this.tenderData.preBidMeetPlace == undefined){ - // this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingPlaceCantBeBlank"),2000,true); - // } - else if(this.tenderData.bidOpeningPlace =='' || this.tenderData.bidOpeningPlace == null || this.tenderData.bidOpeningPlace == undefined){ - this._ui.toastMessage(this.errorTranslateService.translate("bidOpeningPlaceCantBeBlank"),2000,true); - } ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 else this.nextTab() } @@ -670,48 +576,146 @@ export class AddTendersComponent implements OnInit { } - TendersDocuments(){ -<<<<<<< HEAD - // if( this.nitDocuments.file == null || this.nitDocuments.file == undefined){ -======= - // if( this.tenderData.emdAmt == null || this.tenderData.emdAmt == undefined){ ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - // this._ui.toastMessage(this.errorTranslateService.translate("feePayableAtCantBeBlank"),2000,true); - // } - // else if(this.tenderData.emdFeeType =='' || this.tenderData.emdFeeType == null || this.tenderData.emdFeeType == undefined){ - // console.log("errrrr2"); - // } - // else if(this.tenderData.emdPayableTo =='' || this.tenderData.emdPayableTo == null || this.tenderData.emdPayableTo == undefined){ - // console.log("errrrr3"); - // } - // else if( this.tenderData.allowEmdBgOrSt == '' || this.tenderData.allowEmdBgOrSt == null || this.tenderData.allowEmdBgOrSt == undefined){ - // console.log("errrrr4"); - // } - // else if( this.tenderData.emdPercentage == null || this.tenderData.emdPercentage == undefined){ - // console.log("errrrr5"); - // } - // else -<<<<<<< HEAD - this.tenderData.tenderDoc = this.nitDocuments.concat(this.workItemDocuments, this.drawingsDocuments) - this.nextTab() + + tenderDocumnetsPreCheck(){ + + for (let i = 0; i < this.drawingsDocuments.length; i++) { + if( this.drawingsDocuments[i].file == null || this.drawingsDocuments[i].file == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("UploaddocumentCantBeBlank"),2000,true); + return false; + } + else if(this.drawingsDocuments[i].docType == '' ||this.drawingsDocuments[i].docType == null || this.drawingsDocuments[i].docType == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("documentTypeCantBeBlank"),2000,true); + return false; + } + else if(this.drawingsDocuments[i].description == '' ||this.drawingsDocuments[i].description == null || this.drawingsDocuments[i].description == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("descriptionCantBeBlank"),2000,true); + return false; + } + } + + for (let i = 0; i < this.nitDocuments.length; i++) { + if( this.nitDocuments[i].file == null || this.nitDocuments[i].file == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("UploaddocumentCantBeBlank"),2000,true); + return false; + } + else if(this.nitDocuments[i].docType == '' || this.nitDocuments[i].docType == null || this.nitDocuments[i].docType == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("documentTypeCantBeBlank"),2000,true); + return false; + } + else if(this.nitDocuments[i].description == '' || this.nitDocuments[i].description == null || this.nitDocuments[i].description == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("descriptionCantBeBlank"),2000,true); + return false; + } + } + + for (let i = 0; i < this.workItemDocuments.length; i++) { + if( this.workItemDocuments[i].file == null || this.workItemDocuments[i].file == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("UploaddocumentCantBeBlank"),2000,true); + return false; + } + else if(this.workItemDocuments[i].docType == '' ||this.workItemDocuments[i].docType == null || this.workItemDocuments[i].docType == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("documentTypeCantBeBlank"),2000,true); + return false; + } + else if(this.workItemDocuments[i].description == '' ||this.workItemDocuments[i].description == null || this.workItemDocuments[i].description == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("descriptionCantBeBlank"),2000,true); + return false; + } + } +return true + } + + + RequiredDocumentsPreCheck(){ + + for (let i = 0; i < this.coverDocs.length; i++) { + if( this.coverDocs[i].coverType == null || this.coverDocs[i].coverType == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("documentTypeCantBeBlank"),2000,true); + return false; + } + else if(this.coverDocs[i].Description == '' ||this.coverDocs[i].Description == null || this.coverDocs[i].Description == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("descriptionCantBeBlank"),2000,true); + return false; + } + else if(this.coverDocs[i].fileFormat == '' ||this.coverDocs[i].fileFormat == null || this.coverDocs[i].fileFormat == undefined){ + this._ui.toastMessage(this.errorTranslateService.translate("documentFormatCantBeBlank"),2000,true); + return false; + } + } +return true + } + + RequiredDocuments(){ + if(this.RequiredDocumentsPreCheck() ) + if(!this.newCvrROW){ + this._ui.toastMessage(this.errorTranslateService.translate("requiresDocs"),2000,true); + return false; + } + if(this.RequiredDocumentsPreCheck() ){ this.tenderData.covers = this.coverDocs this.nextTab() + } } - + + + + TendersDocuments(){ + this.tenderData.id =this.id + this.tenderData.crud = 'I' + + if(this.tenderDocumnetsPreCheck() ) + if(!this.newDRWROW){ + this._ui.toastMessage(this.errorTranslateService.translate("addDocs"),2000,true); + return false; + + } + if(this.tenderDocumnetsPreCheck() ){ + // this.nextTab() + this.tenderData.tenderDoc = this.nitDocuments.concat(this.workItemDocuments, this.drawingsDocuments) + + this._masterService.saveAllMasterData(apiUrl.AllTenderData,this.tenderData).then((res)=>{ + + if(res){ + Swal.fire( + 'Created', + 'Tender created successfully', + 'success' + ) -======= - this.tenderData.tenderDoc = this.nitDocuments.concat(this.workItemDocuments) - this.nextTab() + + + } + + }, (err) =>{ + if(err.status != 201){ + console.log("-error-"); + Swal.fire({ + icon: 'error', + title: 'Oops...', + text: 'Something went wrong!', + + }) + + } + }); + + + + } } ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + + + + submit(){ this.tenderData.crud = 'I' console.log('onsub---',this.tenderData); @@ -725,16 +729,19 @@ export class AddTendersComponent implements OnInit { return } -<<<<<<< HEAD this._masterService.saveAllMasterData(apiUrl.AllTenderData,this.tenderData).then((res)=>{ console.log('successssssssss========',res); + this.id = res['id'] + console.log('this.id========',this.id); if(res){ Swal.fire( 'Created', - 'Tender created successfully', + 'Tender Details created successfully', 'success' ) + this.nextTab() + } }, (err) =>{ @@ -749,16 +756,6 @@ export class AddTendersComponent implements OnInit { } }); -======= - console.log('onsub-2--',this.tenderData); - - // - - this._masterService.saveAllMasterData(apiUrl.AllTenderData,this.tenderData).then((res)=>{ - console.log(res); - - }) ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } diff --git a/src/app/_modules/dashboard/dashboard-routing.module.ts b/src/app/_modules/dashboard/dashboard-routing.module.ts index ed0ed79..495ae85 100644 --- a/src/app/_modules/dashboard/dashboard-routing.module.ts +++ b/src/app/_modules/dashboard/dashboard-routing.module.ts @@ -12,11 +12,7 @@ const routes: Routes = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, { path: 'dashboard', component: DashboardComponent }, {path:'tender-view/:id', component:HomeViewComponent}, -<<<<<<< HEAD {path:'tender-upload/:id',component:HomeUploadComponent}, -======= - {path:'tender-upload',component:HomeUploadComponent}, ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 { path: 'add-tenders', component: AddTendersComponent}, { path: 'add-tenders/:id', component: AddTendersComponent} diff --git a/src/app/_modules/dashboard/dashboard.component.html b/src/app/_modules/dashboard/dashboard.component.html index 403f8ed..4e8dcea 100644 --- a/src/app/_modules/dashboard/dashboard.component.html +++ b/src/app/_modules/dashboard/dashboard.component.html @@ -1,9 +1,6 @@
-<<<<<<< HEAD -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD
-======= -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -73,13 +62,8 @@ TENDER NAME EDIT VIEW -<<<<<<< HEAD UPLOAD -======= - UPLOAD - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @@ -92,13 +76,8 @@ -<<<<<<< HEAD -======= - - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 diff --git a/src/app/_modules/dashboard/dashboard.component.ts b/src/app/_modules/dashboard/dashboard.component.ts index e0d0515..4beb0e5 100644 --- a/src/app/_modules/dashboard/dashboard.component.ts +++ b/src/app/_modules/dashboard/dashboard.component.ts @@ -14,11 +14,8 @@ import { MatSort, Sort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { routes } from 'src/app/consts'; import { MasterService } from 'src/app/_providers/_services/master.service'; -<<<<<<< HEAD import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service'; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 @Component({ selector: 'app-dashboard', @@ -38,7 +35,6 @@ export class DashboardComponent implements OnInit { public routers: typeof routes = routes; schoolLogoPath: string; -<<<<<<< HEAD tenderData: any; @@ -59,10 +55,6 @@ export class DashboardComponent implements OnInit { @ViewChild(MatSort, { static: false }) sort: MatSort; noData: boolean; -======= - tenderData: any; - seculevel: string = '' ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 constructor( private _menuService: MenuService, @@ -70,12 +62,8 @@ export class DashboardComponent implements OnInit { private _ui: UiService, private emailService: EmailService, private authenticationService: AuthService, -<<<<<<< HEAD private _masterService: MasterService, private errorService:ErrorTranslateService -======= - private _masterService: MasterService ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 ) { // this.user$ = this.getUser(); this.seculevel = localStorage.getItem('seculevel') @@ -83,7 +71,6 @@ export class DashboardComponent implements OnInit { // this.emails$ = this.emailService.loadEmails(); // this.getSchoolLogo(); -<<<<<<< HEAD if(this.seculevel == 'B'){ this.displayedColumns = ['actions','title','publishedDate','bidOpenDate','view']; } @@ -94,12 +81,6 @@ export class DashboardComponent implements OnInit { // displayedColumns: string[] = ['no', 'name','download']; -======= - } - - - displayedColumns: string[] = ['no', 'name','download']; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 loading: boolean = true; @@ -109,25 +90,15 @@ export class DashboardComponent implements OnInit { async ngOnInit() { -<<<<<<< HEAD this.getData(); -======= - this._masterService.getMasterData(apiUrl.getTender).then((res) =>{ - console.log("tenderData",res); - this.tenderData = res - - - }) ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 // await this._ui.userValidation() // this.loading = true; // this.getMenuData(); } -<<<<<<< HEAD getData(){ if(this.seculevel != 'B') this._masterService.getMasterData(apiUrl.getTender).then((res) =>{ @@ -159,13 +130,10 @@ export class DashboardComponent implements OnInit { }) } -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 addNewTender(){ this.navigateTo('/add-tenders') } -<<<<<<< HEAD sortData(sort: Sort) { const data = this.tenderData.slice(); @@ -223,8 +191,6 @@ export class DashboardComponent implements OnInit { this.searchTerm = ""; this.getData(); } -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 // navigateTo(destination) { // this.router.navigate([destination]); // } @@ -308,13 +274,8 @@ export class DashboardComponent implements OnInit { this.router.navigate(['/add-tenders']); } -<<<<<<< HEAD goToUpload(tenderId){ this.router.navigate(['/tender-upload',tenderId]); -======= - goToUpload(){ - this.router.navigate(['/tender-upload']); ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } goToEdit(tenderId){ this.router.navigate(['/add-tenders',tenderId]); diff --git a/src/app/_modules/dashboard/dashboard.module.ts b/src/app/_modules/dashboard/dashboard.module.ts index d25b8df..342ee4e 100644 --- a/src/app/_modules/dashboard/dashboard.module.ts +++ b/src/app/_modules/dashboard/dashboard.module.ts @@ -24,14 +24,11 @@ import { AddTendersComponent } from './add-tenders/add-tenders.component'; import { MatTabsModule } from '@angular/material/tabs'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatNativeDateModule } from '@angular/material/core'; -<<<<<<< HEAD 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'; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 // import { MatTimepickerModule } from 'mat-timepicker'; // import { MatTimepickerModule } from '@angular/material/timepicker'; @@ -65,7 +62,6 @@ const lang = 'en-US'; TranslateModule, ReactiveFormsModule, MatTabsModule, -<<<<<<< HEAD MatSelectModule, MatNativeDateModule, MatDatepickerModule, @@ -78,11 +74,5 @@ const lang = 'en-US'; ], providers: [{ provide: LOCALE_ID, useValue: lang }] -======= - - MatNativeDateModule, - MatDatepickerModule - ] ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 }) export class DashboardModule { } diff --git a/src/app/_modules/dashboard/home-upload/home-upload.component.html b/src/app/_modules/dashboard/home-upload/home-upload.component.html index ea0859d..507eee9 100644 --- a/src/app/_modules/dashboard/home-upload/home-upload.component.html +++ b/src/app/_modules/dashboard/home-upload/home-upload.component.html @@ -1,8 +1,4 @@ -<<<<<<< HEAD
-======= -
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -
-
- Phone number is required. -
-
- Phone number must be a 10-digit number. -
-
- Invalid phone number format. -
-
-
-
- - -
-
- Email is required. -
-
- Invalid email format. -
-
-
+
+ @@ -99,16 +59,36 @@ - - + + @@ -118,19 +98,8 @@
Description
{{cover?.Description}} +
(uploading file should be in {{cover?.fileFormatD?.fileFormat}} format) +
- - + + + + + +
- -
- Please fill in all required fields. -
- + +
diff --git a/src/app/_modules/dashboard/home-upload/home-upload.component.scss b/src/app/_modules/dashboard/home-upload/home-upload.component.scss index 6e21879..d20b177 100644 --- a/src/app/_modules/dashboard/home-upload/home-upload.component.scss +++ b/src/app/_modules/dashboard/home-upload/home-upload.component.scss @@ -22,4 +22,12 @@ } .nav-link:hover { color: rgb(255, 0, 0); - } \ No newline at end of file + } +.resp{ + min-height: 260px; +} + @media (max-width: 767px) { + .resp{ + min-height: 460px; + } +} \ No newline at end of file diff --git a/src/app/_modules/dashboard/home-upload/home-upload.component.ts b/src/app/_modules/dashboard/home-upload/home-upload.component.ts index 0ddfc64..e994742 100644 --- a/src/app/_modules/dashboard/home-upload/home-upload.component.ts +++ b/src/app/_modules/dashboard/home-upload/home-upload.component.ts @@ -1,9 +1,13 @@ import { Component, OnInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { log } from 'console'; +import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto'; +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 { UiService } from 'src/app/_providers/_services/ui.service'; +import Swal from 'sweetalert2' @Component({ selector: 'app-home-upload', @@ -14,71 +18,192 @@ export class HomeUploadComponent implements OnInit { phoneInvalid: boolean = false; - secuLevel:any; + secuLevel: any; formData: any = {}; myForm: FormGroup; loading: boolean = true -<<<<<<< HEAD - a=[{},{},{},{}] -======= - a=[{},{},{},{}] - constructor(private router: Router) { } ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + selected: boolean - constructor(private router: Router,private _ui:UiService,private _errorTranslate: ErrorTranslateService) { + tenderId: number; + + + tenderData: any; + + selectedFiles: any; + + userId: string; + + fileSelected: boolean[] + + DEFAULT_COVER_COUNT: any; + + initialSelectionStatus: any; + + UploadedFile: TenderDocumentDto[]; + + fileFormat: any[] + + constructor( + private router: Router, + private route: ActivatedRoute, + private _ui: UiService, + private _errorTranslate: ErrorTranslateService, + private _masterService: MasterService + ) { this.secuLevel = localStorage.getItem('seculevel'); - } - - navigateTo(destination: any) { - this.router.navigate([destination]) + this.userId = localStorage.getItem('userId'); + this.tenderId = +this.route.snapshot.paramMap.get('id'); } - - goToHome(){ - window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero'; + + ngOnInit(): void { + this.loading = true; + + + this.getData(); + this.getFileFormatLov(); } - goToContactUs(){ - window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; + getData() { + this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => { + // console.log("tenderData", res); + this.loading = false; + + this.tenderData = res; + + + this.DEFAULT_COVER_COUNT = this.tenderData?.covers.length; // Replace with the actual number of rows + this.initialSelectionStatus = new Array(this.DEFAULT_COVER_COUNT).fill(false); + this.fileSelected = [...this.initialSelectionStatus]; + console.log('file---',this.fileSelected); + this.UploadedFile = []; + for(let i=0;i { + this.fileFormat = res + console.log('this.fileFormat===', this.fileFormat); + + }) } - if(this.formData.phone == '' || this.formData.phone == undefined || this.formData.phone.length > 10 || this.formData.phone.length < 10){ - console.log("ph"); - return false + + UploadFiles(event, i) { + // console.log('fileFormatId===',this.tenderData.covers[i].fileFormatD.fileFormat); + + let fileFormatId = this.fileFormat.filter(element => element.fileFormat == this.tenderData.covers[i].fileFormatD.fileFormat); + + this.selectedFiles = event.target.files; + let file = event.target.files[0] + const fd = new FormData(); + fd.append('file', file); + if (file && this.tenderId) { + this._masterService.postMasterData(apiUrl.userDocUpload + '/' + this.tenderId, fd, this.userId).then(res => { + this.tenderData.covers[i].file = res.fileName; + this.fileSelected[i] = true; + this.UploadedFile[i].docName = res.fileName + this.UploadedFile[i].description = this.tenderData.covers[i].Description; + this.UploadedFile[i].docType = fileFormatId[0].id; + this.UploadedFile[i].documentSize = res.fileSizeKB; + this.UploadedFile[i].documentCategory = 'USERD'; + this.UploadedFile[i].tenderId = this.tenderId; + this.UploadedFile[i].userId = this.userId; + console.log('this.UploadedFile========',this.UploadedFile); + + }) + } + } - if(!this._ui.phoneNoValidation(this.formData.phone)){ - this._ui.toastMessage(this._errorTranslate.translate('enterAValidPhoneNumber')); - return false; + + navigateTo(destination: any) { + this.router.navigate([destination]) } - if(this.formData.email == '' || this.formData.email == undefined){ - console.log("e"); - return false + + + goToHome() { + window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero'; } - return true -} + goToContactUs() { + window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; + } + preSave() { + for (let element of this.UploadedFile) { + if (!element.docName) { + this._ui.toastMessage(this._errorTranslate.translate("pleaseAddfiles"),2000,true); - submitForm() { - if(this.preSave()) - console.log(this.formData); + return false; + } + } + + return true; } - deleteInput(inputFieldId: string) { - const inputField = document.getElementById(inputFieldId) as HTMLInputElement; - if (inputField) { - inputField.value = ''; - } + + + submit() { + if(!this.preSave()) + return + // console.log('this.tenderData.covers========',this.tenderData.covers); + + // console.log('this.UploadedFile========',this.UploadedFile); + + Swal.fire({ + title: 'Are you sure?', + text: "You won't be able to edit this!", + icon: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Yes, save it!' + }).then((result) => { + if (result.isConfirmed) { + this._masterService.saveAllMasterData(apiUrl.tenderDoc, this.UploadedFile).then(res => { + console.log('res===upload====', res); + Swal.fire( + 'Success', + 'Documents submitted successfully', + 'success' + ) + this.router.navigate(['dashboard']); + },err=>{ + Swal.fire({ + icon: 'error', + title: 'Oops...', + text: 'Something went wrong!', + + }) + }) + } + }) + + } - ngOnInit(): void { - this.loading = false + + deleteInput(i) { + // const inputField = document.getElementById(inputFieldId) as HTMLInputElement; + // if (inputField) { + // inputField.value = ''; + // } + this._masterService.deleteMasterData(apiUrl.fileDelete + '/' + this.tenderId + '/' + this.userId, this.tenderData.covers[i].file).then(res => { + console.log('delete===', res); + this.tenderData.covers[i].file = ''; + this.fileSelected[i] = false; + this.UploadedFile[i].docName = null + this.UploadedFile[i].description = null; + this.UploadedFile[i].docType = null; + this.UploadedFile[i].documentSize = null; + this.UploadedFile[i].documentCategory = null; + this.UploadedFile[i].tenderId = null; + this.UploadedFile[i].userId = null; + }) + } } diff --git a/src/app/_modules/dashboard/home-view/home-view.component.html b/src/app/_modules/dashboard/home-view/home-view.component.html index e7da4af..f948bcc 100644 --- a/src/app/_modules/dashboard/home-view/home-view.component.html +++ b/src/app/_modules/dashboard/home-view/home-view.component.html @@ -31,11 +31,11 @@

-
+
@@ -60,17 +60,12 @@ - Organisation Name -<<<<<<< HEAD - {{tenderData?.orgChain}} -======= - {{tenderData.orgChain}} ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + Organisation Name + {{tenderData?.orgChain}} Tender Reference Number {{tenderData.tenderRefNo}} -<<<<<<< HEAD Tender ID @@ -78,45 +73,19 @@ Tender Type - {{tenderData.tenderTypeD.tenderType}} + {{tenderData.tenderTypeD?.tenderType}} Tender Category - {{tenderData.tenderCategoryD.tenderCategory}} -======= - - - Tender ID - {{tenderData.tenderId}} - - - Tender Type - {{tenderData.tenderType}} - - - Tender Category - {{tenderData.tenderCategoryD.tenderCategory}} - - - Payment Mode - {{tenderData.paymentModeD.paymentMode}} - - - Form of Contract - {{tenderData.formOfContractD.formOfContract}} - - - No. of Covers - {{tenderData.noOfCovers}} ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + {{tenderData.tenderCategoryD?.tenderCategory}} Payment Mode - {{tenderData.paymentModeD.paymentMode}} + {{tenderData.paymentModeD?.paymentMode}} Form of Contract - {{tenderData.formOfContractD.formOfContract}} + {{tenderData.formOfContractD?.formOfContract}} + + +
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -379,92 +300,73 @@ -<<<<<<< HEAD - Drawings Document -======= - NIT Document ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + Drawings Document -<<<<<<< HEAD - Drawings - - + - - - -======= - Document Name - Description + + {{document.description}} - - - - - - Download - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
- Work Item Documents + Work Item Documents - Document Type - Document Name - Description + Document Type + Document Name + Description - - - - + + {{document.documentTypeD.documentType}} + {{document.docName}} + {{document.description}} - -<<<<<<< HEAD - - + + + + - NIT Item Documents + Notice - Document Type - Document Name - Description + Document Type + Document Name + Description - - - - + + {{document.documentTypeD.documentType}} + {{document.docName}} + {{document.description}} - - -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - + + Drawings +
-<<<<<<< HEAD
@@ -479,34 +381,27 @@ Document Type Description Document Format - - - - - - - - - - - - - - - - -
-
+ + + {{ document.coverTypeD.coverType }} + {{ document.Description }} + {{ document.fileFormatD.fileFormat }} + + + + + + + +
+
-======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 -
@@ -519,13 +414,13 @@ Name - {{tenderData.tenderInvName}} + {{tenderData.tenderInvName}} Address {{tenderData.tenderInvAddess}} - +
diff --git a/src/app/_modules/dashboard/home-view/home-view.component.scss b/src/app/_modules/dashboard/home-view/home-view.component.scss index d7198be..2c52ce3 100644 --- a/src/app/_modules/dashboard/home-view/home-view.component.scss +++ b/src/app/_modules/dashboard/home-view/home-view.component.scss @@ -43,9 +43,5 @@ // } thead{ -<<<<<<< HEAD background-color: #5faca1; color: aliceblue; -======= - background-color: rgb(161, 42, 42); color: aliceblue; ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } \ No newline at end of file diff --git a/src/app/_modules/dashboard/home-view/home-view.component.ts b/src/app/_modules/dashboard/home-view/home-view.component.ts index 6ab5c0d..47dedcf 100644 --- a/src/app/_modules/dashboard/home-view/home-view.component.ts +++ b/src/app/_modules/dashboard/home-view/home-view.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto'; +import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto'; 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'; @@ -13,46 +15,44 @@ export class HomeViewComponent implements OnInit { tenderId: number; tenderData: any; -<<<<<<< HEAD + nitItemDocuments: any ; + workItemDocuments: any; + drawingsDocuments: any; + tenderDocuments: any; constructor(private router: Router, private route: ActivatedRoute, private _masterService: MasterService) { this.tenderId = +this.route.snapshot.paramMap.get('id'); this.getData() -======= - - constructor(private router: Router, - private route: ActivatedRoute, - private _masterService: MasterService) { - this.tenderId = +this.route.snapshot.paramMap.get('id'); ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } - ngOnInit(): void { -<<<<<<< HEAD + this.tenderData = new TenderDetailDto() console.log("this.tenderId", this.tenderId); this.getData() } - getData() { this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => { console.log("tenderData", res); this.tenderData = res + this.tenderDocuments = this.tenderData['tenderDoc'] + console.log("data",this.tenderDocuments); + + + + this.filterDataByCategory(); }) -======= - console.log("this.tenderId",this.tenderId); - this.getData() } - getData(){ - this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderId).then((res) =>{ - console.log("tenderData",res); - this.tenderData = res}) ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + filterDataByCategory() { + + + this.drawingsDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'D'); + this.workItemDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'WID'); + this.nitItemDocuments = this.tenderDocuments.filter(doc => doc.documentCategory === 'NIT'); } navigateTo(destination: any) { this.router.navigate([destination]) @@ -65,14 +65,16 @@ export class HomeViewComponent implements OnInit { window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact'; } -<<<<<<< HEAD - DownloadDrawings(){ + DownloadDrawingsZIP(){ const id = this.tenderId; this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{ }) } + DownloadNIT(){ + const id = this.tenderId; + } downloadZip() { @@ -112,45 +114,5 @@ export class HomeViewComponent implements OnInit { }) // window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id); -======= - - 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=>{ - 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); - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } } diff --git a/src/app/_providers/_resources/api-url.properties.ts b/src/app/_providers/_resources/api-url.properties.ts index 6598a4c..4c4ae72 100644 --- a/src/app/_providers/_resources/api-url.properties.ts +++ b/src/app/_providers/_resources/api-url.properties.ts @@ -5,11 +5,7 @@ export const apiUrl = { googleSignIn: "auth/google", facebookSignIn: "auth/facebook", userInfo: "auth/user-info", -<<<<<<< HEAD getTender: "tender", -======= - getTender: "tender-details", ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 AllTenderData: "tender", TenderType: "tender-type", TenderCategory: "tender-category", @@ -19,14 +15,13 @@ export const apiUrl = { emdFeeType: "emd-fee-type", documentType: "document-type", drawingUploadDoc:"file-upload/drawings", -<<<<<<< HEAD nitUploadDoc:"file-upload/notice", coverslov: "covers-lov", fileformatlov:"file-format-lov", -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 - + userDocUpload:"file-upload/user-documents", + fileDelete:"file-upload/R-userDoc", + tenderDoc:"tender-doc", + fileFormat:"file-format-lov", docUpload: "file-upload/Bank-documents", userImageUpload: "file-upload/user", @@ -36,13 +31,12 @@ export const apiUrl = { registerOtp: 'auth/otp/R', validateRegisterOtp: 'auth/verifyOtp/R', signup: 'auth/signup', -<<<<<<< HEAD bankDocs: 'file-upload/Bank-Documents-Arc', drawingsDownloadDocs: "file-upload/Drawings-Arc", - adminTenderView:'tender/admin' -======= - bankDocs: 'file-upload/Bank-Documents-Arc' ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 + adminTenderView:'tender/admin', + drawingsDelete: "file-upload/R-drawing", + widDelete:"file-upload/R-bankDoc", + noticeDelete:"file-upload/R-notice" }; diff --git a/src/app/_providers/_services/master.service.ts b/src/app/_providers/_services/master.service.ts index 92f63cc..6d21a28 100644 --- a/src/app/_providers/_services/master.service.ts +++ b/src/app/_providers/_services/master.service.ts @@ -49,6 +49,9 @@ export class MasterService { return await this.http.put(`${environment.apiUrl}/${apiUrl}/${id}`, body).toPromise(); } + async deleteMasterDataById(apiUrl, body, id): Promise { + return await this.http.delete(`${environment.apiUrl}/${apiUrl}/${id}`, body).toPromise(); + } async deleteMasterData(apiUrl, id): Promise { return await this.http.delete(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise(); } diff --git a/src/app/_providers/_services/ui.service.ts b/src/app/_providers/_services/ui.service.ts index 0ff5432..5a0df19 100644 --- a/src/app/_providers/_services/ui.service.ts +++ b/src/app/_providers/_services/ui.service.ts @@ -56,11 +56,10 @@ export class UiService { defaultTime = timeDuration if (error) this._snackBar.open(message, defaultButton, { duration: defaultTime, panelClass: ['mat-toolbar', 'mat-warn'] }); - else - this._snackBar.open(message, defaultButton, { duration: defaultTime }); - if (error && green) - this._snackBar.open(message, defaultButton, { duration: defaultTime }); - if (green) + + else if (error && green) + this._snackBar.open(message, defaultButton, { duration: defaultTime, panelClass: ['mat-toolbar', 'mat-warn'] }); + else if (green && !error) this._snackBar.open(message, defaultButton, { duration: defaultTime, panelClass: ['custom-green-snackbar'] }); else this._snackBar.open(message, defaultButton, { duration: defaultTime }); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e58d5db..60da0e8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -72,6 +72,7 @@ import {TranslateHttpLoader} from '@ngx-translate/http-loader'; AppComponent, TimeOutDialogComponent, NotFoundComponent, + ], imports: [ BrowserModule, diff --git a/src/app/shared/header/components/user/user.component.html b/src/app/shared/header/components/user/user.component.html index c8d69a0..150e7e1 100644 --- a/src/app/shared/header/components/user/user.component.html +++ b/src/app/shared/header/components/user/user.component.html @@ -4,7 +4,6 @@
-<<<<<<< HEAD - -
- ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-<<<<<<< HEAD -======= - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
diff --git a/src/app/shared/header/components/user/user.component.ts b/src/app/shared/header/components/user/user.component.ts index 4a2bc17..ece2905 100644 --- a/src/app/shared/header/components/user/user.component.ts +++ b/src/app/shared/header/components/user/user.component.ts @@ -16,10 +16,7 @@ export class UserComponent { signedOut : boolean public routes: typeof routes = routes; public flatlogicEmail: string = "https://flatlogic.com"; -<<<<<<< HEAD adminUser: boolean = false; -======= ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 public signOutEmit(): void { localStorage.removeItem('emailId') @@ -28,7 +25,6 @@ export class UserComponent { this.signedOut = true console.log('user==email======',this._router); -<<<<<<< HEAD } constructor(public _router : Router){ // console.log('user==email======',this._router); @@ -64,12 +60,4 @@ ngOnInit(){ else return '' } -======= - } - constructor(public _router : Router){ - console.log('user==email======',this._router); - - } - ->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3 } diff --git a/src/app/shared/header/containers/header/header.component.html b/src/app/shared/header/containers/header/header.component.html index a2c6aa9..d25c1a3 100644 --- a/src/app/shared/header/containers/header/header.component.html +++ b/src/app/shared/header/containers/header/header.component.html @@ -15,7 +15,6 @@