|
-<<<<<<< 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
-
-
-
-
-
-
-
-=======
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
-
-
-
-
-
-
-
+
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
{{ 'addTender' | translate }}
-=======
- {{ 'addTender' | translate }}
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@@ -73,13 +62,8 @@
TENDER NAME |
EDIT |
VIEW |
-<<<<<<< HEAD
UPLOAD |
-=======
- UPLOAD |
-
->>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
|