diff --git a/ng8-seed/angular.json b/ng8-seed/angular.json index 10d32f4..62c3d50 100644 --- a/ng8-seed/angular.json +++ b/ng8-seed/angular.json @@ -9,6 +9,7 @@ "projectType": "application", "architect": { "build": { + "showCircularDependencies": false, "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist", diff --git a/ng8-seed/src/app/app.module.ts b/ng8-seed/src/app/app.module.ts index 3ecfc63..221c236 100644 --- a/ng8-seed/src/app/app.module.ts +++ b/ng8-seed/src/app/app.module.ts @@ -48,7 +48,7 @@ import { PaymentConfirmationComponent } from './components/payment-confirmation/ import { MyAccountComponent } from './components/my-account/my-account.component'; import { TokenInterceptorService } from './shared/guards/token-interceptor.service'; import { AuthGuardService } from './shared/guards/auth-guard.service'; -import { MatTableDataSource, MatTableModule } from '@angular/material'; +import { MatTableDataSource, MatTableModule, MatSlideToggleModule, MatRadioModule, MatButtonModule } from '@angular/material'; import { SchoolDetailsService } from './shared/school-details.service'; // import { AddEventModule } from './add-event.module'; import {HashLocationStrategy,LocationStrategy} from '@angular/common'; @@ -120,7 +120,14 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { }), FlexLayoutModule, SlideshowModule, - + MatCardModule, + MatIconModule, + MatInputModule, + MatRadioModule, + MatButtonModule, + ReactiveFormsModule, + MatSlideToggleModule, + MatProgressBarModule, // MDBBootstrapModule.forRoot() ], providers: [ diff --git a/ng8-seed/src/app/components/contribute/contribute.component.html b/ng8-seed/src/app/components/contribute/contribute.component.html index 8b8bbe0..a1af942 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.html +++ b/ng8-seed/src/app/components/contribute/contribute.component.html @@ -176,7 +176,7 @@ - + diff --git a/ng8-seed/src/app/components/contribute/contribute.component.ts b/ng8-seed/src/app/components/contribute/contribute.component.ts index 115b405..85694e4 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.ts +++ b/ng8-seed/src/app/components/contribute/contribute.component.ts @@ -29,11 +29,12 @@ export class ContributeComponent implements OnInit { Total: any = []; grandTotal: any = []; finalData: any = []; + schRquId:any ; sponsor_qty:any=[] gen_dev_fund_remarks:string general_devlop_amt:string=''; whole_contribute_list: any=[]; - constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private apiService:ApiService) { + constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private apiService:ApiService,public schInfo:SchoolDetailsService) { // Create 100 users } @@ -60,12 +61,12 @@ export class ContributeComponent implements OnInit { this.getSchoolReqList(); this.getSchoolReqList2(); - // this.schInfo.schReqId.subscribe(res=> - // { - // this.schRquId = res; - // // console.log(res); + this.schInfo.schReqId.subscribe(res=> + { + this.schRquId = res; + // console.log(res); - // }) + }) // window.localStorage.clear(); } @@ -90,19 +91,28 @@ export class ContributeComponent implements OnInit { { if(schDet.dataStatus==true) { - this.dataLength = schDet.records.length; - this.dataSource.data = schDet.records; + let data =''; + // console.log(schDet.records); + if(this.schRquId.sch_req_id !='') + { + data = schDet.records.filter(sch=>sch.school_id==this.schRquId); + }else + { + data = schDet.records; + } + this.dataLength = data.length; + this.dataSource.data = data console.log("data",this.dataSource) let store:any store=sessionStorage.getItem('contribute') store=JSON.parse(store) console.log(store) if(store.records){ - if(store.records.contributions){ - let indexes = Object.keys(store.records.contributions) - console.log(indexes) - // this.sponsor_qty[] - } + // if(store.records.contributions){ + // let indexes = Object.keys(store.records.contributions) + // console.log(indexes) + // // this.sponsor_qty[] + // } } // console.log(this.material_category); @@ -229,7 +239,7 @@ export class ContributeComponent implements OnInit { "cont_type":flag, //1-funds 2-materials "cont_towards":"", //1-State Fund not needed here "amount":this.grandTotal, - "payment_mode":"offline", + "payment_mode":"", "payment_ref":"", "contributions":this.finalData, }}; @@ -240,12 +250,13 @@ export class ContributeComponent implements OnInit { this.apiService.csrContribute(data).subscribe(result=>{ if(result['dataStatus']){ data.records.id=result['records'] + data.records.contributions=[] // if(flag == 1){ sessionStorage.setItem('contribute-selected-list',JSON.stringify(this.whole_contribute_list)) sessionStorage.setItem('contribute-params',JSON.stringify(data)) sessionStorage.setItem('contribute_final_total',this.grandTotal) - this.router.navigate(['payment']) + this.router.navigate(['payment'],{replaceUrl:true}) // } } else{ @@ -273,7 +284,7 @@ export class ContributeComponent implements OnInit { "cont_type":1, //1-funds 2-materials "cont_towards":"1", //1-State Fund "amount":this.general_devlop_amt, - "payment_mode":"offline", + "payment_mode":"", "payment_ref":"", "gen_dev_fund_remarks":this.gen_dev_fund_remarks, "contributions":[] @@ -283,10 +294,11 @@ export class ContributeComponent implements OnInit { this.apiService.csrContribute(data).subscribe(result=>{ if(result['dataStatus']){ data.records.id=result['records'] + data.records.contributions=[] sessionStorage.setItem('contribute-params',JSON.stringify(data)) sessionStorage.setItem('contribute_final_total',this.general_devlop_amt) - this.router.navigate(['payment']) + this.router.navigate(['payment'],{replaceUrl:true}) } else{ diff --git a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.html b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.html index 719ec19..6ca5fc4 100644 --- a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.html +++ b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.html @@ -4,13 +4,22 @@
-

Thank You


+

Thank You for your Support


+
+ +

Redirecting to Home Page Please Wait..


+ +
+
+
Do not Refresh this Page
+
-
+ + +

We have received confirmation of your payment as detailed below

@@ -38,7 +47,7 @@ Print Receipt - + -->
\ No newline at end of file diff --git a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.scss b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.scss index e69de29..4c0b242 100644 --- a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.scss +++ b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.scss @@ -0,0 +1,3 @@ +mat-card{ + height: 500px; +} \ No newline at end of file diff --git a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.ts b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.ts index 7a02cc9..ca03b22 100644 --- a/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.ts +++ b/ng8-seed/src/app/components/payment-confirmation/payment-confirmation.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; @Component({ selector: 'app-payment-confirmation', @@ -7,9 +8,12 @@ import { Component, OnInit } from '@angular/core'; }) export class PaymentConfirmationComponent implements OnInit { - constructor() { } + constructor(private router:Router) { } ngOnInit() { + setTimeout(()=>{ + this.router.navigate(['/'],{replaceUrl:true}) + },7000) } } diff --git a/ng8-seed/src/app/components/payment/payment.component.html b/ng8-seed/src/app/components/payment/payment.component.html index 84511d1..0611f31 100644 --- a/ng8-seed/src/app/components/payment/payment.component.html +++ b/ng8-seed/src/app/components/payment/payment.component.html @@ -69,8 +69,8 @@     --> - - + +    
diff --git a/ng8-seed/src/app/components/payment/payment.component.ts b/ng8-seed/src/app/components/payment/payment.component.ts index f7cf648..a3c7884 100644 --- a/ng8-seed/src/app/components/payment/payment.component.ts +++ b/ng8-seed/src/app/components/payment/payment.component.ts @@ -48,6 +48,7 @@ export class PaymentComponent implements OnInit { contributeKind: FormGroup; contribute_params: any; payment_mode:any='offline'; + maxDate=new Date() constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private apiService:ApiService) { this.isToken(); @@ -110,7 +111,7 @@ export class PaymentComponent implements OnInit { params.records.payment_mode=this.payment_mode this.apiService.csrContribute(params).subscribe(result=>{ if(result['dataStatus']){ - this.router.navigate(['/'],{replaceUrl:true}) + this.router.navigate(['paymentconfirmation'],{replaceUrl:true}) } else{ console.log("something went wrong") diff --git a/ng8-seed/src/app/components/project-detail/project-detail.component.ts b/ng8-seed/src/app/components/project-detail/project-detail.component.ts index f139b2f..b637d38 100644 --- a/ng8-seed/src/app/components/project-detail/project-detail.component.ts +++ b/ng8-seed/src/app/components/project-detail/project-detail.component.ts @@ -27,7 +27,8 @@ export class ProjectDetailComponent implements OnInit { console.log("State",data) this.schInfo.SchoolDetails.subscribe(schDetl=>this.schoolInfo = schDetl); this.imageSources = this.schoolInfo.images; - if( data != ''){ + console.log("param",data) + if( data != '' && data != null){ this.getIndividualSchoolReqData(data) this.getSchoolReqList(data) } diff --git a/ng8-seed/src/app/components/register/register-component.html b/ng8-seed/src/app/components/register/register-component.html index c014909..519ff53 100644 --- a/ng8-seed/src/app/components/register/register-component.html +++ b/ng8-seed/src/app/components/register/register-component.html @@ -6,7 +6,7 @@
close
-

Already Registered ? Login Here

+

Already Registered ? Login Here

Register as a new user

We would need some of your information to facilitate your contributions and keep you updated on the progress of the projects or new projects

@@ -36,18 +36,44 @@

+
+ + + + +
- +
+ - - - -
+
+ + + +
+
+ + + +
+
+ Conscent profile share to public + +        Yes  + No +

+ Conscent Receive updates via Email + +        Yes  + No +
+ + diff --git a/ng8-seed/src/app/components/register/register.component.ts b/ng8-seed/src/app/components/register/register.component.ts index c44f253..645d141 100644 --- a/ng8-seed/src/app/components/register/register.component.ts +++ b/ng8-seed/src/app/components/register/register.component.ts @@ -3,7 +3,8 @@ import {Router} from "@angular/router"; import { environment } from '../../../environments/environment'; import { ApiService } from '../../shared/api.service'; import { FormBuilder, FormControl } from '@angular/forms'; -import { MatDialog } from '@angular/material'; +import { MatDialog, DialogRole, MatDialogRef, MatDialogConfig } from '@angular/material'; +import { LoginComponent } from '../login/login.component'; @Component({ selector: 'ms-register-session', @@ -18,8 +19,10 @@ export class RegisterComponent { password: string; passwordConfirm: string; go_reg: any; + slide1: boolean; + slide2: boolean; - constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private matDialog:MatDialog) { } + constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private matDialog:MatDialog,private dialog_ref:MatDialogRef) { } ngOnInit() { // this.getSchoolReqList(); @@ -39,14 +42,48 @@ export class RegisterComponent { org_info: this.fb.group({ orgname: new FormControl(''), org_address: new FormControl(''), - org_pan: new FormControl('') + org_pan: new FormControl(''), }), + profile_share:new FormControl(''), + notify_pref:new FormControl(''), "created_by":"1", "updated_by":"1" }) } + change_fun(value){ + console.log(value) + if(value.checked == true){ + this.slide1=true + } + else{ + this.slide1=false + } + } + change_fun2(value){ + console.log(value) + if(value.checked == true){ + this.slide2=true + } + else{ + this.slide2=false + } + } + loginScreen(){ + this.dialog_ref.close(); + const dialogConfig = new MatDialogConfig(); + + dialogConfig.disableClose = true; + dialogConfig.autoFocus = true; + this.matDialog.open(LoginComponent,{ + height: '450px', + width: '400px', + panelClass: 'custom-modalbox', + + }) + + } csrUserRegistration() { // console.log(this.go_reg.value);return false; @@ -54,7 +91,8 @@ export class RegisterComponent { let data = this.go_reg.value; this.restApi.post(url,data).subscribe(schDet=> { - this.router.navigate(['/authentication/login']); + // this.router.navigate(['/authentication/login']); + this.loginScreen() }) } register() { diff --git a/ng8-seed/src/app/layouts/admin/admin-layout.component.html b/ng8-seed/src/app/layouts/admin/admin-layout.component.html index a259922..bec633d 100644 --- a/ng8-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng8-seed/src/app/layouts/admin/admin-layout.component.html @@ -98,8 +98,8 @@