Fairoj : registern and payment success msg and merge issue fixes
This commit is contained in:
parent
4212c2aeb5
commit
85c3887f79
@ -9,6 +9,7 @@
|
|||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
|
"showCircularDependencies": false,
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist",
|
"outputPath": "dist",
|
||||||
|
|||||||
@ -48,7 +48,7 @@ import { PaymentConfirmationComponent } from './components/payment-confirmation/
|
|||||||
import { MyAccountComponent } from './components/my-account/my-account.component';
|
import { MyAccountComponent } from './components/my-account/my-account.component';
|
||||||
import { TokenInterceptorService } from './shared/guards/token-interceptor.service';
|
import { TokenInterceptorService } from './shared/guards/token-interceptor.service';
|
||||||
import { AuthGuardService } from './shared/guards/auth-guard.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 { SchoolDetailsService } from './shared/school-details.service';
|
||||||
// import { AddEventModule } from './add-event.module';
|
// import { AddEventModule } from './add-event.module';
|
||||||
import {HashLocationStrategy,LocationStrategy} from '@angular/common';
|
import {HashLocationStrategy,LocationStrategy} from '@angular/common';
|
||||||
@ -120,7 +120,14 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
|||||||
}),
|
}),
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
SlideshowModule,
|
SlideshowModule,
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
|
MatProgressBarModule,
|
||||||
// MDBBootstrapModule.forRoot()
|
// MDBBootstrapModule.forRoot()
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
|||||||
@ -176,7 +176,7 @@
|
|||||||
<mat-form-field dividerColor="warn" class="ml-xs mr-xs" style="width: 100%;">
|
<mat-form-field dividerColor="warn" class="ml-xs mr-xs" style="width: 100%;">
|
||||||
<textarea matInput placeholder="Remarks" [(ngModel)]="gen_dev_fund_remarks"></textarea>
|
<textarea matInput placeholder="Remarks" [(ngModel)]="gen_dev_fund_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button class="mat-green" mat-raised-button style="color:white" (click)="storeData_session()">Proceed for Payment</button>
|
<button class="mat-green" mat-raised-button style="color:white" (click)="storeData_session()">Proceed to Contribute</button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -29,11 +29,12 @@ export class ContributeComponent implements OnInit {
|
|||||||
Total: any = [];
|
Total: any = [];
|
||||||
grandTotal: any = [];
|
grandTotal: any = [];
|
||||||
finalData: any = [];
|
finalData: any = [];
|
||||||
|
schRquId:any ;
|
||||||
sponsor_qty:any=[]
|
sponsor_qty:any=[]
|
||||||
gen_dev_fund_remarks:string
|
gen_dev_fund_remarks:string
|
||||||
general_devlop_amt:string='';
|
general_devlop_amt:string='';
|
||||||
whole_contribute_list: any=[];
|
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
|
// Create 100 users
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -60,12 +61,12 @@ export class ContributeComponent implements OnInit {
|
|||||||
this.getSchoolReqList();
|
this.getSchoolReqList();
|
||||||
this.getSchoolReqList2();
|
this.getSchoolReqList2();
|
||||||
|
|
||||||
// this.schInfo.schReqId.subscribe(res=>
|
this.schInfo.schReqId.subscribe(res=>
|
||||||
// {
|
{
|
||||||
// this.schRquId = res;
|
this.schRquId = res;
|
||||||
// // console.log(res);
|
// console.log(res);
|
||||||
|
|
||||||
// })
|
})
|
||||||
// window.localStorage.clear();
|
// window.localStorage.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,19 +91,28 @@ export class ContributeComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
if(schDet.dataStatus==true)
|
if(schDet.dataStatus==true)
|
||||||
{
|
{
|
||||||
this.dataLength = schDet.records.length;
|
let data ='';
|
||||||
this.dataSource.data = schDet.records;
|
// 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)
|
console.log("data",this.dataSource)
|
||||||
let store:any
|
let store:any
|
||||||
store=sessionStorage.getItem('contribute')
|
store=sessionStorage.getItem('contribute')
|
||||||
store=JSON.parse(store)
|
store=JSON.parse(store)
|
||||||
console.log(store)
|
console.log(store)
|
||||||
if(store.records){
|
if(store.records){
|
||||||
if(store.records.contributions){
|
// if(store.records.contributions){
|
||||||
let indexes = Object.keys(store.records.contributions)
|
// let indexes = Object.keys(store.records.contributions)
|
||||||
console.log(indexes)
|
// console.log(indexes)
|
||||||
// this.sponsor_qty[]
|
// // this.sponsor_qty[]
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(this.material_category);
|
// console.log(this.material_category);
|
||||||
@ -229,7 +239,7 @@ export class ContributeComponent implements OnInit {
|
|||||||
"cont_type":flag, //1-funds 2-materials
|
"cont_type":flag, //1-funds 2-materials
|
||||||
"cont_towards":"", //1-State Fund not needed here
|
"cont_towards":"", //1-State Fund not needed here
|
||||||
"amount":this.grandTotal,
|
"amount":this.grandTotal,
|
||||||
"payment_mode":"offline",
|
"payment_mode":"",
|
||||||
"payment_ref":"",
|
"payment_ref":"",
|
||||||
"contributions":this.finalData,
|
"contributions":this.finalData,
|
||||||
}};
|
}};
|
||||||
@ -240,12 +250,13 @@ export class ContributeComponent implements OnInit {
|
|||||||
this.apiService.csrContribute(data).subscribe(result=>{
|
this.apiService.csrContribute(data).subscribe(result=>{
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
data.records.id=result['records']
|
data.records.id=result['records']
|
||||||
|
data.records.contributions=[]
|
||||||
// if(flag == 1){
|
// if(flag == 1){
|
||||||
sessionStorage.setItem('contribute-selected-list',JSON.stringify(this.whole_contribute_list))
|
sessionStorage.setItem('contribute-selected-list',JSON.stringify(this.whole_contribute_list))
|
||||||
sessionStorage.setItem('contribute-params',JSON.stringify(data))
|
sessionStorage.setItem('contribute-params',JSON.stringify(data))
|
||||||
sessionStorage.setItem('contribute_final_total',this.grandTotal)
|
sessionStorage.setItem('contribute_final_total',this.grandTotal)
|
||||||
|
|
||||||
this.router.navigate(['payment'])
|
this.router.navigate(['payment'],{replaceUrl:true})
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -273,7 +284,7 @@ export class ContributeComponent implements OnInit {
|
|||||||
"cont_type":1, //1-funds 2-materials
|
"cont_type":1, //1-funds 2-materials
|
||||||
"cont_towards":"1", //1-State Fund
|
"cont_towards":"1", //1-State Fund
|
||||||
"amount":this.general_devlop_amt,
|
"amount":this.general_devlop_amt,
|
||||||
"payment_mode":"offline",
|
"payment_mode":"",
|
||||||
"payment_ref":"",
|
"payment_ref":"",
|
||||||
"gen_dev_fund_remarks":this.gen_dev_fund_remarks,
|
"gen_dev_fund_remarks":this.gen_dev_fund_remarks,
|
||||||
"contributions":[]
|
"contributions":[]
|
||||||
@ -283,10 +294,11 @@ export class ContributeComponent implements OnInit {
|
|||||||
this.apiService.csrContribute(data).subscribe(result=>{
|
this.apiService.csrContribute(data).subscribe(result=>{
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
data.records.id=result['records']
|
data.records.id=result['records']
|
||||||
|
data.records.contributions=[]
|
||||||
|
|
||||||
sessionStorage.setItem('contribute-params',JSON.stringify(data))
|
sessionStorage.setItem('contribute-params',JSON.stringify(data))
|
||||||
sessionStorage.setItem('contribute_final_total',this.general_devlop_amt)
|
sessionStorage.setItem('contribute_final_total',this.general_devlop_amt)
|
||||||
this.router.navigate(['payment'])
|
this.router.navigate(['payment'],{replaceUrl:true})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,22 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div class="pt-2" fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div class="pt-2" fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<h1>Thank You</h1><br>
|
<h1>Thank You for your Support</h1><br>
|
||||||
<!-- <p>We have received confirmation of your payment as detailed below</p> -->
|
<!-- <p>We have received confirmation of your payment as detailed below</p> -->
|
||||||
</div>
|
</div>
|
||||||
|
<div fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
|
||||||
|
<h4>Redirecting to Home Page Please Wait.. </h4><br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<h5>Do not Refresh this Page</h5>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap">
|
|
||||||
|
<!-- <div fxLayout="row wrap">
|
||||||
<div class="pt-2" fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div class="pt-2" fxLayoutAlign="center" fxFlex.sm="100" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<!-- <h1>Thank You</h1><br> -->
|
|
||||||
<p>We have received confirmation of your payment as detailed below</p>
|
<p>We have received confirmation of your payment as detailed below</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -38,7 +47,7 @@
|
|||||||
<span class="button-text">Print Receipt</span>
|
<span class="button-text">Print Receipt</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
mat-card{
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-payment-confirmation',
|
selector: 'app-payment-confirmation',
|
||||||
@ -7,9 +8,12 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class PaymentConfirmationComponent implements OnInit {
|
export class PaymentConfirmationComponent implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
constructor(private router:Router) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.router.navigate(['/'],{replaceUrl:true})
|
||||||
|
},7000)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,8 +69,8 @@
|
|||||||
<input matInput placeholder = "Delivery Point" type="text" formControlName="delivery_point">
|
<input matInput placeholder = "Delivery Point" type="text" formControlName="delivery_point">
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<input matInput [matDatepicker]="picker" placeholder="Delivery date" formControlName="do_delivery">
|
<input matInput [matDatepicker]="picker" [min]="maxDate" placeholder="Delivery date" formControlName="do_delivery">
|
||||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
<mat-datepicker #picker></mat-datepicker>
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
</mat-form-field> <br/>
|
</mat-form-field> <br/>
|
||||||
<mat-form-field appearance="outline" >
|
<mat-form-field appearance="outline" >
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export class PaymentComponent implements OnInit {
|
|||||||
contributeKind: FormGroup;
|
contributeKind: FormGroup;
|
||||||
contribute_params: any;
|
contribute_params: any;
|
||||||
payment_mode:any='offline';
|
payment_mode:any='offline';
|
||||||
|
maxDate=new Date()
|
||||||
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) {
|
||||||
this.isToken();
|
this.isToken();
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ export class PaymentComponent implements OnInit {
|
|||||||
params.records.payment_mode=this.payment_mode
|
params.records.payment_mode=this.payment_mode
|
||||||
this.apiService.csrContribute(params).subscribe(result=>{
|
this.apiService.csrContribute(params).subscribe(result=>{
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
this.router.navigate(['/'],{replaceUrl:true})
|
this.router.navigate(['paymentconfirmation'],{replaceUrl:true})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("something went wrong")
|
console.log("something went wrong")
|
||||||
|
|||||||
@ -27,7 +27,8 @@ export class ProjectDetailComponent implements OnInit {
|
|||||||
console.log("State",data)
|
console.log("State",data)
|
||||||
this.schInfo.SchoolDetails.subscribe(schDetl=>this.schoolInfo = schDetl);
|
this.schInfo.SchoolDetails.subscribe(schDetl=>this.schoolInfo = schDetl);
|
||||||
this.imageSources = this.schoolInfo.images;
|
this.imageSources = this.schoolInfo.images;
|
||||||
if( data != ''){
|
console.log("param",data)
|
||||||
|
if( data != '' && data != null){
|
||||||
this.getIndividualSchoolReqData(data)
|
this.getIndividualSchoolReqData(data)
|
||||||
this.getSchoolReqList(data)
|
this.getSchoolReqList(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<div class="close_icon" (click)="closeDialog()">
|
<div class="close_icon" (click)="closeDialog()">
|
||||||
<mat-icon >close</mat-icon>
|
<mat-icon >close</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-0" style="text-align: right;">Already Registered ? <a [routerLink]="['/login']" class="mat-text-primary">Login Here</a></p>
|
<p class="mb-0" style="text-align: right;">Already Registered ? <a (click)="loginScreen()" class="mat-text-primary">Login Here</a></p>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="base-border">Register as a new user</h2>
|
<h2 class="base-border">Register as a new user</h2>
|
||||||
<p>We would need some of your information to facilitate your contributions and keep you updated on the progress of the projects or new projects</p>
|
<p>We would need some of your information to facilitate your contributions and keep you updated on the progress of the projects or new projects</p>
|
||||||
@ -36,18 +36,44 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div class="mt-1 mb-1">
|
||||||
|
<label class="mr-1">Registering as on Organisation ?</label>
|
||||||
|
<mat-slide-toggle name="slideToggle" required (change)="change_fun($event)">
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch" formGroupName="org_info">
|
<div fxLayout="column" fxLayoutAlign="start stretch" formGroupName="org_info">
|
||||||
<mat-form-field style="width: 100%">
|
<div *ngIf="slide1">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Organisation Name" type="text" name="orgname" formControlName="orgname" required>
|
<input matInput placeholder="Organisation Name" type="text" name="orgname" formControlName="orgname" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%;">
|
<mat-form-field style="width: 100%;">
|
||||||
<textarea matInput placeholder="Register Address" name="org_address" formControlName="org_address" required></textarea>
|
<textarea matInput placeholder="Register Address" name="org_address" formControlName="org_address" required></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Pan of the Organisation" type="number" name="org_pan" formControlName="org_pan" required>
|
|
||||||
</mat-form-field>
|
|
||||||
<button class="mat-red" mat-raised-button (click)="csrUserRegistration()">Register</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-1 mb-1">
|
||||||
|
<label class="mr-1">Do you want to avail 80G Exemption</label>
|
||||||
|
<mat-slide-toggle name="slideToggle" (change)="change_fun2($event)" required>
|
||||||
|
</mat-slide-toggle>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="slide2">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="PAN of the Organisation" type="number" name="org_pan" formControlName="org_pan" required>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<mat-label>Conscent profile share to public</mat-label>
|
||||||
|
<mat-radio-group placeholder="Conscent profile share to public" formControlName="profile_share">
|
||||||
|
<mat-radio-button value="yes" >Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
</mat-radio-group><br/><br/>
|
||||||
|
<mat-label>Conscent Receive updates via Email</mat-label>
|
||||||
|
<mat-radio-group aria-label="Conscent Receive updates via Email" formControlName="notify_pref">
|
||||||
|
<mat-radio-button value="yes" >Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
</mat-radio-group><br/>
|
||||||
|
<button class="mat-red" mat-raised-button (click)="csrUserRegistration()">Register</button>
|
||||||
|
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<p>Sign Up Using</p> <a href="#" class="shared-icon mr-1 mat-blue"><i class="fa fa-facebook fa-lg mr-1"></i> Facebook</a><a href="#" class="shared-icon mat-red"><i class="fa fa-google fa-lg mr-1"></i>Google</a>
|
<p>Sign Up Using</p> <a href="#" class="shared-icon mr-1 mat-blue"><i class="fa fa-facebook fa-lg mr-1"></i> Facebook</a><a href="#" class="shared-icon mat-red"><i class="fa fa-google fa-lg mr-1"></i>Google</a>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|||||||
@ -3,7 +3,8 @@ import {Router} from "@angular/router";
|
|||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
import { ApiService } from '../../shared/api.service';
|
import { ApiService } from '../../shared/api.service';
|
||||||
import { FormBuilder, FormControl } from '@angular/forms';
|
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({
|
@Component({
|
||||||
selector: 'ms-register-session',
|
selector: 'ms-register-session',
|
||||||
@ -18,8 +19,10 @@ export class RegisterComponent {
|
|||||||
password: string;
|
password: string;
|
||||||
passwordConfirm: string;
|
passwordConfirm: string;
|
||||||
go_reg: any;
|
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<RegisterComponent>) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.getSchoolReqList();
|
// this.getSchoolReqList();
|
||||||
@ -39,14 +42,48 @@ export class RegisterComponent {
|
|||||||
org_info: this.fb.group({
|
org_info: this.fb.group({
|
||||||
orgname: new FormControl(''),
|
orgname: new FormControl(''),
|
||||||
org_address: 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",
|
"created_by":"1",
|
||||||
"updated_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()
|
csrUserRegistration()
|
||||||
{
|
{
|
||||||
// console.log(this.go_reg.value);return false;
|
// console.log(this.go_reg.value);return false;
|
||||||
@ -54,7 +91,8 @@ export class RegisterComponent {
|
|||||||
let data = this.go_reg.value;
|
let data = this.go_reg.value;
|
||||||
this.restApi.post(url,data).subscribe(schDet=>
|
this.restApi.post(url,data).subscribe(schDet=>
|
||||||
{
|
{
|
||||||
this.router.navigate(['/authentication/login']);
|
// this.router.navigate(['/authentication/login']);
|
||||||
|
this.loginScreen()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
register() {
|
register() {
|
||||||
|
|||||||
@ -98,8 +98,8 @@
|
|||||||
<ul class="main-h-list" style="font-size: 16px;">
|
<ul class="main-h-list" style="font-size: 16px;">
|
||||||
<li *ngFor="let menuitem of horizontalMenuItems.getAll()">
|
<li *ngFor="let menuitem of horizontalMenuItems.getAll()">
|
||||||
<a [routerLink]="['/'+menuitem.state]" *ngIf="menuitem.type === 'link'">
|
<a [routerLink]="['/'+menuitem.state]" *ngIf="menuitem.type === 'link'">
|
||||||
<mat-icon>{{ menuitem.icon }}</mat-icon>
|
<!--<mat-icon>{{ menuitem.icon }}</mat-icon>-->
|
||||||
<span>{{ menuitem.name | translate }}</span>
|
<span><strong>{{ menuitem.name == 'Login' ? user_name == '' ? menuitem.name : user_name : menuitem.name | translate }}</strong></span>
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="['/'+menuitem.state]" *ngIf="menuitem.type === 'sub'">
|
<a [routerLink]="['/'+menuitem.state]" *ngIf="menuitem.type === 'sub'">
|
||||||
<mat-icon>{{ menuitem.icon }}</mat-icon>
|
<mat-icon>{{ menuitem.icon }}</mat-icon>
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import {TranslateService} from '@ngx-translate/core';
|
|||||||
import PerfectScrollbar from 'perfect-scrollbar';
|
import PerfectScrollbar from 'perfect-scrollbar';
|
||||||
import { PerfectScrollbarConfigInterface,
|
import { PerfectScrollbarConfigInterface,
|
||||||
PerfectScrollbarComponent, PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
PerfectScrollbarComponent, PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||||
|
import { ApiService } from 'app/shared/api.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-admin',
|
selector: 'app-layout-admin',
|
||||||
@ -37,13 +38,19 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
@ViewChild('sidemenu', { static: true }) sidemenu;
|
@ViewChild('sidemenu', { static: true }) sidemenu;
|
||||||
public config: PerfectScrollbarConfigInterface = {};
|
public config: PerfectScrollbarConfigInterface = {};
|
||||||
|
user_name:any='';
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService ) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,private apiService:ApiService ) {
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
if(localStorage.getItem('token')){
|
||||||
|
this.user_name= this.apiService.jwtDecode(localStorage.getItem('token'))
|
||||||
|
this.user_name=this.user_name.payload.username
|
||||||
|
}
|
||||||
|
console.log("user",this.user_name)
|
||||||
|
|
||||||
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');
|
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');
|
||||||
|
|
||||||
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac() && !this.compactSidebar && this.layoutDir != 'rtl') {
|
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac() && !this.compactSidebar && this.layoutDir != 'rtl') {
|
||||||
|
|||||||
@ -27,6 +27,7 @@ export class LoginComponent {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log("d",sessionStorage.getItem('contribute'))
|
console.log("d",sessionStorage.getItem('contribute'))
|
||||||
|
localStorage.clear();
|
||||||
// this.getSchoolReqList();
|
// this.getSchoolReqList();
|
||||||
this.initForm();
|
this.initForm();
|
||||||
// console.log(this.router.events);
|
// console.log(this.router.events);
|
||||||
@ -69,7 +70,8 @@ this.previousUrl = this.restApi.getPreviousUrl();
|
|||||||
this.router.navigate(['/home']);
|
this.router.navigate(['/home']);
|
||||||
// this.matDialog.closeAll()
|
// this.matDialog.closeAll()
|
||||||
}else{
|
}else{
|
||||||
this.router.navigate([this.previousUrl]);
|
// this.router.navigate([this.previousUrl]);
|
||||||
|
this.router.navigate(['/home']);
|
||||||
// this.location.back();
|
// this.location.back();
|
||||||
// this.matDialog.closeAll()
|
// this.matDialog.closeAll()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
||||||
<div fxLayout="column" fxFlex.xl="40" fxFlex.lg="40" fxFlex.md="50" fxFlex.sm="80" fxFlex.xs="90">
|
<div fxLayout="column" fxFlex.xl="40" fxFlex.lg="40" fxFlex.md="50" fxFlex.sm="80" fxFlex.xs="90">
|
||||||
<mat-card class="login-session">
|
<mat-card class="login-session">
|
||||||
<p class="mb-0" style="text-align: right;">Already Registered ? <a [routerLink]="['/login']" class="mat-text-primary">Login Here</a></p>
|
<p class="mb-0" style="text-align: right;">Already Registered ? <a (click)="login_screen()" class="mat-text-primary">Login Here</a></p>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="base-border">Register as a new user</h2>
|
<h2 class="base-border">Register as a new user</h2>
|
||||||
<p>We would need some of your information to facilitate your contributions and keep you updated on the progress of the projects or new projects</p>
|
<p>We would need some of your information to facilitate your contributions and keep you updated on the progress of the projects or new projects</p>
|
||||||
@ -57,9 +57,21 @@
|
|||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="PAN of the Organisation" type="number" name="org_pan" formControlName="org_pan" required>
|
<input matInput placeholder="PAN of the Organisation" type="number" name="org_pan" formControlName="org_pan" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
|
||||||
<button class="mat-red" mat-raised-button (click)="csrUserRegistration()">Register</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<mat-label>Conscent profile share to public</mat-label>
|
||||||
|
<mat-radio-group placeholder="Conscent profile share to public" formControlName="profile_share">
|
||||||
|
<mat-radio-button value="yes" >Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
</mat-radio-group><br/><br/>
|
||||||
|
<mat-label>Conscent Receive updates via Email</mat-label>
|
||||||
|
<mat-radio-group aria-label="Conscent Receive updates via Email" formControlName="notify_pref">
|
||||||
|
<mat-radio-button value="yes" >Yes</mat-radio-button>
|
||||||
|
<mat-radio-button value="no">No</mat-radio-button>
|
||||||
|
</mat-radio-group><br/><br/>
|
||||||
|
|
||||||
|
<button class="mat-red" mat-raised-button (click)="csrUserRegistration()">Register</button>
|
||||||
|
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<p>Sign Up Using</p> <a href="#" class="shared-icon mr-1 mat-blue"><i class="fa fa-facebook fa-lg mr-1"></i> Facebook</a><a href="#" class="shared-icon mat-red"><i class="fa fa-google fa-lg mr-1"></i>Google</a>
|
<p>Sign Up Using</p> <a href="#" class="shared-icon mr-1 mat-blue"><i class="fa fa-facebook fa-lg mr-1"></i> Facebook</a><a href="#" class="shared-icon mat-red"><i class="fa fa-google fa-lg mr-1"></i>Google</a>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|||||||
@ -46,8 +46,9 @@ export class RegisterComponent {
|
|||||||
org_other_details: new FormControl(''),
|
org_other_details: new FormControl(''),
|
||||||
user_id: new FormControl(''),
|
user_id: new FormControl(''),
|
||||||
isactive: new FormControl(''),
|
isactive: new FormControl(''),
|
||||||
|
|
||||||
}),
|
}),
|
||||||
|
profile_share:new FormControl(''),
|
||||||
|
notify_pref: new FormControl(''),
|
||||||
"created_by":"1",
|
"created_by":"1",
|
||||||
"updated_by":"1"
|
"updated_by":"1"
|
||||||
|
|
||||||
@ -86,6 +87,9 @@ export class RegisterComponent {
|
|||||||
register() {
|
register() {
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
}
|
}
|
||||||
|
login_screen(){
|
||||||
|
this.router.navigate(['authentication','login'])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ export class ApiService {
|
|||||||
csrContribute(DATA){
|
csrContribute(DATA){
|
||||||
let token_decode=this.jwtDecode(localStorage.getItem('token'))
|
let token_decode=this.jwtDecode(localStorage.getItem('token'))
|
||||||
if(token_decode){
|
if(token_decode){
|
||||||
DATA.records.user_id=token_decode['payload'].username
|
DATA.records.user_id=token_decode['payload'].userid
|
||||||
}
|
}
|
||||||
console.log("dd",token_decode)
|
console.log("dd",token_decode)
|
||||||
return this.http.post(apiUrl+'csrContribute',DATA).pipe
|
return this.http.post(apiUrl+'csrContribute',DATA).pipe
|
||||||
|
|||||||
@ -32,7 +32,7 @@ const HORIZONTALMENUITEMS = [
|
|||||||
state: 'contribute',
|
state: 'contribute',
|
||||||
name: 'Contribute',
|
name: 'Contribute',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: 'error_outline'
|
icon: 'list'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// state: 'apps',
|
// state: 'apps',
|
||||||
|
|||||||
@ -59,7 +59,7 @@ const MENUITEMS : Menu[] = [
|
|||||||
state: 'contribute',
|
state: 'contribute',
|
||||||
name: 'Contribute',
|
name: 'Contribute',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: 'error_outline'
|
icon: 'list'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// state: 'apps',
|
// state: 'apps',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
apiUrl:'https://lms.venbainfotech.com/csr/api/',
|
apiUrl:'https://contribute.tnschools.gov.in/csrb/api/',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
apiUrl:'https://lms.venbainfotech.com/csr/api/',
|
apiUrl:'https://lms.venbainfotech.com/csr/api/',
|
||||||
|
//apiUrl:'https://contribute.tnschools.gov.in/csrb/api/'
|
||||||
};
|
};
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user