Fairoj : Changes and issues fixes

This commit is contained in:
venbatechnologies@gmail.com 2019-10-24 17:15:06 +05:30
parent 83725caed0
commit 79c71aa4ae
39 changed files with 900 additions and 541 deletions

View File

@ -67,6 +67,8 @@ import {
} from "ngx-social-button"; } from "ngx-social-button";
import { PasswordChangeComponent } from './components/password-change/password-change.component'; import { PasswordChangeComponent } from './components/password-change/password-change.component';
import { ShareButtonsModule } from '@ngx-share/buttons'; import { ShareButtonsModule } from '@ngx-share/buttons';
import { OnlyNumberDirective } from './directives/only-number.directive';
import { DirectivesModuleModule } from './directives/directives-module/directives-module.module';
export function HttpLoaderFactory(http: HttpClient) { export function HttpLoaderFactory(http: HttpClient) {
@ -109,7 +111,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
UserCertificateComponent, UserCertificateComponent,
PrivacyPolicyComponent, PrivacyPolicyComponent,
PasswordChangeComponent, PasswordChangeComponent,
userCertificateDisplay userCertificateDisplay,
// ProjectListComponent // ProjectListComponent
], ],
@ -155,7 +158,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
MatProgressBarModule, MatProgressBarModule,
// MDBBootstrapModule.forRoot() // MDBBootstrapModule.forRoot()
NgxSocialButtonModule, NgxSocialButtonModule,
ShareButtonsModule ShareButtonsModule,
DirectivesModuleModule
], ],
providers: [ providers: [
TranslateService, TranslateService,

View File

@ -88,7 +88,7 @@
<!-- Sponsor Column --> <!-- Sponsor Column -->
<ng-container matColumnDef="Sponsor_Qty"> <ng-container matColumnDef="Sponsor_Qty">
<mat-header-cell *matHeaderCellDef > Sponsored Qty </mat-header-cell> <mat-header-cell *matHeaderCellDef > Sponsored Qty </mat-header-cell>
<mat-cell data-label="Sponsored Qty" *matCellDef="let row;let i = index"> <input step="1" min="1" max="" title="Qty" [(ngModel)]="sponsor_qty[i]" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit,row.mat_id,row)" <mat-cell data-label="Sponsored Qty" *matCellDef="let row;let i = index"> <input OnlyNumber="true" step="1" min="1" max="" title="Qty" [(ngModel)]="sponsor_qty[i]" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit,row.mat_id,row)"
class="sponsor_input" > </mat-cell> class="sponsor_input" > </mat-cell>
</ng-container> </ng-container>
@ -121,10 +121,26 @@
</div> </div>
</div> </div>
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons ></mat-paginator> <mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons ></mat-paginator>
<div style="text-align: center;" *ngIf="dataStatus" fxLayoutAlign="center">
<mat-label style=" font-size: 1.25rem;">I am happy to contribute</mat-label>&nbsp;&nbsp;
<mat-radio-group [(ngModel)]="contribute_type" >&nbsp;&nbsp;&nbsp;
<mat-radio-button value="2" ><span style=" font-size: 1.25rem;">Material</span></mat-radio-button><br/>
<mat-radio-button value="1"><span style=" font-size: 1.25rem;">Funds</span></mat-radio-button>
</mat-radio-group><br/>
<!-- <mat-form-field appearance="outline" fxFlex="50" fxFlex.xs="100" class="select_cot_type">
<mat-label style=" font-size: 1.25rem;">I am happy to contribute</mat-label>
<mat-select color="secondary" placeholder="Select" [(ngModel)]="contribute_type" #username="ngModel">
<mat-option value="2"><span style=" font-size: 1.25rem;">Materials</span></mat-option>
<mat-option value="1"><span style=" font-size: 1.25rem;">Funds/Money</span></mat-option>
</mat-select>
<mat-error *ngIf="username.invalid && username.errors.required && (username.dirty || username.touched)">Contribute type is required</mat-error>
</mat-form-field> -->
</div>
<div class="pt-1 pr-1" style="text-align: right;" *ngIf="dataStatus"> <div class="pt-1 pr-1" style="text-align: right;" *ngIf="dataStatus">
<button mat-raised-button color="primary" (click)="finalSave(2)" class="mr-1 mb-1">I'd like to Contribute in Kind</button>
<button (click)="finalSave(1)" mat-raised-button style="background-color:rgb(69, 189, 189);color:white" >I'd like to Contribute in Cash</button>
<!-- <button mat-raised-button color="primary" (click)="finalSave(2)" class="mr-1 mb-1">I'd like to Contribute in Kind</button> -->
<button (click)="finalSave(contribute_type)" mat-raised-button style="background-color:rgb(69, 189, 189);color:white;font-weight: bold" >Submit</button>
</div> </div>
</div> </div>
<ng-template #status><h2>{{msg}}</h2></ng-template> <ng-template #status><h2>{{msg}}</h2></ng-template>
@ -163,7 +179,7 @@
<!-- <div fxLayout fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="0"> --> <!-- <div fxLayout fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="0"> -->
<div class="text-center" fxFlex="100%" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="100" fxFlex.xl="100"> <div class="text-center" fxFlex="100%" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="100" fxFlex.xl="100">
<mat-form-field appearance="outline" style="width: 70%;text-align: center;"> <mat-form-field appearance="outline" style="width: 70%;text-align: center;">
<input matInput type="tel" placeholder="Amount in Rs." [(ngModel)]="general_devlop_amt" maxlength="10" (change)="dev_fund_change($event.target.value)" onkeypress="return event.charCode >= 48 && event.charCode <= 57"> <input matInput type="tel" OnlyNumber="true" placeholder="Amount in Rs." [(ngModel)]="general_devlop_amt" maxlength="10" (change)="dev_fund_change($event.target.value)" onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</mat-form-field> </mat-form-field>
<!-- </div> --> <!-- </div> -->
</div> </div>

View File

@ -264,4 +264,16 @@ a {
width:30%; width:30%;
text-align: left; text-align: left;
} }
}
.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
border-color: cyan;
}
::ng-deep .mat-select-content{
width:2000px;
background-color: red;
font-size: 10px;
} }

View File

@ -43,6 +43,7 @@ export class ContributeComponent implements OnInit {
msg: any; msg: any;
@ViewChild('table_element',{static:true}) table_element : ElementRef @ViewChild('table_element',{static:true}) table_element : ElementRef
clientWidth: any; clientWidth: any;
contribute_type:any='';
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private apiService:ApiService,public schInfo:SchoolDetailsService) { constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,private apiService:ApiService,public schInfo:SchoolDetailsService) {
// Create 100 users // Create 100 users
@ -345,6 +346,10 @@ export class ContributeComponent implements OnInit {
alert("Please tell us the number of items you would like to contribute"); alert("Please tell us the number of items you would like to contribute");
return return
} }
if(this.contribute_type == '' ){
alert("Please choose the contribute type");
return
}
let data = {'records': let data = {'records':
{ {
'id':'', 'id':'',
@ -387,7 +392,7 @@ export class ContributeComponent implements OnInit {
return return
} }
if(this.general_devlop_amt ==''){ if(this.general_devlop_amt ==''){
alert("Please tell us the number of items you would like to contribute"); alert("Please Fill the Amount");
return return
} }
let data = {'records': let data = {'records':

View File

@ -18,7 +18,8 @@
<input matInput placeholder="Password" type="password" name="password" required formControlName="password"> <input matInput placeholder="Password" type="password" name="password" required formControlName="password">
</mat-form-field> </mat-form-field>
<button class="mat-green" mat-raised-button (click)="csrUserLogin()">SIGN IN</button> <button class="mat-green" mat-raised-button (click)="csrUserLogin()">SIGN IN</button>
<p class="mat-text-warn mb-0">Forgot password?</p> <p class="mat-text-warn mb-0" style="text-align: right;color:red;"><a style="color:red;
text-decoration: underline;" (click)="forgotPassworDialog()" class="mat-text-primary"><span style="color:red;">Forgot Password?</span></a></p>
<p class="mb-0">Don't have an account? <a (click)="registerDialog()" class="mat-text-primary">Register Here</a></p> <p class="mb-0">Don't have an account? <a (click)="registerDialog()" class="mat-text-primary">Register Here</a></p>
</div> </div>
<!-- <div> <!-- <div>

View File

@ -10,3 +10,13 @@
// color: blue; // color: blue;
cursor: pointer; cursor: pointer;
} }
.forgot_p{
float: right;
}
.forgot_a{
color:red;
text-decoration: underline;
}
.forgot_a :hover{
text-decoration: none;
}

View File

@ -4,9 +4,10 @@ import { FormControl, FormBuilder } from '@angular/forms';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { ApiService } from 'app/shared/api.service'; import { ApiService } from 'app/shared/api.service';
import { Location } from "@angular/common"; import { Location } from "@angular/common";
import { MatDialog } from '@angular/material'; import { MatDialog, MatDialogRef } from '@angular/material';
import { RegisterComponent } from '../register/register.component'; import { RegisterComponent } from '../register/register.component';
import { AdminLayoutComponent } from 'app/layouts/admin/admin-layout.component'; import { AdminLayoutComponent } from 'app/layouts/admin/admin-layout.component';
import { PasswordChangeComponent } from '../password-change/password-change.component';
@Component({ @Component({
selector: 'ms-login-session', selector: 'ms-login-session',
@ -22,7 +23,7 @@ export class LoginComponent {
previousUrl: string; previousUrl: string;
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router, constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,
private location:Location,private matDialog:MatDialog) { private location:Location,private matDialog:MatDialog,private dialogRef:MatDialogRef<LoginComponent>) {
// console.log(this.router.events); // console.log(this.router.events);
@ -111,6 +112,15 @@ this.previousUrl = this.restApi.getPreviousUrl();
panelClass: 'custom-modalbox' panelClass: 'custom-modalbox'
}) })
} }
forgotPassworDialog(){
this.dialogRef.close();
this.matDialog.open(PasswordChangeComponent,{
"height":"360px",
"width":"320px",
panelClass: 'custom-modalbox',
data:'forgotPass'
})
}
} }

