diff --git a/ng8-seed/src/app/app.routing.ts b/ng8-seed/src/app/app.routing.ts index 0876caa..2bb3a55 100644 --- a/ng8-seed/src/app/app.routing.ts +++ b/ng8-seed/src/app/app.routing.ts @@ -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) diff --git a/ng8-seed/src/app/components/contribute/contribute.component.html b/ng8-seed/src/app/components/contribute/contribute.component.html index 2287dec..44703af 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.html +++ b/ng8-seed/src/app/components/contribute/contribute.component.html @@ -8,28 +8,28 @@
- + {{ item.district_name }} - + {{ item.school_name }} - + {{ item.cat_name }} - + {{ item.material_name }} @@ -54,13 +54,13 @@ Image - School Img + School Img - Description - {{row.material_name}} required at {{row.school_name}}, {{row.block_name}} Block, {{row.district_name}} District. + Description + {{row.material_name}} required at {{row.school_name}}, {{row.block_name}} Block, {{row.district_name}} District. @@ -71,21 +71,21 @@ - Sponsor - + Sponsor + - Cost Per Unit - {{row.cost_per_unit === null?0:row.cost_per_unit}} + Cost Per Unit + {{row.cost_per_unit === null?0:row.cost_per_unit}} - Total - {{Total[i]}} + Total + {{Total[i]}} @@ -98,7 +98,7 @@ - +
Total {{somethingChanged()}} {{grandTotal}}
@@ -106,8 +106,8 @@
- - + +
@@ -145,30 +145,30 @@ - State School Development Fund + diff --git a/ng8-seed/src/app/components/contribute/contribute.component.scss b/ng8-seed/src/app/components/contribute/contribute.component.scss index 86f7c8c..d98078a 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.scss +++ b/ng8-seed/src/app/components/contribute/contribute.component.scss @@ -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; diff --git a/ng8-seed/src/app/components/contribute/contribute.component.ts b/ng8-seed/src/app/components/contribute/contribute.component.ts index adb285d..b602500 100644 --- a/ng8-seed/src/app/components/contribute/contribute.component.ts +++ b/ng8-seed/src/app/components/contribute/contribute.component.ts @@ -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; } + } diff --git a/ng8-seed/src/app/components/payment/payment.component.html b/ng8-seed/src/app/components/payment/payment.component.html index 98546ef..45643e8 100644 --- a/ng8-seed/src/app/components/payment/payment.component.html +++ b/ng8-seed/src/app/components/payment/payment.component.html @@ -26,7 +26,23 @@
Choose a Payment Option

- + +
+
+ + +

₹ 70,000

+
+
+
+
+ +
    +
  • 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.
  • +
  • All contributions towards Tamil Nadu State Parent Teacher Association (TNPTA) are exempt from Income Tax under section 80 (G).
  • +
  • The PAN Number of Tamil Nadu State Tamil Nadu Parent Teacher Association (TNPTA) is AACAT2920R.
  • +
+ @@ -74,16 +89,16 @@ - -
+ + -->
- +
\ No newline at end of file diff --git a/ng8-seed/src/app/components/payment/payment.component.scss b/ng8-seed/src/app/components/payment/payment.component.scss index 1fdd4be..b2b03dc 100644 --- a/ng8-seed/src/app/components/payment/payment.component.scss +++ b/ng8-seed/src/app/components/payment/payment.component.scss @@ -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 { diff --git a/ng8-seed/src/app/components/payment/payment.component.ts b/ng8-seed/src/app/components/payment/payment.component.ts index f397a7b..f5c2163 100644 --- a/ng8-seed/src/app/components/payment/payment.component.ts +++ b/ng8-seed/src/app/components/payment/payment.component.ts @@ -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']); + } + } } diff --git a/ng8-seed/src/app/components/project-detail/project-detail.component.ts b/ng8-seed/src/app/components/project-detail/project-detail.component.ts index f3abe3f..e5ead5a 100644 --- a/ng8-seed/src/app/components/project-detail/project-detail.component.ts +++ b/ng8-seed/src/app/components/project-detail/project-detail.component.ts @@ -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'); diff --git a/ng8-seed/src/app/components/project-list/project-list.component.html b/ng8-seed/src/app/components/project-list/project-list.component.html index 5408f7f..834d4e4 100644 --- a/ng8-seed/src/app/components/project-list/project-list.component.html +++ b/ng8-seed/src/app/components/project-list/project-list.component.html @@ -12,17 +12,18 @@ --> - -
-
-
+ + +
+
+
-
+
-
Govt Higher Secondary school
-

Thiruvannamalai

+
{{schooldetails.school_name}}
+

{{schooldetails.district_name}}

@@ -31,17 +32,17 @@
info_outline
- + - - + + @@ -51,281 +52,9 @@ - - -
-
-
-
-
-
-
-
Govt Higher Secondary school
-

Vellore

-
- -
-
-
-
info_outline
-
-
EstimationCollectedRecruitmentTotal Contribute
1.50L
- - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

Salem

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

Pallavaram,Chennai

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

Ramanathapuram

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

Nagapattinam

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
PurposeNeed
Building FundUrgent
EstimationCollected
1.50L50,000
-
-
-
-
-
-
-
-
-
-
-
-
-
Govt Higher Secondary school
-

-
- -
-
-
-
info_outline
-
- - - - - - - - - - - - - - - - - -
WidthHeight
3000mm4000mm
Custuertcutaeyw
4529901
-
-
-
-
-
+
+
+