diff --git a/src/app/_modules/dashboard/dialog/dialog.component.scss b/src/app/_modules/dashboard/dialog/dialog.component.scss
new file mode 100644
index 0000000..6879e9c
--- /dev/null
+++ b/src/app/_modules/dashboard/dialog/dialog.component.scss
@@ -0,0 +1,40 @@
+/* Custom styles for the dialog component */
+
+h2.mat-dialog-title {
+ font-family: 'Arial', sans-serif; /* Change the font family for the title */
+ font-size: 24px; /* Increase the font size */
+ font-weight: bold; /* Make the title bold */
+ }
+
+ mat-dialog-content {
+ font-family: 'Arial', sans-serif; /* Change the font family for the content */
+ font-size: 16px; /* Adjust the font size */
+ }
+
+ ul {
+ list-style-type: disc; /* Use disc bullets for the list items */
+ padding-left: 20px; /* Add some padding to the left for better alignment */
+ }
+
+ mat-dialog-actions {
+ justify-content: flex-end; /* Align the buttons to the right */
+ }
+
+// button.mat-dialog-button.mat-primary {
+// background-color: #4CAF50; /* Change the background color of the Accept button */
+// color: #ffffff; /* Change the text color of the Accept button */
+// }
+
+
+ div.checkbox-container {
+ display: flex;
+ align-items: center; /* Center align the contents vertically */
+ }
+
+ .view-terms-link {
+ cursor: pointer;
+ font-size: 14px;
+ color: #007bff; /* Change the color of the link (you can choose a different color if needed) */
+ text-decoration: underline;
+ margin-left: 10px; /* Add some space between the checkbox and the link */
+ }
\ No newline at end of file
diff --git a/src/app/_modules/dashboard/dialog/dialog.component.spec.ts b/src/app/_modules/dashboard/dialog/dialog.component.spec.ts
new file mode 100644
index 0000000..a32e0ea
--- /dev/null
+++ b/src/app/_modules/dashboard/dialog/dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DialogComponent } from './dialog.component';
+
+describe('DialogComponent', () => {
+ let component: DialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ DialogComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/_modules/dashboard/dialog/dialog.component.ts b/src/app/_modules/dashboard/dialog/dialog.component.ts
new file mode 100644
index 0000000..58e0104
--- /dev/null
+++ b/src/app/_modules/dashboard/dialog/dialog.component.ts
@@ -0,0 +1,43 @@
+import { Component, OnInit,Inject } from '@angular/core';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+
+@Component({
+ selector: 'app-dialog-component',
+ template: `
+
Terms and Conditions
+
+
+
{{ detail }}
+
+
+
+ Accept
+ Close
+
+ `,
+ styleUrls: ['./dialog.component.scss']
+})
+export class DialogComponent implements OnInit {
+
+ details: string[];
+
+ constructor(
+ public dialogRef: MatDialogRef,
+ @Inject(MAT_DIALOG_DATA) public data: { details: string[] }
+ ) {
+ this.details = data.details;
+ }
+
+ onAccept() {
+ // You can perform any actions needed when the user accepts the terms and conditions here.
+ this.dialogRef.close('accepted');
+ }
+
+ onClose() {
+ // You can perform any actions needed when the user closes the dialog without accepting the terms and conditions here.
+ this.dialogRef.close('closed');
+ }
+ ngOnInit(): void {
+
+ }
+}
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 507eee9..baa85bd 100644
--- a/src/app/_modules/dashboard/home-upload/home-upload.component.html
+++ b/src/app/_modules/dashboard/home-upload/home-upload.component.html
@@ -46,11 +46,16 @@
-
+
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 d20b177..6bbca16 100644
--- a/src/app/_modules/dashboard/home-upload/home-upload.component.scss
+++ b/src/app/_modules/dashboard/home-upload/home-upload.component.scss
@@ -30,4 +30,16 @@
.resp{
min-height: 460px;
}
-}
\ No newline at end of file
+}
+
+.checkbox-container {
+ display: flex;
+ align-items: center;
+ margin-bottom: 10px;
+}
+
+.checkbox-text {
+ flex: 1;
+ font-family: 'Arial', sans-serif;
+ font-size: 16px;
+}
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 e994742..7d2fc86 100644
--- a/src/app/_modules/dashboard/home-upload/home-upload.component.ts
+++ b/src/app/_modules/dashboard/home-upload/home-upload.component.ts
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
+import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { log } from 'console';
import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto';
@@ -8,6 +9,7 @@ import { ErrorTranslateService } from 'src/app/_providers/_services/error-transl
import { MasterService } from 'src/app/_providers/_services/master.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
import Swal from 'sweetalert2'
+import { DialogComponent } from '../dialog/dialog.component';
@Component({
selector: 'app-home-upload',
@@ -30,6 +32,12 @@ export class HomeUploadComponent implements OnInit {
tenderId: number;
+ bidAmount:number;
+
+ agreeToTerms1: boolean = false;
+ agreeToTerms2: boolean = false;
+ showError: boolean = false;
+
tenderData: any;
@@ -37,6 +45,8 @@ export class HomeUploadComponent implements OnInit {
userId: string;
+ agreeToTerms: boolean = false;
+
fileSelected: boolean[]
DEFAULT_COVER_COUNT: any;
@@ -52,7 +62,8 @@ export class HomeUploadComponent implements OnInit {
private route: ActivatedRoute,
private _ui: UiService,
private _errorTranslate: ErrorTranslateService,
- private _masterService: MasterService
+ private _masterService: MasterService,
+ public dialog: MatDialog
) {
this.secuLevel = localStorage.getItem('seculevel');
this.userId = localStorage.getItem('userId');
@@ -62,11 +73,34 @@ export class HomeUploadComponent implements OnInit {
ngOnInit(): void {
this.loading = true;
+ this.agreeToTerms = false;
this.getData();
this.getFileFormatLov();
}
+
+
+ openDialog() {
+ const dialogRef = this.dialog.open(DialogComponent, {
+ width: '500px',
+ data: {
+ details: [
+ 'I have thoroughly read and understood all the details provided on the official website of Thrickodithanam SCB related to the tendering process.',
+ 'I confirm that all the information I have provided in connection with this tender is accurate, complete, and valid to the best of my knowledge. I also understand that any misrepresentation or omission of relevant information may result in the rejection of my application/participation or the termination of any subsequent contract awarded to me.'
+ ]
+ }
+ });
+
+ dialogRef.afterClosed().subscribe((result) => {
+ // Handle any logic after the dialog is closed (if needed)
+ // For example, you can update the agreeToTerms variable based on the user's choice.
+ });
+ }
+
+
+
+
getData() {
this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => {
// console.log("tenderData", res);
@@ -125,6 +159,10 @@ export class HomeUploadComponent implements OnInit {
navigateTo(destination: any) {
this.router.navigate([destination])
}
+ updateTerms(event: any) {
+ this.agreeToTerms = event.checked;
+ }
+
goToHome() {
@@ -134,6 +172,11 @@ export class HomeUploadComponent implements OnInit {
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
preSave() {
+
+ if(this.bidAmount == 0 || this.bidAmount == null || this.bidAmount == undefined){
+ this._ui.toastMessage(this._errorTranslate.translate("pleaseEnterBidFinalAmount"),2000,true);
+ return false;
+ }
for (let element of this.UploadedFile) {
if (!element.docName) {
this._ui.toastMessage(this._errorTranslate.translate("pleaseAddfiles"),2000,true);
@@ -141,18 +184,50 @@ export class HomeUploadComponent implements OnInit {
return false;
}
}
+
+ if (!this.agreeToTerms) {
+ this._ui.toastMessage(this._errorTranslate.translate("pleaseAgreeToTheTermsandCondition"), 2000, true);
+ return false;
+ }
+
return true;
}
+
+
+
+
+
+ // openDialog(): void {
+ // this.showDialog = true;
+ // }
+
+ // closeDialog(): void {
+ // this.showDialog = false;
+ // }
+
submit() {
if(!this.preSave())
return
- // console.log('this.tenderData.covers========',this.tenderData.covers);
+ let id ={
+ tenderId : this.tenderId,
+ userId : this.userId,
+
+ }
+ let body= {
+ bidAmount:this.bidAmount
+ }
+ this._masterService.postMasterData(apiUrl.UploadBidAmount,body,`${this.userId}/${this.tenderId}`).then((res)=>{
+ console.log(res);
+
+ })
+
- // console.log('this.UploadedFile========',this.UploadedFile);
+ //console.log('this.tenderId========',body);
+ // console.log('this.userId========',this.userId);
Swal.fire({
title: 'Are you sure?',
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 f948bcc..423775d 100644
--- a/src/app/_modules/dashboard/home-view/home-view.component.html
+++ b/src/app/_modules/dashboard/home-view/home-view.component.html
@@ -169,35 +169,35 @@
Published Date
-
{{tenderData.publishDate}}
+
{{tenderData.publishDate | date: 'MMM d, y, h:mm:ss a'}}
Document Download / Sale Start Date
-
{{tenderData.saleStartDate}}
+
{{tenderData.saleStartDate | date: 'MMM d, y, h:mm:ss a'}}
Clarification Start Date
-
{{tenderData.clarificationStartDate}}
+
{{tenderData.clarificationStartDate | date: 'MMM d, y, h:mm:ss a'}}
Document Download / Sale End Date
-
{{tenderData.saleEndDate}}
+
{{tenderData.saleEndDate | date: 'MMM d, y, h:mm:ss a'}}
Clarification End Date
-
{{tenderData.clarificationEndDate}}
+
{{tenderData.clarificationEndDate | date: 'MMM d, y, h:mm:ss a'}}
Bid Submission Start Date
-
{{tenderData.bidSubStartDate}}
+
{{tenderData.bidSubStartDate | date: 'MMM d, y, h:mm:ss a'}}
Bid Submission End Date
-
{{tenderData.bidSubEndDate}}
+
{{tenderData.bidSubEndDate | date: 'MMM d, y, h:mm:ss a'}}
Bid Opening Date
-
{{tenderData.bidOpenDate}}
+
{{tenderData.bidOpenDate | date: 'MMM d, y, h:mm:ss a'}}
@@ -269,7 +269,7 @@
Pre Bid Meeting Date
-
{{tenderData.preBidDate}}
+
{{tenderData.preBidDate | date: 'MMM d, y, h:mm:ss a'}}