View File

@ -4,6 +4,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>
<div *ngIf="!forgotPassComponent">
<header> <h4>Password Change</h4></header> <header> <h4>Password Change</h4></header>
<!-- <mat-card style="width:100%"> <!-- <mat-card style="width:100%">
@ -16,6 +17,9 @@
<mat-form-field appearance="outline" style="width:100%"> <mat-form-field appearance="outline" style="width:100%">
<input matInput type="password" placeholder="Password" formControlName="password" autocomplete="off"> <input matInput type="password" placeholder="Password" formControlName="password" autocomplete="off">
<mat-error *ngIf="passwordChangeForm.controls['password'].hasError('required')">Password is Required</mat-error>
<mat-error *ngIf="passwordChangeForm.controls['password'].hasError('minlength')">Password must be minimum of 4 Characters</mat-error>
<mat-error *ngIf="passwordChangeForm.controls['password'].hasError('maxlength')">Password must be maximum of 12 Characters</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field appearance="outline" style="width:100%"> <mat-form-field appearance="outline" style="width:100%">
<input matInput type="password" placeholder="Confirm Password" formControlName="confirm_password" autocomplete="off" (keyup)="checkValidators($event.target.value,'pass')"> <input matInput type="password" placeholder="Confirm Password" formControlName="confirm_password" autocomplete="off" (keyup)="checkValidators($event.target.value,'pass')">
@ -24,7 +28,33 @@
<button style="float:right;" class="mat-red" mat-raised-button (click)="csrUserRegistration()">Update</button> <br/> <button style="float:right;" class="mat-red" mat-raised-button (click)="csrUserRegistration()">Update</button> <br/>
</form> </form>
</div>
<div *ngIf="forgotPassComponent">
<header> <h4>Forgot Password</h4></header>
<!-- <mat-card style="width:100%">
<mat-card-header>
<mat-card-title>
</mat-card-title>
</mat-card-header> -->
<form [formGroup]="forgotPassForm">
<mat-form-field appearance="outline" style="width:100%">
<input matInput type="text" placeholder="Email" formControlName="mail" autocomplete="off">
<mat-error *ngIf="forgotPassForm.controls['mail'].hasError('required')">Email is required</mat-error>
<mat-error *ngIf="forgotPassForm.controls['mail'].hasError('email')">Invalid Email</mat-error>
</mat-form-field>
<mat-form-field appearance="outline" style="width:100%">
<input OnlyNumber="true" matInput type="number" placeholder="Mobile Number" formControlName="mobile" autocomplete="off" >
<mat-error *ngIf="forgotPassForm.controls['mobile'].hasError('required')">mobile number is required</mat-error>
<mat-error *ngIf="forgotPassForm.controls['mobile'].hasError('min')">minimum 10 digit required</mat-error>
<mat-error *ngIf="forgotPassForm.controls['mobile'].hasError('max')">maximum 12 digit is allowed</mat-error>
</mat-form-field>
<button style="float:right;" class="mat-red" mat-raised-button (click)="forgotPassSubmit()">Submit</button> <br/>
</form>
</div>
<!-- </mat-card> --> <!-- </mat-card> -->
</div> </div>
</div> </div>

View File

