-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1b67f0
commit efba929
Showing
46 changed files
with
1,197 additions
and
53 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<!-- <app-nav></app-nav> --> | ||
<!-- <app-login></app-login> --> | ||
<app-auth-modal></app-auth-modal> | ||
<!-- <h1>Hello</h1> --> | ||
<app-nav></app-nav> | ||
|
||
<!-- <app-forget-password></app-forget-password> --> | ||
<app-dashboard-modal></app-dashboard-modal> | ||
|
||
<!-- <app-change-password></app-change-password> --> | ||
<!-- <app-food-card></app-food-card> -> | ||
<!-- <app-sidebar *ngIf="true"></app-sidebar>/ --> | ||
|
||
<app-auth-modal *ngIf="auth.isAuthenticated"></app-auth-modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { Component } from '@angular/core'; | ||
import { faIceCream } from '@fortawesome/free-solid-svg-icons'; | ||
import { AuthService } from './services/auth.service'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent { | ||
|
||
constructor(public auth: AuthService){ | ||
|
||
} | ||
|
||
title = 'canteen-fe'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<br> | ||
<div class="shadow-lg rounded-lg mt-14 mb-2 mx-2 overflow-hidden"> | ||
|
||
|
||
<canvas class="pb-2 bg-gray-100" id="chartDoughnut"></canvas> | ||
|
||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ChartCardComponent } from './chart-card.component'; | ||
|
||
describe('ChartCardComponent', () => { | ||
let component: ChartCardComponent; | ||
let fixture: ComponentFixture<ChartCardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ ChartCardComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ChartCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import {Chart} from 'chart.js' | ||
|
||
@Component({ | ||
selector: 'app-chart-card', | ||
templateUrl: './chart-card.component.html', | ||
styleUrls: ['./chart-card.component.css'] | ||
}) | ||
export class ChartCardComponent implements OnInit { | ||
|
||
ngOnInit(){ | ||
|
||
const dataDoughnut = { | ||
labels: ["Vacant", "Occupied"], | ||
datasets: [ | ||
{ | ||
label: "Canteen Space", | ||
data: [300, 50,], | ||
backgroundColor: [ | ||
'rgb(54, 162, 235)', | ||
|
||
'rgb(255, 99, 132)', | ||
], | ||
hoverOffset: 4, | ||
}, | ||
], | ||
}; | ||
|
||
const configDoughnut = { | ||
type: "doughnut", | ||
data: dataDoughnut, | ||
options: {}, | ||
}; | ||
|
||
const chartBar = new Chart( | ||
document.getElementById("chartDoughnut") as HTMLCanvasElement, | ||
// el.nativeElement.chartDoughnut, | ||
configDoughnut | ||
|
||
); | ||
|
||
} | ||
|
||
} |
Empty file.
18 changes: 18 additions & 0 deletions
18
src/app/dashboard/dashboard-modal/dashboard-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div> | ||
<app-chart-card></app-chart-card> | ||
<div class="flex justify-end mx-1 my-1"> | ||
<label class="inline-flex relative items-center cursor-pointer"> | ||
<input type="checkbox" value="" class="sr-only peer" checked /> | ||
<div | ||
class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" | ||
></div> | ||
<span class="ml-3 text-sm font-medium text-gray-900"></span> | ||
</label> | ||
</div> | ||
|
||
<app-food-section></app-food-section> | ||
<app-food-section></app-food-section> | ||
|
||
<app-food-section></app-food-section> | ||
|
||
</div> |
23 changes: 23 additions & 0 deletions
23
src/app/dashboard/dashboard-modal/dashboard-modal.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DashboardModalComponent } from './dashboard-modal.component'; | ||
|
||
describe('DashboardModalComponent', () => { | ||
let component: DashboardModalComponent; | ||
let fixture: ComponentFixture<DashboardModalComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ DashboardModalComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DashboardModalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/app/dashboard/dashboard-modal/dashboard-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-dashboard-modal', | ||
templateUrl: './dashboard-modal.component.html', | ||
styleUrls: ['./dashboard-modal.component.css'] | ||
}) | ||
export class DashboardModalComponent { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { FoodSectionComponent } from './food-section/food-section.component'; | ||
import { FoodCardComponent } from './food-card/food-card.component'; | ||
import { ChartCardComponent } from './chart-card/chart-card.component'; | ||
import { DashboardModalComponent } from './dashboard-modal/dashboard-modal.component'; | ||
|
||
|
||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
FoodSectionComponent, | ||
FoodCardComponent, | ||
ChartCardComponent, | ||
DashboardModalComponent | ||
], | ||
imports: [ | ||
CommonModule | ||
|
||
], | ||
exports : [ | ||
FoodCardComponent, | ||
FoodSectionComponent, | ||
ChartCardComponent, | ||
DashboardModalComponent | ||
] | ||
}) | ||
export class DashboardModule { } |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- <div class="carousel-item active mx-2 my-2"> | ||
<img | ||
src="https://cdn.britannica.com/98/235798-050-3C3BA15D/Hamburger-and-french-fries-paper-box.jpg" | ||
class=" rounded-lg " | ||
alt="Wild Landscape" | ||
/> | ||
</div> --> | ||
|
||
|
||
<div class="carousel-inner relative w-full overflow-hidden rounded-lg"> | ||
<!-- <a | ||
href="#" | ||
class="block mx-2 border border-gray-200 shadow-md hover:bg-gray-100 " | ||
> --> | ||
<img | ||
[src]="imgUrl" | ||
|
||
class="rounded-lg w-full" | ||
alt="Wild Landscape" | ||
/> | ||
<!-- </a> --> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FoodCardComponent } from './food-card.component'; | ||
|
||
describe('FoodCardComponent', () => { | ||
let component: FoodCardComponent; | ||
let fixture: ComponentFixture<FoodCardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ FoodCardComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(FoodCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-food-card', | ||
templateUrl: './food-card.component.html', | ||
styleUrls: ['./food-card.component.css'] | ||
}) | ||
export class FoodCardComponent { | ||
|
||
imgUrl = 'https://cdn.britannica.com/98/235798-050-3C3BA15D/Hamburger-and-french-fries-paper-box.jpg' | ||
} |
Empty file.
60 changes: 60 additions & 0 deletions
60
src/app/dashboard/food-section/food-section.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<div | ||
id="foodsectionCrousel" | ||
class="carousel slide carousel-fade relative mx-2 my-2" | ||
> | ||
<div class="carousel-inner relative w-full overflow-hidden"> | ||
<app-food-card> </app-food-card> | ||
</div> | ||
|
||
<button | ||
type="button" | ||
class="carousel-control-prev absolute top-0 left-0 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" | ||
data-carousel-prev | ||
> | ||
<span | ||
class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 group-hover:bg-white/50I group-focus:ring-4 group-focus:ring-white group-focus:outline-none" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="w-5 h-5 text-white sm:w-6 sm:h-6" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M15 19l-7-7 7-7" | ||
></path> | ||
</svg> | ||
<span class="sr-only">Previous</span> | ||
</span> | ||
</button> | ||
<button | ||
type="button" | ||
class="carousel-control-next absolute top-0 right-0 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none" | ||
> | ||
<span | ||
class="inline-flex items-center justify-center w-8 h-8 rounded-full sm:w-10 sm:h-10 bg-white/30 group-hover:bg-white/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-none" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="w-5 h-5 text-white sm:w-6 sm:h-6" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M9 5l7 7-7 7" | ||
></path> | ||
</svg> | ||
<span class="sr-only">Next</span> | ||
</span> | ||
</button> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
src/app/dashboard/food-section/food-section.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FoodSectionComponent } from './food-section.component'; | ||
|
||
describe('FoodSectionComponent', () => { | ||
let component: FoodSectionComponent; | ||
let fixture: ComponentFixture<FoodSectionComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ FoodSectionComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(FoodSectionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.