changes by suren
This commit is contained in:
parent
477e11004c
commit
6e32259b93
@ -8,13 +8,16 @@ import { ProjectsComponent } from './components/projects/projects.component';
|
||||
import { PaymentComponent } from './components/payment/payment.component';
|
||||
import { PaymentConfirmationComponent } from './components/payment-confirmation/payment-confirmation.component';
|
||||
import { MyAccountComponent } from './components/my-account/my-account.component';
|
||||
import { AuthGuardService } from './shared/guards/auth-guard.service';
|
||||
export const AppRoutes: Routes = [{
|
||||
path: '',
|
||||
redirectTo: 'home',
|
||||
pathMatch: 'full',
|
||||
|
||||
}, {
|
||||
path: '',
|
||||
component: AdminLayoutComponent,
|
||||
|
||||
children: [{
|
||||
path: 'home',
|
||||
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule)
|
||||
|
||||
@ -8,28 +8,28 @@
|
||||
<form [formGroup]="Contribute">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2 pt-1">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 100%;">
|
||||
<mat-select placeholder="Select District" formControlName="district_id" [required]="isRequired" [disabled]="isDisabled">
|
||||
<mat-select placeholder="Select District" formControlName="district_id" >
|
||||
<mat-option *ngFor="let item of district" [value]="item.district_id" >
|
||||
{{ item.district_name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field dividerColor="accent" class="ml-xs mr-xs" style="width: 100%;">
|
||||
<mat-select placeholder="Select Schools" formControlName="schoold_id" [required]="isRequired" [disabled]="isDisabled">
|
||||
<mat-select placeholder="Select Schools" formControlName="schoold_id" >
|
||||
<mat-option *ngFor="let item of school" [value]="item.school_id" >
|
||||
{{ item.school_name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field dividerColor="warn" class="ml-xs mr-xs" style="width: 100%;">
|
||||
<mat-select placeholder="Select Category" formControlName="cad_id" [required]="isRequired" [disabled]="isDisabled">
|
||||
<mat-select placeholder="Select Category" formControlName="cad_id" >
|
||||
<mat-option *ngFor="let item of category" [value]="item.cad_id" >
|
||||
{{ item.cat_name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field dividerColor="warn" class="ml-xs mr-xs" style="width: 100%;">
|
||||
<mat-select placeholder="Material Name" formControlName="mat_id" [required]="isRequired" [disabled]="isDisabled">
|
||||
<mat-select placeholder="Material Name" formControlName="mat_id" >
|
||||
<mat-option *ngFor="let item of material_category" [value]="item.mat_id" >
|
||||
{{ item.material_name }}
|
||||
</mat-option>
|
||||
@ -54,13 +54,13 @@
|
||||
<!-- Requirement Column -->
|
||||
<ng-container matColumnDef="Image" >
|
||||
<th style="width: 15% !important;" mat-header-cell *matHeaderCellDef mat-sort-header>Image</th>
|
||||
<td style="width: 15% !important;" mat-cell *matCellDef="let row" class="product-thumbnail"><a href="#"><img src="{{row.img_url}}" alt="School Img" width="70"></a></td>
|
||||
<td style="width: 15% !important;" mat-cell *matCellDef="let row" class="product-thumbnail"><img src="{{row.img_url}}" onerror="this.onerror=null;this.src='https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/No_image_available_600_x_450.svg/600px-No_image_available_600_x_450.svg.png';" alt="School Img" width="70"></td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Requirement Column -->
|
||||
<ng-container matColumnDef="Description">
|
||||
<th style="width: 50% !important;" mat-header-cell *matHeaderCellDef mat-sort-header>Description</th>
|
||||
<td style="width: 50% !important;" mat-cell *matCellDef="let row">{{row.material_name}} required at {{row.school_name}}, {{row.block_name}} Block, {{row.district_name}} District.</td>
|
||||
<th style="width: 35% !important;text-align: center !important;" mat-header-cell *matHeaderCellDef mat-sort-header>Description</th>
|
||||
<td style="width: 35% !important;" mat-cell *matCellDef="let row">{{row.material_name}} required at <a [routerLink]="'/home/project-detail'">{{row.school_name}}</a>, {{row.block_name}} Block, {{row.district_name}} District.</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Quantity Column -->
|
||||
@ -71,21 +71,21 @@
|
||||
|
||||
<!-- Sponsor Column -->
|
||||
<ng-container matColumnDef="Sponsor">
|
||||
<th style="width: 10% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Sponsor </th>
|
||||
<td style="width: 10% !important;" mat-cell *matCellDef="let row;let i = index"> <input step="1" min="0" max="" title="Qty" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit)" style="width: 100% !important;border: none;border-bottom: 1px solid black;"> </td>
|
||||
<th style="width: 15% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Sponsor </th>
|
||||
<td style="width: 15% !important;" mat-cell *matCellDef="let row;let i = index"> <input step="1" min="0" max="" title="Qty" class="text" size="2" type="number" (change)="somethingChanged($event.target.value,i,row.cost_per_unit)" style="width: 100% !important;text-align: center;"> </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- price Column -->
|
||||
<ng-container matColumnDef="Cost Per Unit">
|
||||
<th style="width: 10% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Cost Per Unit </th>
|
||||
<td style="width: 10% !important;" mat-cell *matCellDef="let row;"> {{row.cost_per_unit === null?0:row.cost_per_unit}} </td>
|
||||
<th style="width: 15% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Cost Per Unit </th>
|
||||
<td style="width: 15% !important;" mat-cell *matCellDef="let row;"> {{row.cost_per_unit === null?0:row.cost_per_unit}} </td>
|
||||
<!-- <td mat-footer-cell *matFooterCellDef> Total </td> -->
|
||||
</ng-container>
|
||||
|
||||
<!-- Total Column -->
|
||||
<ng-container matColumnDef="Total">
|
||||
<th style="width: 15% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Total </th>
|
||||
<td style="width: 15% !important;" mat-cell *matCellDef="let row ;let i=index">{{Total[i]}} </td>
|
||||
<th style="width: 20% !important;" mat-header-cell *matHeaderCellDef mat-sort-header> Total </th>
|
||||
<td style="width: 20% !important;" mat-cell *matCellDef="let row ;let i=index">{{Total[i]}} </td>
|
||||
<!-- <td mat-footer-cell *matFooterCellDef> {{somethingChanged()}} </td> -->
|
||||
</ng-container>
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
<table class="table-responsive" cellspacing="0" style="width: 50% !important;">
|
||||
<tr class="order-total" style="text-align: right;">
|
||||
<td style="font-weight: bold;">Total</td>
|
||||
<td> <strong><span class="amount"><span class="currency-symbol">₹</span>{{somethingChanged()}}</span></strong></td>
|
||||
<td> <strong><span class="amount"><span class="currency-symbol">₹</span>{{grandTotal}}</span></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -106,8 +106,8 @@
|
||||
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
|
||||
<div class="pt-1 pr-1" style="text-align: right;">
|
||||
<button mat-raised-button color="primary" class="mr-1 mb-1">Will Contribute the above in kind</button>
|
||||
<button [routerLink]="['../payment']" mat-raised-button style="background-color:rgb(69, 189, 189);color:white" >Proceed for Payment</button>
|
||||
<button mat-raised-button color="primary" class="mr-1 mb-1">I'd like to Contribute in kind</button>
|
||||
<button [routerLink]="['../payment']" mat-raised-button style="background-color:rgb(69, 189, 189);color:white" >I would like to Contribute in Cash</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--*********************-->
|
||||
@ -145,30 +145,30 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-radio-button name="group1" class="pb-1">State School Development Fund</mat-radio-button>
|
||||
<!-- <mat-radio-button name="group1" class="pb-1">State School Development Fund</mat-radio-button>
|
||||
<mat-radio-button name="group1">District School Development Fund</mat-radio-button>
|
||||
<mat-form-field style="width: 100%" class="pl-1">
|
||||
<mat-select placeholder="Select District" [required]="isRequired" [disabled]="isDisabled" >
|
||||
<mat-option *ngFor="let item of districtList" [value]="item.id" >
|
||||
{{ item.value }}
|
||||
<mat-select placeholder="Select District" >
|
||||
<mat-option>
|
||||
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-radio-button name="group1">School Development Fund</mat-radio-button>
|
||||
<mat-form-field style="width: 100%" class="pl-1">
|
||||
<mat-select placeholder="Select District" [required]="isRequired" [disabled]="isDisabled" >
|
||||
<mat-option *ngFor="let item of districtList" [value]="item.id" >
|
||||
{{ item.value }}
|
||||
<mat-select placeholder="Select District" >
|
||||
<mat-option >
|
||||
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" class="pl-1">
|
||||
<mat-select placeholder="Select School" [required]="isRequired" [disabled]="isDisabled" >
|
||||
<mat-option *ngFor="let item of schoolList" [value]="item.id" >
|
||||
{{ item.value }}
|
||||
<mat-select placeholder="Select School">
|
||||
<mat-option >
|
||||
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field dividerColor="warn" class="ml-xs mr-xs" style="width: 100%;">
|
||||
<textarea matInput placeholder="Remarks" value="Some Text ..."></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
.calculated-shipping[_ngcontent-gen-c13]{
|
||||
padding: 0px !important;
|
||||
}
|
||||
a {
|
||||
text-decoration: underline;
|
||||
color: #4CAF50;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
@ -12,6 +16,7 @@
|
||||
|
||||
td, th {
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
}
|
||||
table.shop-table {
|
||||
// border-collapse: separate;
|
||||
|
||||
@ -3,6 +3,7 @@ import { environment } from '../../../environments/environment';
|
||||
import { ApiService } from '../../shared/api.service';
|
||||
import { FormGroup, FormBuilder, FormControl, Validators, } from '@angular/forms';
|
||||
import { MatTableDataSource, MatPaginator, MatSort } from '@angular/material';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
|
||||
|
||||
@ -25,8 +26,9 @@ export class ContributeComponent implements OnInit {
|
||||
school: any = [];
|
||||
category: any = [];
|
||||
Total: any = [];
|
||||
grandTotal: any = [];
|
||||
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder) {
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) {
|
||||
// Create 100 users
|
||||
|
||||
}
|
||||
@ -46,11 +48,11 @@ export class ContributeComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
ngOnInit() {
|
||||
|
||||
// this.getSchoolReqList();
|
||||
|
||||
this.initForm();
|
||||
this.getSchoolReqList();
|
||||
this.getSchoolReqList2();
|
||||
// window.localStorage.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -89,8 +91,10 @@ export class ContributeComponent implements OnInit {
|
||||
somethingChanged(e,i,item){
|
||||
// console.log(e,i,item);
|
||||
this.Total[i] = e*item;
|
||||
|
||||
// console.log(this.Total);
|
||||
return ( this.Total.reduce((acc, value) => acc + value, 0));
|
||||
this.grandTotal = this.Total.reduce((acc, value) => acc + value, 0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -137,7 +141,8 @@ export class ContributeComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
// console.log('mat'+this.material_category);
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
// Hack: Scrolls to top of Page after page view initialized
|
||||
let top = document.getElementById('top');
|
||||
@ -149,6 +154,7 @@ export class ContributeComponent implements OnInit {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,23 @@
|
||||
<mat-card>
|
||||
<mat-card-title><h5 class="mt-0">Choose a Payment Option</h5></mat-card-title>
|
||||
<hr>
|
||||
<mat-tab-group class="p-2">
|
||||
|
||||
<div class="mt-2" fxLayout="row wrap" fxLayoutAlign="center">
|
||||
<div fxLayoutAlign="center" fxFlex.sm="40.33" fxFlex.xs="100" fxFlex.sm="40.33" fxFlex.md="40.33" fxFlex.lg="40.33" fxFlex.xl="40.33" class="m-gap p-gap">
|
||||
<mat-card class="p-1" style="background: linear-gradient(58deg,#009688,#673ab7);color: #fff;">
|
||||
<mat-card-content>
|
||||
<h3><strong><span class="amount"><span class="currency-symbol">₹ </span>70,000</span></strong></h3>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li><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>
|
||||
<li><span>The PAN Number of Tamil Nadu State Tamil Nadu Parent Teacher Association (TNPTA) is AACAT2920R.</span></li>
|
||||
</ul>
|
||||
<!-- <mat-tab-group class="p-2">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Credit/Debit Cards</ng-template>
|
||||
<mat-card-content>
|
||||
@ -44,7 +60,6 @@
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Expiration Date: 01/16" type="text" name="ctry" required>
|
||||
</mat-form-field>
|
||||
<!-- <button class="mat-green" mat-raised-button>Submit</button> -->
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
@ -74,16 +89,16 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-tab>
|
||||
<!-- <mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Paypal</ng-template>
|
||||
<h6><strong>Paypal</strong></h6>
|
||||
<mat-card-content>
|
||||
<p>Pay via PayPal; you can pay with your credit card if you don’t have a PayPal account.</p>
|
||||
<button class="mat-green" mat-raised-button>Proceed To Paypal</button>
|
||||
</mat-card-content>
|
||||
</mat-tab> -->
|
||||
</mat-tab-group>
|
||||
</mat-tab>
|
||||
</mat-tab-group> -->
|
||||
<div class="pt-1" style="text-align: right;">
|
||||
<button [routerLink]="['../paymentconfirmation']" mat-raised-button color="primary" class="mr-1 mb-1">Complete Payment</button>
|
||||
<button [routerLink]="['../paymentconfirmation']" mat-raised-button color="primary" class="mr-1 mb-1">Proceed for Payment</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
@ -1,3 +1,8 @@
|
||||
ul{
|
||||
color:#007805;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.p-list-main {
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { ApiService } from 'app/shared/api.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-payment',
|
||||
@ -39,9 +42,23 @@ export class PaymentComponent implements OnInit {
|
||||
value: 'milk-8',
|
||||
viewValue: 'Milk'
|
||||
}];
|
||||
constructor() { }
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) {
|
||||
this.isToken();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// window.localStorage.clear();
|
||||
}
|
||||
isToken(){
|
||||
// console.log(this.restApi.isToken());
|
||||
if(this.restApi.isToken())
|
||||
{
|
||||
|
||||
}else{
|
||||
this.router.navigate(['/authentication']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,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';
|
||||
|
||||
@Component({
|
||||
selector: 'app-project-detail',
|
||||
@ -22,12 +26,16 @@ export class ProjectDetailComponent implements OnInit {
|
||||
url:'assets/images/csr-img/img3.jpg',
|
||||
caption:'Third'
|
||||
}]
|
||||
school_details: any;
|
||||
// types_of_funds=['State Fund','District Fund','School common Fund','For this Project']
|
||||
constructor() { }
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ngAfterViewInit() {
|
||||
// Hack: Scrolls to top of Page after page view initialized
|
||||
let top = document.getElementById('top');
|
||||
|
||||
@ -12,17 +12,18 @@
|
||||
</mat-button-toggle-group> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<div fxLayout="row wrap" [routerLink]="'/home/project-detail'">
|
||||
<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" style="margin-left: 5px;">
|
||||
<div class="p-list-main mb-2">
|
||||
|
||||
<!-- <div fxLayout="row wrap" [routerLink]="'/home/project-detail'"> -->
|
||||
<div fxLayout="row wrap">
|
||||
<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" style="margin-left: 5px;" *ngFor="let schooldetails of school_list" [routerLink]="'/home/project-detail'">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/1.jpg" alt=""></div>
|
||||
<div class="top"><img src="{{schooldetails.img_url}}" onerror="this.onerror=null;this.src='https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/No_image_available_600_x_450.svg/600px-No_image_available_600_x_450.svg.png';" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Thiruvannamalai</p>
|
||||
<h5>{{schooldetails.school_name}}</h5>
|
||||
<p>{{schooldetails.district_name}}</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
@ -31,17 +32,17 @@
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<!-- <tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
<th>Recruitment</th>
|
||||
<th>Total Contribute</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
@ -51,281 +52,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/2.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Vellore</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">pageview</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/3.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Salem</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/4.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Pallavaram,Chennai</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/5.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Ramanathapuram</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/6.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p>Nagapattinam</p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/7.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p></p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Purpose</th>
|
||||
<th>Need</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Building Fund</td>
|
||||
<td>Urgent</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Estimation</th>
|
||||
<th>Collected</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.50L</th>
|
||||
<th>50,000</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
<div class="top"><img src="assets/images/csr-img/8.jpg" alt=""></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<h5>Govt Higher Secondary school</h5>
|
||||
<p></p>
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="inside">
|
||||
<div class="icon"><i class="material-icons">info_outline</i></div>
|
||||
<div class="contents">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Width</th>
|
||||
<th>Height</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3000mm</td>
|
||||
<td>4000mm</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Custuert</th>
|
||||
<th>cutaeyw</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>45</th>
|
||||
<th>29901</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
import { Component, OnInit, HostListener } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { data } from 'jquery';
|
||||
import { ApiService } from 'app/shared/api.service';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-project-list',
|
||||
@ -6,11 +11,27 @@ import { Component, OnInit, HostListener } from '@angular/core';
|
||||
styleUrls: ['./project-list.component.scss']
|
||||
})
|
||||
export class ProjectListComponent implements OnInit {
|
||||
filter_toggle:any="all_items"
|
||||
constructor() { }
|
||||
filter_toggle:any="all_items"
|
||||
school_list : any [];
|
||||
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.getSchoolReqList();
|
||||
}
|
||||
getSchoolReqList()
|
||||
{
|
||||
|
||||
let url = `${environment.apiUrl}${'getSchoolReqList'}`;
|
||||
this.restApi.post(url,'').subscribe(schDet=>
|
||||
{
|
||||
// console.log(schDet);
|
||||
this.school_list = schDet.records;
|
||||
// console.log(this.school_list);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
checktop(){
|
||||
console.log("dd",window);
|
||||
window.scrollTo(0,0)
|
||||
|
||||
@ -33,19 +33,19 @@ export class DashboardComponent {
|
||||
// }
|
||||
|
||||
slickInit(e) {
|
||||
console.log('slick initialized');
|
||||
// console.log('slick initialized');
|
||||
}
|
||||
|
||||
breakpoint(e) {
|
||||
console.log('breakpoint');
|
||||
// console.log('breakpoint');
|
||||
}
|
||||
|
||||
afterChange(e) {
|
||||
console.log('afterChange');
|
||||
// console.log('afterChange');
|
||||
}
|
||||
|
||||
beforeChange(e) {
|
||||
console.log('beforeChange');
|
||||
// console.log('beforeChange');
|
||||
}
|
||||
txt:string;
|
||||
height:string="400px"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit ,ViewEncapsulation } from '@angular/core';
|
||||
import {Router} from "@angular/router";
|
||||
import {Router, NavigationEnd} from "@angular/router";
|
||||
import { FormControl, FormBuilder } from '@angular/forms';
|
||||
import { environment } from 'environments/environment';
|
||||
import { ApiService } from 'app/shared/api.service';
|
||||
@ -14,13 +14,25 @@ export class LoginComponent {
|
||||
|
||||
email: string;
|
||||
password: string;
|
||||
loginForm: any;
|
||||
loginForm: any;
|
||||
previousUrl: string;
|
||||
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) { }
|
||||
constructor(public restApi:ApiService,public fb:FormBuilder,public router:Router) {
|
||||
|
||||
// console.log(this.router.events);
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// this.getSchoolReqList();
|
||||
this.initForm();
|
||||
// console.log(this.router.events);
|
||||
// this.router.events.filter(e => e instanceof NavigationEnd).pairwise().subscribe((e) => {
|
||||
|
||||
// console.log('NAVIGATION PREVIOUS => ',e);
|
||||
// });
|
||||
this.previousUrl = this.restApi.getPreviousUrl();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -44,31 +56,39 @@ export class LoginComponent {
|
||||
// this.load.loadedDismiss();
|
||||
// console.log(schDet);return false;
|
||||
|
||||
// if(schDet.dataStatus==true)
|
||||
// {
|
||||
if(schDet.dataStatus==true)
|
||||
{
|
||||
// this.setTokenData(schDet.records);
|
||||
|
||||
this.restApi.setToken(schDet.token);
|
||||
this.router.navigate(['/home']);
|
||||
if(this.router.url==this.previousUrl)
|
||||
{
|
||||
this.router.navigate(['/home']);
|
||||
}else{
|
||||
this.router.navigate([this.previousUrl]);
|
||||
}
|
||||
|
||||
// this.router.navigate(['/home']);
|
||||
// window.localStorage.setItem('token','abcd');
|
||||
// }else
|
||||
// {
|
||||
// // this.toast.apptoast(res.message,'danger');
|
||||
// window.localStorage.clear();
|
||||
// return false;
|
||||
// }
|
||||
|
||||
}else
|
||||
{
|
||||
// this.toast.apptoast(res.message,'danger');
|
||||
window.localStorage.clear();
|
||||
|
||||
alert(schDet.msg);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// setTokenData(records: any) {
|
||||
// throw new Error("Method not implemented.");
|
||||
// }
|
||||
login() {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
// login() {
|
||||
// this.router.navigate(['/']);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import { delay } from 'rxjs/internal/operators';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
import 'rxjs/add/operator/toPromise';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
|
||||
|
||||
// Api Url Enviroment
|
||||
@ -19,11 +20,27 @@ const apiUrl = environment.apiUrl;
|
||||
})
|
||||
export class ApiService {
|
||||
expToken = new BehaviorSubject(false);
|
||||
constructor(public http:HttpClient) {
|
||||
private previousUrl: string;
|
||||
private currentUrl: string;
|
||||
|
||||
constructor(public http:HttpClient,private router: Router) {
|
||||
|
||||
this.Token();
|
||||
this.getPreviewUrl();
|
||||
}
|
||||
|
||||
|
||||
public getPreviewUrl(){
|
||||
this.currentUrl = this.router.url;
|
||||
this.router.events.subscribe(event => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.previousUrl = this.currentUrl;
|
||||
this.currentUrl = event.url;
|
||||
};
|
||||
});
|
||||
}
|
||||
public getPreviousUrl() {
|
||||
return this.previousUrl;
|
||||
}
|
||||
|
||||
//POST
|
||||
post(url:any,data:any): Observable<any>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user