@ -14,14 +14,17 @@ export class PasswordChangeComponent implements OnInit {
passwordChangeForm:FormGroup passwordChangeForm:FormGroup
pass_pattern_error: boolean; pass_pattern_error: boolean;
go_reg: any; go_reg: any;
forgotPassForm:FormGroup
forgotPassComponent: boolean;
constructor(private restApi:ApiService,private fb:FormBuilder,private dialogRef:MatDialog,@Inject(MAT_DIALOG_DATA) public data:any,private router:Router) { constructor(private restApi:ApiService,private fb:FormBuilder,private dialogRef:MatDialog,@Inject(MAT_DIALOG_DATA) public data:any,private router:Router) {
console.log(data) console.log(data)
} }
ngOnInit() { ngOnInit() {
if(this.data !='forgotPass'){
this.passwordChangeForm=this.fb.group({ this.passwordChangeForm=this.fb.group({
id:[this.data,Validators.compose([Validators.required])], id:[this.data,Validators.compose([Validators.required])],
password:['',Validators.compose([Validators.required])], password:['',Validators.compose([Validators.required,Validators.minLength(4),Validators.maxLength(12)])],
confirm_password:['',Validators.compose([Validators.required])] confirm_password:['',Validators.compose([Validators.required])]
// name:[''], // name:[''],
// email:[{value:'',disabled:true}], // email:[{value:'',disabled:true}],
@ -39,6 +42,14 @@ export class PasswordChangeComponent implements OnInit {
}) })
} }
else{
this.forgotPassComponent=true
this.forgotPassForm=this.fb.group({
mail:['',Validators.compose([Validators.email,Validators.required])],
mobile:['',Validators.compose([Validators.required, Validators.min(1000000000), Validators.max(999999999999)])]
})
}
}
checkValidators(value,option){ checkValidators(value,option){
if(option == 'pass'){ if(option == 'pass'){
if(value == this.passwordChangeForm.value.password){ if(value == this.passwordChangeForm.value.password){
@ -86,5 +97,20 @@ export class PasswordChangeComponent implements OnInit {
closeDialog(){ closeDialog(){
this.dialogRef.closeAll() this.dialogRef.closeAll()
} }
forgotPassSubmit(){
if(this.forgotPassForm.invalid){
alert("Please Fill all the Fields")
return;
}
this.restApi.forgetPwd(this.forgotPassForm.value).subscribe(res=>{
if(res['dataStatus']){
alert(res['msg'])
this.dialogRef.closeAll()
}
else{
alert(res['msg'])
}
})
}
} }

View File

@ -48,7 +48,7 @@
<mat-card-content style="text-align: center;"> <mat-card-content style="text-align: center;">
<h3><strong><span class="amount"><span class="currency-symbol">&#8377;&nbsp;</span>{{grand_tot_value}}</span></strong></h3><br/> <h3><strong><span class="amount"><span class="currency-symbol">&#8377;&nbsp;</span>{{grand_tot_value}}</span></strong></h3><br/>
<mat-radio-group aria-label="Payment Mode" [(ngModel)]="payment_mode" (click)="changeValidation($event)"> <mat-radio-group aria-label="Payment Mode" [(ngModel)]="payment_mode" (change)="changeValidation($event,'1')">
<mat-radio-button value="1" >Online</mat-radio-button>&nbsp; <mat-radio-button value="1" >Online</mat-radio-button>&nbsp;
<mat-radio-button value="2">Offline</mat-radio-button> <mat-radio-button value="2">Offline</mat-radio-button>
</mat-radio-group> </mat-radio-group>
@ -72,14 +72,15 @@
</mat-form-field>&nbsp;&nbsp;&nbsp; --> </mat-form-field>&nbsp;&nbsp;&nbsp; -->
<label>Please tell us when you would like to deliver the selected items :</label><br> <label>Please tell us when you would like to deliver the selected items :</label><br>
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<input matInput [matDatepicker]="picker" [min]="maxDate" placeholder="Delivery date" formControlName="do_delivery"> <input matInput [matDatepicker]="picker" [min]="maxDate" placeholder="Delivery date" formControlName="do_delivery" required>
<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-error *ngIf="contributeKind.controls['do_delivery'].errors">Delivery Date is Required</mat-error>
</mat-form-field>&nbsp;&nbsp;&nbsp;<br/> </mat-form-field>&nbsp;&nbsp;&nbsp;<br/>
<label>Please deliver the items to the following address :</label><br> <!--<label>Please deliver the items to the following address :</label><br>
<mat-form-field appearance="outline" > <mat-form-field appearance="outline" >
<input matInput placeholder = "Delivery Point" type="text" formControlName="delivery_point"> <input matInput placeholder = "Delivery Point" type="text" formControlName="delivery_point">
</mat-form-field>&nbsp;&nbsp;&nbsp;<br/> </mat-form-field>&nbsp;&nbsp;&nbsp;<br/> -->
<label>Please leave your comments and any other inputs here :</label><br> <label>Please leave your comments and any other inputs here :</label><br>
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<textarea matInput placeholder="Remarks" type="text" formControlName="remarks"></textarea> <textarea matInput placeholder="Remarks" type="text" formControlName="remarks"></textarea>
@ -114,7 +115,7 @@
<mat-card-title>Payment Details</mat-card-title> <mat-card-title>Payment Details</mat-card-title>
<form [formGroup]="offlineDetForm"> <form [formGroup]="offlineDetForm">
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<mat-select placeholder="Payment Mode" formControlName="payment_type"> <mat-select placeholder="Payment Mode" formControlName="payment_type" (selectionChange)="changeValidation($event,'2')">
<mat-option *ngFor="let value of payment_mode_data" [value]="value.id">{{value.name}}</mat-option> <mat-option *ngFor="let value of payment_mode_data" [value]="value.id">{{value.name}}</mat-option>
</mat-select> </mat-select>
<mat-error>Please Choose the option </mat-error> <mat-error>Please Choose the option </mat-error>
@ -123,13 +124,15 @@
<div fxLayout="row" fxLayout.xs="column"> <div fxLayout="row" fxLayout.xs="column">
<mat-form-field class="mr-1" fxFlex.xs="100" fxFlex="50" > <mat-form-field class="mr-1" fxFlex.xs="100" fxFlex="50" >
<input matInput type="text" formControlName="payment_ref" placeholder="Cheque / DD Number"> <input OnlyNumber="true" matInput type="text" formControlName="payment_ref" placeholder="Cheque / DD Number">
<mat-error *ngIf="offlineDetForm.controls['payment_ref'].errors">Cheque / DD Number is required</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex.xs="100" fxFlex="50"> <mat-form-field fxFlex.xs="100" fxFlex="50">
<input matInput [matDatepicker]="picker" placeholder="Date" formControlName="check_date"> <input matInput [matDatepicker]="picker" [min]="checkDate_DD_min" [max]="checkDate_DD_max" placeholder="Date" formControlName="check_date">
<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-error *ngIf="offlineDetForm.controls['check_date'].errors">Date is required</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" fxLayout.xs="column"> <div fxLayout="row" fxLayout.xs="column">
@ -157,7 +160,7 @@
</div> </div>
<div *ngIf="offlineDetForm.value.check_deposit_mode == '2' && offlineDetForm.controls['check_deposit_mode']"> <div *ngIf="offlineDetForm.value.check_deposit_mode == '2' && offlineDetForm.controls['check_deposit_mode']">
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<input matInput type="text" formControlName="cheque_drop_address" placeholder="Cheque Drop Details"> <input matInput type="text" formControlName="cheque_drop_address" placeholder="Please provide details of the bank, branch where the cheque is dropped">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -167,12 +170,14 @@
<div fxLayout="row"> <div fxLayout="row">
<mat-form-field style="width: 50%;" class="mr-1"> <mat-form-field style="width: 50%;" class="mr-1">
<input matInput type="text" formControlName="payment_ref" placeholder="Transaction Reference"> <input matInput type="text" formControlName="payment_ref" placeholder="Transaction Reference Id">
<mat-error *ngIf="offlineDetForm.controls['payment_ref'].errors">Transaction Reference Id is required</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 50%;"> <mat-form-field style="width: 50%;">
<input matInput [matDatepicker]="picker" placeholder="Date" formControlName="check_date"> <input matInput [matDatepicker]="picker" [max]="maxDate" placeholder="Date" formControlName="check_date">
<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-error *ngIf="offlineDetForm.controls['check_date'].errors">Date is required</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -183,9 +188,9 @@
</div> </div>
<ul> <ul>
<li *ngIf="payment_mode == '1'"><span>Tamil Nadu State Parent Teacher Association (TNPTA) accepts online voluntary contributions using Net Banking or VISA-Debit/Credit Cards in Indian Rupees (INR) from Individuals, Organizations, Trusts,Companies and Institutions etc.</span></li> <li *ngIf="payment_mode == '1'"><span>Tamil Nadu State Parent Teacher Association (TNPTA) accepts online voluntary contributions using Net Banking or Debit/Credit Cards in Indian Rupees (INR) from Individuals, Organizations, Trusts,Companies and Institutions etc.</span></li>
<li><span>All contributions towards Tamil Nadu State Parent Teacher Association (TNPTA) are exempt from Income Tax under section 80 (G).</span></li> <li *ngIf="payment_mode == '1' || payment_mode == '2'"><span>All contributions towards Tamil Nadu State Parent Teacher Association (TNPTA) are exempt from Income Tax under section 80 (G).</span></li>
<li><span>The PAN Number of Tamil Nadu State Parent Teacher Association (TNPTA) is AACAT2920R.</span></li> <li *ngIf="payment_mode == '1' || payment_mode == '2'"><span>The PAN Number of Tamil Nadu State Parent Teacher Association (TNPTA) is AACAT2920R.</span></li>
</ul> </ul>

View File

@ -56,9 +56,19 @@ export class PaymentComponent implements OnInit {
offlineDetForm:FormGroup; offlineDetForm:FormGroup;
payment_mode_data=[{id:1,name:"Cheque/DD"},{id:2,name:"Bank Transfer"}] payment_mode_data=[{id:1,name:"Cheque/DD"},{id:2,name:"Bank Transfer"}]
deposit_mode_data=[{id:1,name:"Despatch"},{id:2,name:"Cheque Drop"}] deposit_mode_data=[{id:1,name:"Despatch"},{id:2,name:"Cheque Drop"}]
checkDate_DD_min: any;
checkDate_DD_max: 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) {
this.isToken(); this.isToken();
console.log(this.maxDate)
let month = this.maxDate.getMonth();
let year = this.maxDate.getFullYear();
let prevMonth = (month === 0) ? 10 : month -2;
let nextMonth = (month === 11) ? 12 : month + 1;
this.checkDate_DD_min=new Date()
this.checkDate_DD_max=new Date()
this.checkDate_DD_min.setMonth(prevMonth);
this.checkDate_DD_max.setMonth(nextMonth);
} }
ngOnInit() { ngOnInit() {
@ -83,9 +93,10 @@ export class PaymentComponent implements OnInit {
if(this.contribute_type == '2'){ if(this.contribute_type == '2'){
this.contributeKind=this.fb.group({ this.contributeKind=this.fb.group({
delivery_point:[''], delivery_point:[''],
do_delivery:[''], do_delivery:['',Validators.compose([Validators.required])],
remarks:[''] remarks:['']
}) })
} }
this.offlineDetForm=this.fb.group({ this.offlineDetForm=this.fb.group({
payment_type:[''], payment_type:[''],
@ -116,6 +127,13 @@ export class PaymentComponent implements OnInit {
this.router.navigate(['/authentication']); this.router.navigate(['/authentication']);
} }
}
validateAllFormFields(formGroup: FormGroup) {
console.log(formGroup) //{1}
Object.keys(formGroup.controls).forEach(field => { // {1}
const control = formGroup.get(field); // {2}
control.markAsTouched({ onlySelf: true }); // {3}
});
} }
proceed_for_payment(){ proceed_for_payment(){
if(this.payment_mode == '' && this.contribute_type != '2'){ if(this.payment_mode == '' && this.contribute_type != '2'){
@ -124,14 +142,19 @@ export class PaymentComponent implements OnInit {
} }
let params=this.contribute_params let params=this.contribute_params
if(this.contribute_type == '2'){ if(this.contribute_type == '2'){
params.records.mat_delivery_point=this.contributeKind.value.delivery_point if(this.contributeKind.invalid){
alert("Please Fill the Date of Delivery Field")
return;
}
// params.records.mat_delivery_point=this.contributeKind.value.delivery_point
params.records.mat_delivery_date=this.contributeKind.value.do_delivery params.records.mat_delivery_date=this.contributeKind.value.do_delivery
params.records.gen_dev_fund_remarks=this.contributeKind.value.remarks params.records.gen_dev_fund_remarks=this.contributeKind.value.remarks
} }
if(this.payment_mode == '2'){ if(this.payment_mode == '2'){
if(this.offlineDetForm.invalid){ if(this.offlineDetForm.invalid){
alert('Please Choose the Payment Mode'); this.validateAllFormFields(this.offlineDetForm)
alert('Please fill all the fields');
return; return;
} }
params.records.payment_type=this.offlineDetForm.value.payment_type params.records.payment_type=this.offlineDetForm.value.payment_type
@ -207,13 +230,37 @@ export class PaymentComponent implements OnInit {
// } // }
// } // }
changeValidation(value){ changeValidation(event,flag){
if(value.target.innerText == 'Offline'){ console.log(event)
// for paymet type 1-online 2-offline
if(flag == '1'){
if(event.value == '2'){
this.offlineDetForm.controls['payment_type'].setValidators(Validators.compose([Validators.required])) this.offlineDetForm.controls['payment_type'].setValidators(Validators.compose([Validators.required]))
} }
else{ else{
this.offlineDetForm.controls['payment_type'].clearValidators(); this.offlineDetForm.controls['payment_type'].clearValidators();
this.offlineDetForm.controls['payment_type'].updateValueAndValidity();
}
}
// for paymet ref 1-check-dd 2-bt
if(flag== '2'){
if(event.value == '1'){
this.offlineDetForm.controls['payment_ref'].setValidators(Validators.compose([Validators.required]))
this.offlineDetForm.controls['check_date'].setValidators(Validators.compose([Validators.required]))
this.offlineDetForm.controls['check_branch_bank'].setValidators(Validators.compose([Validators.required]))
this.offlineDetForm.controls['check_deposit_mode'].setValidators(Validators.compose([Validators.required]))
}
else if(event.value == '2'){
this.offlineDetForm.controls['payment_ref'].setValidators(Validators.compose([Validators.required]))
this.offlineDetForm.controls['check_date'].setValidators(Validators.compose([Validators.required]))
this.offlineDetForm.controls['check_branch_bank'].clearValidators()
this.offlineDetForm.controls['check_branch_bank'].updateValueAndValidity()
this.offlineDetForm.controls['check_deposit_mode'].clearValidators()
this.offlineDetForm.controls['check_deposit_mode'].updateValueAndValidity()
}
} }
} }

View File

@ -6,6 +6,7 @@
</mat-card-title> </mat-card-title>
</mat-card-header> </mat-card-header>
<mat-card-content><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <mat-card-content><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8"> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
@ -14,7 +15,7 @@
<META NAME="AUTHOR" CONTENT="Arun Selvan"> <META NAME="AUTHOR" CONTENT="Arun Selvan">
<META NAME="CREATED" CONTENT="20191016;121800000000000"> <META NAME="CREATED" CONTENT="20191016;121800000000000">
<META NAME="CHANGEDBY" CONTENT="Arun Selvan"> <META NAME="CHANGEDBY" CONTENT="Arun Selvan">
<META NAME="CHANGED" CONTENT="20191016;134600000000000"> <META NAME="CHANGED" CONTENT="20191024;82700000000000">
<META NAME="AppVersion" CONTENT="16.0000"> <META NAME="AppVersion" CONTENT="16.0000">
<META NAME="DocSecurity" CONTENT="0"> <META NAME="DocSecurity" CONTENT="0">
<META NAME="HyperlinksChanged" CONTENT="false"> <META NAME="HyperlinksChanged" CONTENT="false">
@ -24,18 +25,22 @@
<STYLE TYPE="text/css"> <STYLE TYPE="text/css">
<!-- <!--
@page { margin: 1in } @page { margin: 1in }
P { margin-bottom: 0.08in; direction: ltr; widows: 2; orphans: 2 } P { margin-bottom: 0.08in; direction: ltr; widows: 2; orphans: 2; background:none; }
A:link { color: #0000ff; } A:link { color: #0000ff; }
A{
color:#0000ff;
text-decoration: underline;
}
--> -->
</STYLE> </STYLE>
</HEAD> </HEAD>
<BODY LANG="en-IN" LINK="#0000ff" DIR="LTR"> <BODY LANG="en-IN" LINK="#0000ff" DIR="LTR" style="padding: 8px;">
<P STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">LAST UPDATED: OCTOBER <FONT COLOR="#212529"><FONT FACE="Arial, serif">LAST UPDATED: OCTOBER
16, 2019</FONT></FONT></P> 24, 2019</FONT></FONT></P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">This Privacy Policy <FONT COLOR="#212529"><FONT FACE="Arial, serif">This Privacy Policy
applies to&nbsp;</FONT></FONT><A style="color:#0000ff;text-decoration: underline" HREF="https://contribute.tnschools.gov.in"><FONT FACE="Arial, serif">https://contribute.tnschools.gov.in</FONT></A><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;(“</FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>Website</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&quot;), applies to&nbsp;</FONT></FONT><A HREF="https://contribute.tnschools.gov.in"><FONT FACE="Arial, serif">https://contribute.tnschools.gov.in</FONT></A><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;(“</FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>Website</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&quot;),
and all other websites, applications, online services, and other and all other websites, applications, online services, and other
interactive features or downloads that post a link to this Privacy interactive features or downloads that post a link to this Privacy
Policy, whether accessed via computer, mobile device or otherwise Policy, whether accessed via computer, mobile device or otherwise
@ -99,8 +104,7 @@ details, Facebook profile, contacts, etc.</FONT></FONT></P>
</P> </P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>By Visiting This <FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>By Visiting This
Site You Agree To Be Bound By The Terms And Conditions Of This </B></FONT></FONT> Site You Agree To Be Bound By The Terms And Conditions</B></FONT></FONT></P>
</P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.5in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.5in">
<FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">1. <FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">1.
Collection of Personal Information, Other Information and Its Usage</FONT></FONT></FONT></P> Collection of Personal Information, Other Information and Its Usage</FONT></FONT></FONT></P>
@ -191,7 +195,7 @@ authentic, correct, current and updated and you have all the rights,
permissions and consents as may be required to provide such permissions and consents as may be required to provide such
information to us;</FONT></FONT></P> information to us;</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>1.7.2</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;Your <FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>1.7.2</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;By
providing the information to us and our consequent storage, providing the information to us and our consequent storage,
collection, usage, transfer, access or processing of the same shall collection, usage, transfer, access or processing of the same shall
not be in violation of any third party agreement, laws, charter not be in violation of any third party agreement, laws, charter
@ -290,8 +294,8 @@ Use of Demographic / Profile Data / Your Information</FONT></FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>3.1</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;We <FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>3.1</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;We
use personal information to provide the services you request. To the use personal information to provide the services you request. To the
extent we use your personal information to market to you, we will extent we use your personal information to market, we will provide
provide you the ability to opt-out of such uses. We use your personal you the option to opt-out of such uses. We use your personal
information to resolve disputes; troubleshoot problems; help promote information to resolve disputes; troubleshoot problems; help promote
a safe service; collect money; measure interest in our services and a safe service; collect money; measure interest in our services and
updates; customize your experience; detect and protect us against updates; customize your experience; detect and protect us against
@ -339,7 +343,7 @@ contribution to a campaign, even after registering through email or
the Facebook login. By choosing to be anonymous, the Site does not the Facebook login. By choosing to be anonymous, the Site does not
publish the contributor's name or image on a campaign's contributor publish the contributor's name or image on a campaign's contributor
section. TNTPA knows about your identity when you register, but does section. TNTPA knows about your identity when you register, but does
not reveal it to anyone.</FONT></FONT></P> not reveal it to anyone without your consent.</FONT></FONT></P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.5in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.5in">
<FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">6. <FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">6.
Review of Information / Account Deactivation / Removal of Information</FONT></FONT></FONT></P> Review of Information / Account Deactivation / Removal of Information</FONT></FONT></FONT></P>
@ -378,7 +382,7 @@ Security</FONT></FONT></FONT></P>
have adopted reasonable security practices and procedure to ensure have adopted reasonable security practices and procedure to ensure
that the personal information collected is secure. Your personal that the personal information collected is secure. Your personal
information is held on secure servers. You agree that such measures information is held on secure servers. You agree that such measures
are secured and adequate when you register with us/create an account.</FONT></FONT></P> are secure and adequate when you register with us/create an account.</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>8.2</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;While <FONT COLOR="#212529"><FONT FACE="Arial, serif"><B>8.2</B></FONT></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">&nbsp;While
we will endeavour to take all reasonable and appropriate steps to we will endeavour to take all reasonable and appropriate steps to
@ -442,10 +446,11 @@ be contacted with respect to any complaints, questions, comments or
concerns including those pertaining to breach of Terms of Use, concerns including those pertaining to breach of Terms of Use,
Privacy Policy and other policies or questions is provided below:</FONT></FONT></P> Privacy Policy and other policies or questions is provided below:</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">Mr. Umasankar</FONT></FONT></P> <FONT COLOR="#212529"><FONT FACE="Arial, serif">Treasurer, </FONT></FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">Treasurer, Tamil Nadu <FONT COLOR="#212529"><FONT FACE="Arial, serif">Tamil Nadu State
State Parent Teacher Association</FONT></FONT></P> Parent Teacher Association</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">DPI Campus, College <FONT COLOR="#212529"><FONT FACE="Arial, serif">DPI Campus, College
Road,</FONT></FONT></P> Road,</FONT></FONT></P>
@ -453,9 +458,12 @@ Road,</FONT></FONT></P>
<FONT COLOR="#212529"><FONT FACE="Arial, serif">Chennai - 600006, <FONT COLOR="#212529"><FONT FACE="Arial, serif">Chennai - 600006,
India.</FONT></FONT></P> India.</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in"> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">Email:&nbsp;tnpta.csr@gmail.com <FONT COLOR="#212529"><FONT FACE="Arial, serif">Email:&nbsp;</FONT></FONT><A HREF="mailto:tnpta.csr@gmail.com"><FONT FACE="Arial, serif">tnpta.csr@gmail.com</FONT></A><FONT COLOR="#212529"><FONT FACE="Arial, serif">
</FONT></FONT> </FONT></FONT>
</P> </P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; background: #ffffff; line-height: 0.23in"><A NAME="_GoBack"></A>
<FONT COLOR="#212529"><FONT FACE="Arial, serif">Phone : +91 44 -
28279758</FONT></FONT></P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.5in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.5in">
<FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">11. <FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">11.
Changes to this Policy</FONT></FONT></FONT></P> Changes to this Policy</FONT></FONT></FONT></P>
@ -471,9 +479,10 @@ information, unless you consent to the new or revised policy.</FONT></FONT></P>
<P STYLE="margin-bottom: 0.19in; line-height: 0.5in"> <P STYLE="margin-bottom: 0.19in; line-height: 0.5in">
<FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">12. <FONT COLOR="#000000"><FONT FACE="Arial, serif"><FONT SIZE=6 STYLE="font-size: 27pt">12.
Effective Date</FONT></FONT></FONT></P> Effective Date</FONT></FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in"><A NAME="_GoBack"></A> <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.19in; line-height: 0.23in">
<FONT COLOR="#212529"><FONT FACE="Arial, serif">This policy was <FONT COLOR="#212529"><FONT FACE="Arial, serif">This policy is
updated and became immediately effective on October, 16th 2019</FONT></FONT></P> effective from October, 24</FONT></FONT><FONT COLOR="#212529"><SUP><FONT FACE="Arial, serif">th</FONT></SUP></FONT><FONT COLOR="#212529"><FONT FACE="Arial, serif">
2019</FONT></FONT></P>
<P STYLE="margin-bottom: 0in"><BR> <P STYLE="margin-bottom: 0in"><BR>
</P> </P>
</BODY> </BODY>

View File

@ -334,7 +334,7 @@
<!-- Sponsor Column --> <!-- Sponsor Column -->
<ng-container matColumnDef="Sponsor_Qty"> <ng-container matColumnDef="Sponsor_Qty">
<mat-header-cell *matHeaderCellDef > Sponsored Qty </mat-header-cell> <mat-header-cell *matHeaderCellDef > Sponsored Qty </mat-header-cell>
<mat-cell data-label="Sponsored Qty" *matCellDef="let row;let i = index"> <input step="1" min="1" max="" title="Qty" [(ngModel)]="sponsor_qty[i]" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit,row.mat_id,row)" <mat-cell data-label="Sponsored Qty" *matCellDef="let row;let i = index"> <input OnlyNumber="true" step="1" min="1" max="" title="Qty" [(ngModel)]="sponsor_qty[i]" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit,row.mat_id,row)"
class="sponsor_input"> </mat-cell> class="sponsor_input"> </mat-cell>
</ng-container> </ng-container>
@ -366,11 +366,32 @@
</table> </table>
</div> </div>
</div> </div>
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons ></mat-paginator> <!-- <mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons ></mat-paginator> -->
<div class="pt-1 pr-1" style="text-align: right;" *ngIf="dataStatus"> <!-- <div class="pt-1 pr-1" style="text-align: right;" *ngIf="dataStatus">
<button mat-raised-button color="primary" (click)="finalSave(2)" class="mr-1 mb-1">I'd like to Contribute in Kind</button> <button mat-raised-button color="primary" (click)="finalSave(2)" class="mr-1 mb-1">I'd like to Contribute in Kind</button>
<button (click)="finalSave(1)" mat-raised-button style="background-color:rgb(69, 189, 189);color:white" >I'd like to Contribute in Cash</button> <button (click)="finalSave(1)" mat-raised-button style="background-color:rgb(69, 189, 189);color:white" >I'd like to Contribute in Cash</button>
</div> -->
<div style="text-align: center;" *ngIf="dataStatus" fxLayoutAlign="center">
<mat-label style=" font-size: 1.25rem;">I am happy to contribute</mat-label>&nbsp;&nbsp;
<mat-radio-group [(ngModel)]="contribute_type" >&nbsp;&nbsp;&nbsp;
<mat-radio-button value="2" ><span style=" font-size: 1.25rem;">Material</span></mat-radio-button><br/>
<mat-radio-button value="1"><span style=" font-size: 1.25rem;">Funds</span></mat-radio-button>
</mat-radio-group><br/>
<!-- <mat-form-field appearance="outline" fxFlex="50" fxFlex.xs="100" class="select_cot_type">
<mat-label style=" font-size: 1.25rem;">I am happy to contribute</mat-label>
<mat-select color="secondary" placeholder="Select" [(ngModel)]="contribute_type" #username="ngModel">
<mat-option value="2"><span style=" font-size: 1.25rem;">Materials</span></mat-option>
<mat-option value="1"><span style=" font-size: 1.25rem;">Funds/Money</span></mat-option>
</mat-select>
<mat-error *ngIf="username.invalid && username.errors.required && (username.dirty || username.touched)">Contribute type is required</mat-error>
</mat-form-field> -->
</div>
<div class="pt-1 pr-1" style="text-align: right;" *ngIf="dataStatus">
<!-- <button mat-raised-button color="primary" (click)="finalSave(2)" class="mr-1 mb-1">I'd like to Contribute in Kind</button> -->
<button (click)="finalSave(contribute_type)" mat-raised-button style="background-color:rgb(69, 189, 189);color:white;font-weight: bold" >Submit</button>
</div> </div>
</div> </div>
<ng-template #status><h2>{{msg}}</h2></ng-template> <ng-template #status><h2>{{msg}}</h2></ng-template>

View File

@ -34,6 +34,7 @@ export class ProjectDetailComponent implements OnInit {
@ViewChild('table_element',{static:true}) table_element : ElementRef @ViewChild('table_element',{static:true}) table_element : ElementRef
clientWidth: any; clientWidth: any;
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator; @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
contribute_type:any=''
// types_of_funds=['State Fund','District Fund','School common Fund','For this Project'] // types_of_funds=['State Fund','District Fund','School common Fund','For this Project']
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,public schInfo:SchoolDetailsService,private activatedRoute:ActivatedRoute) { } constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,public schInfo:SchoolDetailsService,private activatedRoute:ActivatedRoute) { }
@ -136,6 +137,10 @@ finalSave(flag)
alert("Please Fill the amount"); alert("Please Fill the amount");
return return
} }
if(this.contribute_type == '' ){
alert("Please choose the contribute type");
return
}
let data = {'records': let data = {'records':
{ {
'id':'', 'id':'',

View File

@ -28,7 +28,7 @@
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> --> <!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
</div> </div>
</div> </div>
<div class="inside" *ngIf="schooldetails.school_name != 'More'"> <div class="inside" *ngIf="schooldetails.school_name != 'MORE'">
<div class="icon"><mat-icon>info_outline</mat-icon></div> <div class="icon"><mat-icon>info_outline</mat-icon></div>
<div class="contents"> <div class="contents">
<table> <table>
@ -59,6 +59,15 @@
<h1 class="text"><span> More</span></h1> <h1 class="text"><span> More</span></h1>
</mat-card> </mat-card>
</div> --> </div> -->
<div fxFlex.sm="33.33" fxFlex.xs="100" fxFlex.md="23.33" fxFlex.lg="23.33" fxFlex.xl="23.33" class="m-gap p-gap">
<mat-card style="margin: 8px;padding:0px;height: 300px;border-radius: 40px;" fxFlex="100" [routerLink]="['/contribute']">
<mat-card style=" -webkit-filter: blur(3px);
filter: blur(3px);background-image:url('assets/images/csr-img/collage.png');background-repeat: no-repeat, repeat;background-size: cover;" fxLayoutAlign="center center" >
</mat-card>
<h1 class="text"><span style="font-size: 40px">+</span><br/><span class="more_text"> MORE</span></h1>
</mat-card>
</div>
<!-- <div fxFlex.sm="33.33" fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="23.33" fxFlex.lg="23.33" fxFlex.xl="23.33" class="m-gap p-gap"> --> <!-- <div fxFlex.sm="33.33" fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="23.33" fxFlex.lg="23.33" fxFlex.xl="23.33" class="m-gap p-gap"> -->
<!-- <div class="p-list-main mb-2"> <!-- <div class="p-list-main mb-2">

View File

@ -201,23 +201,28 @@ mat-card{
border-radius: 4px; border-radius: 4px;
// background-color: #e91e63; // background-color: #e91e63;
border: none; border: none;
color: white; color:cyan;
text-align: center; text-align: center;
font-size: 35px; font-size: 35px;
padding: 5px; padding: 5px;
width: 200px; width: 200px;
transition: all 0.5s; transition: all 0.5s;
cursor: pointer; cursor: pointer;
position: absolute;
top:20%;
left:17%;
} }
.text span { .text .more_text {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
position: relative; position: relative;
transition: 0.5s; transition: 0.5s;
} }
.text span:after { .text .more_text:after {
content: '\00bb'; content: '\00bb';
position: absolute; position: absolute;
opacity: 0; opacity: 0;
@ -226,12 +231,12 @@ mat-card{
transition: 0.5s; transition: 0.5s;
} }
.text:hover span { .text:hover .more_text {
padding-right: 25px; padding-right: 25px;
color:rgb(225, 0, 255) color:rgb(225, 0, 255)
} }
.text:hover span:after { .text:hover .more_text:after {
opacity: 1; opacity: 1;
right: 0; right: 0;
} }

View File

@ -31,7 +31,7 @@ export class ProjectListComponent implements OnInit {
// this.school_list = schDet['records'].filter(sch=>sch.is_featured==this.is_featured)[0]; // this.school_list = schDet['records'].filter(sch=>sch.is_featured==this.is_featured)[0];
this.school_list = schDet['records']; this.school_list = schDet['records'];
this.school_list = this.school_list.filter(sch=>sch.is_featured==1); this.school_list = this.school_list.filter(sch=>sch.is_featured==1);
this.school_list.push({school_name:"More",images:['assets/images/csr-img/school_empty.jpg']}) // this.school_list.push({school_name:"MORE",images:['assets/images/csr-img/school_empty.jpg']})
// this.school_list[this.school_list.length-1].images.push('assets/images/csr-img/school_empty.jpg') // this.school_list[this.school_list.length-1].images.push('assets/images/csr-img/school_empty.jpg')
console.log(this.school_list); console.log(this.school_list);
@ -54,7 +54,7 @@ export class ProjectListComponent implements OnInit {
getschDetails(schDetails) getschDetails(schDetails)
{ {
if(schDetails.school_name != 'More'){ if(schDetails.school_name != 'MORE'){
let data = {'school_name':schDetails.school_name,'images':schDetails.images,'district_name':schDetails.district_name,'total_b':schDetails.total_b,'total_g':schDetails.total_g,'total':schDetails.total,'teach_tot':schDetails.teach_tot,'nonteach_tot':schDetails.nonteach_tot,'totstaff':schDetails.totstaff,'total_cost':schDetails.total_cost,'total_recevied':schDetails.total_recevied,'school_id':schDetails.school_id,'block_name':schDetails.block_name,'management':schDetails.management,'category':schDetails.category,'high_class':schDetails.high_class,'low_class':schDetails.low_class,'latitude':schDetails.longitude,'longitude':schDetails.longitude,'school_req_id':schDetails.school_req_id}; let data = {'school_name':schDetails.school_name,'images':schDetails.images,'district_name':schDetails.district_name,'total_b':schDetails.total_b,'total_g':schDetails.total_g,'total':schDetails.total,'teach_tot':schDetails.teach_tot,'nonteach_tot':schDetails.nonteach_tot,'totstaff':schDetails.totstaff,'total_cost':schDetails.total_cost,'total_recevied':schDetails.total_recevied,'school_id':schDetails.school_id,'block_name':schDetails.block_name,'management':schDetails.management,'category':schDetails.category,'high_class':schDetails.high_class,'low_class':schDetails.low_class,'latitude':schDetails.longitude,'longitude':schDetails.longitude,'school_req_id':schDetails.school_req_id};
this.schInfo.updateDetails(data); this.schInfo.updateDetails(data);

View File

@ -14,16 +14,24 @@
<div fxLayout="column" fxLayoutAlign="start stretch"> <div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Name" type="text" name="name" formControlName="name" required> <input matInput placeholder="Name" type="text" name="name" formControlName="name" required>
<mat-error *ngIf="go_reg.controls['name'].errors">Name is Required</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="E Mail" type="email" name="email" formControlName="email" required > <input matInput placeholder="E Mail" type="email" name="email" formControlName="email" required (change)="checkExists($event.target.value,'email')">
<mat-error *ngIf="go_reg.controls['email'].hasError('required')">Email is required</mat-error>
<mat-error *ngIf="go_reg.controls['email'].hasError('email')">Invalid Email</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Confirm E Mail" type="email" name="confirm_email" formControlName="confirm_email" required (keyup)="checkValidators($event.target.value,'email')"> <input matInput placeholder="Confirm E Mail" type="email" name="confirm_email" formControlName="confirm_email" required (keyup)="checkValidators($event.target.value,'email')">
<mat-error *ngIf="go_reg.controls['confirm_email'].hasError('required')">Email is required</mat-error>
<mat-error *ngIf="go_reg.controls['confirm_email'].hasError('email')">Invalid Email</mat-error>
</mat-form-field> </mat-form-field>
<div style="color:red;font-size: 14px;float: right" *ngIf="email_pattern_error"> Email & Confirm Email does not match.</div> <div style="color:red;font-size: 14px;float: right" *ngIf="email_pattern_error"> Email & Confirm Email does not match.</div>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Phone Number" type="number" name="mobile" formControlName="mobile" required> <input matInput placeholder="Phone Number" type="text" name="mobile" inputmode="numeric" pattern="[0-9]*" OnlyNumber="true" formControlName="mobile" required min="10" max="12" minlength="10" maxlength="12" (change)="checkExists($event.target.value,'mobile')">
<mat-error *ngIf="go_reg.controls['mobile'].hasError('required')">mobile number is required</mat-error>
<mat-error *ngIf="go_reg.controls['mobile'].hasError('min')">minimum 10 digit required</mat-error>
<mat-error *ngIf="go_reg.controls['mobile'].hasError('max')">maximum 12 digit is allowed</mat-error>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field style="width: 100%"> <!-- <mat-form-field style="width: 100%">
<input matInput [matDatepicker]="picker" [max]="maxDate" placeholder="Date of Birth" formControlName="user_dob"> <input matInput [matDatepicker]="picker" [max]="maxDate" placeholder="Date of Birth" formControlName="user_dob">
@ -32,10 +40,14 @@
</mat-form-field> --> </mat-form-field> -->
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Password" type="password" name="password" formControlName="password" required > <input matInput placeholder="Password" type="password" name="password" formControlName="password" required >
<mat-error *ngIf="go_reg.controls['password'].hasError('required')">Password is Required</mat-error>
<mat-error *ngIf="go_reg.controls['password'].hasError('minlength')">Password must be minimum of 4 Characters</mat-error>
<mat-error *ngIf="go_reg.controls['password'].hasError('maxlength')">Password must be maximum of 12 Characters</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Confirm Password" type="password" name="confirm_password" formControlName="confirm_password" required (keyup)="checkValidators($event.target.value,'pass')"> <input matInput placeholder="Confirm Password" type="password" name="confirm_password" formControlName="confirm_password" required (keyup)="checkValidators($event.target.value,'pass')">
<mat-error *ngIf="go_reg.controls['confirm_password'].errors">Confirm Password is Required</mat-error>
</mat-form-field> </mat-form-field>
<div style="color:red;font-size: 14px;float: right" *ngIf="pass_pattern_error"> Password & Confirm Password does not match.</div> <div style="color:red;font-size: 14px;float: right" *ngIf="pass_pattern_error"> Password & Confirm Password does not match.</div>
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2"> <!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
@ -60,6 +72,7 @@
<div *ngIf="slide1"> <div *ngIf="slide1">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Organisation Name" type="text" name="orgname" formControlName="orgname" > <input matInput placeholder="Organisation Name" type="text" name="orgname" formControlName="orgname" >
<mat-error *ngIf="go_reg.controls['org_info']['controls'].orgname.hasError('required')">Organisation Name is Required</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<textarea matInput placeholder="Registered Address" name="org_address" formControlName="org_address" ></textarea> <textarea matInput placeholder="Registered Address" name="org_address" formControlName="org_address" ></textarea>
@ -70,13 +83,17 @@
<mat-slide-toggle name="slideToggle" (change)="change_fun2($event)" > <mat-slide-toggle name="slideToggle" (change)="change_fun2($event)" >
</mat-slide-toggle> </mat-slide-toggle>
</div> </div>
<div *ngIf="slide2"> <div *ngIf="slide2">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="PAN of the Organisation" type="text" name="org_pan" max="10" maxlength="10" formControlName="org_pan" > <mat-label>PAN of the Organisation</mat-label>
<input matInput placeholder="Format:ACDEF1234Z" type="text" name="org_pan" max="10" maxlength="10" formControlName="org_pan" oninput="this.value = this.value.toUpperCase()">
<mat-error *ngIf="go_reg.controls['org_info']['controls'].org_pan.errors">Enter a valid PAN number</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<mat-checkbox formControlName="profile_share"> </mat-checkbox>&nbsp; <span tex-wrap>I hereby consent to share details of my contributions with the public</span><br/><br/> <mat-checkbox formControlName="profile_share"> </mat-checkbox>&nbsp; <span tex-wrap>I hereby give my consent to share details of my contribution in the public domain</span><br/><br/>
<mat-checkbox formControlName="notify_pref" text-wrap></mat-checkbox>&nbsp; <mat-checkbox formControlName="notify_pref" text-wrap></mat-checkbox>&nbsp;
<span tex-wrap>I hereby give my consent to receive periodic updates through email and other modes</span> <span tex-wrap>I hereby give my consent to receive periodic updates through email and other modes</span>
<!-- <mat-label>Conscent profile share to public</mat-label> <!-- <mat-label>Conscent profile share to public</mat-label>

View File

@ -41,9 +41,10 @@ export class RegisterComponent {
name: new FormControl('',Validators.compose([Validators.required])), name: new FormControl('',Validators.compose([Validators.required])),
email: new FormControl('',Validators.compose([Validators.required,Validators.email])), email: new FormControl('',Validators.compose([Validators.required,Validators.email])),
confirm_email:new FormControl('',Validators.compose([Validators.required,Validators.email])), confirm_email:new FormControl('',Validators.compose([Validators.required,Validators.email])),
mobile: new FormControl(''), // mobile: new FormControl('',Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12), Validators.pattern('[0-9]*')])),
mobile: new FormControl('',Validators.compose([Validators.required, Validators.min(1000000000), Validators.max(999999999999)])),
// user_dob:new FormControl(''), // user_dob:new FormControl(''),
password: new FormControl('',Validators.compose([Validators.required])), password: new FormControl('',Validators.compose([Validators.required,Validators.minLength(4),Validators.maxLength(12)])),
confirm_password:new FormControl('',Validators.compose([Validators.required])), confirm_password:new FormControl('',Validators.compose([Validators.required])),
user_type:new FormControl('1'), user_type:new FormControl('1'),
org_info: this.fb.group({ org_info: this.fb.group({
@ -63,10 +64,13 @@ export class RegisterComponent {
if(value.checked == true){ if(value.checked == true){
this.slide1=true this.slide1=true
this.go_reg.controls['user_type'].setValue('2'); this.go_reg.controls['user_type'].setValue('2');
this.go_reg.controls['org_info']['controls'].orgname.setValidators(Validators.compose([Validators.required,Validators.maxLength(99)]))
} }
else{ else{
this.slide1=false this.slide1=false
this.go_reg.controls['user_type'].setValue('1'); this.go_reg.controls['user_type'].setValue('1');
this.go_reg.controls['org_info']['controls'].orgname.clearValidators();
this.go_reg.controls['org_info']['controls'].orgname.updateValueAndValidity()
} }
} }
setValidatorConfirmPass(value){ setValidatorConfirmPass(value){
@ -108,9 +112,13 @@ export class RegisterComponent {
if(value.checked == true){ if(value.checked == true){
this.slide2=true this.slide2=true
// this.go_reg.controls['org_pan'].setV // this.go_reg.controls['org_pan'].setV
console.log(this.go_reg.controls['org_info'])
this.go_reg.controls['org_info']['controls'].org_pan.setValidators(Validators.compose([Validators.required,Validators.maxLength(10),Validators.minLength(10),Validators.pattern('[A-Z]{5}[0-9]{4}[A-Z]{1}')]))
} }
else{ else{
this.slide2=false this.slide2=false
this.go_reg.controls['org_info']['controls'].org_pan.clearValidators();
this.go_reg.controls['org_info']['controls'].org_pan.updateValueAndValidity();
} }
} }
loginScreen(){ loginScreen(){
@ -133,9 +141,12 @@ export class RegisterComponent {
alert("Please fill all the mandatory fields marked with '*'") alert("Please fill all the mandatory fields marked with '*'")
return; return;
} }
// this.go_reg.removeControl('confirm_password') // this.go_reg.removeControl('confirm_password')
// this.go_reg.removeControl('cofirm_email') // this.go_reg.removeControl('cofirm_email')
// console.log(this.go_reg.value);return false; // console.log(this.go_reg.value);return false;
let url = `${environment.apiUrl}${'csrUserRegistration'}`; let url = `${environment.apiUrl}${'csrUserRegistration'}`;
console.log("dd",url) console.log("dd",url)
let data = this.go_reg.value; let data = this.go_reg.value;
@ -148,6 +159,7 @@ export class RegisterComponent {
// this.router.navigate(['/authentication/login']); // this.router.navigate(['/authentication/login']);
this.loginScreen() this.loginScreen()
}) })
} }
register() { register() {
this.router.navigate(['/']); this.router.navigate(['/']);
@ -155,6 +167,21 @@ export class RegisterComponent {
closeDialog(){ closeDialog(){
this.matDialog.closeAll(); this.matDialog.closeAll();
} }
checkExists(value,option){
if(value == ''){
return
}
console.log(this.go_reg.controls)
let param={key:option,data:value}
this.restApi.checkExistCredentials(param).subscribe(res=>{
if(!res['dataStatus']){
alert(res['msg'])
setTimeout(()=>{
this.go_reg.controls[option].setValue('')
})
}
})
}
} }

View File

@ -47,6 +47,11 @@
<mat-cell data-label="Cost/Qty" *matCellDef="let row;" > {{row.cost_per_unit === null?0:row.cost_per_unit}} </mat-cell> <mat-cell data-label="Cost/Qty" *matCellDef="let row;" > {{row.cost_per_unit === null?0:row.cost_per_unit}} </mat-cell>
<!-- <td mat-footer-cell *matFooterCellDef> Total </td> --> <!-- <td mat-footer-cell *matFooterCellDef> Total </td> -->
</ng-container> </ng-container>
<ng-container matColumnDef="HM_Address">
<mat-header-cell *matHeaderCellDef >Delivery Address</mat-header-cell>
<mat-cell data-label="Delivery Address" *matCellDef="let row;" ><span style="text-transform: capitalize;"> {{row.teacher_name != null ? row.teacher_name.toLowerCase() : ''}}<br/>{{row.school_address != null ? row.school_address.split("/")[0].toLowerCase() : ''}}<br/>{{row.school_address != null ? row.school_address.split("/")[1].toLowerCase() : ''}} - {{row.pincode}}<br/>{{row.mbl_nmbr}}</span></mat-cell>
<!-- <td mat-footer-cell *matFooterCellDef> Total </td> -->
</ng-container>
<!-- Total Column --> <!-- Total Column -->
<ng-container matColumnDef="Amount"> <ng-container matColumnDef="Amount">

View File

@ -101,6 +101,12 @@
justify-content: flex-end ; justify-content: flex-end ;
} }
.mat-column-HM_Address{
margin:0px;
padding: 0px;
justify-content: center;
flex: 0 0 25%;
}
@media(max-width:768px) { @media(max-width:768px) {
.main-detail-product { .main-detail-product {
padding: 0.3rem !important; padding: 0.3rem !important;

View File

@ -13,16 +13,30 @@ export class ReqListComponent implements OnInit {
@ViewChild(MatSort, {static: true}) sort: MatSort; @ViewChild(MatSort, {static: true}) sort: MatSort;
pageSize = 10; pageSize = 10;
displayedColumns: string[] = [ 'Item_Need', 'School', 'Required_Qty', 'Received_Qty', 'balance_Qty','Sponsor_Qty', 'Cost_Per_Unit', 'Amount']; displayedColumns: string[] = [ 'Item_Need', 'School', 'Required_Qty', 'Received_Qty', 'balance_Qty','Sponsor_Qty', 'Cost_Per_Unit', 'Amount'];
cont_type
constructor() { constructor() {
} }
ngOnInit() { ngOnInit() {
let list_req= sessionStorage.getItem('contribute-selected-list') let list_req:any= sessionStorage.getItem('contribute-selected-list')
let cont_params:any=sessionStorage.getItem('contribute-params')
this. cont_type=JSON.parse(cont_params).records.cont_type
if(this.cont_type == '2'){
this.displayedColumns.pop()
this.displayedColumns.pop()
this.displayedColumns.push('HM_Address')
console.log(this.displayedColumns)
}
console.log(cont_params,this.cont_type)
list_req=JSON.parse(list_req) list_req=JSON.parse(list_req)
console.log(list_req); console.log(list_req);
if(list_req.length > 0){ if(list_req.length > 0){
this.dataLength = list_req.length; this.dataLength = list_req.length;
list_req.forEach(value=>{
value.school_address=value.school_address.replace('<br>','/')
})
console.log(list_req)
this.dataSource.data = list_req; this.dataSource.data = list_req;
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { ApiService } from 'app/shared/api.service'; import { ApiService } from 'app/shared/api.service';
import { FormGroup, FormBuilder, FormControl } from '@angular/forms'; import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';
import {animate, state, style, transition, trigger} from '@angular/animations'; import {animate, state, style, transition, trigger} from '@angular/animations';
import { MatTableDataSource, MatSnackBar, MatDialog } from '@angular/material'; import { MatTableDataSource, MatSnackBar, MatDialog } from '@angular/material';
import * as jspdf from 'jspdf'; import * as jspdf from 'jspdf';
@ -76,6 +76,7 @@ export class UserProfileComponent implements OnInit {
this.user_data.profile_share == '1' ? this.user_data.profile_share = true : this.user_data.profile_share=false this.user_data.profile_share == '1' ? this.user_data.profile_share = true : this.user_data.profile_share=false
this.user_data.notify_pref == '1' ? this.user_data.notify_pref = true : this.user_data.notify_pref=false this.user_data.notify_pref == '1' ? this.user_data.notify_pref = true : this.user_data.notify_pref=false
this.user_data.org_pan!= null && this.user_data.org_pan != '' ? this.slide2=true: false this.user_data.org_pan!= null && this.user_data.org_pan != '' ? this.slide2=true: false
this.user_data.org_pan!= null && this.user_data.org_pan != '' ? this.profile_form.controls['org_info']['controls'].org_pan.setValidators( Validators.compose([Validators.required,Validators.maxLength(10),Validators.minLength(10),Validators.pattern('[A-Z]{5}[0-9]{4}[A-Z]{1}')])) : this.profile_form.controls['org_info']['controls'].org_pan.clearValidators()
this.user_data.user_type == '2' ? this.slide1 =true : this.slide1=false this.user_data.user_type == '2' ? this.slide1 =true : this.slide1=false
this.profile_form.patchValue(this.user_data) this.profile_form.patchValue(this.user_data)
this.profile_form.controls['org_info'].patchValue(this.user_data); this.profile_form.controls['org_info'].patchValue(this.user_data);
@ -210,7 +211,10 @@ export class UserProfileComponent implements OnInit {
} }
csrUserRegistration() csrUserRegistration()
{ {
if(this.profile_form.invalid){
alert("Please Fill All the Fields")
return
}
// this.go_reg.removeControl('confirm_password') // this.go_reg.removeControl('confirm_password')
// this.go_reg.removeControl('cofirm_email') // this.go_reg.removeControl('cofirm_email')
// console.log(this.go_reg.value);return false; // console.log(this.go_reg.value);return false;

View File

@ -28,6 +28,7 @@
</div> --> </div> -->
<slideshow class="image" [height]="height" <slideshow class="image" [height]="height"
[autoPlay]="true" [autoPlay]="true"
autoPlayInterval="9000"
[showArrows]="true" [showArrows]="true"
arrowSize="20px" arrowSize="20px"
[imageUrls]="imageSources" [imageUrls]="imageSources"
@ -65,7 +66,7 @@ showCaptions="true"
</div> </div>
</div> </div>
<div fxLayout="column"> <div fxLayout="column">
<h5 >Requirements<br/><small style="font-size:12px;">of the listed </small></h5> <h5 >Support Required<br/><small style="font-size:12px;">at</small></h5>
<hr style="border-top:2px solid rgb(81, 202, 202) !important;width:190px !important;"> <hr style="border-top:2px solid rgb(81, 202, 202) !important;width:190px !important;">
<div fxLayout="column" class="text-center mt-2 mb-1"> <div fxLayout="column" class="text-center mt-2 mb-1">
@ -77,7 +78,7 @@ showCaptions="true"
<!-- <div fxLayout="row" class="text-center mt-1 mb-1"> --> <!-- <div fxLayout="row" class="text-center mt-1 mb-1"> -->
<div fxFlex="100"> <div fxFlex="100">
<h2 class="mt-0 logo_one" style="color: #a978e0 !important;"><span>{{support_and_req.students_tot_count}}</span></h2> <h2 class="mt-0 logo_one" style="color: #a978e0 !important;"><span>{{support_and_req.students_tot_count}}</span></h2>
<p>Student lives impacted</p> <p>Students get benefited</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -694,9 +694,11 @@ hr{
height: auto; height: auto;
transition: .5s ease; transition: .5s ease;
backface-visibility: hidden; backface-visibility: hidden;
box-shadow: 10px 10px 60px 0 rgba(0,0,0,.75) !important; box-shadow: 10px 10px 60px 0 rgba(0,0,0,.75) !important;
} }
.middle { .middle {
transition: .5s ease; transition: .5s ease;
opacity: 0; opacity: 0;

View File

@ -55,11 +55,11 @@ export class DashboardComponent {
width:string="300px;" width:string="300px;"
imageSources=[{ imageSources=[{
// url:'https://cdn.vox-cdn.com/uploads/chorus_image/image/56748793/dbohn_170625_1801_0018.0.0.jpg', // url:'https://cdn.vox-cdn.com/uploads/chorus_image/image/56748793/dbohn_170625_1801_0018.0.0.jpg',
url:'assets/images/csr-img/s1m.jpg', url:'assets/images/csr-img/s6.jpg',
// caption:'First' // caption:'First'
}, },
{ {
url:'assets/images/csr-img/s6m.jpg' url:'assets/images/csr-img/s1m.jpg'
}, },
{ {
// url:'https://cdn.vox-cdn.com/uploads/chorus_asset/file/9278671/jbareham_170917_2000_0124.jpg', // url:'https://cdn.vox-cdn.com/uploads/chorus_asset/file/9278671/jbareham_170917_2000_0124.jpg',

View File

@ -17,6 +17,8 @@ import { ProjectListComponent } from 'app/components/project-list/project-list.c
import { ProjectDetailComponent } from 'app/components/project-detail/project-detail.component'; import { ProjectDetailComponent } from 'app/components/project-detail/project-detail.component';
import {FooterComponent} from 'app/components/footer/footer.component' import {FooterComponent} from 'app/components/footer/footer.component'
import { SlickCarouselModule } from 'ngx-slick-carousel'; import { SlickCarouselModule } from 'ngx-slick-carousel';
import { OnlyNumberDirective } from 'app/directives/only-number.directive';
import { DirectivesModuleModule } from 'app/directives/directives-module/directives-module.module';
@NgModule({ @NgModule({
@ -46,7 +48,7 @@ import { SlickCarouselModule } from 'ngx-slick-carousel';
MatButtonToggleModule, MatButtonToggleModule,
MatTabsModule, MatTabsModule,
MatPaginatorModule, MatPaginatorModule,
DirectivesModuleModule
], ],
declarations: [ DashboardComponent,ProjectListComponent,ProjectDetailComponent ] declarations: [ DashboardComponent,ProjectListComponent,ProjectDetailComponent ]
}) })

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { OnlyNumberDirective } from '../only-number.directive';
@NgModule({
declarations: [OnlyNumberDirective],
exports: [
OnlyNumberDirective,
]
})
export class DirectivesModuleModule { }

View File

@ -0,0 +1,8 @@
import { OnlyNumberDirective } from './only-number.directive';
describe('OnlyNumberDirective', () => {
it('should create an instance', () => {
const directive = new OnlyNumberDirective();
expect(directive).toBeTruthy();
});
});

View File

@ -0,0 +1,32 @@
import { Directive, Input, HostListener } from '@angular/core';
@Directive({
selector: '[OnlyNumber]'
})
export class OnlyNumberDirective {
constructor() { }
@Input() OnlyNumber: boolean;
@HostListener('keydown', ['$event']) onKeyDown(event) {
let e = <KeyboardEvent> event;
if (this.OnlyNumber) {
if ([46, 8, 9, 27, 13, 110, 190].indexOf(e.keyCode) !== -1 ||
// Allow: Ctrl+A
(e.keyCode == 65 && e.ctrlKey === true) ||
// Allow: Ctrl+C
(e.keyCode == 67 && e.ctrlKey === true) ||
// Allow: Ctrl+X
(e.keyCode == 88 && e.ctrlKey === true) ||
// Allow: home, end, left, right
(e.keyCode >= 35 && e.keyCode <= 39)) {
// let it happen, don't do anything
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
}
}
}

View File

@ -113,8 +113,8 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="99.33" fxFlex.lg="63.33" fxFlex.xl="53.33" fxFlex="100" fxLayoutAlign="right"> <div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="99.33" fxFlex.lg="100" fxFlex.xl="53.33" fxFlex="100" fxLayoutAlign="flex-end">
<div class="horizontal-menu" style="text-align: right;margin-left: 40px;position: relative;left:14%;"> <div class="horizontal-menu" style="text-align: right;">
<nav> <nav>
<ul class="main-h-list" style="font-size: 18px;font-weight: bold"> <ul class="main-h-list" style="font-size: 18px;font-weight: bold">
<li *ngFor="let menuitem of horizontalMenuItems.getAll()" class="vertical_nav"> <li *ngFor="let menuitem of horizontalMenuItems.getAll()" class="vertical_nav">

View File

@ -55,6 +55,7 @@ export class ApiService {
}); });
} }
//GET //GET
get(url) get(url)
{ {
@ -178,6 +179,14 @@ export class ApiService {
return this.http.get(apiUrl+'csrDashboardContent').pipe return this.http.get(apiUrl+'csrDashboardContent').pipe
(catchError(err=>this.handleError(err))) (catchError(err=>this.handleError(err)))
} }
checkExistCredentials(data){
return this.http.post(apiUrl+'checkExistCredentials',data).pipe
(catchError(err=>this.handleError(err)))
}
forgetPwd(data){
return this.http.post(apiUrl+'forgetPwd',data).pipe(
catchError(err=>this.handleError(err))
)
}
} }

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 416 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -5,12 +5,12 @@
<!-- <head> --> <!-- <head> -->
<meta property="og:description" content="Alone we can do so little, <meta property="og:description" content="Alone we can do so little,
together we can do so much " /> together we can do so much " />
<meta property="og:image" content="https://contribute.tnschools.gov.in/certificate.jpg" /> <meta property="og:image" content="https://contribute.tnschools.gov.in/csr/assets/certificate.jpg" />
<!-- </head> --> <!-- </head> -->
<base href="./"> <base href="./">
<meta property="og:image" content="certificate.jpg" /> <!-- <meta property="og:image" content="certificate.jpg" /> -->
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">