Fairoj : Changes in payment and project details

This commit is contained in:
venbatechnologies@gmail.com 2019-09-30 20:04:29 +05:30
parent 4ebff2b58b
commit 998f8c4c72
5 changed files with 67 additions and 26 deletions

View File

@ -23,6 +23,7 @@
</mat-card-content>
</mat-card> -->
<div id="top"></div>
<div *ngIf="isCardShow">
<mat-card>
<mat-card-header>
@ -86,7 +87,15 @@
</mat-card>
</div>
<div *ngIf="payment_mode == 'offline'" class="ac_det">
<p>A/c Name : Tamil Nadu State Parent Teacher</p>
<p>Association : CSR Funds</p>
<p>A/C Number : 142301000022944</p>
<p>MICR : 600020076</p>
<p>IFSC : IOBA0001423</p>
<p>Bank : Indian Overseas Bank</p>
<p>Branch : College Road, Chennai</p>
</div>
<ul>
<li *ngIf="payment_mode == 'online'"><span>Government of Tamil Nadu 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><span>All contributions towards Tamil Nadu State Parent Teacher Association (TNPTA) are exempt from Income Tax under section 80 (G).</span></li>

View File

@ -184,3 +184,15 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
color: black;
}
}
.ac_det{
// align-content: center;
// text-align: center;
// align-content: center;
// text-align: center;
margin-left:3.5%;
font-weight: bold
// width: 600px;
// background-color: #A6CDDE;
}

View File

@ -81,6 +81,15 @@ export class PaymentComponent implements OnInit {
}
// }
}
ngAfterViewInit() {
// Hack: Scrolls to top of Page after page view initialized
let top = document.getElementById('top');
console.log("d",top);
if (top !== null) {
top.scrollIntoView();
top = null;
}
}
isToken(){
// console.log(this.restApi.isToken());
if(this.restApi.isToken())

View File

@ -168,18 +168,18 @@
<mat-card-content>
<table style="padding:20px;">
<tr>
<th>Details</th>
<!-- <th>Details</th> -->
<th>Material Name</th>
<th>Estimation</th>
<th>Collected</th>
<!-- <th>Estimation</th> -->
<th>Cost Per unit</th>
<th>Qty</th>
</tr>
<tr>
<td>{{schoolInfo.cat_name}}</td>
<td>{{schoolInfo.material_name}}</td>
<td>{{schoolInfo.total_cost}}</td>
<td>{{schoolInfo.total_recevied}}</td>
<td>{{schoolInfo.qty}}</td>
<tr *ngFor="let item of all_material_list">
<!-- <td>{{item.cat_name}}</td> -->
<td>{{item.material_name}}</td>
<!-- <td>{{schoolInfo.total_cost}}</td> -->
<td>{{item.cost_per_unit}}</td>
<td>{{item.qty}}</td>
</tr>
</table>
<div fxLayout fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="0">

View File

@ -2,9 +2,8 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { environment } from 'environments/environment';
import { ApiService } from 'app/shared/api.service';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { SchoolDetailsService } from 'app/shared/school-details.service';
import { MatDialogRef, MatDialogConfig, MatDialog } from '@angular/material';
import { Router, ActivatedRoute } from '@angular/router';
import { SchoolDetailsService } from 'app/shared/school-details.service';
@Component({
selector: 'app-project-detail',
@ -12,30 +11,45 @@ import { MatDialogRef, MatDialogConfig, MatDialog } from '@angular/material';
styleUrls: ['./project-detail.component.scss']
})
export class ProjectDetailComponent implements OnInit {
@ViewChild('slider',{static:false}) sliderimg
imageSources=[];
imageSources=[];
school_list : any [];
schoolInfo: any ;
schoolInfo: any ;
all_material_list: any;
// 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,public dialog: MatDialog) { }
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router,public schInfo:SchoolDetailsService,private activatedRoute:ActivatedRoute) { }
ngOnInit() {
let data=this.activatedRoute.snapshot.paramMap.get('schoolreqid')
// console.log(this.activatedRoute.snapshot.paramMap(''))
console.log("State",data)
this.schInfo.SchoolDetails.subscribe(schDetl=>this.schoolInfo = schDetl);
this.imageSources = this.schoolInfo.images;
if( data != ''){
this.getIndividualSchoolReqData(data)
this.getSchoolReqList(data)
}
else{
this.getSchoolReqList();
}
}
getSchoolReqList()
getIndividualSchoolReqData(id){
this.restApi.getIndividualSchoolReqData(id).subscribe(res=>{
if(res['dataStatus']){
this.schoolInfo=res['records'][0]
this.imageSources=res['records'][0].images
}
})
}
getSchoolReqList(id?)
{
let url = `${environment.apiUrl}${'getSchoolReqList'}`;
let data = {
schoold_id: '',
schoold_id: id || null,
district_id: '',
cad_id: '',
mat_id: ''
@ -44,7 +58,7 @@ export class ProjectDetailComponent implements OnInit {
if (schDet.dataStatus == true) {
// console.log(schDet);
this.all_material_list=schDet.records
let projectList = schDet.records.filter(sch=>sch.school_id==this.schoolInfo.school_id)[0];
// console.log(projectList);
@ -81,7 +95,4 @@ export class ProjectDetailComponent implements OnInit {
this.sliderimg.goToSlide(index);
}
}