diff --git a/documentation/components/AboutComponent.html b/documentation/components/AboutComponent.html new file mode 100644 index 0000000..73340ec --- /dev/null +++ b/documentation/components/AboutComponent.html @@ -0,0 +1,553 @@ + + +
+ + ++
+ src/app/user/about/about.component.ts
+
selector | +app-about |
+
styleUrls | +./about.component.css |
+
templateUrl | +./about.component.html |
+
+ Properties+ |
+
+ + | +
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ Defined in src/app/user/about/about.component.ts:17
+ |
+ ||||||||||||
+
+ Parameters :
+
+
|
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ Defined in src/app/user/about/about.component.ts:21
+ |
+
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ Defined in src/app/user/about/about.component.ts:17
+ |
+
import { Component, Input, OnInit } from '@angular/core';
+import { AuthService } from 'src/app/services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { AccordionComponent } from 'src/app/shared/accordion/accordion.component';
+
+
+@Component({
+ selector: 'app-about',
+ templateUrl: './about.component.html',
+ styleUrls: ['./about.component.css']
+})
+
+export class AboutComponent {
+ backArrow = faArrowLeft;
+
+
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+}
+
+
+ <div class="w-[100%] sm:h-[130vh] md:h-[98vh] flex flex-col bg-[#3D484B] p-[1%]" >
+
+ <nav
+ class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border-b-2 border-greyss bg-[#3D484B]">
+ <div class="text-blackes h-[20pt] w-[20pt] mt-[1.5%] ml-[-1%]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%]">
+ <h3 class="sm:text-[17pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Help</h3>
+ </div>
+ </nav>
+
+ <div>
+ <app-accordion [headerText]="'What is a Companies Cafeteria App?'">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+A Companies Cafeteria App is a mobile
+application specifically designed for <br>
+employees of a company to access and <br>
+interact with the cafeteria services
+provided <br> by the company. It enables employees to <br>
+view the cafeteria menu and provide <br>
+feedback, all through their mobile devices.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'How does a Cafeteria App work?'">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ A Companies Cafeteria App typically allows employees to create an account using their company email address or employee ID. Once registered, they can log in to the app and access features such as viewing the daily menu, viewing item prices and receiving related notifications.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'What are the benefits of using a Companies Cafeteria App?'">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ There are several benefits of using a Companies Cafeteria App. It offers convenience and efficiency by allowing employees to quickly view the menu, avoid long queues, and to provide feedback.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'Can provide feedback or suggestions through Cafeteria App? '">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ Yes, Cafeteria Aps include a feature that allows employees to provide feedback or suggestions regarding the cafeteria services. This feedback can be related to food quality, menu options, service improvements, or any other aspect of the cafeteria experience. The app may provide a feedback form, rating system, or a direct channel for communication with the cafeteria management or staff.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'Can a Cafeteria App offer pre-ordering or scheduling options? '">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ No, currently such options are not available.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="' How do I access the Cafeteria Application?'">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ You can access the Corporate Company's Cafeteria Application by downloading it from the app store or play store, depending on your device.
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'How do I create an account? '">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ To create an account, open the app and click on the "Sign Up" button. Follow the prompts to input your information, and you're all set!
+</p>
+ </div>
+
+ </app-accordion>
+ <hr>
+ <app-accordion [headerText]="'Others'">
+ <div class="text-[13pt] p-[3%] text-[#D4D4D4] mt-[-1.5%] ml-[1%]">
+ <p>
+ Welcome to our Contact Us page! If you have any questions or need more information, our friendly and knowledgeable support team is here to assist you. You can reach us by filling out the contact form below, and we'll respond promptly. Additionally, you can find a comprehensive list of frequently asked questions (FAQs) on this page to help address your concerns. We value your feedback and are committed to providing exceptional customer service. Thank you for choosing us as your trusted resource. <br> <br> Contact Details: <br><br>
+ Email: support@example.com <br><br> We look forward to hearing from you and providing the answers you need.
+</p>
+ </div>
+
+ </app-accordion>
+
+ </div>
+
+</div>
+
+ ./about.component.css
+
.fa-lg{
+ filter: invert(100%);
+ /* height: 20rem;
+ width: 80rem; */
+}
+
+.disable-scroll{
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ }
+ +
+ src/app/shared/accordion/accordion.component.ts
+
selector | +app-accordion |
+
styleUrls | +./accordion.component.css |
+
templateUrl | +./accordion.component.html |
+
+ Properties+ |
+
+
|
+
+ Inputs+ |
+
+
|
+
+ + headerText + | +|
+ Type : string
+
+ |
+ |
+ Default value : ''
+ |
+ |
+ + | +
+ + paraText + | +|
+ Type : string
+
+ |
+ |
+ Default value : ''
+ |
+ |
+ + | +
+ + + chevronDown + + + | +
+ Default value : faChevronDown
+ |
+
+ + | +
+ + + chevronUp + + + | +
+ Default value : faChevronUp
+ |
+
+ + | +
+ + + isAccordionOpen + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
+ + | +
import { Component, OnInit, Input } from '@angular/core';
+import { faChevronUp } from '@fortawesome/free-solid-svg-icons';
+import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { Router } from '@angular/router';
+
+
+
+@Component({
+ selector: 'app-accordion',
+ templateUrl: './accordion.component.html',
+ styleUrls: ['./accordion.component.css']
+})
+export class AccordionComponent{
+ chevronUp = faChevronUp;
+ chevronDown = faChevronDown;
+ isAccordionOpen:boolean = false;
+
+@Input() headerText:string = '';
+@Input() paraText:string = '';
+
+}
+
+ <div class="accordion">
+ <div class="accordion-header text-white bg-[#3D484B] mt-[2%] p-[4%]">
+ <div class="flex justify-between">
+ <div class="text-[13pt]">
+ {{headerText}}
+ </div>
+ <div>
+ <fa-icon *ngIf="isAccordionOpen" class="fa-sm" [icon]="chevronUp" (click)="isAccordionOpen=false" ></fa-icon>
+ <fa-icon *ngIf="!isAccordionOpen" class="fa-sm" [icon]="chevronDown" (click)="isAccordionOpen= true"></fa-icon>
+ </div>
+ </div>
+ </div>
+ <div class="accordion-body">
+ <ng-container *ngIf="isAccordionOpen">
+ <ng-content>
+ </ng-content>
+ </ng-container>
+ </div>
+
+ </div>
+
+
+ ./accordion.component.css
+
+ +
+ src/app/user/account/account.component.ts
+
+
+ OnInit
+
selector | +app-account |
+
styleUrls | +./account.component.css |
+
templateUrl | +./account.component.html |
+
+ Properties+ |
+
+ + | +
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService)
+ |
+ ||||||
+ Defined in src/app/user/account/account.component.ts:14
+ |
+ ||||||
+
+ Parameters :
+
+
|
+
+ + + confirm + + + | +
+confirm()
+ |
+
+ Defined in src/app/user/account/account.component.ts:26
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + confirmModal + + + | +
+confirmModal()
+ |
+
+ Defined in src/app/user/account/account.component.ts:19
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + ngOnInit + + + | +
+ngOnInit()
+ |
+
+ Defined in src/app/user/account/account.component.ts:16
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ Defined in src/app/user/account/account.component.ts:15
+ |
+
+ + + modal + + + | +
+ Default value : false
+ |
+
+ Defined in src/app/user/account/account.component.ts:14
+ |
+
+ + + userIcon + + + | +
+ Default value : faCircleUser
+ |
+
+ Defined in src/app/user/account/account.component.ts:12
+ |
+
+ + + username + + + | +
+ Default value : JSON.parse(localStorage.getItem('_username_canteen_app') || '')
+ |
+
+ Defined in src/app/user/account/account.component.ts:13
+ |
+
import { Component, OnInit } from '@angular/core';
+import { faCircleUser } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+
+@Component({
+ selector: 'app-account',
+ templateUrl: './account.component.html',
+ styleUrls: ['./account.component.css']
+})
+export class AccountComponent implements OnInit{
+
+ userIcon = faCircleUser;
+ username = JSON.parse(localStorage.getItem('_username_canteen_app') || '');
+ modal = false;
+constructor(public auth: AuthService){}
+ ngOnInit(): void {
+ }
+
+ confirmModal() {
+ this.modal = !this.modal;
+ }
+ // logout() {
+ // this.auth.logoutUser();
+ // // this.auth.isAuthenticated();
+ // }
+ confirm(){
+ this.modal = !this.modal;
+ }
+
+
+}
+
+ <div
+ class="absolute xsm:top-0 xsm:left-0 xsm-h-[70pt] sm:top-0 sm:left-0 sm:h-[100pt] md:h-[70pt] sm:w-[100%] bg-[#3D484B] opacity-[40%] z-10 overflow-hidden">
+</div>
+
+
+ <div class="w-[100%] md:h-[98vh] overflow-hidden relative" style="max-height: 720pt;">
+
+ <div class="flex flex-col xsm:h-[65pt] md:h-[70pt] sm:w-[100%] md:w-[100%]">
+ <div
+ class="xsm:h-[100%] xsm:w-[100%] sm:h-[100pt] p-[0rem] sm:w-[100%] md:w-[110%] mt-[0rem] overflow-hidden">
+ <img src="../../../assets/img/NavbarBg2.svg" height="100%" width="100%">
+ </div>
+ </div>
+ <div
+ class="absolute xsm:top-[2.5rem] sm:top-[2.5rem] md:top-[3rem] flex flex-col items-center text-center w-[100%] z-20">
+ <div class="xsm:h-[70pt] xsm:w-[70pt] sm:h-[80pt] sm:w-[80pt] flex justify-center items-center z-20"><img
+ src="../../../assets/img/Male User.png" style="border-radius: 50%;" height="100%" width="100%"
+ alt=""></div>
+ <div>
+ <p class="xsm:text-[17pt] sm:text-[16pt] md:text-[28pt] text-[#FFFFFF] font-roboto-black z-20">
+ {{username}}</p>
+ <p class="xsm:text-[13pt] md:text-[24pt] sm:text-[14pt] text-[#FFFFFF] font-roboto-regular">Business
+ Analyst</p>
+ </div>
+ </div>
+
+ <div
+ class="xsm:h-[100vh] sm:h-[83vh] p-[12%] md:h-[90vh] sm:w-[100%] sm:mt-[0rem] font-roboto-medium text-black flex flex-col items-center bg-[#3D484B]">
+ <div
+ class="flex items-center justify-between xsm:w-[150pt] sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] xsm:mt-[8rem] sm:mt-[30%] md:mt-[12rem] sm:text-left md:w-[405pt] md:h-[15pt] ">
+ <div class="xsm:h-[30pt] xsm:w-[30pt] xsm:flex justify-center items-center sm:h-[28.5pt] sm:w-[28.5pt] md:h-[40pt] md:w-[40pt] sm:p-[8px] bg-[#fff] sm:flex sm:items-center sm:justify-center rounded-[10pt]"
+ [routerLink]="['/profile']"><img height="100%"
+ class="icone xsm:h-[50%] xsm:w-[70%] sm:w-[80%] sm:h-[90%] md:h-[90%] md:w-[85%]" width="80%"
+ src="../../../assets/img/Page-1.svg" alt="UserAccount"></div>
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[280pt]" [routerLink]="['/profile']">
+ <p class="sm:text-[13pt] md:text-[19pt] sm:ml-[8%] text-[#FFFFFF] font-roboto-regular">Profile</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png" [routerLink]="['/profile']"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt"></div>
+ </div>
+ <div
+ class=" flex items-center justify-between xsm:w-[150pt] sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] xsm:mt-[0.5rem] sm:mt-[-0.2rem] md:mt-[1rem] md:w-[405pt]">
+ <div
+ class="xsm:h-[30pt] xsm:w-[30pt] xsm:flex xsm:justify-center xsm:items-center md:h-[40pt] md:w-[40pt] sm:h-[28.5pt] sm:w-[28.5pt] rounded-[10pt] bg-[#FFFFFF] flex items-center justify-center sm:p-[8px]">
+ <img height="100%" width="75%"
+ class="icone xsm:h-[60%] xsm:w-[70%] md:h-[90%] md:w-[85%] sm:w-[80%] sm:h-[90%]"
+ src="../../../assets/img/Icon material-security.svg" alt="ChangePassword"></div>
+ <div class="sm:h-[20pt] xsm:w-[98pt] sm:w-[194pt] md:w-[280pt]">
+ <p class="text-[#FFFFFF] sm:ml-[8%] font-roboto-regular sm:text-[13pt] md:text-[19pt]"
+ [routerLink]="['/changePassword']">Change Password</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png" [routerLink]="['/changePassword']"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt"></div>
+ </div>
+ <div
+ class=" flex items-center justify-between xsm:w-[150pt] sm:w-[280pt] md:w-[405pt] sm:p-[2rem] sm:h-[10pt] sm:mt-[-0.2rem] xsm:mt-[0.8rem] md:mt-[1rem]">
+ <div class="xsm:h-[30pt] xsm:w-[30pt] xsm:flex xsm:justify-center xsm:items-center sm:h-[28.5pt] sm:w-[28.5pt] md:h-[40pt] md:w-[40pt] rounded-[10pt] bg-[#FFFFFF] sm:p-[8px] flex items-center justify-center"
+ [routerLink]="['/inviteFriend']"><img height="100%"
+ class="icone xsm:h-[50%] xsm:w-[70%] md:h-[95%] md:w-[90%] sm:w-[90%] text-[#3d484b] sm:h-[95%]"
+ width="90%" src="../../../assets/img/Group 4064.svg" alt="InviteAccount"></div>
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[280pt]">
+ <p class="text-[#FFFFFF] sm:ml-[8%] font-roboto-regular sm:text-[13pt] md:text-[19pt]"
+ [routerLink]="['/inviteFriend']">Invite a Friend</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt" [routerLink]="['/inviteFriend']"></div>
+ </div>
+ <div
+ class=" flex items-center justify-between xsm:w-[150pt] xsm:mt-[0.8rem] sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] sm:mt-[-0.2rem] md:w-[405pt] md:mt-[1rem]">
+ <div
+ class="xsm:h-[30pt] xsm:w-[30pt] xsm:flex xsm:justify-center xsm:items-center sm:h-[28.5pt] sm:w-[28.5pt] rounded-[10pt] bg-[#FFFFFF] sm:p-[8px] flex items-center justify-center">
+ <img class="icone xsm:p-[-5rem] sm:w-[100%] sm:h-[100%]" height="100%" width="100%"
+ src="../../../assets/img/Group 3181.svg" alt="FeedbackAccount"></div>
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[275pt]">
+ <p class="text-[#FFFFFF] font-roboto-regular sm:ml-[8%] sm:text-[13pt] md:text-[19pt]"
+ [routerLink]="['/Feedback']">Feedback</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png" [routerLink]="['/Feedback']"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt"></div>
+ </div>
+ <div
+ class=" flex items-center justify-between xsm:w-[150pt] xsm:mt-[0.8rem] xsm:rounded-[10pt] sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] sm:mt-[-0.2rem] md:w-[405pt] md:mt-[1rem]">
+ <div class="xsm:h-[30pt] xsm:rounded-[8pt] xsm:w-[30pt] xsm:flex xsm:justify-center xsm:items-center sm:h-[28.5pt] sm:w-[28.5pt] sm:rounded-[10pt] bg-[#FFFFFF] sm:p-[8px] flex items-center justify-center"
+ [routerLink]="['/about']"><img
+ class="icone xsm:h-[50%] xsm:w-[70%] md:h-[95%] md:w-[80%] sm:w-[80%] sm:h-[90%]" height="100%"
+ width="90%" src="../../../assets/img/Icon ionic-md-information-circle-outline.svg"
+ alt="AboutAccount"></div>
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[280pt]">
+ <p class="text-[#FFFFFF] sm:ml-[8%] font-roboto-regular sm:text-[13pt] md:text-[19pt]"
+ [routerLink]="['/about']">Help</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt" [routerLink]="['/about']"></div>
+ </div>
+ <div
+ class="xsm:w-[150pt] xsm:mt-[0.8rem] flex items-center justify-between sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] sm:mb-[1rem] sm:mt-[-0.2rem] md:w-[405pt] md:mt-[1rem]">
+ <div
+ class="xsm:h-[30pt] xsm:w-[30pt] xsm:flex xsm:justify-center xsm:items-center rounded-[10pt] bg-[#FFFFFF] sm:p-[8px] text-mediumGreys flex items-center justify-center">
+ <img class="icone xsm:h-[50%] xsm:w-[70%] md:h-[90%] md:w-[85%] sm:w-[78%] sm:h-[68%]" height="90%"
+ width="70%" src="../../../assets/img/Path 11.svg" alt="LogoutAccount"></div>
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[280pt]">
+ <p class="text-[#FFFFFF] sm:ml-[8%] font-roboto-regular sm:text-[13pt] md:text-[19pt]"
+ (click)="confirmModal()">Logout</p>
+ </div>
+ <div class="white"><img src="../../../assets/img/icon.png"
+ class="xsm:h-[12pt] xsm:w-[7pt] sm:h-[10pt] sm:w-[6pt] h-[14pt] w-[9pt] md:h-[18pt] md:w-[13pt]" height="14pt"
+ width="9pt" (click)="confirmModal()"></div>
+ </div>
+ </div>
+
+ <div *ngIf="modal"
+ class="w-[100%] h-[100%] flex flex-col justify-center items-center bg-transparent absolute sm:top-[5%] md:top-[-10%] rounded-[8pt] z-[999] p-4 ">
+ <div
+ class="w-[250pt] sm:p-[6%] sm:h-[115pt] md:h-[170pt] md:w-[350pt] sm:p-[1rem] md:p-[2rem] bg-[#475356] rounded-[8pt]">
+ <p class="sm:text-[16pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Logout</p>
+ <p class="text-[13pt] md:text-[20pt] font-roboto-regular text-[#D4D4D4]">Are you sure you want to
+ logout?</p>
+ <div
+ class="flex text-orangess sm:text-[16pt] md:text-[18pt] font-roboto-regular w-[100pt] md:w-[120pt] justify-between p-[1.3rem] m-[10%] mt-[0.1rem] float-right">
+ <p class="text-[14pt]" (click)="auth.logout()">Yes</p>
+ <div class="logOut-box">
+ <p class="text-white text-[14pt]" (click)="confirm()">Cancel</p>
+ </div>
+
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <app-footer> </app-footer>
+
+
+
+ ./account.component.css
+
.white{
+ filter: invert(100%);
+}
+/* .icone{
+ filter: invert(100%);
+} */
+
+.logOut-box{
+ height: 28pt;
+ width: 240pt;
+ text-align: center;
+ background-color: #fc8019;
+ margin-left: 30%;
+ margin-top: -5%;
+ padding: 13%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 2px solid #fc8019;
+ border-radius: 5px ;
+}
+ +
+ src/app/admin-dashboard/add-food/add-food.component.ts
+
selector | +app-add-food |
+
styleUrls | +./add-food.component.css |
+
templateUrl | +./add-food.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(foodInventory: FoodInventoryServiceService, http: HttpClient, router: Router, auth: AuthService)
+ |
+ |||||||||||||||
+ + | +|||||||||||||||
+
+ Parameters :
+
+
|
+
+ + + addFood + + + | +
+addFood()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + addFoodForm + + + | +
+ Default value : new FormGroup({
+ FoodName: this.FoodName,
+ Price: this.Price,
+ ImageUrl: this.ImageUrl,
+ })
+ |
+
+ + | +
+ + + alertMsg + + + | +
+ Type : string
+
+ |
+
+ Default value : 'Please Wait! Under Process'
+ |
+
+ + | +
+ + + AlertType + + + | +
+ Type : string
+
+ |
+
+ Default value : 'success'
+ |
+
+ + | +
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + Public + foodInventory + + + | +
+ Type : FoodInventoryServiceService
+
+ |
+
+ + | +
+ + + FoodName + + + | +
+ Default value : new FormControl('', [Validators.required, Validators.min(3)])
+ |
+
+ + | +
+ + + ImageUrl + + + | +
+ Default value : new FormControl('', [Validators.required])
+ |
+
+ + | +
+ + + Price + + + | +
+ Default value : new FormControl('', [Validators.required])
+ |
+
+ + | +
+ + + showAlert + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
+ + | +
import { HttpClient } from '@angular/common/http';
+import { Component } from '@angular/core';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { Router } from '@angular/router';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+
+import { FoodInventoryServiceService } from 'src/app/services/food-inventory-service.service';
+import Swal from 'sweetalert2';
+
+@Component({
+ selector: 'app-add-food',
+ templateUrl: './add-food.component.html',
+ styleUrls: ['./add-food.component.css'],
+})
+export class AddFoodComponent {
+ constructor(
+ public foodInventory: FoodInventoryServiceService,
+ private http: HttpClient,
+ private router: Router,
+ public auth: AuthService
+ ) {}
+
+ AlertType = 'success';
+ showAlert: boolean = false;
+ alertMsg = 'Please Wait! Under Process';
+ backArrow = faArrowLeft;
+
+ FoodName = new FormControl('', [Validators.required, Validators.min(3)]);
+ Price = new FormControl('', [Validators.required]);
+ ImageUrl = new FormControl('', [Validators.required]);
+
+ addFoodForm = new FormGroup({
+ FoodName: this.FoodName,
+ Price: this.Price,
+ ImageUrl: this.ImageUrl,
+ });
+
+ addFood() {
+ const swalWithBootstrapButtons = Swal.mixin({
+ customClass: {
+ confirmButton:
+ 'text-white bg-green-700 hover:bg-green-800 focus:outline-none focus:ring-4 focus:ring-green-300 font-medium rounded-full text-sm px-5 py-2.5 text-center mr-2 mb-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800',
+ cancelButton:
+ 'text-white bg-red-700 hover:bg-red-800 focus:outline-none focus:ring-4 focus:ring-red-300 font-medium rounded-full text-sm px-5 py-2.5 text-center mr-2 mb-2 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900',
+ },
+ buttonsStyling: false,
+ });
+
+ this.foodInventory.addFood(this.addFoodForm).subscribe({
+ next: () => {
+ swalWithBootstrapButtons
+ .fire({
+ title: 'Added !',
+ showCancelButton: true,
+ text: this.FoodName.value ? this.FoodName.value : '',
+ imageUrl: this.ImageUrl.value ? this.ImageUrl.value : '',
+ imageWidth: 400,
+ confirmButtonText: 'Done!',
+ cancelButtonText: 'Add More!',
+ reverseButtons: false,
+ imageHeight: 200,
+ imageAlt: 'Custom image',
+ })
+ .then((result) => {
+ if (result.isConfirmed) {
+ this.router.navigateByUrl('/foodInventory');
+ } else if (result.dismiss === Swal.DismissReason.cancel) {
+ this.addFoodForm.reset();
+ }
+ });
+ },
+ });
+ }
+}
+
+ <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert>
+< class="fixed inset-0 overflow-y-auto" id="modal">
+<div
+ class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
+>
+ <div class="self-end m-1 mr-5">
+ <button
+ type="button"
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="auth.backbutton()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+ </div>
+
+ <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ >
+ <!-- Add margin if you want to see some of the overlay behind the modal-->
+ <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Add Food</p>
+ <!--Title-->
+ <div class="flex justify-between items-center pb-4">
+ <!-- Modal Close Button -->
+ </div>
+
+ <form [formGroup]="addFoodForm" (submit)="addFood()">
+ <!-- Name -->
+ <div class="mb-3">
+ <label class="inline-block mb-2"> Food Name</label>
+ <app-input
+ [control]="FoodName"
+ placeholder="Enter Food Name"
+ ></app-input>
+ </div>
+
+ <div class="mb-3">
+ <label class="inline-block mb-2">Price</label>
+ <app-input
+ [control]="Price"
+ type="number"
+ placeholder="Enter Food Price"
+ ></app-input>
+ </div>
+
+ <div class="mb-3">
+ <label class="inline-block mb-2">Food Image</label>
+ <app-input
+ [control]="ImageUrl"
+ placeholder="Enter Food Image"
+ ></app-input>
+ </div>
+
+ <button
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500"
+ >
+ Add Food
+ </button>
+ </form>
+ </div>
+ </div>
+</div>
+
+
+ ./add-food.component.css
+
+ +
+ src/app/shared/add-item-button/add-item-button.component.ts
+
selector | +app-add-item-button |
+
styleUrls | +./add-item-button.component.css |
+
templateUrl | +./add-item-button.component.html |
+
+ Properties+ |
+
+
|
+
+ Inputs+ |
+
+ + | +
+constructor(activatedroute: ActivatedRoute)
+ |
+ ||||||
+ + | +||||||
+
+ Parameters :
+
+
|
+
+ + link + | +|
+ Type : any
+
+ |
+ |
+ + | +
+ + state + | +|
+ Type : any
+
+ |
+ |
+ + | +
+ + + Public + activatedroute + + + | +
+ Type : ActivatedRoute
+
+ |
+
+ + | +
+ + + plusbutton + + + | +
+ Default value : faPlus
+ |
+
+ + | +
import { Component, Input } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { faPlus } from '@fortawesome/free-solid-svg-icons';
+
+@Component({
+ selector: 'app-add-item-button',
+ templateUrl: './add-item-button.component.html',
+ styleUrls: ['./add-item-button.component.css'],
+})
+export class AddItemButtonComponent {
+ constructor(public activatedroute: ActivatedRoute) {}
+ @Input() state: any;
+ @Input() link: any;
+ plusbutton = faPlus;
+}
+
+ <!-- <a
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ [routerLink]="link"
+ [state]="state"
+>
+ <fa-icon class="fa fa-sm" [icon]="plusbutton"> </fa-icon>
+
+</a> -->
+
+
+ ./add-item-button.component.css
+
+ +
+ src/app/shared/add-new-item/add-new-item.component.ts
+
selector | +app-add-new-item |
+
styleUrls | +./add-new-item.component.css |
+
templateUrl | +./add-new-item.component.html |
+
+ Properties+ |
+
+ + | +
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + rupeeSign + + + | +
+ Default value : faIndianRupeeSign
+ |
+
+ + | +
import { Component } from '@angular/core';
+import { AuthService } from 'src/app/services/auth.service';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { faIndianRupeeSign } from '@fortawesome/free-solid-svg-icons';
+
+@Component({
+ selector: 'app-add-new-item',
+ templateUrl: './add-new-item.component.html',
+ styleUrls: ['./add-new-item.component.css']
+})
+export class AddNewItemComponent {
+
+ backArrow = faArrowLeft;
+ rupeeSign = faIndianRupeeSign;
+
+
+
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+
+}
+
+
+ <div class="w-[100%] sm:h-[100%] md:h-[105vh] flex flex-col items-center bg-[#3D484B] ">
+ <nav class="w-[100%] h-[40pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="sm:h-[18pt] sm:w-[18pt] md:h-[20pt]">
+ <button type="button" class="text-white" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%] flex justify-between items-center">
+ <h3 class="text-[14pt] text-[#FFFFFF] font-roboto-black">Add New Item</h3>
+ </div>
+ </nav>
+ <div class="h-[88vh] w-[100%] flex items-center flex-col m-[3%] ">
+ <div class="input-box">
+ <div class="mb-[3%]">
+ <label class="sm:text-[12.5pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-[2rem] ml-[0.5%]">Adding
+ to</label>
+ <select id="title"
+ class="p-[2.5%] bg-[white] h-[35pt] w-[100%] text-[#fc8019] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] border-2 border-[#606161] ">
+ <option>Snacks</option>
+ <option>Breakfast</option>
+ <option>Lunch</option>
+ </select>
+ </div>
+ <div>
+ <label class="sm:text-[12.5pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-[2rem]">Name</label>
+ <input type="text" placeholder="Crispy Corn" id="title"
+ class="p-3 bg-[white] h-[35pt] w-[100%] text-[#fc8019] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] border-2 border-[#606161] mb-[4%] ">
+ </div>
+
+
+ <div class="input-box-1">
+ <div>
+ <label class="sm:text-[12.5pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular">Price
+ </label>
+ </div>
+ <div class="flex">
+ <div class="icon-box">
+ <fa-icon class="fa fa-sm btn-class" [icon]="rupeeSign"> </fa-icon>
+ </div>
+ <div class="w-[100%] h-[100%]">
+ <input type="text" placeholder="30" id="title"
+ class=" p-3 bg-[white] h-[100%] w-[100%] sm:text-[11pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[30pt] border-2 border-[#606161]" />
+ </div>
+ </div>
+ </div>
+ <div class="mt-[12%]">
+ <label class="sm:text-[12.5pt] mt-[-3%] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-[2rem]">Select
+ Icon</label>
+ <select id="title"
+ class="p-2.5 bg-[white] h-[42pt] w-[100%] text-[#fc8019] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] border-2 border-[#606161] mt-[1%] ">
+
+ </select>
+ </div>
+ </div>
+
+
+
+ </div>
+
+ <!-- menu part -->
+
+ <div class="mt-[-30%] mb-[25%]">
+ <button type="submit"
+ class=" h-[34pt] md:mt-[20%] sm:text-[14pt] md:text-[22pt] w-[100pt] sm:w-[250pt] bg-orangess text-white rounded transition hover:bg-orange-500 font-roboto-regular text-[18pt]">
+ Save
+ </button>
+
+ </div>
+
+</div>
+
+ ./add-new-item.component.css
+
.input-box {
+ margin-top: 4%;
+ width: 86%;
+ height: 70pt;
+ margin-bottom: 5%;
+}
+
+.icon-box {
+ background-color: white;
+ height: 30pt;
+ width: 13%;
+ display: flex;
+
+ justify-content: center;
+ align-items: center;
+ margin-top: 0.7%;
+}
+
+.input-box-1 {
+ margin-top: 1%;
+ width: 100%;
+ height: 30pt;
+ display: flex;
+ flex-direction: column;
+ margin-left: 1%;
+
+
+}
+ +
+ src/app/shared/add-new-menu/add-new-menu.component.ts
+
selector | +app-add-new-menu |
+
styleUrls | +./add-new-menu.component.css |
+
templateUrl | +./add-new-menu.component.html |
+
+ Properties+ |
+
+ + | +
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + passwordHide + + + | +
+passwordHide()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + calArrow + + + | +
+ Default value : faCalendarDays
+ |
+
+ + | +
+ + + magbutton + + + | +
+ Default value : faMagnifyingGlass
+ |
+
+ + | +
+ + + show + + + | +
+ Type : boolean
+
+ |
+
+ Default value : true
+ |
+
+ + | +
import { Component } from '@angular/core';
+import { AuthService } from 'src/app/services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
+import { faCalendarDays } from '@fortawesome/free-solid-svg-icons';
+
+@Component({
+ selector: 'app-add-new-menu',
+ templateUrl: './add-new-menu.component.html',
+ styleUrls: ['./add-new-menu.component.css']
+})
+export class AddNewMenuComponent {
+
+ backArrow = faArrowLeft;
+ calArrow = faCalendarDays;
+ show: boolean=true;
+ passwordHide(){
+ this.show=!this.show
+ }
+
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+
+ magbutton = faMagnifyingGlass;
+
+}
+
+ <div class="w-[100%] sm:h-[100%] md:h-[105vh] flex flex-col items-center bg-[#3D484B]" style="overflow: hidden;">
+ <nav class="w-[100%] h-[40pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="sm:h-[18pt] sm:w-[18pt] md:h-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%] flex justify-between items-center">
+ <h3 class="text-[14pt] text-[#FFFFFF] font-roboto-black">Add New Menu</h3>
+ </div>
+ </nav>
+ <div class="h-[90vh] w-[100%] flex items-center flex-col p-1">
+ <div class="input-box">
+ <div id="input-id" class="height-[50pt]">
+ <input type="text" id="date" placeholder="Calender"
+ class="bg-[white] p-3 w-[100%] h-[34.5pt] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] border-2 border-[#606161]">
+ <fa-icon class="fa fa-sm btn-class-1" [icon]="calArrow"> </fa-icon>
+ </div>
+ <div>
+ <!-- <input type="text" placeholder="Lunch" id="title"
+ class="p-3 bg-[white] w-[100%] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] h-[34.5pt] border-2 border-[#606161] " /> -->
+ <select id="title" class=" bg-[white] p-3 w-[100%] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] h-[34.5pt] text-[#FC8019] border-2 border-[#606161]">
+ <option class="p-3" value="Lunch">Lunch</option>
+ <option value="Breakfast">Breakfast</option>
+ <option value="Snacks">Snacks</option>
+
+ </select>
+ </div>
+ </div>
+
+ <div class="menu-class">
+ <div class="text-[white] font-roboto-black ">
+ <h4>Menu</h4>
+ </div>
+ <div class="font-roboto-black text-orangess">
+ <a [routerLink]="['/addNewItem']">+Add Item</a>
+ </div>
+ </div>
+ <div class="input-box-1">
+ <div class="icon-box">
+ <fa-icon class="fa fa-sm btn-class" [icon]="magbutton"> </fa-icon>
+ </div>
+ <div class="w-[100%] h-[100%]">
+ <input type="text" placeholder="Search For Food Item" id="title"
+ class=" p-3 bg-[white] h-[100%] w-[100%] sm:text-[11pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[40pt] border-2 border-[#606161] " />
+ </div>
+ </div>
+ </div>
+
+ <!-- menu part -->
+
+ <div class="totalMenu" >
+ <div id="box-6" class="zeroClass sm:mt-[-200%] sm:ml-[-0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox" />
+ </div>
+ <div id="box-6-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3154.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Aloo Gobhi
+ Sabji
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-3" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-3-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3129.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Chapati
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹20</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-5" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-5-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3145.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Raita
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-4" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-4-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3146.svg" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Rice
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹30</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-7" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-7-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3152.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Salad
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-8" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[59pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-8-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3150.svg" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Dal Fry
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div>
+ <button type="submit"
+ class=" sm:mt-[25%] h-[33pt] md:mt-[20%] sm:text-[12pt] md:text-[22pt] w-[95%] sm:w-[100%] bg-orangess text-white rounded transition hover:bg-orange-500 font-roboto-regular text-[16pt]">
+ Save Menu
+ </button>
+
+ </div>
+ </div>
+
+ </div>
+
+
+ ./add-new-menu.component.css
+
.background {
+ height: 100vh;
+ width: 100vw;
+ background-color: #3D484B;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+
+
+}
+
+
+.nav-class {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1px solid #8D8D8D;
+
+}
+
+.btn-cont {
+ color: #333333;
+ height: 20pt;
+ width: 20pt;
+ margin-left: 4%;
+}
+
+.input-box {
+ margin-top: 4%;
+ width: 86%;
+ height: 70pt;
+ margin-bottom: 5%;
+
+
+}
+
+.input-box-1 {
+ margin-top: 4%;
+ width: 86%;
+ height: 30pt;
+ display: flex;
+ margin-left: 2%;
+
+
+}
+
+#input-id {
+ margin-bottom: 5%;
+}
+
+.icon-box {
+ background-color: white;
+ height: 27pt;
+ width: 13%;
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+ margin-top: 0.7%;
+
+}
+
+.menu-class {
+ width: 95%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 5%;
+ font-size: 12pt;
+ margin-bottom: -6.5%;
+ margin-top: -1.2%;
+}
+
+.shift {
+ margin-left: 6.5%;
+}
+
+/* .checkbox {
+ height: 20pt;
+ width: 15pt; */
+ /* appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ outline: none;
+ border: 1px solid #fdfdfd;
+ border-radius: 4px;
+ background-color: #49565a; */
+/* } */
+
+
+/* input[type="checkbox"]:checked {
+
+ background-color: #fc8019;
+ } */
+
+
+ /* input[type="checkbox"]:checked::before {
+ content: "";
+ position: absolute;
+ top: 30%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 10px;
+ height: 10px;
+ background-color: #ffffff;
+ border-radius: 2px;
+ } */
+
+
+ .custom-select option{
+ height: 35pt;
+ width: 100pt;
+
+ }
+
+
+.btn-class {
+ position: relative;
+ top: 29%;
+ left: 4%;
+ font-size: 11.5pt;
+}
+
+.btn-class-1 {
+ color: #8d8d8d;
+ font-size: 14pt;
+ float: right;
+ position: absolute;
+ top: 10.8%;
+ left: 85%;
+
+}
+
+#box-3 #box-3-img {
+ background-color: #FDF6EC;
+}
+
+#box-4 #box-4-img {
+ background-color: #ffc5c4;
+}
+
+#box-5 #box-5-img {
+ background-color: #FFC5C4;
+}
+
+#box-6 #box-6-img {
+ background-color: #ffe17d9d;
+ /* margin-left: -19%; */
+
+}
+
+#box-7 #box-7-img {
+ background-color: #fafafa;
+}
+
+#box-8 #box-8-img {
+ background-color: #fafafa;
+}
+
+
+
+.zeroClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.boxClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10pt;
+ flex-direction: row;
+}
+
+.totalMenu {
+ margin-top: 25.5%;
+ margin-bottom: -19%;
+
+}
+
+.fa-lg {
+ filter: invert(100%);
+}
+.checkbox {
+ /* Hide the default checkbox */
+ height: 20pt;
+ width: 15pt;
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ width: 26px;
+ height: 26px;
+ background-color: #fff;
+ border: 2px solid #606161;
+ border-radius: 4px;
+ outline: none;
+ cursor: pointer;
+ position: relative;
+ }
+
+ /* Custom checkbox styles - checked state */
+ .checkbox:checked {
+ background-color: #FC8019; /* Change this to your desired color */
+ border-color: #FC8019; /* Change this to your desired color */
+ }
+
+ /* Custom checkbox styles - checkmark */
+ .checkbox::after {
+ content: "\2713";
+ font-size: 16px;
+ color: #FFF; /* Change this to your desired color */
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ display: none;
+ /* content: "\2713";
+
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 7px;
+ height: 7px;
+ background-color: #fff;
+ border-radius: 50%;
+ display: none; */
+ }
+
+ /* Custom checkbox styles - checked state checkmark */
+ .checkbox:checked::after {
+ display: block;
+ }
+
+ +
@@ -72,7 +77,7 @@
selector | app-alert |
styleUrls | ./alert.component.css |
@@ -115,7 +123,7 @@
selector | app-root |
styleUrls | ./app.component.css |
@@ -121,7 +129,7 @@
-constructor(auth: AuthService, modal: ModalService)
+constructor(auth: AuthService, modal: ModalService, router: Router)
|
||
- Defined in src/app/app.component.ts:11
+ Defined in src/app/app.component.ts:15
|
||
router | + +
+ Router
+ |
+
+ + No + | + +
+ + + Public + router + + + | +
+ Type : Router
+
+ |
+
+ Defined in src/app/app.component.ts:17
+ |
+
+ + + showFooter + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
+ Defined in src/app/app.component.ts:14
|
- Defined in src/app/app.component.ts:22
+ Defined in src/app/app.component.ts:23
+ |
+
+ + + user + + + | +|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ Type : IUser | undefined
+
+ |
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ Defined in src/app/app.component.ts:15
|
selector | app-auth-modal |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
styleUrls | ./auth-modal.component.css |
@@ -126,7 +134,7 @@
selector | +app-back-button |
+
styleUrls | +./back-button.component.css |
+
templateUrl | +./back-button.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService)
+ |
+ ||||||
+ + | +||||||
+
+ Parameters :
+
+
|
+
+ + + back + + + | +
+back()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
import { Component } from '@angular/core';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+
+@Component({
+ selector: 'app-back-button',
+ templateUrl: './back-button.component.html',
+ styleUrls: ['./back-button.component.css']
+})
+export class BackButtonComponent {
+
+ backArrow = faArrowLeft
+ constructor(private auth : AuthService){
+
+ }
+
+ back(){
+ this.auth.backbutton()
+ }
+}
+
+ <button
+ type="button"
+ class=" text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="back()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+
+ ./back-button.component.css
+
+ +
+ src/app/booking/booking.component.ts
+
selector | +app-booking |
+
styleUrls | +./booking.component.css |
+
templateUrl | +./booking.component.html |
+
import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-booking',
+ templateUrl: './booking.component.html',
+ styleUrls: ['./booking.component.css']
+})
+export class BookingComponent {
+
+}
+
+ <div class="flex items-center justify-center p-12 pt-20">
+
+
+ <div class="mx-auto w-full max-w-[550px]">
+ <h2 class="text-center text-3xl pb-4 " >Emergency Booking</h2>
+
+ <form action="https://formbold.com/s/FORM_ID" method="POST">
+ <div class="-mx-3 flex flex-wrap">
+
+
+
+ </div>
+ <div class="-mx-3 flex flex-wrap">
+ <div class="w-full px-3 sm:w-1/2">
+ <div class="mb-5">
+ <label
+ for="date"
+ class="mb-3 block text-base font-medium text-[#07074D]"
+ >
+ Date
+ </label>
+ <input
+ type="date"
+ name="date"
+ id="date"
+ class="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md"
+ />
+ </div>
+ </div>
+ <div class="w-full px-3 sm:w-1/2">
+ <div class="mb-5">
+ <label
+ for="time"
+ class="mb-3 block text-base font-medium text-[#07074D]"
+ >
+ Time
+ </label>
+ <input
+ type="time"
+ name="time"
+ id="time"
+ class="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md"
+ />
+ </div>
+ </div>
+ </div>
+
+ <div class="mb-5">
+
+ <div class="flex items-center space-x-6">
+ <div class="flex items-center">
+ <input
+ type="checkbox"
+ name="radio1"
+ id="radioButton1"
+ class="h-5 w-5"
+ />
+ <label
+ for="radioButton1"
+ class="pl-3 text-base font-medium text-[#07074D]"
+ >
+ Are you sure you want to book?
+ </label>
+ </div>
+
+ </div>
+ </div>
+
+ <div>
+ <button
+ class="hover:shadow-form rounded-md bg-[#6A64F1] py-3 px-8 text-center text-base font-semibold text-white outline-none"
+ >
+ Submit
+ </button>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ ./booking.component.css
+
+ +
@@ -72,7 +77,7 @@
selector | app-change-password |
styleUrls | ./change-password.component.css |
@@ -115,68 +123,847 @@
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, http: HttpClient, router: Router, toastr: ToastrService)
+ |
+ |||||||||||||||
+ + | +|||||||||||||||
+
+ Parameters :
+
+
|
+
+ + + closeModal + + + | +
+closeModal()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + confirmModal + + + | +
+confirmModal()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + openModal + + + | +
+openModal()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + viewpass + + + | +||||||
+viewpass(index: number)
+ |
+ ||||||
+ + | +||||||
+
+
+ Parameters :
+
+
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + circleEx + + + | +
+ Default value : faCircleExclamation
+ |
+
+ + | +
+ + + eye + + + | +
+ Default value : faEye
+ |
+
+ + | +
+ + + eyeSlash + + + | +
+ Default value : faEyeSlash
+ |
+
+ + | +
+ + + isModalOpen + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + modal + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + visibleFields + + + | +
+ Type : boolean[]
+
+ |
+
+ Default value : [false, false, false]
+ |
+
+ + | +
import { Component } from '@angular/core';
-
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+import { faEye } from '@fortawesome/free-solid-svg-icons';
+import { faEyeSlash } from '@fortawesome/free-solid-svg-icons';
+import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons';
+import { HttpClient } from '@angular/common/http';
+import { Router } from '@angular/router';
+import { ToastrService } from 'ngx-toastr';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
@Component({
selector: 'app-change-password',
templateUrl: './change-password.component.html',
- styleUrls: ['./change-password.component.css']
+ styleUrls: ['./change-password.component.css'],
})
+// export class ChangePasswordComponent {
+// backArrow = faArrowLeft;
+// eye = faEye;
+// eyeSlash = faEyeSlash;
+// circleEx = faCircleExclamation;
+// visible:boolean = false;
+// changetype:boolean = true;
+// modal = false;
+// show: boolean=false;
+// passwordHide(){
+// this.show=!this.show
+// }
+// confirmModal() {
+// this.modal = !this.modal;
+// }
+
+// viewpass(){
+// this.visible = !this.visible;
+// this.changetype = !this.changetype;
+// }
+
+// constructor(public auth: AuthService) {}
+// }
export class ChangePasswordComponent {
+ backArrow = faArrowLeft;
+ eye = faEye;
+ eyeSlash = faEyeSlash;
+ modal = false;
+ circleEx = faCircleExclamation;
+ visibleFields: boolean[] = [false, false, false]; // [currentPassword, newPassword, confirmPassword]
+ confirmModal() {
+ this.modal = !this.modal;
+ }
+
+ viewpass(index: number) {
+ this.visibleFields[index] = !this.visibleFields[index];
+ }
+
+
+
+ constructor(public auth: AuthService,
+ private http: HttpClient,
+ private router: Router,
+ private toastr: ToastrService) {}
+ isModalOpen = false;
+ openModal() {
+ this.isModalOpen = true;
+ }
+
+ closeModal() {
+ this.isModalOpen = false;
+ }
}
<!-- Login Form -->
-<form>
- <div class="mb-3">
- <label class="inline-block mb-2">Current Password</label>
- <app-input type="password" placeholder="Enter Current Password">
- </app-input>
- </div>
- <div class="mb-3">
- <label class="inline-block mb-2">New Password</label>
- <app-input type="password" placeholder="Enter Current Password">
- </app-input>
+<!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
+
+<!-- Auth Modal -->
+
+<!-- <div class="fixed inset-0 overflow-y-auto" id="modal">
+ <div
+ class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0" -->
+
+<!-- <div class="self-end m-1 mr-5">
+ <button
+ type="button"
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="auth.backbutton()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+ </div> -->
+
+<!-- rounded tab shadow -->
+<!-- <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ >
+ Add margin if you want to see some of the overlay behind the modal
+ <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Change Password</p>
+ Title
+ <div class="flex justify-between items-center pb-4">
+ Modal Close Button
+ </div>
+
+ <form>
+ <div class="mb-3">
+ <label class="inline-block mb-2">Current Password</label>
+
+ <app-input type="password" placeholder="Enter Current Password">
+ </app-input>
+ </div>
+ <div class="mb-3">
+ <label class="inline-block mb-2">New Password</label>
+ <app-input type="password" placeholder="Enter Current Password">
+ </app-input>
+ </div>
+ <div class="mb-3">
+ <label class="inline-block mb-2">Confirm New Password</label>
+ <app-input type="password" placeholder="Enter Current Password">
+ </app-input>
+ </div>
+ <button
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
+ >
+ Send Reset Link
+ </button>
+ </form>
+ </div>
+ </div>
</div>
- <div class="mb-3">
- <label class="inline-block mb-2">Confirm New Password</label>
- <app-input type="password" placeholder="Enter Current Password">
- </app-input>
- </div>
- <button
- type="submit"
- class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
- >
- Send Reset Link
- </button>
-</form>
-
+</div> -->
+
+
+
+
+
+
+
+<div class="w-[100%] sm:h-[100vh] md:h-[102vh] flex flex-col items-center bg-[#3D484B]" style="overflow: hidden;" >
+
+ <nav
+ class="w-[100%] sm:h-[40pt] md:h-[42pt] p-[1.8rem] xsm:h-[38pt] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="sm:h-[20pt] sm:w-[18pt] md:h-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] xsm:w-[83%] md:w-[95%]">
+ <h3 class="xsm:text-[14pt] sm:text-[17pt] text-[#FFFFFF] font-roboto-black">Change Password</h3>
+ </div>
+ </nav>
+
+ <form class="w-[100%] xsm:h-[100vh] sm:h-[100vh] md:h-[105pt] flex flex-col items-center p-[1.5rem]">
+ <div class="sm:mt-[1rem] sm:w-[94%] xsm:w-[97%] xsm:mt-[2rem] md:w-[95%] relative">
+ <label for="currentPassward" class="sm:text-[13pt] md:text-[17pt] text-[#D4D4D4] font-roboto-regular sm:mb-2 md:mb-[5rem]">Current
+ Password <span class="text-[#FF2F2F]">*</span></label>
+ <app-input type="{{ visibleFields[0] ? 'text' : 'password' }}"
+ id="currentPassword"
+ class="w-[100%] sm:h-[40pt] md:h-[50pt] text-darkgreyss rounded-[4pt] bg-white outline-none"></app-input>
+ <!-- <div class="absolute xsm:top-[60%] sm:top-[3rem] md:top-[3rem] xsm:right-[1rem] sm:right-[1rem] md:right-[2.5rem]" (click)="passwordHide()"><img src="../../../assets/img/awesome-eye-slash.svg" alt=""></div> -->
+ <span class="eyeIcon" (click)="viewpass(0)"><i [ngClass]="visibleFields[0] ? 'fa fa-eye' : 'fa fa-eye-slash'"></i></span>
+ </div>
+ <div class="sm:mt-[2rem] xsm:mt-[2rem] xsm:w-[97%] sm:w-[94%] md:w-[95%] relative">
+ <label class="sm:text-[13pt] md:text-[18pt] text-[#D4D4D4] font-roboto-regular">New Password <span
+ class="text-[#FF2F2F]">*</span> </label>
+ <app-input type="{{ visibleFields[1] ? 'text' : 'password' }}"
+ id="newPassword"
+ class="w-[100%] sm:h-[40pt] md:h-[50pt] text-darkgreyss rounded-[4pt]"></app-input>
+ <!-- <div class="absolute xsm:top-[60%] sm:top-[3rem] md:top-[3rem] sm:right-[1rem] xsm:right-[1rem] md:right-[2.5rem] " (click)="passwordHide()"><img src="../../../assets/img/awesome-eye-slash.svg" alt=""></div> -->
+ <span class="eyeIcon" (click)="viewpass(1)"><i [ngClass]="visibleFields[1] ? 'fa fa-eye' : 'fa fa-eye-slash'"></i></span>
+ </div>
+ <div class="sm:mt-[2rem] xsm:mt-[2rem] sm:w-[94%] xsm:w-[97%] md:w-[95%] relative">
+ <label class="sm:text-[13pt] md:text-[18pt] text-[#D4D4D4] font-roboto-regular">Confirm New Password <span
+ class="text-[#FF2F2F]">*</span> </label>
+ <app-input type="{{ visibleFields[2] ? 'text' : 'password' }}"
+ id="confirmPassword"
+ class="w-[100%] h-[40pt] text-darkgreyss rounded-[4pt] mt-[1rem]">
+ </app-input>
+ <!-- <div class="absolute xsm:top-[60%] sm:top-[3rem] md:top-[3rem] sm:right-[1rem] xsm:right-[1rem] md:right-[2.5rem]" (click)="passwordHide()"><fa-icon class="fa-lg h-[10pt]" [icon]="eye"></fa-icon></div> -->
+ <span class="eyeIcon" (click)="viewpass(2)"><i [ngClass]="visibleFields[2] ? 'fa fa-eye' : 'fa fa-eye-slash'"></i></span>
+ </div>
+ <button type="submit"
+ class="sm:h-[35pt] xsm:h-[30pt] md:h-[80pt] sm:w-[90%] xsm:mt-[50%] xsm:w-[97%] md:w-[90%] md:p-[0.1rem] bg-orangess rounded-[4pt] sm:text-[14.5pt] md:text-[17pt] font-roboto-regular text-white sm:mt-[70%] md:mt-[22rem]">
+ Change Password
+ </button>
+ <!-- <div class="mt-[1rem] xsm:mt-[0.5rem]">
+ <p class="sm:text-[13pt] md:text-[20pt] text-orangess font-roboto-regular" routerLink="/forgotPassword">Forgot Password</p>
+ </div> -->
+ <div
+ class="xsm:w-[150pt] xsm:mt-[0.8rem] flex items-center justify-between sm:w-[280pt] sm:p-[2rem] sm:h-[10pt] sm:mb-[1rem] sm:mt-[-0.2rem] md:w-[405pt] md:mt-[1rem]" >
+ <div class="sm:h-[20pt] xsm:w-[100pt] sm:w-[194pt] md:w-[280pt]">
+ <p class="text-[#FC8019] sm:ml-[35%] font-roboto-regular sm:text-[14pt] md:text-[19pt]"
+ (click)="openModal()">Forgot Password</p>
+ </div>
+ </div>
+
+
+
+ <!-- <div *ngIf="modal"
+ class="w-[100%] h-[100%] flex flex-col justify-center items-center bg-transparent absolute sm:top-[-2%] md:top-[-10%] rounded-[8pt] z-[999] p-4">
+
+ <div
+ class="w-[250pt] sm:p-[6%] sm:h-[250pt] md:h-[170pt] md:w-[350pt] sm:p-[1rem] md:p-[2rem] bg-[#475356] rounded-[8pt] sm:mb-[10%] " >
+ <div class="flex flex-col items-center sm:mt-[-3%]">
+
+ <img class="m-[4%]" src="../../../assets/img/forgot-password-icon.svg" alt="" height="10%" width="10%">
+ <button class="modal-close-button" (click)="closeModal()">✖</button>
+
+ <p class="sm:text-[14pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Forgot Password</p>
+ <pre class="text-[13pt] sm:mt-[5%] md:text-[20pt] font-roboto-regular text-[#D4D4D4]">Enter your email and we'll send you
+ a link to reset your password</pre>
+ <div class="w-[90%] sm:mt-[6%]">
+ <label for="subject" class="text-[13pt] text-[#D4D4D4] font-roboto-regular">Email <span
+ class="text-[#FF2F2F]">*</span> </label>
+ <input type="text" id="subject"
+ class="p-3 w-[100%] sm:mt-[2%] sm:mb-[3%] sm:text-[14pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[30pt] border-2 border-greyss "
+ required />
+ </div>
+ <button type="submit"
+ class="sm:h-[35pt] xsm:h-[30pt] md:h-[80pt] sm:w-[90%] xsm:mt-[50%] xsm:w-[97%] md:w-[90%] md:p-[0.1rem] bg-orangess rounded-[4pt] sm:text-[14pt] md:text-[17pt] font-roboto-regular sm:mt-[4%] text-white md:mt-[22rem] sm:mb-[10%]">
+ Reset Password
+ </button>
+
+
+ </div>
+
+
+ </div>
+ </div> -->
+ <!-- <p class="text-left text-[16pt] sm:text-[11.5pt] md:text-[18pt] text-orangess font-roboto-regular p-[2pt] mt-[5pt] float-right"
+ (click)="openModal()">Forgot Password?</p> -->
+
+ <app-forget-password *ngIf="isModalOpen" (modalClosed)="closeModal()"></app-forget-password>
+ </form>
+
+</div>
./change-password.component.css
+ .fa-lg{
+ filter: invert(100%);
+}
+
+.eyeIcon {
+ position: absolute;
+ right: 15px;
+ top: 55%;
+
+ float: right;
+ color: #666666;
+}
+
+
+.modal-close-button {
+ position: absolute;
+ /* top: 10px; */
+ right: 12%;
+ font-size: 20px;
+ background-color: transparent;
+ border: none;
+ cursor: pointer;
+ color: white;
+ }
+
@@ -74,11 +79,11 @@
- OnInit
+ OnInit
selector | app-chart-card |
styleUrls | ./chart-card.component.css |
@@ -121,10 +129,28 @@
+ Properties+ |
+
+ + | +
@@ -149,12 +175,60 @@ Methods |
+constructor(count: PeopleCountService)
+ |
+ ||||||
+ + | +||||||
+
+ Parameters :
+
+
|
+
+ + + Public + count + + + | +
+ Type : PeopleCountService
+
+ |
+
+ + | +
+ + + data + + + | +
+ Type : any
+
+ |
+
+ + | +
import { Component, OnInit } from '@angular/core';
-import {Chart} from 'chart.js'
+import { Chart } from 'chart.js';
+import { map } from 'rxjs';
+import { PeopleCountService } from 'src/app/services/people-count.service';
@Component({
selector: 'app-chart-card',
templateUrl: './chart-card.component.html',
- styleUrls: ['./chart-card.component.css']
+ styleUrls: ['./chart-card.component.css'],
})
export class ChartCardComponent implements OnInit {
-
- ngOnInit(){
-
- const dataDoughnut = {
- labels: ["Vacant", "Occupied"],
- datasets: [
- {
- label: "Canteen Space",
- data: [300, 50,],
+ constructor(public count: PeopleCountService) {}
+ data:any;
+ ngOnInit() {
+ this.count.getPeopleCount().subscribe((val) => {
+ this.count.counts = val.data[0].attributes.rcounting;
+ const dataDoughnut = {
+ // labels: ['Vacant', 'Occupied'],
+ datasets: [
+ {
+ label: 'Canteen Space',
+ data: [150 - this.count.counts, this.count.counts],
+ backgroundColor: ['rgb( 133,204,113)', 'rgb(253,114,114)'],
+ hoverOffset: 4,
+ borderWidth: 15,
+ borderHeight: "200%",
+ height: 100,
+ borderColor:"rgb(73, 86, 90)",
+ layout: {
+
+ }
+ // borderRadius:"innerEnd",
+ // spacing:50
+ },
+
+ ],
+ };
+ const configDoughnut = {
+ labels: ['Reserved','Vacant'],
+ dataset : [{
+ label : 'Status',
+ data: dataDoughnut,
+ spacing: 10,
+ cutout: "50%",
+ radius: "100%",
+ rotation: 0,
+ circumference: 360,
backgroundColor: [
- 'rgb(54, 162, 235)',
-
- 'rgb(255, 99, 132)',
- ],
- hoverOffset: 4,
+ 'rgb(133,204,113)',
+ 'rgb(253,114,114)'
+ ]
+
+ }],
+ type: 'doughnut',
+ data: dataDoughnut,
+ options: {
+ cutoutPercentage:67,
+ width:50
+
},
- ],
- };
-
- const configDoughnut = {
- type: "doughnut",
- data: dataDoughnut,
- options: {},
- };
+ };
- const chartBar = new Chart(
- document.getElementById("chartDoughnut") as HTMLCanvasElement,
- // el.nativeElement.chartDoughnut,
- configDoughnut
-
- );
-
- }
+ const chartBar = new Chart(
+ document.getElementById('chartDoughnut') as HTMLCanvasElement,
+ configDoughnut
+ );
+ });
+ }
}
<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>
-
+ <div class=" leading-normal w:[90%] sm:w-[85%] sm:ml-[9%] sm:mr-[3%] sm:mt-[1%] md:mt-[15%] sm:p-[3pt] md:w-[480pt] md:h-[300pt] h-[215pt] bg-#3d484b font-roboto rounded-[4pt] flex flex-col items-center">
+
+
+ <div class=" leading-normal flex justify-between rounded-lg bg-[#49565a] w-[98%] sm:mr-[6%] p-[22px] md:h-[250pt]">
+
+ <div class="rounded-[4pt] w-[160pt] h-[160pt] relative flex flex-col items-center justify-center font-roboto sm:mt-[-5%] md:mt-[3%] md:ml-[5%]">
+ <canvas style="height:221px; width:172px;" class="flex h-[100vh] justify-center items-center" id="chartDoughnut"></canvas>
+ <p class="absolute text-white text-[11pt] font-roboto top-[25%] flex flex-col justify-center p-[1.7rem] items-center">Total Capacity <span class="text-#f5f5f5 text-[18pt]">150</span></p>
+ </div>
+
+ <div class="w-[50%] h-[170pt] sm:w-[60%] sm:h-[160pt] font-roboto flex flex-col justify-between p-[20px] sm:p-[30px] md:p-[15px] md:ml-[100pt] items-center font-roboto sm:mt-[-5%] md:mt-[4%]">
+ <div class="h-[60pt] w-[80pt] sm:h-[50pt] md:h-[70pt] md:w-[90pt] sm:mt-[-10%] sm:w-[70pt] bg-white text-[#85cc71] text-center rounded"> <p class="text-[14pt] sm:text-[12pt] md:text-[16pt] font-roboto-regular mt-[5pt]">Vacant </p> <span class="font-extrabold text-[22pt] sm:text-[17pt] md:text-[24pt]">{{150 - count.counts}}</span></div>
+ <div class="h-[60pt] w-[80pt] sm:h-[50pt] sm:w-[70pt] md:h-[70pt] md:w-[90pt] sm:mt-[6pt] bg-white flex flex-col justify-center items-center text-[#fd7272] font-medium text-center rounded sm:mt-[-8%]"> <p class="text-[14pt] md:text-[16pt] sm:text-[12pt] text-[#fd7272]">Occupied</p> <span class="font-extrabold text-[22pt] sm:text-[17pt] md:text-[24pt]">{{this.count.counts}}</span> </div>
+ </div>
+
+ </div>
+
+ <div class="flex justify-between items-center w-[100%] sm:mt-[-14%] md:mt-[-13%] h-[20%] p-[18px] sm:p-[18px] md:p-[50px]">
+ <div> <p class="text-[#D4D4D4] sm:text-[12pt] md:text-[16pt] font-roboto-regular"><span class="font-roboto-black text-[#D4D4D4]"> Last updated: </span> 13 min ago</p> </div>
+ <div class="font-roboto-regular flex text-orangess justify-between items-center w-[90pt] p-[24px] h-[17pt] md:h-[20rem] font-roboto "> <a href="/"><img src="../../../assets/img/refresh2.svg" height="" width="90%" alt=""></a><a href="/"><p class="text-[18pt] sm:text-[11pt] md:text-[20pt]">Refresh</p></a></div>
+ </div>
+
+</div>
./chart-card.component.css
+ .chart{
+ border-radius: 0% ;
+ position: static;
+}
+
@@ -74,11 +79,11 @@
- OnInit
+ OnInit
selector | app-dashboard-modal |
styleUrls | ./dashboard-modal.component.css |
@@ -121,7 +129,7 @@
|
-constructor(card: FoodService, sidebar: SidebarService, food: FoodService)
+constructor(auth: AuthService, sidebar: SidebarService, food: FoodService, activatedroute: ActivatedRoute)
|
|||
- + | |||
card | +auth |
- FoodService
+ AuthService
|
@@ -245,6 +320,18 @@ Constructor |
activatedroute | + +
+ ActivatedRoute
+ |
+
+ + No + | + +
+ + + changeTab + + + | +||||||
+changeTab(tabName: string)
+ |
+ ||||||
+ + | +||||||
+
+
+ Parameters :
+
+
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
+ + + closeModal + + + | +
+closeModal()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + displayBreakFast + + + | +
+displayBreakFast()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + displayHighTea + + + | +
+displayHighTea()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
- + + | +|
+
+
+ Returns :
+ void
+
+ |
+
+ + + openModal + + + | +
+openModal()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + setSlider + + + | +
+setSlider()
+ |
+
+ |
FoodService
+ Type : ActivatedRoute
FoodService
+ Type : AuthService
any[]
+ Type : number
[
- {
- id: 1,
- name: 'poha',
- imageUrl:
- 'https://www.shutterstock.com/image-photo/indian-breakfast-dish-poha-260nw-765020587.jpg',
- },
- {
- id: 1,
- name: 'Samosa',
- imageUrl: 'https://thumbs.dreamstime.com/b/samosa-24578861.jpg',
- },
- ]
+ Default value : 1
any[]
+ Type : number[]
[
- {
- id: 1,
- name: 'poha',
- imageUrl:
- 'https://www.shutterstock.com/image-photo/indian-breakfast-dish-poha-260nw-765020587.jpg',
- },
- {
- id: 1,
- name: 'Samosa',
- imageUrl: 'https://thumbs.dreamstime.com/b/samosa-24578861.jpg',
- },
- ]
+ Default value : []
any[]
+ Type : ElementRef<HTMLElement>
[
- {
- id: 1,
- name: 'poha',
- imageUrl:
- 'https://www.shutterstock.com/image-photo/indian-breakfast-dish-poha-260nw-765020587.jpg',
- },
- {
- id: 1,
- name: 'Samosa',
- imageUrl: 'https://thumbs.dreamstime.com/b/samosa-24578861.jpg',
- },
- ]
+ Decorators :
+
+ @ViewChild('breakfastSection')
+
FoodService
+
+ + + + HcurrentSlide + + + | +
+ Type : number
+
+ |
+
+ Default value : 1
+ |
+
+ + | +
+ + + + highTeaSection + + + | +
+ Type : ElementRef<HTMLElement>
+
+ |
+
+ Decorators :
+ +
+ @ViewChild('highTeaSection')
+ |
+
+ + | +
+ + + Hopacities + + + | +
+ Type : number[]
+
+ |
+
+ Default value : []
+ |
+
+ + | +
+ + + id + + + | +
+ Type : any
+
+ |
+
+ + | +
+ + + isModalOpen + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + LcurrentSlide + + + | +
+ Type : number
+
+ |
+
+ Default value : 1
+ |
+
+ + | +
+ + + Lopacities + + + | +
+ Type : number[]
+
+ |
+
+ Default value : []
+ |
+
+ + | +
+ + + + lunchSection + + + | +
+ Type : ElementRef<HTMLElement>
+
+ |
+
+ Decorators :
+ +
+ @ViewChild('lunchSection')
+ |
+
+ + | +
+ + + plusbutton + + + | +
+ Default value : faPlus
+ |
+
+ + | +
+
Public
sidebar
@@ -509,7 +1118,132 @@ |
- + + | +
+ + + toggleBreakfast + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + toggleHightea + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + toggleLunch + + + | +
+ Default value : true
+ |
+
+ + | +
+ + + toggleToday + + + | +
+ Default value : true
+ |
+
+ + | +
+ + + toggleTomorrow + + + | +|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ Default value : false
+ |
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
selector | +app-day-toggle-button |
+
styleUrls | +./day-toggle-button.component.css |
+
templateUrl | +./day-toggle-button.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(foodService: FoodService)
+ |
+ ||||||
+ + | +||||||
+
+ Parameters :
+
+
|
+
+ + + toggleDay + + + | +||||||
+toggleDay(tabname: string)
+ |
+ ||||||
+ + | +||||||
+
+
+ Parameters :
+
+
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
+ + + Public + foodService + + + | +
+ Type : FoodService
+
+ |
+
+ + | +
+ + + isTodayActive + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + isTomorrowActive + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + left + + + | +
+ Default value : faChevronLeft
+ |
+
+ + | +
+ + + right + + + | +
+ Default value : faChevronRight
+ |
+
+ + | +
+ + + toggleToday + + + | +
+ Default value : true
+ |
+
+ + | +
+ + + toggleTomorrow + + + | +
+ Default value : false
+ |
+
+ + | +
import { Component } from '@angular/core';
+import { FoodService } from 'src/app/services/food.service';
+import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
+import { faChevronLeft } from '@fortawesome/free-solid-svg-icons';
+@Component({
+ selector: 'app-day-toggle-button',
+ templateUrl: './day-toggle-button.component.html',
+ styleUrls: ['./day-toggle-button.component.css'],
+})
+export class DayToggleButtonComponent {
+ toggleToday= true;
+ toggleTomorrow=false;
+ left = faChevronLeft;
+ right = faChevronRight;
+ isTomorrowActive = false;
+ isTodayActive = false;
+
+ constructor(public foodService: FoodService) {}
+ toggleDay(tabname:string) {
+ // this.foodService.toggleDay();
+ if(tabname==="Today"){
+ this.toggleToday=true;
+ this.toggleTomorrow=false;
+ this.foodService.todayFood();
+ this.isTodayActive = !this.isTodayActive;
+ }
+ if(tabname==="Tomorrow"){
+ this.toggleToday=false;
+ this.toggleTomorrow=true;
+ this.foodService.tommorowFood();
+ this.isTomorrowActive = !this.isTomorrowActive;
+ }
+ }
+}
+
+ <!-- <div class="flex w-[100%] justify-evenly items-center h-[40pt] p-[2rem] mt-[2rem] mb-[2rem]">
+ <button (click)="toggleDay('Today')" [ngClass]="{'orange' : toggleToday}" class="bg-greyss text-[16pt] text-white text-center w-[105pt] items-center justify-center h-[28pt] rounded-[5pt]">Today</button>
+ <button (click)="toggleDay('Tomorrow')" [ngClass]="{'orange' : toggleTomorrow}" class="bg-greyss text-[16pt] text-white text-center w-[105pt] h-[28pt] rounded-[5pt]">Tomorrow</button>
+</div> -->
+<div class="w-[100%] flex flex-col items-center">
+
+ <div
+ class="h-[35pt] w-[100%] md:w-[112%] xxs:w-[110%] flex items-center justify-evenly sm:ml-[0.3rem] mt-[1rem] sm:mt-[-2rem] ml-[0.1rem]">
+ <p class="xxs:mt-[-4pt] sm:text-[14pt] xxs:text-[11pt] md:text-[23pt] font-roboto-regular text-[#FFFFFF]"><span
+ class="font-roboto-black text-[#FFFFFF]"> Today's Menu, </span> 4 April 2023</p>
+ <div class="w-[60pt] sm:w-[60pt] md:w-[70pt] xxs:w-[50pt] h-[30pt] flex justify-between ml-[0.4rem]">
+ <div
+ class="sm:h-[25pt] xxs:h-[22pt] xxs:w-[22pt] md:h-[30pt] sm:w-[25pt] md:w-[30pt] border-2 border-greyss flex justify-center items-center p-[4pt] rounded-[4pt]"
+ id="today-icon" (click)="toggleDay('Today')" [ngClass]="{'orange' : toggleToday}">
+
+ <fa-icon class="fa-sm text-white" [icon]="left" [ngClass]="{'bg-orange': isTodayActive}"></fa-icon>
+
+ <!-- <img src="../../../assets/img/Group 4056.svg" alt="" height="100%" width="100%" > -->
+ </div>
+ <div
+ class="sm:h-[25pt] sm:w-[25pt] xxs:h-[22pt] xxs:w-[22pt] md:h-[30pt] w-[25pt] md:w-[30pt] border-2 border-greyss flex justify-center items-center p-[4pt] rounded-[4pt]"
+ id="tomorrow-icon" (click)="toggleDay('Tomorrow')" [ngClass]="{'orange' : toggleTomorrow}">
+ <fa-icon class="fa-sm text-white" [icon]="right" [ngClass]="{'bg-orange': isTomorrowActive}"></fa-icon>
+ </div>
+ </div>
+ </div>
+
+</div>
+<!-- <div class="flex justify-end mt-[5rem] mx-1 my-1 border-2 border-red-600">
+ <span class="mr-2 text-sm font-medium text-gray-900">Today</span>
+
+ <label class="inline-flex relative items-center cursor-pointer">
+ <input
+ type="checkbox"
+ value=""
+ class="sr-only peer"
+ (click)="toggleDay()"
+ [checked]="!(foodService.selectedDay$| async)"
+ />
+ <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-2 mr-2 text-sm font-medium text-gray-900">Tomorrow</span> -->
+
+<!-- </label>
+ <span class="ml-2 mr-2 text-sm font-medium text-gray-900">Tomorrow</span>
+</div> -->
+
+ ./day-toggle-button.component.css
+
.grey {
+ /* background-color: #CCCCCC; */
+ border: 2px solid #CCCCCC;
+ color: #CCCCCC;
+ }
+
+ #today-icon svg{
+ color: #FC8019;
+ }
+ .orange {
+ /* background-color: #FC8019; */
+ border: 2px solid #FC8019;
+ color: #FC8019;
+ }
+
+ .grey-arrow{
+ filter:greyscale(100%);
+ }
+
+.bg-orange {
+ color: #FC8019;
+
+}
+
+ +
+ src/app/admin-dashboard/delete-food/delete-food.component.ts
+
selector | +app-delete-food |
+
styleUrls | +./delete-food.component.css |
+
templateUrl | +./delete-food.component.html |
+
import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-delete-food',
+ templateUrl: './delete-food.component.html',
+ styleUrls: ['./delete-food.component.css'],
+})
+export class DeleteFoodComponent {}
+
+ <p>delete-food works!</p>
+
+
+ ./delete-food.component.css
+
+ +
+ src/app/shared/edit-menu/edit-menu.component.ts
+
selector | +app-edit-menu |
+
styleUrls | +./edit-menu.component.css |
+
templateUrl | +./edit-menu.component.html |
+
+ Properties+ |
+
+ + | +
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + passwordHide + + + | +
+passwordHide()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + magbutton + + + | +
+ Default value : faMagnifyingGlass
+ |
+
+ + | +
+ + + show + + + | +
+ Type : boolean
+
+ |
+
+ Default value : true
+ |
+
+ + | +
import { Component, Input } from '@angular/core';
+import { AuthService } from 'src/app/services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+import { FormControl } from '@angular/forms';
+import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
+
+
+
+
+
+
+@Component({
+ selector: 'app-edit-menu',
+ templateUrl: './edit-menu.component.html',
+ styleUrls: ['./edit-menu.component.css']
+})
+export class EditMenuComponent {
+ backArrow = faArrowLeft;
+ show: boolean=true;
+ passwordHide(){
+ this.show=!this.show
+ }
+
+
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+
+ magbutton = faMagnifyingGlass;
+}
+
+
+
+
+
+
+ <div class="w-[100%] sm:h-[100vh] md:h-[105vh] flex flex-col items-center bg-[#3D484B]">
+ <nav class="w-[100%] h-[40pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="sm:h-[18pt] sm:w-[18pt] md:h-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%] flex justify-between items-center">
+ <h3 class="text-[14pt] text-[#FFFFFF] font-roboto-black">Edit Menu</h3>
+ </div>
+ </nav>
+ <div class="h-[100vh] w-[100%] flex items-center flex-col p-1">
+ <div class="input-box sm:mb-[1%]">
+ <div id="input-id" class="height-[50pt]">
+ <input type="text" id="date" placeholder="03/04/2023"
+ class="bg-[#33393b] p-3 w-[100%] h-[29pt] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] h-[40pt] border-2 border-[#606161]"
+ readonly="true" />
+ </div>
+ <div>
+ <input type="text" placeholder="Lunch" id="title"
+ class="p-3 bg-[#33393b] h-[29pt] w-[100%] sm:text-[11pt] md:text-[13pt] outline-none rounded-[4pt] h-[40pt] border-2 border-[#606161] "
+ readonly="true" />
+ </div>
+ </div>
+
+ <div class="menu-class">
+ <div class="text-[white] font-roboto-black ">
+ <h4>Menu</h4>
+ </div>
+ <div class="font-roboto-black text-orangess">
+ <a href="../add-item-button/add-item-button.component.html">+Add Item</a>
+ </div>
+ </div>
+ <div class="input-box-1">
+ <div class="icon-box">
+ <fa-icon class="fa fa-sm btn-class" [icon]="magbutton"> </fa-icon>
+ </div>
+ <div class="w-[100%] h-[100%]">
+ <input type="text" placeholder="Search For Food Item" id="title"
+ class=" p-3 bg-[white] h-[100%] w-[100%] sm:text-[11pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[40pt] border-2 border-[#606161] " />
+ </div>
+ </div>
+ </div>
+
+ <!-- menu part -->
+
+ <div>
+ <div id="box-6" class="zeroClass sm:mt-[-180%] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox" />
+ </div>
+ <div id="box-6-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3154.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Aloo Gobhi
+ Sabji
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-3" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-3-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3129.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Chapati
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹20</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-5" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-5-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3145.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Raita
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-4" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-4-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3146.svg" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Rice
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹30</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-7" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-7-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3152.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Salad
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div id="box-8" class="zeroClass sm:mt-[1rem] sm:ml-[0pt] xsm:ml-[79pt]">
+ <div class="h-[21pt] w-[30pt]">
+ <input class="checkbox" type="checkbox">
+ </div>
+ <div id="box-8-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[33pt] sm:w-[33pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3150.svg" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[150pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[12pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">Dal Fry
+ </p>
+ <p class="sm:text-[11pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">₹10</p>
+ </div>
+ <div class="sm:h-[2pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="85%" width="85%"></div>
+ </div>
+ <div>
+ <button type="submit"
+ class=" sm:mt-[35%] h-[30pt] md:mt-[20%] sm:text-[12pt] md:text-[22pt] w-[95%] sm:w-[100%] bg-orangess text-white py-1 px-3 rounded transition hover:bg-orange-500 font-roboto-regular text-[16pt]">
+ Save Menu
+ </button>
+
+ </div>
+ </div>
+
+</div>
+
+ ./edit-menu.component.css
+
.background {
+ height: 100vh;
+ width: 100vw;
+ background-color: #3D484B;
+ display: flex;
+
+ align-items: center;
+ flex-direction: column;
+
+
+}
+
+
+.nav-class {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1px solid #8D8D8D;
+
+}
+
+.btn-cont {
+ color: #333333;
+ height: 20pt;
+ width: 20pt;
+ margin-left: 4%;
+}
+
+.input-box {
+ margin-top: 4%;
+ width: 86%;
+ height: 70pt;
+
+}
+
+.input-box-1 {
+ margin-top: 4%;
+ width: 86%;
+ height: 30pt;
+ display: flex;
+ margin-left: 1%;
+
+
+}
+
+#input-id {
+ margin-bottom: 5%;
+}
+
+.icon-box {
+ background-color: white;
+ height: 27pt;
+ width: 13%;
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+ margin-top: 0.5%;
+}
+
+.menu-class {
+ width: 95%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 5%;
+ font-size: 12pt;
+ margin-bottom: -6.5%;
+ margin-top: -1.2%;
+}
+
+.shift {
+ margin-left: 6.5%;
+}
+
+.checkbox {
+ height: 20pt;
+ width: 15pt;
+}
+
+
+.btn-class {
+ position: relative;
+ top: 29%;
+ left: 4%;
+ font-size: 11.5pt;
+}
+
+#box-3 #box-3-img {
+ background-color: #FDF6EC;
+}
+
+#box-4 #box-4-img {
+ background-color: #ffc5c4;
+}
+
+#box-5 #box-5-img {
+ background-color: #FFC5C4;
+}
+
+#box-6 #box-6-img {
+ background-color: #ffe17d9d;
+}
+
+#box-7 #box-7-img {
+ background-color: #fafafa;
+}
+#box-8 #box-8-img {
+ background-color: #fafafa;
+}
+
+
+
+.zeroClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.boxClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10pt;
+}
+
+.fa-lg {
+ filter: invert(100%);
+}
+ +
+ src/app/user/edit-profile/edit-profile.component.ts
+
+
+ OnInit
+
selector | +app-edit-profile |
+
styleUrls | +./edit-profile.component.css |
+
templateUrl | +./edit-profile.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+ + | +
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + ngOnInit + + + | +
+ngOnInit()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + update + + + | +
+update()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + alertMsg + + + | +
+ Type : string
+
+ |
+
+ Default value : 'Please Wait! Under Process'
+ |
+
+ + | +
+ + + AlertType + + + | +
+ Type : string
+
+ |
+
+ Default value : 'success'
+ |
+
+ + | +
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + email + + + | +
+ Default value : new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ])
+ |
+
+ + | +
+ + + EmployeeId + + + | +
+ Default value : new FormControl(this.auth.user$.getValue()?.EmpId, [
+ Validators.required,
+ ])
+ |
+
+ + | +
+ + + id + + + | +
+ Type : number | undefined
+
+ |
+
+ Default value : -1
+ |
+
+ + | +
+ + + inputDisable + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + isDisable + + + | +
+ Default value : false
+ |
+
+ + | +
+ + + organization + + + | +
+ Default value : new FormControl('', [Validators.required])
+ |
+
+ + | +
+ + + OrgList + + + | +
+ Type : any[]
+
+ |
+
+ Default value : []
+ |
+
+ + | +
+ + + profession + + + | +
+ Default value : new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ])
+ |
+
+ + | +
+ + + showAlert + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
+ + | +
+ + + user + + + | +
+ Type : ICurrentUser | null
+
+ |
+
+ Default value : null
+ |
+
+ + | +
+ + + username + + + | +
+ Default value : new FormControl(this.auth.user$.getValue()?.username, [
+ Validators.required,
+ Validators.minLength(3),
+ ])
+ |
+
+ + | +
import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { map } from 'rxjs';
+import ICurrentUser from 'src/app/models/currentUser.modal';
+import { AuthService } from 'src/app/services/auth.service';
+import { UserService } from 'src/app/services/user.service';
+import { SetDisabledStateOption } from '@angular/forms';
+
+@Component({
+ selector: 'app-edit-profile',
+ templateUrl: './edit-profile.component.html',
+ styleUrls: ['./edit-profile.component.css'],
+})
+export class EditProfileComponent implements OnInit {
+ user: ICurrentUser | null = null;
+ backArrow = faArrowLeft;
+ AlertType = 'success';
+ showAlert: boolean = false;
+ isDisable = false;
+ inputDisable= false;
+ alertMsg = 'Please Wait! Under Process';
+ id: number | undefined = -1;
+
+ OrgList: any[] = [];
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+ ngOnInit(): void {
+ this.auth.user$
+ .pipe(
+ map((val: any) => {
+ console.log(val.id);
+
+ this.id = val.id;
+ })
+ )
+ .subscribe();
+ this.auth.getCurrentUser().subscribe((val) => {
+ this.auth.user$.next(val);
+ this.username.setValue(this.auth.user$.getValue()?.username);
+ this.email.setValue(this.auth.user$.getValue()?.email);
+
+ this.EmployeeId.setValue(this.auth.user$.getValue()?.EmpId);
+ });
+ this.userService.getOrganization();
+ console.log(this.userService.Organization);
+ this.OrgList = this.userService.Organization;
+ }
+
+ username = new FormControl(this.auth.user$.getValue()?.username, [
+ Validators.required,
+ Validators.minLength(3),
+ ]);
+ email = new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ]);
+
+ organization = new FormControl('', [Validators.required]);
+ EmployeeId = new FormControl(this.auth.user$.getValue()?.EmpId, [
+ Validators.required,
+ ]);
+ profession = new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ]);
+
+ EditForm = new FormGroup({
+ username: this.username,
+ email: this.email,
+ organization: this.organization,
+ EmployeeId: this.EmployeeId,
+ });
+
+ update() {
+ this.AlertType = 'alert';
+ this.showAlert = true;
+
+ this.auth
+ .update(this.EditForm, this.id!)
+
+ .subscribe({
+ next: () => {
+ this.AlertType = 'success';
+ this.showAlert = true;
+ this.alertMsg = 'Account Created';
+ this.auth.isAuthenticated();
+ },
+
+ error: (e) => {
+ this.AlertType = 'error';
+ this.showAlert = true;
+ this.alertMsg = e.error.error.message;
+ },
+ });
+
+ return;
+ }
+
+}
+
+ <!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
+
+<!-- Auth Modal -->
+
+<!-- <div class="self-end m-1 mr-5">
+ 2nd div class class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
+ <button
+ type="button"
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="auth.backbutton()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+ </div> -->
+<!-- <ul class="flex flex-wrap">
+ <li class="flex-auto text-center">
+ <a
+ class="block rounded py-3 px-4 mx-2 transition hover:text-white text-white bg-cyan-400"
+ routerLink="/changePassword"
+ >Change Password</a
+ >
+ </li>
+ <li class="flex-auto text-center">
+ <a
+ class="block rounded py-3 px-4 transition hover:text-white text-white bg-cyan-400"
+ routerLink="/forgotPassword"
+ >Forgot Password</a
+ >
+ </li>
+ </ul>
+
+<!-- rounded tab shadow -->
+<!-- <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ >
+ Add margin if you want to see some of the overlay behind the modal
+ <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Edit Profile</p>
+ Title
+ <div class="flex justify-between items-center pb-4">
+ Modal Close Button
+ </div>
+
+ <form [formGroup]="EditForm">
+ Name
+ <div class="mb-3">
+ <label class="inline-block mb-2">Name</label>
+ <app-input [control]="username" placeholder="Enter Name">
+ </app-input>
+ </div>
+ Email
+ <div class="mb-3">
+ <label class="inline-block mb-2">Email</label>
+ <app-input [control]="email" placeholder="Enter Email"> </app-input>
+ </div>
+
+ <div class="mb-3">
+ <label class="inline-block mb-2">Organization</label>
+ <select
+ name="Organization"
+ id=""
+ class="form-select-lg mb-3 block w-full px-3 py-1.5 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-400 transition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
+ >
+ <option disabled selected value="Select Organiztion">
+ Select Organiztion
+ </option>
+ <option *ngFor="let m of OrgList">
+ {{ m.attributes.OrgName }}
+ </option>
+ <option value="New Vision">Core Card</option>
+ <option value="New Vision">GTS</option>
+ </select>
+ </div>
+ Employee Id
+ <div class="mb-3">
+ <label class="inline-block mb-2">Employee Id</label>
+ <app-input
+ [control]="EmployeeId"
+ type="text"
+ placeholder="Enter Employee Id"
+ >
+ </app-input>
+ </div>
+
+ <button
+ (click)="update()"
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500"
+ >
+ Update
+ </button>
+ </form>
+ </div>
+ </div> -->
+
+
+
+<div class="w-[100%] sm:h-[100vh] md:h-[105vh] flex flex-col items-center justify-center bg-[#3D484B]">
+ <nav
+ class="w-[100%] h-[40pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]"
+ >
+ <div class="sm:h-[20pt] sm:w-[30pt] sm:ml-[-3%] md:h-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%] flex justify-between items-center">
+ <h3 class="text-[17pt] text-[#FFFFFF] font-roboto-black">Edit Profile</h3>
+ </div>
+ </nav>
+
+ <div class="h-[70pt] w-[70pt] mt-[3%] flex relative">
+ <img
+ src="../../../assets/img/userEditprofile.svg"
+ alt="user"
+ height="100%"
+ width="100%"
+ />
+ <img
+ src="../../../assets/img/editProfil icon.svg"
+ alt=""
+ height="27pt"
+ width="27pt"
+ class="absolute bottom-[0.2rem] right-[0.3rem]"
+ />
+ </div>
+
+ <form
+ [formGroup]="EditForm"
+ class="mt-[-0.5rem] w-[100%] sm:mb-[5%] sm:h-[100%] md:h-[105vh] p-[1.5rem] flex flex-col items-center"
+ >
+ <!-- Employee Id -->
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-[2rem]"
+ >Employee Id</label
+ >
+ <app-input
+ [control]="EmployeeId"
+ [inputDisable]="true"
+ [isEnabled]="false"
+
+ class="text-Greyess text-[14pt] bg-lightGreys w-[100%] sm:h-[40pt] md:h-[60pt] rounded-[4pt]"
+ type="text"
+ placeholder="Enter Employee Id"
+ ></app-input>
+ </div>
+ <!-- Name -->
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Name</label
+ >
+ <app-input
+
+ [control]="username"
+ [inputDisable]="false"
+ [isEnabled]="true"
+
+
+
+ class="text-Greyess text-[14pt] bg-lightGreys sm:h-[40pt] md:h-[50pt] w-[100%] rounded-[4pt]"
+ placeholder="Enter Name"
+ >
+ </app-input>
+ </div>
+ <!-- Email -->
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Email</label
+ >
+ <app-input
+ [control]="email"
+ [inputDisable]="true"
+ [isEnabled]="false"
+ class="text-black text-[14pt] bg-lightGreys w-[307pt] h-[40pt] rounded-[4pt]"
+ placeholder="Enter Email"
+ >
+ </app-input>
+ </div>
+
+ <div class="flex flex-col sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label class="sm:text-[13pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular">Organization</label>
+ <select name="Organization" disabled="isDisable" class="w-[100%] h-[30pt] bg-[#2D373A] text-[#BBBBBB] border-2 border-[#2D373A] rounded-[4pt] bg-white">
+ <option selected value="Select Organization" class=" text-[14pt] w-[60%] text-[#BBBBBB] rounded-[4pt] bg-white" >
+ Select Organization
+ </option>
+ <option *ngFor="let m of OrgList" class="text-Greyess text-[14pt] bg-white w-[90%]">
+ {{ m.attributes.OrgName }}
+ </option>
+ <option value="New Vision" class="text-Greyess text-[14pt] bg-white overflow-hidden">
+ Core Card
+ </option>
+ <option
+ value="New Vision"
+ class="text-Greyess text-[14pt] bg-white overflow-hidden"
+ >
+ GTS
+ </option>
+ </select>
+ </div>
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Profession</label
+ >
+ <app-input
+ [control]="profession"
+ [inputDisable]="false"
+
+
+ class="text-Greyess text-[14pt] bg-white sm:h-[40pt] md:h-[50pt] w-[100%] rounded-[4pt]"
+ placeholder="Enter Name"
+ >
+ </app-input>
+ </div>
+ <button
+ (click)="update()"
+ type="submit"
+ class="sm:h-[3rem] md:h-[4rem] sm:w-[95%] md:w-[90%] bg-orangess rounded-[4pt] sm:text-[15pt] md:text-[17pt] font-roboto-black text-white sm:mt-[20%] md:mt-[18%]"
+ >
+ Save
+ </button>
+ </form>
+</div>
+
+
+ ./edit-profile.component.css
+
.fa-lg{
+ filter: invert(100%);
+}
+
+.enabled {
+ background-color: white;
+ }
+ +
+ src/app/feedback/feedback.component.ts
+
+
+ OnInit
+
selector | +app-feedback |
+
styleUrls | +./feedback.component.css |
+
templateUrl | +./feedback.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, fb: FormBuilder, router: Router)
+ |
+ ||||||||||||
+ Defined in src/app/feedback/feedback.component.ts:19
+ |
+ ||||||||||||
+
+ Parameters :
+
+
|
+
+ + + feedback + + + | +
+feedback()
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:37
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + initializeForm + + + | +
+initializeForm()
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:30
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + ngOnInit + + + | +
+ngOnInit()
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:26
+ |
+
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:21
+ |
+
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:19
+ |
+
+ + + registerForm + + + | +
+ Type : FormGroup
+
+ |
+
+ Default value : new FormGroup({})
+ |
+
+ Defined in src/app/feedback/feedback.component.ts:18
+ |
+
import { Component, OnInit } from '@angular/core';
+import {
+ FormBuilder,
+ FormControl,
+ FormGroup,
+ Validators,
+} from '@angular/forms';
+import { Router } from '@angular/router';
+import { AuthService } from '../services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+
+@Component({
+ selector: 'app-feedback',
+ templateUrl: './feedback.component.html',
+ styleUrls: ['./feedback.component.css'],
+})
+export class FeedbackComponent implements OnInit {
+ registerForm: FormGroup = new FormGroup({});
+ backArrow = faArrowLeft;
+ constructor(
+ public auth: AuthService,
+ private fb: FormBuilder,
+ private router: Router
+ ) {}
+
+ ngOnInit(): void {
+ this.initializeForm();
+ }
+
+ initializeForm() {
+ this.registerForm = this.fb.group({
+ email: ['', Validators.required],
+ subject: ['', Validators.required],
+ });
+ }
+
+ feedback() {
+ const values = { ...this.registerForm.value };
+ this.auth.feedback(values).subscribe({
+ next: () => {
+ this.router.navigateByUrl('/members');
+ },
+ error: () => {
+ console.log('error');
+ },
+ });
+ }
+}
+
+ <!-- <br />
+<br />
+<br /> -->
+<!-- <section class="bg-white dark:bg-gray-900">
+ <div class="py-8 lg:py-16 px-4 mx-auto max-w-screen-md pt-10">
+ <h2
+ class="md:mb-4 text-4xl tracking-tight font-extrabold text-center text-gray-900 dark:text-white"
+ >
+ Feedback
+ </h2>
+ <p
+ class="mb-8 lg:mb-16 font-light text-center text-gray-500 dark:text-gray-400 sm:text-xl"
+ >
+ If you have any issue regarding Foods and Canteen management, Let us know.
+ </p>
+ <form action="#" class="space-y-8">
+ <div>
+ <label
+ for="email"
+ class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
+ >Your email</label
+ >
+ <input
+ type="email"
+ id="email"
+ class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light"
+ placeholder="name@flowbite.com"
+ required
+ />
+ </div>
+ <div>
+ <label
+ for="subject"
+ class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
+ >Issue</label
+ >
+ <input
+ type="text"
+ id="subject"
+ class="block p-3 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:shadow-sm-light"
+ placeholder="Let us know how we can help you"
+ required
+ />
+ </div>
+ <div class="sm:col-span-2">
+ <label
+ for="message"
+ class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-400"
+ >Your message</label
+ >
+ <textarea
+ id="message"
+ rows="6"
+ class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg shadow-sm border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
+ placeholder="Leave a comment..."
+ ></textarea>
+ </div>
+ <button
+ class="hover:shadow-form rounded-md bg-[#6A64F1] py-3 px-8 text-center text-base font-semibold text-white outline-none"
+ >
+ Send Feedback
+ </button>
+ </form>
+ </div>
+</section> -->
+
+
+
+<div class="w-[100%] md:h-[100%] sm:h-[100vh] flex flex-col items-center bg-[#3D484B]">
+
+ <nav class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="text-blackes h-[18pt] w-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%]">
+ <h3 class="sm:text-[16pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Feedback</h3>
+ </div>
+ </nav>
+
+ <form action="#" class="w-[95%] sm:p-[4%] flex flex-col items-center mt-[3%] md:h-[100vh] mb-[20%]">
+ <div class="w-[95%] sm:mt-[-2%]">
+ <label for="subject" class="text-[13pt] text-[#D4D4D4] font-roboto-regular">Issue <span class="text-[#FF2F2F]">*</span> </label>
+ <!-- <input type="text" id="subject" class="p-3 w-[100%] sm:mt-[2%] sm:mb-[3%] sm:text-[14pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[30pt] border-2 border-greyss " required/> -->
+
+ <select id="subject" class="p-0 w-[100%] sm:mt-[2%] sm:mb-[3%] sm:text-[14pt] md:text-[11pt] text-Greyess outline-none rounded-[4pt] h-[30pt] border-2 border-greyss " required>
+ <option value="" disabled selected>Select an option</option>
+ <option value="option1">Food</option>
+ <option value="option2">Technical glitch</option>
+ <option value="option3">Staff misconduct</option>
+ <option value="option4">Hygiene</option>
+ </select>
+ </div>
+ <div class="w-[95%] mt-[0.5rem]">
+ <label for="message" class="mb-2 text-[13pt] font-roboto-regular text-[#D4D4D4] ">Message <span class="text-[#FF2F2F]">*</span></label>
+ <!-- <textarea id="message" rows="12"
+ class="feedback-class block outline-none sm:mt-[2%] p-[0.5rem] w-[100%] text-Greyess sm:text-[13pt] rounded-[4pt] shadow-sm border-2 border-greyss focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="Leave a comment...">
+ </textarea> -->
+ <textarea id="message" rows="12"
+ class="block feedback-class outline-none sm:mt-[2%] p-[0.5rem] w-[100%] text-Greyess sm:text-[13pt] rounded-[4pt] shadow-sm border-2 border-greyss focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 " placeholder="Leave a comment..."></textarea>
+ <div class="sm:mt-[2%] text-right">
+ <span class="text-[#D4D4D4] text-[11pt] ">500 Characters</span>
+ </div>
+ </div>
+ <button class="mt-[30%] sm:h-[35pt] sm:w-[95%] xsm:h-[40pt] md:h-[4rem] md:w-[90%] rounded-[4pt] bg-orangess flex justify-center items-center font-roboto-regular text-white outline-none">
+ Send Feedback
+ </button>
+ </form>
+
+</div>
+
+
+ ./feedback.component.css
+
.fa-lg{
+ filter: invert(100%);
+}
+
+.feedback-class{
+ text-indent: 0px;
+}
+ +
+ src/app/feedback-history/feedback-history.component.ts
+
+
+ OnInit
+
selector | +app-feedback-history |
+
styleUrls | +./feedback-history.component.css |
+
templateUrl | +./feedback-history.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, fb: FormBuilder, router: Router)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + feedback + + + | +
+feedback()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + initializeForm + + + | +
+initializeForm()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + ngOnInit + + + | +
+ngOnInit()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + registerForm + + + | +
+ Type : FormGroup
+
+ |
+
+ Default value : new FormGroup({})
+ |
+
+ + | +
import { Component, OnInit } from '@angular/core';
+import {
+ FormBuilder,
+ FormControl,
+ FormGroup,
+ Validators,
+} from '@angular/forms';
+import { Router } from '@angular/router';
+import { AuthService } from '../services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+
+@Component({
+ selector: 'app-feedback-history',
+ templateUrl: './feedback-history.component.html',
+ styleUrls: ['./feedback-history.component.css'],
+})
+export class FeedbackHistoryComponent implements OnInit {
+ registerForm: FormGroup = new FormGroup({});
+ backArrow = faArrowLeft;
+ constructor(
+ public auth: AuthService,
+ private fb: FormBuilder,
+ private router: Router
+ ) {}
+
+ ngOnInit(): void {
+ this.initializeForm();
+ }
+
+ initializeForm() {
+ this.registerForm = this.fb.group({
+ email: ['', Validators.required],
+ subject: ['', Validators.required],
+ });
+ }
+
+ feedback() {
+ const values = { ...this.registerForm.value };
+ this.auth.feedback(values).subscribe({
+ next: () => {
+ this.router.navigateByUrl('/members');
+ },
+ error: () => {
+ console.log('error');
+ },
+ });
+ }
+}
+
+ <div class="w-[100%] md:h-[100%] sm:h-[100vh] flex flex-col items-center bg-[#3D484B]">
+
+ <nav class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="text-blackes h-[18pt] w-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%]">
+ <h3 class="sm:text-[16pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Feedback</h3>
+ </div>
+ </nav>
+
+ <form action="#" class="w-[95%] sm:p-[4%] flex flex-col items-center mt-[3%] md:h-[100vh] mb-[20%]">
+ <!-- <div class="w-[95%] sm:mt-[-2%]">
+ <label for="subject" class="text-[13pt] text-[#D4D4D4] font-roboto-regular">Subject <span class="text-[#FF2F2F]">*</span> </label>
+
+
+ <select id="subject" class="p-0 w-[100%] sm:mt-[2%] sm:mb-[3%] sm:text-[14pt] md:text-[11pt] text-Greyess outline-none rounded-[4pt] h-[30pt] border-2 border-greyss " required>
+ <option value="" disabled selected>Select an option</option>
+ <option value="option1">Food</option>
+ <option value="option2">Technical glitch</option>
+ <option value="option3">Staff misconduct</option>
+ <option value="option4">Hygiene</option>
+ </select>
+ </div> -->
+ <!-- <div class="w-[95%] mt-[0.5rem]">
+ <label for="message" class="mb-2 text-[13pt] font-roboto-regular text-[#D4D4D4] ">Message <span class="text-[#FF2F2F]">*</span></label>
+
+ <textarea id="message" rows="12"
+ class="block feedback-class outline-none sm:mt-[2%] p-[0.5rem] w-[100%] text-Greyess sm:text-[13pt] rounded-[4pt] shadow-sm border-2 border-greyss focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 " placeholder="Leave a comment..."></textarea>
+ <div class="sm:mt-[2%] text-right">
+ <span class="text-[#D4D4D4] text-[11pt] ">500 Characters</span>
+ </div>
+ </div> -->
+ <!-- <button class="mt-[30%] sm:h-[35pt] sm:w-[95%] xsm:h-[40pt] md:h-[4rem] md:w-[90%] rounded-[4pt] bg-orangess flex justify-center items-center font-roboto-regular text-white outline-none">
+ Send Feedback
+ </button> -->
+ <div class="feedback-history">
+ <h3 class="page-title">Feedback History</h3>
+
+ <div class="feedback-list">
+ <div class="feedback-item">
+ <div class="feedback-header">
+ <h4 class="subject">Subject: Food</h4>
+ </div>
+ <div class="feedback-body">
+ <p class="message">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor
+ sapien ut mi consequat, at tincidunt mauris hendrerit. Duis eu
+ imperdiet nulla. Donec convallis purus sit amet orci tristique
+ laoreet. Morbi sit amet ex in elit semper pellentesque. Donec non
+ gravida ligula. Donec sodales consectetur enim vel blandit.
+ </p>
+ </div>
+ <div class="feedback-reply">
+ <h4 class="reply-author">Reply from Admin:</h4>
+ <p class="reply-message">
+ Thank you for your feedback. We apologize for any inconvenience
+ caused. We are working on improving our food quality.
+ </p>
+ </div>
+ </div>
+
+ <!-- Add more feedback items here -->
+ </div>
+ <div class="show-more-container flex justify-start mt-8">
+ <button class="mt-[30%] sm:h-[35pt] sm:w-[95%] xsm:h-[40pt] md:h-[4rem] md:w-[90%] rounded-[4pt] bg-orangess flex justify-center items-center font-roboto-regular px-4 py-2 text-base font-bold rounded">Show More</button>
+ </div>
+ </div>
+ </form>
+
+ </div>
+
+
+ ./feedback-history.component.css
+
.fa-lg{
+ filter: invert(100%);
+}
+
+.feedback-class{
+ text-indent: 0px;
+}
+.feedback-history {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background-color: #3D484B;
+ padding: 2rem;
+ color: #FFFFFF;
+ }
+
+ .page-title {
+ font-size: 22pt;
+ font-weight: bold;
+ }
+
+ .feedback-list {
+ width: 95%;
+ margin-top: 3%;
+ }
+
+ .feedback-item {
+ margin-bottom: 2rem;
+ background-color: #3D484B;
+ border: 1px solid grey;
+ padding: 1.8rem;
+ }
+
+ .feedback-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .subject {
+ font-size: 13pt;
+ color: #D4D4D4;
+ font-weight: bold;
+ }
+
+ .message {
+ font-size: 13pt;
+ color: #D4D4D4;
+ margin-top: 0.5rem;
+ }
+
+ .feedback-reply {
+ margin-top: 1rem;
+ }
+
+ .reply-author {
+ font-size: 13pt;
+ color: #D4D4D4;
+ font-weight: bold;
+ }
+
+ .reply-message {
+ font-size: 13pt;
+ color: #D4D4D4;
+ margin-top: 0.5rem;
+ }
+
+ +
@@ -74,12 +79,12 @@
- OnInit
- OnDestroy
+ OnInit
+ OnDestroy
selector | app-food-card |
styleUrls | ./food-card.component.css |
@@ -122,7 +130,7 @@
-constructor(card: FoodService, el: ElementRef)
+constructor(card: FoodService, el: ElementRef)
|
||
el |
- ElementRef
+ ElementRef
|
@@ -253,7 +261,7 @@ Constructor |
ElementRef
+ Type : ElementRef
import { Component, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';
import { FoodService } from 'src/app/services/food.service';
@@ -495,35 +503,40 @@
@Input() cardId = '';
@Input() imgUrl = 'https://ionicframework.com/docs/img/demos/thumbnail.svg';
- @Input() category : number = -1;
+ @Input() category: number = -1;
ngOnInit(): void {
- this.card.register(this.cardId,this.category);
+ this.card.register(this.cardId, this.category);
}
ngOnDestroy(): void {
- // this.card.unregister(this.cardId);
+ this.card.unregister(this.cardId, this.category);
}
}
<div class="carousel-inner relative w-full overflow-hidden rounded-lg">
- <img [src]="imgUrl" class="rounded-lg w-full" alt="Wild Landscape" />
+ <img
+ [src]="imgUrl"
+ class="rounded-lg w-full h-64 object-cover"
+ alt="Wild Landscape"
+ />
</div>
-
./food-card.component.css
+ .carousel{ position: relative;
+
+}
+
+ src/app/admin-dashboard/food-inventory/food-inventory.component.ts
+
selector | +app-food-inventory |
+
styleUrls | +./food-inventory.component.css |
+
templateUrl | +./food-inventory.component.html |
+
+ Properties+ |
+
+ + | +
+ Methods+ |
+
+
|
+
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+ Parameters :
+
+
|
+
+ + + passwordHide + + + | +
+passwordHide()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + magbutton + + + | +
+ Default value : faMagnifyingGlass
+ |
+
+ + | +
+ + + show + + + | +
+ Type : boolean
+
+ |
+
+ Default value : true
+ |
+
+ + | +
import { Component, OnInit } from '@angular/core';
+import { faEdit, faPlus, faTrash } from '@fortawesome/free-solid-svg-icons';
+import { map } from 'rxjs';
+import { FoodInventoryServiceService } from 'src/app/services/food-inventory-service.service';
+import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+
+
+import Swal from 'sweetalert2';
+@Component({
+ selector: 'app-food-inventory',
+ templateUrl: './food-inventory.component.html',
+ styleUrls: ['./food-inventory.component.css'],
+})
+export class FoodInventoryComponent {
+
+ backArrow = faArrowLeft;
+ show: boolean=true;
+ passwordHide(){
+ this.show=!this.show
+ }
+
+ constructor(public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService) {
+ }
+
+ magbutton = faMagnifyingGlass;
+
+
+
+}
+
+
+ <div class="w-[100%] sm:h-[100%] md:h-[105vh] flex flex-col items-center bg-[#3D484B]">
+ <nav class="w-[100%] h-[40pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="sm:h-[18pt] sm:w-[18pt] md:h-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%] flex justify-between items-center">
+ <h3 class="text-[14pt] text-[#FFFFFF] font-roboto-black">Manage Inventory</h3>
+ </div>
+ </nav>
+ <div class="h-[100%] w-[100%] flex items-center flex-col p-1">
+
+ <div class="menu-class">
+ <div class="text-[white] font-roboto-black ">
+ <h4>Menu</h4>
+ </div>
+ <div class="font-roboto-black text-orangess">
+ <a [routerLink]="['/addFood']">+Add Item</a>
+ </div>
+ </div>
+ <div class="input-box-1">
+ <div class="icon-box">
+ <fa-icon class="fa fa-sm btn-class" [icon]="magbutton"> </fa-icon>
+ </div>
+ <div class="w-[100%] h-[100%]">
+ <input type="text" placeholder="Search For Food Item" id="title"
+ class=" p-3 bg-[white] h-[100%] w-[100%] sm:text-[11pt] md:text-[13pt] text-Greyess outline-none rounded-[4pt] h-[40pt] border-2 border-[#606161] " />
+ </div>
+ </div>
+ </div>
+
+ <!-- menu part -->
+ <div class="foodClass">
+
+ <div id="box-6" class="zeroClass sm:mt-[7%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-6-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3154.png" height="90%" width="90%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Aloo Gobhi Sabji
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹10</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ <div id="box-5" class="zeroClass sm:mt-[3%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-5-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3145.png" height="90%" width="90%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Raita
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹10</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ <div id="box-8" class="zeroClass sm:mt-[3%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-8-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3150.png" height="90%" width="90%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Dal Fry
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹10</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ <div id="box-7" class="zeroClass sm:mt-[3%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-7-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3152.png" height="75%" width="75%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Salad
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹10</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ <div id="box-3" class="zeroClass sm:mt-[3%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-3-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3129.png" height="90%" width="90%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Chapati
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹20</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ <div id="box-4" class="zeroClass sm:mt-[3%] sm:ml-[0pt] xsm:ml-[79pt]">
+
+ <div id="box-4-img"
+ class="boxClass md:ml-[1.5rem] sm:h-[40pt] sm:w-[40pt] xsm:h-[32pt] xsm:w-[32pt] xsm:p-[2pt] md:h-[55pt] md:w-[55pt] ">
+ <img src="../../../assets/img/Group 3146.svg" height="90%" width="90%">
+ </div>
+ <div
+ class="sm:w-[200pt] xsm:w-[130pt] md:w-[330pt] sm:h-[30pt] sm:leading-[16pt] md:leading-[22pt] sm:ml-[0.8rem] xsm:ml-[0.6rem]">
+ <p class="font-roboto-black text-[#FFFFFF] sm:text-[13.5pt] md:text-[20pt] xsm:text-[10pt] ml-[0.8rem]">
+ Rice
+ </p>
+ <p class="sm:text-[12.5pt] xsm:text-[10pt] md:text-[16pt] ml-[0.8rem] font-roboto-regular text-[#D4D4D4]">
+ ₹30</p>
+ </div>
+ <div class="sm:h-[3pt] sm:w-[4pt] xsm:h-[2pt] xsm:w-[3pt]"><img src="../../../assets/img/ellipsisLatest.svg"
+ height="90%" width="90%">
+ </div>
+ </div>
+ </div>
+
+</div>
+
+ ./food-inventory.component.css
+
.background {
+ height: 100vh;
+ width: 100vw;
+ background-color: #3D484B;
+ display: flex;
+
+ align-items: center;
+ flex-direction: column;
+
+
+}
+
+
+.nav-class {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1px solid #8D8D8D;
+
+}
+
+.btn-cont {
+ color: #333333;
+ height: 20pt;
+ width: 20pt;
+ margin-left: 4%;
+}
+
+.input-box {
+ margin-top: 4%;
+ width: 86%;
+ height: 70pt;
+
+}
+
+.input-box-1 {
+ margin-top: 4%;
+ width: 86%;
+ height: 30pt;
+ display: flex;
+ margin-left: 1%;
+
+
+}
+
+#input-id {
+ margin-bottom: 5%;
+}
+
+.icon-box {
+ background-color: white;
+ height: 27pt;
+ width: 13%;
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+ margin-top: 0.7%;
+}
+
+.menu-class {
+ width: 95%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 5%;
+ font-size: 12pt;
+ margin-bottom: -6.5%;
+ margin-top: 3%;
+}
+
+.shift {
+ margin-left: 6.5%;
+}
+
+.checkbox {
+ height: 20pt;
+ width: 15pt;
+}
+
+
+.btn-class {
+ position: relative;
+ top: 29%;
+ left: 4%;
+ font-size: 11.5pt;
+}
+
+#box-3 #box-3-img {
+ background-color: #FDF6EC;
+}
+
+#box-4 #box-4-img {
+ background-color: #FFC5C4;
+}
+
+#box-5 #box-5-img {
+ background-color: #fafafa;
+}
+
+#box-6 #box-6-img {
+ background-color: #fafafa;
+}
+
+#box-7 #box-7-img {
+ background-color: #fafafa;
+}
+#box-8 #box-8-img {
+ background-color: #fafafa;
+}
+
+
+
+.zeroClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+}
+
+.boxClass {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10pt;
+
+}
+
+.foodClass{
+ width: 100%;
+ height: 75vh;
+ display: flex;
+ flex-direction: column;
+
+
+
+}
+
+.fa-lg {
+ filter: invert(100%);
+}
+ +
+ src/app/dashboard/food-post/food-post.component.ts
+
+
+ OnInit
+
selector | +app-food-post |
+
styleUrls | +./food-post.component.css |
+
templateUrl | +./food-post.component.html |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+ + | +
+constructor(auth: AuthService, food: FoodService, activatedroute: ActivatedRoute, router: Router)
+ |
+ |||||||||||||||
+ + | +|||||||||||||||
+
+ Parameters :
+
+
|
+
+ + + ngOnInit + + + | +
+ngOnInit()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + saveFood + + + | +
+saveFood()
+ |
+
+ + | +
+
+
+ Returns :
+ void
+
+ |
+
+ + + Public + activatedroute + + + | +
+ Type : ActivatedRoute
+
+ |
+
+ + | +
+ + + Public + auth + + + | +
+ Type : AuthService
+
+ |
+
+ + | +
+ + + backArrow + + + | +
+ Default value : faArrowLeft
+ |
+
+ + | +
+ + + date + + + | +
+ Default value : new FormControl(this.food.formatDate(this.date1), [
+ Validators.required,
+ ])
+ |
+
+ + | +
+ + + date1 + + + | +
+ Type : Date
+
+ |
+
+ Default value : new Date()
+ |
+
+ + | +
+ + + Public + food + + + | +
+ Type : FoodService
+
+ |
+
+ + | +
+ + + food1 + + + | +
+ Type : IFoodItem
+
+ |
+
+ + | +
+ + + foodForm + + + | +
+ Default value : new FormGroup({
+ foodname: this.foodname,
+ date: this.date,
+ price: this.price,
+ })
+ |
+
+ + | +
+ + + fooditem + + + | +
+ Type : any[]
+
+ |
+
+ Default value : this.food.fooditem
+ |
+
+ + | +
+ + + foodItems + + + | +
+ Type : IFoodItem
+
+ |
+
+ Default value : {
+ FoodName: this.foodForm.value.foodname!,
+ price: this.foodForm.value.price!,
+ date: this.foodForm.value.date!,
+ }
+ |
+
+ + | +
+ + + foodname + + + | +
+ Default value : new FormControl([''], [Validators.required, Validators.min(10)])
+ |
+
+ + | +
+ + + price + + + | +
+ Default value : new FormControl('', [Validators.required])
+ |
+
+ + | +
+ + + Public + router + + + | +
+ Type : Router
+
+ |
+
+ + | +
+ + + routeState + + + | +
+ Type : any
+
+ |
+
+ + | +
+ + + selectedCity + + + | +
+ Type : any
+
+ |
+
+ + | +
+ + + selectedCityId + + + | +
+ Type : number | undefined
+
+ |
+
+ + | +
+ + + selectedCityIds + + + | +
+ Type : string[] | undefined
+
+ |
+
+ + | +
+ + + selectedUserIds + + + | +
+ Type : string[] | undefined
+
+ |
+
+ + | +
import { Component, OnInit } from '@angular/core';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+import { FoodService } from 'src/app/services/food.service';
+import { ActivatedRoute, Router } from '@angular/router';
+import IFoodItem from 'src/app/models/food.model';
+
+@Component({
+ selector: 'app-food-post',
+ templateUrl: './food-post.component.html',
+ styleUrls: ['./food-post.component.css'],
+})
+export class FoodPostComponent implements OnInit {
+ routeState: any;
+ food1!: IFoodItem;
+ date1: Date = new Date();
+ fooditem: any[] = this.food.fooditem;
+
+ constructor(
+ public auth: AuthService,
+ public food: FoodService,
+ public activatedroute: ActivatedRoute,
+ public router: Router
+ ) {
+ if (this.router.getCurrentNavigation()?.extras.state) {
+ this.routeState = this.router.getCurrentNavigation()?.extras.state;
+
+ console.log(this.routeState);
+ }
+
+ if (this.routeState.selectedDay) {
+ this.date1 = new Date();
+ console.log(this.date1);
+ } else {
+ var day = new Date();
+ var nextDay = new Date(day);
+ nextDay.setDate(day.getDate() + 1);
+ this.date1 = nextDay;
+ console.log(this.date1);
+ }
+ }
+
+ ngOnInit(): void {}
+
+ backArrow = faArrowLeft;
+
+ foodname = new FormControl([''], [Validators.required, Validators.min(10)]);
+ date = new FormControl(this.food.formatDate(this.date1), [
+ Validators.required,
+ ]);
+ price = new FormControl('', [Validators.required]);
+
+ foodForm = new FormGroup({
+ foodname: this.foodname,
+ date: this.date,
+ price: this.price,
+ });
+
+ foodItems: IFoodItem = {
+ FoodName: this.foodForm.value.foodname!,
+ price: this.foodForm.value.price!,
+ date: this.foodForm.value.date!,
+ };
+
+ saveFood() {
+ this.food.postFood(this.foodItems).subscribe((response: IFoodItem) => {
+ console.log(response);
+ });
+ }
+
+ selectedCity: any;
+ selectedCityIds: string[] | undefined;
+
+ selectedCityId: number | undefined;
+ selectedUserIds: string[] | undefined;
+}
+
+ <!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+ </app-alert> -->
+
+<!-- Auth Modal -->
+
+<div class="fixed inset-0 overflow-y-auto" id="modal">
+ <div
+ class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
+ >
+ <div class="self-end m-1 mr-5">
+ <button
+ type="button"
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="auth.backbutton()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+ </div>
+
+ <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ >
+ <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Add Food</p>
+
+ <div class="flex justify-between items-center pb-4"></div>
+ <h1 class="">{{ routeState.category }}</h1>
+ <form [formGroup]="foodForm" (ngSubmit)="saveFood()">
+ <div class="mb-3">
+ <label class="inline-block mb-2">Date</label>
+
+ <input
+ class="block w-full px-3 py-1.5 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-400 ransition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
+ type="date"
+ [value]="date.value"
+ [formControl]="date"
+ />
+ <p>{{ date.value }}</p>
+ </div>
+
+ <div class="mb-3 z-50">
+ <label class="inline-block mb-2">Food-Items</label>
+ <ng-select
+ class="block w-full px-3 py-1.5 bg-gray-100 bg-clip-padding bg-no-repeat border border-solid border-gray-400 ransition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
+ [items]="fooditem"
+ bindLabel="FoodName"
+ bindValue="FoodName"
+ [multiple]="true"
+ placeholder="Select items"
+ [(ngModel)]="selectedCityIds"
+ [formControl]="foodname"
+ >
+ </ng-select>
+ </div>
+ <!-- <div class="mb-3">
+ <label class="inline-block mb-2">Price</label>
+ <app-input [control]="price" placeholder="Enter Price"> </app-input>
+ </div> -->
+
+ <button
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500"
+ >
+ Add Food
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+ ./food-post.component.css
+
+
+ +
@@ -72,7 +77,7 @@
selector | app-food-section |
styleUrls | ./food-section.component.css |
@@ -115,7 +123,7 @@
- + | ||
-changeCard(action: string, $event: Event)
+changeCard(action: string, $event: Event)
|
||
- + | ||
$event |
- Event
+ Event
|
@@ -340,7 +348,7 @@ |
import { Component, Input } from '@angular/core';
+
+ import { Component, Input } from '@angular/core';
import { FoodService } from 'src/app/services/food.service';
@Component({
selector: 'app-food-section',
templateUrl: './food-section.component.html',
styleUrls: ['./food-section.component.css'],
})
-export class FoodSectionComponent {
-
+export class FoodSectionComponent {
constructor(public card: FoodService) {}
- @Input() category : number = -1;
- changeCard(action: string,$event: Event) {
-
+ @Input() category: number = -1;
+ changeCard(action: string, $event: Event) {
console.log($event);
-
- this.card.toggleCard(action,this.category)
- $event.preventDefault()
- }
+
+ this.card.toggleCard(action, this.category);
+ $event.preventDefault();
+ }
}
-
+
<div
id="foodsectionCrousel"
class="carousel slide carousel-fade relative mx-2 my-2"
@@ -445,7 +451,7 @@
<button
*ngIf="
(category === 0 && card.BCurrentIndex !== card.Bcards.length - 1) ||
- (category === 1 && card.LCurrentIndex !== card.Bcards.length - 1) ||
+ (category === 1 && card.LCurrentIndex !== card.Lcards.length - 1) ||
(category === 2 && card.HCurrentIndex !== card.Hcards.length - 1)
"
(click)="changeCard('next', $event)"
@@ -477,14 +483,14 @@
-
+
./food-section.component.css
-
+
@@ -509,8 +515,8 @@
diff --git a/documentation/components/FooterComponent.html b/documentation/components/FooterComponent.html
new file mode 100644
index 0000000..472aa06
--- /dev/null
+++ b/documentation/components/FooterComponent.html
@@ -0,0 +1,559 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ FooterComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/shared/footer/footer.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-footer
+
+
+
+
+
+ styleUrls
+ ./footer.component.css
+
+
+
+
+
+ templateUrl
+ ./footer.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(footerService: FooterService)
+
+
+
+
+ Defined in src/app/shared/footer/footer.component.ts:30
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ footerService
+
+
+ FooterService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ isActive
+
+
+
+
+
+
+isActive(section: string)
+
+
+
+
+
+
+ Defined in src/app/shared/footer/footer.component.ts:37
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ section
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setActive
+
+
+
+
+
+
+setActive(section: string)
+
+
+
+
+
+
+ Defined in src/app/shared/footer/footer.component.ts:33
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ section
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import { FooterService } from 'src/app/services/footer.service';
+
+@Component({
+ selector: 'app-footer',
+ templateUrl: './footer.component.html',
+ styleUrls: ['./footer.component.css']
+})
+export class FooterComponent {
+ constructor(private footerService: FooterService) {}
+
+ setActive(section: string): void {
+ this.footerService.setActive(section);
+ }
+
+ isActive(section: string): boolean {
+ return this.footerService.isActive(section);
+ }
+}
+
+
+
+
+
+
+ <!-- <div class="h-[52pt] w-[100%] fixed bottom-[0rem] items-center justify-evenly flex bg-darkesgreys border border-[#CCCCCC] ">
+ <div class="first" class="h-[45pt] flex flex-col items-center w-[70pt] p-[5px]" [routerLink]="'/dashbord-modal'" routerLinkActive="active">
+ <img class="img" src="../../assets/img/Group 4049.svg" height="30pt" width="30pt" alt="" >
+
+ <p class="tracking-wide para text-mediumGreys font-roboto-black text-[12pt] ">Dashboard</p>
+ </div>
+ <div class="second" [ngClass]="{'active': isActive}" class="h-[45pt] flex flex-col items-center w-[70pt] mt-[3%] p-[5px] " [routerLink]="'/Account'" routerLinkActive="active">
+ <img src="../../assets/img/footer-account-icon.svg" height="22pt" width="22pt" alt="" >
+
+ <p class="para-1 text-mediumGreys font-bold text-[13pt] mb-[5%] mt-[3%]">Account</p>
+ </div>
+</div> -->
+
+
+<div class="h-[52pt] w-[100%] fixed bottom-[0rem] items-center justify-evenly flex bg-darkesgreys border border-[#CCCCCC]">
+ <div class="first" [routerLink]="'/'" (click)="setActive('dashboard')" [class.active]="isActive('dashboard')">
+ <img class="img" [src]="isActive('dashboard') ? '../../assets/img/Home-removebg-preview.png' : '../../assets/img/Group 4049.svg'" height="30pt" width="30pt" alt="">
+ <p [class.active]="isActive('dashboard')" [ngClass]="isActive('dashboard') ? 'text-[#FC8019]': 'text-mediumGreys'" class="tracking-wide para text-mediumGreys font-roboto-black text-[13pt] ml-[2%] items-center">Dashboard</p>
+ </div>
+ <div class="second" [routerLink]="'/Account'" (click)="setActive('account')" [class.active]="isActive('account')">
+ <img class="img-1" [src]="isActive('account') ? '../../assets/img/Icon material-account-box.jpg' : '../../assets/img/footer-account-icon.svg'" height="22pt" width="22pt" alt="">
+ <p [class.active]="isActive('account')" [ngClass]="isActive('account') ? 'text-[#FC8019]': 'text-mediumGreys'" class="tracking-wide para-1 text-mediumGreys font-bold text-[13pt] mb-[5%] mt-[3%]">Account</p>
+ </div>
+</div>
+
+
+
+
+
+
+
+
+ ./footer.component.css
+
+ /* div .active{
+background-color: #FC8019;
+}
+
+p .active{
+color: #FC8019;
+background-color: #FC8019;
+} */
+
+
+.active{
+ color: #FC8019;
+}
+
+.img{
+ margin-left: 15%;
+ margin-top: 5%;
+}
+.img-1{
+ margin-left: 32%;
+ margin-top: 15%;
+
+}
+.para{
+ margin-left: -15%;
+ margin-top: 4%;
+
+}
+
+.para-1{
+ margin-left: 2%;
+ margin-top: 7%;
+}
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/ForgetPasswordComponent.html b/documentation/components/ForgetPasswordComponent.html
index ff7b2fa..fc1cf6d 100644
--- a/documentation/components/ForgetPasswordComponent.html
+++ b/documentation/components/ForgetPasswordComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
ForgetPasswordComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-forget-password
+
+
styleUrls
./forget-password.component.css
@@ -115,19 +123,378 @@ Metadata
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+ -
+ backArrow
+
+ -
+ email
+
+ -
+ forgotpasswordForm
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+
+
+
+
+ Outputs
+
+
+
+
+
+ -
+ modalClosed
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(auth: AuthService, router: Router, toastr: ToastrService)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ router
+
+
+ Router
+
+
+
+ No
+
+
+
+
+ toastr
+
+
+ ToastrService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Outputs
+
+
+
+
+
+ modalClosed
+
+
+
+
+ Type : EventEmitter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ close
+
+
+
+
+
+
+close()
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ reset
+
+
+
+
+
+
+reset()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ backArrow
+
+
+
+
+
+
+ Default value : faArrowLeft
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+
+ Default value : new FormControl('', [Validators.required])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ forgotpasswordForm
+
+
+
+
+
+
+ Default value : new FormGroup({
+ email:this.email
+ })
+
+
+
+
+
+
+
+
+
+
+
+
-
- import { Component } from '@angular/core';
+
+ import { Component, Output, EventEmitter } from '@angular/core';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+import { Router } from '@angular/router';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+
+import { ToastrService } from 'ngx-toastr';
+
@Component({
selector: 'app-forget-password',
@@ -135,37 +502,253 @@ Metadata
styleUrls: ['./forget-password.component.css']
})
export class ForgetPasswordComponent {
+ backArrow = faArrowLeft;
+ email = new FormControl('', [Validators.required]);
+ @Output() modalClosed = new EventEmitter<boolean>();
+ forgotpasswordForm = new FormGroup({
+ email:this.email
+ });
+ close() {
+ this.modalClosed.emit(true);
+ }
+
+
+
+
+ constructor(public auth : AuthService, private router: Router,private toastr: ToastrService){}
+// reset(){
+// this.auth.forgotPassword(this.forgotpasswordForm).subscribe(
+// {next(value) {
+
+// console.log(value)
+// },error(err) {
+// console.log(err)
+// },
+// }
+// );
+// }
+reset() {
+ this.auth.forgotPassword(this.forgotpasswordForm).subscribe(
+ (response: any) => {
+ if (response && response.ok === true) {
+ this.toastr.success('Reset link successfully sent');
+ }
+ },
+ (error: any) => {
+ console.log(error);
+ }
+ );
+}
+//
+// reset() {
+// this.auth.forgotPassword(this.forgotpasswordForm).subscribe(
+// (value: any) => {
+// if (value && value.ok === true) {
+// this.toastr.success('Reset link successfully sent');
+// } else {
+// this.toastr.error('Failed to send reset link');
+// }
+// },
+// (error) => {
+// this.toastr.error('Error sending reset link');
+// console.log(error);
+// }
+// );
+// }
}
-
+
<!-- Login Form -->
-<form>
- <!-- Email -->
- <div class="mb-3">
- <label class="inline-block mb-2">Email</label>
- <app-input type="email" placeholder="Enter Email"> </app-input>
+
+<!-- Login Form -->
+
+<!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
+
+<!-- Auth Modal -->
+
+<!-- <div class="fixed inset-0 overflow-y-auto" id="modal">
+ <div
+ class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
+ >
+ <div class="self-end m-1 mr-5">
+ <button
+ type="button"
+ class="text-cyan-700 border border-cyan-700 hover:bg-cyan-500 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-centerdark:text-blue-500"
+ (click)="auth.backbutton()"
+ >
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ <span class="sr-only">Icon description</span>
+ </button>
+ </div> -->
+
+<!-- rounded tab shadow -->
+<!-- <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ > -->
+<!-- Add margin if you want to see some of the overlay behind the modal-->
+<!-- <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Forgot Password</p>
+ Title-->
+<!-- <div class="flex justify-between items-center pb-4">
+
+ </div> -->
+
+<!-- <form> -->
+<!-- Email -->
+<!-- <div class="mb-3">
+ <label class="inline-block mb-2">Email</label>
+ <app-input type="email" placeholder="Enter Email"> </app-input>
+ </div>
+ <button
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
+ >
+ Send Reset Link
+ </button>
+ </form>
+ </div>
+ </div>
</div>
- <button
- type="submit"
- class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
+</div> -->
+
+<!-- <div class="w-[100%] sm:h-[100vh] md:h-[98vh] flex flex-col justify-center items-center bg-[#3D484B]">
+
+ <nav class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B] sm:mt-[-40%] sm:mb-[5%]">
+ <div class="text-blackes h-[20pt] w-[20pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg text-white absolute top-[2.2%]" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%]">
+ <h3 class="sm:text-[16.5pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Forgot Password</h3>
+ </div>
+ </nav>
+
+
+</div> -->
+
+<div
+ class="modal"
+ class="disable-scroll w-[100%] h-[105vh] flex flex-col justify-center items-center absolute sm:top-[-2%] md:top-[-10%] sm:right-[-1%] rounded-[8pt] z-[999] p-4 overlay"
+>
+ <div
+ class="w-[250pt] sm:p-[6%] sm:h-[250pt] md:h-[170pt] md:w-[350pt] sm:p-[1rem] md:p-[2rem] bg-[#475356] rounded-[8pt] sm:mb-[10%]"
>
- Send Reset Link
- </button>
-</form>
+ <div class="flex flex-col items-center sm:mt-[-3%]">
+ <img
+ class="m-[4%]"
+ src="../../../assets/img/forgot-password-icon.svg"
+ alt=""
+ height="10%"
+ width="10%"
+ />
+ <button class="modal-close-button" (click)="close()">✖</button>
+
+ <p class="sm:text-[14pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">
+ Forgot Password
+ </p>
+ <pre
+ class="text-[13pt] sm:mt-[5%] md:text-[20pt] font-roboto-regular text-[#D4D4D4]"
+ >
+Enter your email and we'll send you
+ a link to reset your password</pre
+ >
+ <div class="w-[90%] sm:mt-[6%]">
+ <label
+ for="subject"
+ class="text-[13pt] text-[#D4D4D4] font-roboto-regular"
+ >Email <span class="text-[#FF2F2F]">*</span>
+ </label>
+ </div>
+ <form (ngSubmit)="reset()" class="w-[90%]">
+ <app-input
+ [control]="email"
+ type="text"
+ placeholder="Enter your Email"
+ class="h-[40pt] md:h-[60pt] w-[100%]"
+ ></app-input>
+
+ <button
+ type="submit"
+ class="sm:h-[35pt] xsm:h-[30pt] md:h-[80pt] sm:w-[100%] xsm:mt-[50%] xsm:w-[97%] md:w-[100%] md:p-[0.1rem] bg-orangess rounded-[4pt] sm:text-[14pt] md:text-[17pt] font-roboto-regular sm:mt-[8%] text-white md:mt-[22rem] sm:mb-[10%]"
+ >
+ Send Reset Link
+ </button>
+ </form>
+ </div>
+ </div>
+</div>
-
+
./forget-password.component.css
-
+ .image{
+ filter: invert(100%);
+}
+.bg{
+ background-color: #0000006d;
+}
+
+.forget-pwd-cls{
+ height: 470pt;
+ width: 250pt;
+ margin-top: 10%;
+ border: 2px solid black;
+ border-radius: 5%;
+
+}
+
+.modal-close-button {
+ position: absolute;
+ /* top: 10px; */
+ right: 13%;
+ font-size: 20px;
+ background-color: transparent;
+ border: none;
+ cursor: pointer;
+ color: white;
+ }
+
+
+ .overlay{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #3d484b0a;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 999;
+ }
+
+
+ /* .hide-button {
+ background-color: transparent;
+ } */
+
+
+ .disable-scroll{
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ }
+
+
-
+
@@ -190,8 +773,8 @@ Metadata
diff --git a/documentation/components/InputComponent.html b/documentation/components/InputComponent.html
index 5bf3950..8d7bbd1 100644
--- a/documentation/components/InputComponent.html
+++ b/documentation/components/InputComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
InputComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-input
+
+
styleUrls
./input.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -132,6 +140,12 @@ Inputs
control
+
+ inputDisable
+
+
+ isEnabled
+
placeholder
@@ -150,7 +164,7 @@ Inputs
-
+
Inputs
@@ -162,7 +176,7 @@ Inputs
- Type : FormControl
+ Type : FormControl
@@ -170,6 +184,32 @@ Inputs
Default value : new FormControl()
+
+
+
+ Defined in src/app/shared/input/input.component.ts:12
+
+
+
+
+
+
+
+
+
+ inputDisable
+
+
+
+
+ Type : boolean
+
+
+
+
+
+ Default value : false
+
@@ -178,6 +218,32 @@ Inputs
+
+
+
+
+
+ isEnabled
+
+
+
+
+ Type : boolean
+
+
+
+
+
+ Default value : true
+
+
+
+
+ Defined in src/app/shared/input/input.component.ts:14
+
+
+
+
@@ -199,7 +265,7 @@ Inputs
- Defined in src/app/shared/input/input.component.ts:12
+ Defined in src/app/shared/input/input.component.ts:11
@@ -225,7 +291,7 @@ Inputs
- Defined in src/app/shared/input/input.component.ts:11
+ Defined in src/app/shared/input/input.component.ts:10
@@ -239,7 +305,7 @@ Inputs
-
+
import { Component, Input } from '@angular/core';
import { FormControl } from '@angular/forms';
@@ -249,31 +315,78 @@ Inputs
styleUrls: ['./input.component.css']
})
export class InputComponent {
-
- @Input() type = 'text'
+ @Input() type = 'text';
@Input() placeholder = ''
@Input() control : FormControl = new FormControl()
+ @Input() inputDisable:boolean = false;
+ @Input() isEnabled=true;
+ // isDisabled = false;
+
+
}
-
- <input [formControl]="control" [type]="type" [placeholder]="placeholder"
- class="block w-full px-3 py-1.5 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-400 ransition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
- />
+
+ <input
+ [formControl]="control"
+ [type]="type"
+ [placeholder]="placeholder"
+ [readOnly]="inputDisable"
+
+
+ class="block w-full px-3 py-1.5 sm:mt-[2%] bg-[#2D373A] bg-clip-padding bg-no-repeat border border-solid border-[#2D373A] transition duration-500 focus:outline-none rounded bg-transparent sm:text-[12pt] md:text-[20pt] text-[#BBBBBB] sm:h-[30pt] md:h-[50pt] " [ngStyle]="{ 'background-color': isEnabled ? 'white' : '#2D373A' , 'color': isEnabled ? 'black' : '#BBBBBB' } "/>
+
+<ng-container *ngIf="control.touched && control.dirty">
+ <p class="text-red-400" *ngIf="control.errors?.['pattern']">
+ Passwords must be at least 8 characters long, have 1 uppercase letter, 1
+ lowercase letter, and 1 number.
+ </p>
+
+ <p *ngIf="control.errors?.['required']" class="text-red-400">
+ Field is required
+ </p>
+
+ <p *ngIf="control.errors?.['minlength']" class="text-red-400">
+ The value you inputted is
+
+ {{ control.errors?.['minlength'].actualLength }}
+
+ characters long. It must be at least
+
+ {{ control.errors?.['minlength'].requiredLength }}
+
+ characters long.
+ </p>
+
+ <p *ngIf="control.errors?.['email']" class="text-red-400">
+ You must enter a valid email.
+ </p>
+
+ <p *ngIf="control.errors?.['min']" class="text-red-400">Value too low.</p>
+
+ <p *ngIf="control.errors?.['max']" class="text-red-400">Value too high.</p>
+
+ <p *ngIf="control.errors?.['notMatching']" class="text-red-400">
+ password Do not Match.
+ </p>
+ <p *ngIf="control.errors?.['emailTaken']" class="text-red-400">
+ Email Taken. Please try Another
+ </p>
+</ng-container>
-
+
./input.component.css
-
+
@@ -298,8 +411,8 @@ Inputs
diff --git a/documentation/components/InviteFriendComponent.html b/documentation/components/InviteFriendComponent.html
new file mode 100644
index 0000000..0a56308
--- /dev/null
+++ b/documentation/components/InviteFriendComponent.html
@@ -0,0 +1,505 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ InviteFriendComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/user/invite-friend/invite-friend.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-invite-friend
+
+
+
+
+
+ styleUrls
+ ./invite-friend.component.css
+
+
+
+
+
+ templateUrl
+ ./invite-friend.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+ -
+ backArrow
+
+ -
+ shareNodes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(auth: AuthService, http: HttpClient, userService: UserService)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ http
+
+
+ HttpClient
+
+
+
+ No
+
+
+
+
+ userService
+
+
+ UserService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ backArrow
+
+
+
+
+
+
+ Default value : faArrowLeft
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ shareNodes
+
+
+
+
+
+
+ Default value : faShareNodes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import ICurrentUser from 'src/app/models/currentUser.modal';
+import { AuthService } from 'src/app/services/auth.service';
+import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+import { UserService } from 'src/app/services/user.service';
+import { HttpClient } from '@angular/common/http';
+import { faShareNodes } from '@fortawesome/free-solid-svg-icons';
+
+
+@Component({
+ selector: 'app-invite-friend',
+ templateUrl: './invite-friend.component.html',
+ styleUrls: ['./invite-friend.component.css']
+})
+export class InviteFriendComponent {
+ backArrow = faArrowLeft;
+ shareNodes = faShareNodes;
+
+ constructor(
+ public auth: AuthService,
+ private http: HttpClient,
+ private userService: UserService
+ ) {}
+}
+
+
+
+
+ <div class="w-[100%] sm:h-[95vh] md:h-[100vh] flex flex-col items-center bg-[#3D484B]">
+
+ <nav class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="h-[20pt] w-[30pt] sm:ml-[-2%]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[95%]">
+ <h3 class="sm:text-[16pt] md:text-[22pt] text-[#FFFFFF] font-roboto-black">Invite a Friend</h3>
+ </div>
+ </nav>
+
+ <div class="w-[100%] text-center sm:mt-[6%] md:mt-[5rem]">
+ <p class="text-[17.5pt] font-roboto-regular text-[#FFFFFF]">Send an <span class="text-orangess font-roboto-black">Invitation</span></p>
+ <p class="text-[17.5pt] font-roboto-regular text-[#FFFFFF]">to your <span class="text-orangess font-roboto-black">friends!</span></p>
+ </div>
+
+ <div class="sm:h-[246pt] md:h-[500pt] sm:w-[100%] sm:object-cover overflow-hidden object-center flex items-center mt-[4rem]">
+ <img src="../../../assets/img/InviteImage2.png" class="" height="100%" width="100%">
+ </div>
+
+ <div class="w-[100%] text-start flex flex-col items-center mt-[4%]">
+ <p class="text-[#D4D4D4] sm:text-[13pt] md:text-[18pt] font-roboto-regular">Please click on the button below to send <br/> the app link to your friends</p>
+ </div>
+
+ <button type="submit" class="h-[44pt] w-[80%] bg-orangess rounded-[4pt] text-[14pt] font-roboto-regular text-[#F5F5F5] mt-[3rem] mb-[3rem]" >
+ <fa-icon class="fa-sm" [icon]="shareNodes"></fa-icon>
+
+ Invite Friends
+ </button>
+
+
+
+
+
+ ./invite-friend.component.css
+
+ .fa-lg{
+ filter: invert(100%);
+
+}
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/LeftArrowButtonComponent.html b/documentation/components/LeftArrowButtonComponent.html
new file mode 100644
index 0000000..4e24170
--- /dev/null
+++ b/documentation/components/LeftArrowButtonComponent.html
@@ -0,0 +1,386 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ LeftArrowButtonComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/shared/arrowButtons/left-arrow-button/left-arrow-button.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-left-arrow-button
+
+
+
+
+
+ styleUrls
+ ./left-arrow-button.component.css
+
+
+
+
+
+ templateUrl
+ ./left-arrow-button.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+
+
+ Inputs
+
+
+
+
+
+ -
+ currentSlide
+
+ -
+ slider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Inputs
+
+
+
+
+
+ currentSlide
+
+
+
+
+ Type : number
+
+
+
+
+
+ Default value : -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ slider
+
+
+
+
+ Type : KeenSliderInstance
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component, Input } from '@angular/core';
+import { KeenSliderInstance } from 'keen-slider';
+
+@Component({
+ selector: 'app-left-arrow-button',
+ templateUrl: './left-arrow-button.component.html',
+ styleUrls: ['./left-arrow-button.component.css'],
+})
+export class LeftArrowButtonComponent {
+ @Input() currentSlide: number = -1;
+ @Input() slider!: KeenSliderInstance;
+}
+
+
+
+
+ <!-- [ngClass]="
+'arrow arrow--left ' + (currentSlide === 0 ? 'arrow--disabled' : '')
+" -->
+
+<button
+ *ngIf="slider"
+ [ngClass]="{
+ hidden:
+ slider.track.details.slides.length - 2 === currentSlide ||
+ slider.track.details.slides.length === 1
+ }"
+ (click)="slider.prev()"
+ 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-cyan-400 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="M15 19l-7-7 7-7"
+ ></path>
+ </svg>
+ <span class="sr-only">Previous</span>
+ </span>
+</button>
+
+
+
+
+
+ ./left-arrow-button.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/LoginComponent.html b/documentation/components/LoginComponent.html
index 08db118..58bc12a 100644
--- a/documentation/components/LoginComponent.html
+++ b/documentation/components/LoginComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
LoginComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -70,9 +75,15 @@
File
+
+
Implements
+
+
+ OnInit
+
-
+
Metadata
@@ -87,11 +98,14 @@ Metadata
+
selector
app-login
+
+
styleUrls
./login.component.css
@@ -115,7 +129,7 @@ Metadata
-
+
Index
@@ -133,18 +147,30 @@ Properties
AlertType
+
+ circleEx
+
credentials
email
+
+ isModalOpen
+
loginForm
+
+ modal
+
password
+
+ show
+
showAlert
@@ -163,6 +189,18 @@ Methods
authenticate
+
+ closeModal
+
+
+ ngOnInit
+
+
+ openModal
+
+
+ passwordHide
+
@@ -175,18 +213,18 @@ Methods
-
+
Constructor
-constructor(auth: AuthService, http: HttpClient, router: Router)
+constructor(auth: AuthService, http: HttpClient, router: Router, toastr: ToastrService)
- Defined in src/app/user/login/login.component.ts:16
+ Defined in src/app/user/login/login.component.ts:33
@@ -219,7 +257,7 @@ Constructor
http
- HttpClient
+ HttpClient
@@ -231,7 +269,19 @@ Constructor
router
- Router
+ Router
+
+
+
+ No
+
+
+
+
+ toastr
+
+
+ ToastrService
@@ -252,7 +302,7 @@ Constructor
-
+
Methods
@@ -277,8 +327,156 @@
- Defined in src/app/user/login/login.component.ts:30
+ Defined in src/app/user/login/login.component.ts:61
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ closeModal
+
+
+
+
+
+
+closeModal()
+
+
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:94
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ ngOnInit
+
+
+
+
+
+
+ngOnInit()
+
+
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:42
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal
+
+
+
+
+
+
+openModal()
+
+
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:90
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ passwordHide
+
+
+
+
+
+
+passwordHide()
+
+
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:84
@@ -295,7 +493,7 @@
-
+
Properties
@@ -324,7 +522,7 @@
- Defined in src/app/user/login/login.component.ts:16
+ Defined in src/app/user/login/login.component.ts:19
@@ -355,7 +553,32 @@
- Defined in src/app/user/login/login.component.ts:14
+ Defined in src/app/user/login/login.component.ts:17
+
+
+
+
+
+
+
+
+
+
+
+
+ circleEx
+
+
+
+
+
+
+ Default value : faCircleExclamation
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:22
@@ -389,7 +612,7 @@
- Defined in src/app/user/login/login.component.ts:23
+ Defined in src/app/user/login/login.component.ts:28
@@ -414,7 +637,32 @@
- Defined in src/app/user/login/login.component.ts:20
+ Defined in src/app/user/login/login.component.ts:25
+
+
+
+
+
+
+
+
+
+
+
+
+ isModalOpen
+
+
+
+
+
+
+ Default value : false
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:88
@@ -439,7 +687,32 @@
- Defined in src/app/user/login/login.component.ts:28
+ Defined in src/app/user/login/login.component.ts:33
+
+
+
+
+
+
+
+
+
+
+
+
+ modal
+
+
+
+
+
+
+ Default value : false
+
+
+
+
+ Defined in src/app/user/login/login.component.ts:20
@@ -461,6 +734,37 @@
Default value : new FormControl('', [Validators.required])
+
+
+
+ Defined in src/app/user/login/login.component.ts:26
+
+
+
+
+
+
+
+
+
+
+
+
+ show
+
+
+
+
+
+
+ Type : boolean
+
+
+
+
+
+ Default value : false
+
@@ -495,7 +799,7 @@
- Defined in src/app/user/login/login.component.ts:15
+ Defined in src/app/user/login/login.component.ts:18
@@ -507,25 +811,30 @@
-
+
import { HttpClient } from '@angular/common/http';
-import { Component } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons';
import { Router } from '@angular/router';
-import { last } from 'rxjs';
import { AuthService } from 'src/app/services/auth.service';
+import IUser from 'src/app/models/user.model';
+import { ToastrService } from 'ngx-toastr';
+
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],
})
-export class LoginComponent {
+export class LoginComponent implements OnInit {
AlertType = 'alert';
showAlert: boolean = false;
alertMsg = 'Please Wait! Under Process';
-
- constructor(private auth: AuthService, private http: HttpClient,private router : Router) {}
+ modal = false;
+ show: boolean = false;
+ circleEx = faCircleExclamation;
+
email = new FormControl('', [Validators.required]);
password = new FormControl('', [Validators.required]);
@@ -537,70 +846,200 @@
loginForm = new FormGroup(this.credentials);
+ constructor(
+ private auth: AuthService,
+ private http: HttpClient,
+ private router: Router,
+ private toastr: ToastrService
+ ) {}
+
+ ngOnInit(): void {
+ let token: any;
+ let email: any;
+ token = localStorage.getItem('_token_canteen_app');
+ email = localStorage.getItem('_email_canteen_app');
+ let currUser = localStorage.getItem('_username_canteen_app');
+
+ if (
+ token === localStorage.getItem('_token_canteen_app') ||
+ email === localStorage.getItem('_email_canteen_app') ||
+ currUser === localStorage.getItem('_username_canteen_app')
+ ) {
+ let user: IUser = currUser && JSON.parse(currUser) && JSON.parse(email) && JSON.parse(token);
+ this.auth.setCurrentUser(user);
+ } else if (token === null && currUser === null && email === null) {
+ return;
+ }
+ }
+
authenticate() {
this.AlertType = 'alert';
this.showAlert = true;
this.auth
- .login(
- this.loginForm.value.email || '',
- this.loginForm.value.password || ''
- )
+ .login(this.loginForm.value.email || '', this.loginForm.value.password || '')
.subscribe({
next: (v) => {
this.AlertType = 'success';
this.showAlert = true;
this.alertMsg = 'LogIn Successful';
- this.auth.isAuthenticated()
+ this.auth.isAuthenticated();
+ this.router.navigateByUrl('/');
},
error: (e) => {
this.AlertType = 'error';
this.showAlert = true;
- this.alertMsg = e.error.error.message;
- }
+ // this.alertMsg = e.error.error.message;
+ },
});
+
return;
}
+
+ passwordHide() {
+ this.show = !this.show;
+ }
+
+ isModalOpen = false;
+
+ openModal() {
+ this.isModalOpen = true;
+ }
+
+ closeModal() {
+ this.isModalOpen = false;
+ }
+
+
}
+
+
+
+
+
+
+
-
- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
- {{alertMsg}}
-</app-alert>
+
+ <!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
<!-- Login Form -->
-<form [formGroup]="loginForm" (ngSubmit)="authenticate()">
- <!-- Email -->
- <div class="mb-3">
+<!-- <form [formGroup]="loginForm" (ngSubmit)="authenticate()">
+
+ <div class="mb-3" id="email">
<label class="inline-block mb-2">Email</label>
<app-input [control]="email" type="text" placeholder="Enter Email">
</app-input>
</div>
- <!-- Password -->
+
<div class="mb-3">
<label class="inline-block mb-2">Password</label>
-
<app-input [control]="password" type="password" placeholder="Password">
</app-input>
</div>
- <button
- type="submit"
- class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
- >
+
+ <button type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400">
Submit
</button>
-</form>
-
+
+</form> -->
+
+
+
+
+<!-- new updated design of loginForm -->
+<div
+ class="absolute bottom-0 left-0 h-[100%] sm:h-[100vh] sm:w-[100vw] w-[100%] md:h-[100%] md:w-[100%] bg-gradient-to-b from-[#3D484B38] from-20% via-[#424344e6] via-20% to-[#3D484B] to-60% opacity-[100%] z-10">
+
+</div>
+<div
+ class="w-[100%] sm:h-[100%] sm:w-[100%] md:w-[100%] md:h-[100%] md:mt-[2pt] sm:mt-[0pt] flex flex-col justify-center items-center bg-[107%,100%] bg-no-repeat bg-center"
+ style="background-image: url('../../../assets/img/bg-img.svg'); background-size: 110%; overflow: hidden; height: 100vh ;">
+ <div
+ class="h-[100pt] w-[80%] md:h-[-100%] md:m-[1rem] sm:m-[4rem] md:mt-[15%] mt-[0rem] relative flex flex-col items-center justify-center object-cover">
+ <!-- <img src="../../../assets/img/navbarBg.svg" height="100%" width="100%" alt=""> -->
+ <div
+ class="absolute h-[70pt] w-[80%] top-[3rem] md:w-[68%] md:h-[68%] sm:w-[180pt] md:m-[12%] sm:h-[30%] flex p-[0.5rem] items-center justify-center z-20">
+ <img src="../../../assets/img/canteenApp.png" height="100%" width="100%" alt="">
+ </div>
+ </div>
+
+ <div id="heading part" class="w-[100%] mb-[1rem] sm:mt-[10%] md:mt-[30%] p-[2rem] sm:mb-[-2rem] ml-[15.5pt] z-20">
+ <p class="text-[16pt] md:text-[27pt] font-roboto-black text-[#FFFFFF]">Login</p>
+ <p class="text-[12pt] sm:text-[11.5pt] md:text-[16.5pt] text-[#D4D4D4] font-roboto-regular">Enter your credentials
+ to continue.</p>
+ </div>
+
+ <form [formGroup]="loginForm" (ngSubmit)="authenticate()"
+ class="flex flex-col items-center sm:h-[100%] w-[100%] h-[100%] p-[2.5rem] pb-[0rem]">
+
+ <div class="mb-3 w-[100%] z-20" id="email">
+ <label
+ class="inline-block mb-2 sm:text-[12pt] md:text-[20pt] text-[#D4D4D4] p-[1.5pt] font-roboto-regular">Username</label>
+ <app-input [control]="email" type="text" placeholder="Enter your Email"
+ class="h-[40pt] md:h-[60pt] w-[100%]"></app-input>
+ </div>
+
+ <div class="mb-3 w-[100%] z-20">
+ <label
+ class="inline-block mb-2 text-[14pt] md:text-[20pt] sm:text-[12pt] text-[#D4D4D4] font-roboto-regular">Password</label>
+ <app-input [control]="password" type="password" placeholder="Password"
+ class="h-[40pt] md:h-[100pt] w-[100%] bg-white"></app-input>
+ <p class="text-left text-[16pt] sm:text-[11.5pt] md:text-[18pt] text-orangess font-roboto-regular p-[2pt] mt-[5pt] float-right"
+ (click)="openModal()">Forgot Your Password?</p>
+
+
+ <app-forget-password *ngIf="isModalOpen" (modalClosed)="closeModal()"></app-forget-password>
+
+
+ </div>
+
+ <!-- [routerLink]="['/forgotPassword']" -->
+ <button type="submit" [ngStyle]="{'z-index': isModalOpen? 9 :99}"
+ class="block mt-[50%] md:mt-[20%] sm:text-[13pt] md:text-[22pt] z-20 w-[95%] sm:w-[100%] bg-orangess text-white py-1 px-3 rounded transition hover:bg-orange-500 font-roboto-regular text-[16pt] z-99 login-button">
+ Login
+ </button>
+ </form>
+
+ <div class="mt-[3%] sm:mb-[25%] md:mt-[1%] z-20" [ngStyle]="{'z-index': isModalOpen? 2 :20}">
+ <p class="text-[14pt] sm:text-[12pt] md:text-[20pt] font-roboto-regular text-white">Haven't Registered? <span
+ class="text-orangess" [routerLink]="['/registerComponent']">Register Here</span></p>
+ </div>
+</div>
-
+
./login.component.css
-
+ .white{
+ background-color: white;
+
+ z-index: 999;
+ outline: none;
+}
+
+
+
+.hide-button {
+ background: transparent;
+}
+
+
+ .disable-scroll{
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ }
+
-
+
@@ -625,8 +1064,8 @@
diff --git a/documentation/components/ModalComponent.html b/documentation/components/ModalComponent.html
index 1b340af..f8c5e16 100644
--- a/documentation/components/ModalComponent.html
+++ b/documentation/components/ModalComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
ModalComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-modal
+
+
styleUrls
./modal.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -182,13 +190,13 @@ Inputs
-
+
Constructor
-constructor(modal: ModalService, el: ElementRef)
+constructor(modal: ModalService, el: ElementRef)
@@ -226,7 +234,7 @@ Constructor
el
- ElementRef
+ ElementRef
@@ -243,7 +251,7 @@ Constructor
-
+
Inputs
@@ -275,7 +283,7 @@ Inputs
-
+
Methods
@@ -392,7 +400,7 @@
-
+
Properties
@@ -411,7 +419,7 @@
- Type : ElementRef
+ Type : ElementRef
@@ -456,14 +464,14 @@
-
+
import { Component, ElementRef, Input } from '@angular/core';
import { ModalService } from 'src/app/services/modal.service';
@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
- styleUrls: ['./modal.component.css']
+ styleUrls: ['./modal.component.css'],
})
export class ModalComponent {
@Input() modalID = '';
@@ -471,32 +479,30 @@
constructor(public modal: ModalService, public el: ElementRef) {}
ngOnInit(): void {
- console.log("On init Called");
+ console.log('On init Called');
document.body.appendChild(this.el.nativeElement);
}
ngOnDestroy(): void {
- console.log("On Destroyed Called");
-
- document.body.removeChild(this.el.nativeElement)
+ console.log('On Destroyed Called');
+
+ document.body.removeChild(this.el.nativeElement);
}
closeModal() {
this.modal.toggleModal(this.modalID);
}
-
}
-
+
<!-- Auth Modal -->
-<div class="fixed z-20 inset-0 overflow-y-auto" id="modal"
- [ngClass]="{hidden: modal.isModalOpen() }">
+<div class="fixed z-20 inset-0 overflow-y-auto" id="modal" [ngClass]="{ hidden: modal.isModalOpen() }">
<div
class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
>
- <div class="fixed inset-0 transition-opacity" (click)="closeModal()">
+ <div class="fixed inset-0 transition-opacity" (click)="closeModal()">
<div class="absolute inset-0 bg-gray-500 bg-opacity-95"></div>
</div>
<!-- This element is to trick the browser into centering the modal contents. -->
@@ -515,7 +521,9 @@
<ng-content select="[heading]"> </ng-content>
<!-- Modal Close Button -->
- <div class="modal-close cursor-pointer z-50" (click)="closeModal()" >✕</div>
+ <div class="modal-close cursor-pointer z-50" (click)="closeModal()">
+ ✕
+ </div>
</div>
<ng-content> </ng-content>
@@ -526,14 +534,14 @@
-
+
./modal.component.css
-
+
@@ -558,8 +566,8 @@
diff --git a/documentation/components/NavComponent.html b/documentation/components/NavComponent.html
index 23969e5..eeb644d 100644
--- a/documentation/components/NavComponent.html
+++ b/documentation/components/NavComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,36 +35,41 @@
- - Components
- - Components
+ -
NavComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
- src/app/nav/nav.component.ts
+ src/app/dashboard/nav/nav.component.ts
@@ -72,7 +77,7 @@ File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-nav
+
+
styleUrls
./nav.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -134,6 +142,9 @@ Properties
userIcon
+
+ username
+
@@ -161,7 +172,7 @@ Methods
-
+
Constructor
@@ -172,7 +183,7 @@ Constructor
- Defined in src/app/nav/nav.component.ts:16
+ Defined in src/app/dashboard/nav/nav.component.ts:12
@@ -214,7 +225,7 @@ Constructor
-
+
Methods
@@ -232,15 +243,15 @@
-toggleHam($event: Event)
+toggleHam($event: Event)
- Defined in src/app/nav/nav.component.ts:19
+ Defined in src/app/dashboard/nav/nav.component.ts:14
@@ -263,7 +274,7 @@
$event
- Event
+ Event
@@ -289,7 +300,7 @@
-
+
Properties
@@ -314,7 +325,7 @@
- Defined in src/app/nav/nav.component.ts:18
+ Defined in src/app/dashboard/nav/nav.component.ts:13
@@ -339,7 +350,32 @@
- Defined in src/app/nav/nav.component.ts:16
+ Defined in src/app/dashboard/nav/nav.component.ts:11
+
+
+
+
+
+
+
+
+
+
+
+
+ username
+
+
+
+
+
+
+ Default value : JSON.parse(localStorage.getItem('_username_canteen_app') || '')
+
+
+
+
+ Defined in src/app/dashboard/nav/nav.component.ts:12
@@ -351,15 +387,10 @@
-
+
import { Component } from '@angular/core';
-import {
- faHamburger,
- faMobileScreenButton,
- faUserCircle,
-} from '@fortawesome/free-solid-svg-icons';
-import { SidebarService } from '../services/sidebar.service';
-import { SidebarComponent } from '../sidebar/sidebar.component';
+import { faUserCircle } from '@fortawesome/free-solid-svg-icons';
+import { SidebarService } from '../../services/sidebar.service';
@Component({
selector: 'app-nav',
@@ -368,47 +399,55 @@
})
export class NavComponent {
userIcon = faUserCircle;
-
- constructor(public sidebar: SidebarService) {}
+ username = JSON.parse(localStorage.getItem('_username_canteen_app') || '');
+ constructor(public sidebar: SidebarService ) {}
toggleHam($event: Event) {
this.sidebar.toggleSidebar();
-
$event.preventDefault();
}
}
-
- <!-- Header -->
-<header id="header" class="w-full z-10 fixed shadow-lg">
- <nav
- class="w-full fixed flex justify-start items-center bg-cyan-400 py-4 px-4"
- >
- <!-- App Name -->
- <!-- <a class="text-3xl text-white font-bold uppercase mr-4 justify-end">Canteen</a> -->
- <fa-icon class="fa-2xl text-gray-200" [icon]="userIcon"></fa-icon>
-
- <div class="flex flex-grow justify-end items-end">
- <!-- Primary Navigation -->
- <ul class="flex flex-row mt-1">
- <!-- Navigation Links -->
- </ul>
+
+ <!-- Header --><!-- <header id="header" class="w-full z-20 fixed shadow-lg"> -->
+<nav class="sm:w-[100%] sm:fixed sm:top-[0rem] sm:flex sm:bg-darkesgreys sm:z-[999] sm:h-[6rem] md:h-[10rem]">
+ <!-- <div class="flex items-center space-x-4">
+ <img
+ class="w-14 h-14 rounded-full"
+ src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRRuRdeXSJ1OhBp7RqQq2SJqjB9Axq9iavyHw&usqp=CAU"
+ alt=""
+ />
+ <div class="font-medium dark:text-white">
<div
- [ngClass]="{ 'on-ham': sidebar.onHam}"
- class="ham"
- (click)="toggleHam($event)"
+ class="text-lg font-light text-gray-900 md:text-xl dark:text-gray-900"
>
- <div class="bar"></div>
+ Jese Leos
+ </div>
+
+ <div class="text-sm text-gray-600 dark:text-gray-600">
+ Joined in August 2014{{username}}
</div>
</div>
- </nav>
-</header>
+ </div> -->
+
+ <div class="flex items-center justify-around w-[100%] p-[0.9rem] h-[100%]">
+ <div class="h-[64pt] w-[64pt] flex items-center justify-center rounded-[32pt]"><img src="../../../assets/img/Male User.png" height="100%" width="90%" alt="" ></div>
+ <div class="leading-[18pt] w-[180pt]"><p class="capitalize display:inline-block text-[17pt] font-roboto-black text-[#FFFFFF]">Hi, {{username}}</p> <p class="text-[14pt] text-[#D4D4D4] font-roboto-regular">Welcome back!</p></div>
+ </div>
-<app-sidebar *ngIf="sidebar.isSidebarVisible$"></app-sidebar>
+ <!-- <a> <fa-icon class="fa-2xl text-gray-#707070" [icon]="userIcon"></fa-icon>
+ <fa-icon class="fa-2xl text-gray-#707070 " [icon]="userIcon"></fa-icon>
+ </a> -->
+</nav>
+<!-- </header> -->
+
+<!-- <app-sidebar *ngIf="sidebar.isSidebarVisible$"></app-sidebar>
+<app-user-tab *ngIf="sidebar.isUserTabVisible"></app-user-tab> -->
+
-
+
./nav.component.css
@@ -455,7 +494,7 @@
-
+
@@ -480,8 +519,8 @@
diff --git a/documentation/components/NotFoundComponent.html b/documentation/components/NotFoundComponent.html
new file mode 100644
index 0000000..4672af9
--- /dev/null
+++ b/documentation/components/NotFoundComponent.html
@@ -0,0 +1,273 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ NotFoundComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/not-found/not-found.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-not-found
+
+
+
+
+
+ styleUrls
+ ./not-found.component.css
+
+
+
+
+
+ templateUrl
+ ./not-found.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-not-found',
+ templateUrl: './not-found.component.html',
+ styleUrls: ['./not-found.component.css']
+})
+export class NotFoundComponent {
+
+}
+
+
+
+
+ <div class="flex items-center justify-center bg-slate-500 border absolute">
+ <div class="">
+ <img src="assets/img/404.jpg" alt="" />
+ </div>
+</div>
+
+
+
+
+
+ ./not-found.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/PleaseLoginComponent.html b/documentation/components/PleaseLoginComponent.html
new file mode 100644
index 0000000..f23472f
--- /dev/null
+++ b/documentation/components/PleaseLoginComponent.html
@@ -0,0 +1,485 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ PleaseLoginComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/user/please-login/please-login.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-please-login
+
+
+
+
+
+ styleUrls
+ ./please-login.component.css
+
+
+
+
+
+ templateUrl
+ ./please-login.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ modal
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ openLogin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(modal: ModalService)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ modal
+
+
+ ModalService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ openLogin
+
+
+
+
+
+
+openLogin($event: Event)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ $event
+
+ Event
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ modal
+
+
+
+
+
+
+ Type : ModalService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import { ModalService } from 'src/app/services/modal.service';
+
+@Component({
+ selector: 'app-please-login',
+ templateUrl: './please-login.component.html',
+ styleUrls: ['./please-login.component.css'],
+})
+export class PleaseLoginComponent {
+ constructor(public modal: ModalService) {}
+
+ openLogin($event: Event) {
+ this.modal.toggleModal('auth');
+ $event.preventDefault;
+ }
+}
+
+
+
+
+
+<div class="flex h-screen justify-center items-center bg-slate-100">
+ <div class="rounded-lg shadow-lg bg-white max-w-sm w-full text-center">
+ <div class="p-6">
+ <h5 class="text-gray-900 text-xl font-medium mb-2">Welcome</h5>
+ <p class="text-gray-700 text-base mb-4">Please Login</p>
+ <button
+ type="button"
+ class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out"
+ (click)="openLogin($event)">
+ Login or Register
+ </button>
+ </div>
+ </div>
+</div>
+
+
+
+
+ ./please-login.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/ProfileComponent.html b/documentation/components/ProfileComponent.html
new file mode 100644
index 0000000..16b7987
--- /dev/null
+++ b/documentation/components/ProfileComponent.html
@@ -0,0 +1,858 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ ProfileComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/user/profile/profile.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-profile
+
+
+
+
+
+ styleUrls
+ ./profile.component.css
+
+
+
+
+
+ templateUrl
+ ./profile.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+ -
+ backArrow
+
+ -
+ EditForm
+
+ -
+ email
+
+ -
+ EmployeeId
+
+ -
+ inputDisable
+
+ -
+ isDisable
+
+ -
+ organization
+
+ -
+ OrgList
+
+ -
+ profession
+
+ -
+ username
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(auth: AuthService, userService: UserService)
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:17
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ userService
+
+
+ UserService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:22
+
+
+
+
+
+
+
+
+
+
+
+
+ backArrow
+
+
+
+
+
+
+ Default value : faArrowLeft
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:15
+
+
+
+
+
+
+
+
+
+
+
+
+ EditForm
+
+
+
+
+
+
+ Default value : new FormGroup({
+ username: this.username,
+ email: this.email,
+ organization: this.organization,
+ EmployeeId: this.EmployeeId,
+ })
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:42
+
+
+
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+
+ Default value : new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ])
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:30
+
+
+
+
+
+
+
+
+
+
+
+
+ EmployeeId
+
+
+
+
+
+
+ Default value : new FormControl(this.auth.user$.getValue()?.EmpId, [
+ Validators.required,
+ ])
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:35
+
+
+
+
+
+
+
+
+
+
+
+
+ inputDisable
+
+
+
+
+
+
+ Default value : false
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:17
+
+
+
+
+
+
+
+
+
+
+
+
+ isDisable
+
+
+
+
+
+
+ Default value : false
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:16
+
+
+
+
+
+
+
+
+
+
+
+
+ organization
+
+
+
+
+
+
+ Default value : new FormControl('', [Validators.required])
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:34
+
+
+
+
+
+
+
+
+
+
+
+
+ OrgList
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:25
+
+
+
+
+
+
+
+
+
+
+
+
+ profession
+
+
+
+
+
+
+ Default value : new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ])
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:38
+
+
+
+
+
+
+
+
+
+
+
+
+ username
+
+
+
+
+
+
+ Default value : new FormControl(this.auth.user$.getValue()?.username, [
+ Validators.required,
+ Validators.minLength(3),
+ ])
+
+
+
+
+ Defined in src/app/user/profile/profile.component.ts:26
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component, OnInit } from '@angular/core';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { faArrowLeft, faUser } from '@fortawesome/free-solid-svg-icons';
+import { AuthService } from 'src/app/services/auth.service';
+import { UserService } from 'src/app/services/user.service';
+
+
+@Component({
+ selector: 'app-profile',
+ templateUrl: './profile.component.html',
+ styleUrls: ['./profile.component.css']
+})
+
+export class ProfileComponent {
+ backArrow = faArrowLeft;
+ isDisable = false;
+ inputDisable= false;
+// Keep the input disabled by default
+
+
+ constructor(
+ public auth: AuthService,
+ private userService: UserService
+ ) {}
+ OrgList: any[] = [];
+ username = new FormControl(this.auth.user$.getValue()?.username, [
+ Validators.required,
+ Validators.minLength(3),
+ ]);
+ email = new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ]);
+ organization = new FormControl('', [Validators.required]);
+ EmployeeId = new FormControl(this.auth.user$.getValue()?.EmpId, [
+ Validators.required,
+ ]);
+ profession = new FormControl(this.auth.user$.getValue()?.email, [
+ Validators.required,
+ Validators.email,
+ ]);
+ EditForm = new FormGroup({
+ username: this.username,
+ email: this.email,
+ organization: this.organization,
+ EmployeeId: this.EmployeeId,
+ });
+}
+
+
+
+
+ <div class="w-[100%] sm:h-[80%] md:h-[105vh] flex flex-col items-center bg-[#3D484B]">
+ <nav class="w-[100%] sm:h-[40pt] md:h-[70pt] p-[1.8rem] flex items-center justify-between border border-greyss bg-[#3D484B]">
+ <div class="text-blackes h-[20pt] w-[18pt]">
+ <button type="button" (click)="auth.backbutton()">
+ <fa-icon class="fa-lg" [icon]="backArrow"></fa-icon>
+ </button>
+ </div>
+ <div class="sm:w-[90%] md:w-[80%]">
+ <h3 class="sm:text-[16pt] md:text-[22pt] sm:ml-[5%] text-[#FFFFFF] font-roboto-black">Profile </h3>
+ </div>
+ <!-- <svg [routerLink]="['/edit']" class="sm:h-[20pt] sm:w-[20pt] md:h-[120%] sm:flex sm:justify-center sm:items-center md:w-[11%]" id="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H322.8c-3.1-8.8-3.7-18.4-1.4-27.8l15-60.1c2.8-11.3 8.6-21.5 16.8-29.7l40.3-40.3c-32.1-31-75.7-50.1-123.9-50.1H178.3zm435.5-68.3c-15.6-15.6-40.9-15.6-56.6 0l-29.4 29.4 71 71 29.4-29.4c15.6-15.6 15.6-40.9 0-56.6l-14.4-14.4zM375.9 417c-4.1 4.1-7 9.2-8.4 14.9l-15 60.1c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l60.1-15c5.6-1.4 10.8-4.3 14.9-8.4L576.1 358.7l-71-71L375.9 417z"/></svg> -->
+ <img [routerLink]="['/edit']" src="../../../assets/img/manage_accounts_FILL0_wght400_GRAD0_opsz48.svg" alt="" height="8%" width="8%">
+
+ </nav>
+
+
+ <div class="h-[95pt] w-[95pt] sm:ml-[7%] mt-[15%] flex relative">
+ <img class="sm:mt-[-75%]"
+ src="../../../assets/img/userEditprofile.svg"
+ alt="user"
+ height="75%"
+ width="75%"
+ />
+ </div>
+
+
+
+ <form
+ ng-model="all"
+ [formGroup]="EditForm"
+
+ class="mt-[-15%] mb-[8rem] w-[100%] sm:h-[65vh] md:h-[105vh] p-[1.5rem] flex flex-col items-center"
+ >
+ <!-- Employee Id -->
+ <div class=" sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] sm:ml-[0.6%] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-[2rem]"
+ >Employee Id</label
+ >
+ <app-input
+ [control]="EmployeeId"
+ [inputDisable]="true"
+ [isEnabled]="false"
+
+ class="text-Greyess text-[14pt] bg-lightGreys w-[100%] sm:h-[40pt] md:h-[60pt] rounded-[4pt]"
+ type="text"
+ placeholder="Enter Employee Id"
+
+
+ ></app-input>
+ </div>
+ <!-- Name -->
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] sm:ml-[0.6%] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Name</label
+ >
+ <app-input
+ [control]="username"
+ [inputDisable]="true"
+ [isEnabled]="false"
+
+ class="text-Greyess text-[14pt] bg-lightGreys sm:h-[40pt] md:h-[50pt] w-[100%] rounded-[4pt]"
+ placeholder="Enter Name"
+ >
+ </app-input>
+ </div>
+ <!-- Email -->
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] sm:ml-[0.6%] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Email</label
+ >
+ <app-input
+ [control]="email"
+ [inputDisable]="true"
+ [isEnabled]="false"
+ class="text-Greyess text-[14pt] bg-lightGreys w-[307pt] h-[40pt] rounded-[4pt]"
+ placeholder="Enter Email"
+ [inputDisable]="true">
+ </app-input>
+ </div>
+
+ <div class="flex flex-col sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label class="sm:text-[13pt] md:text-[20pt] text-[#BBBBBB] sm:mb-[2%] font-roboto-regular">Organization</label>
+ <select name="Organization" disabled="isDisable" class="w-[100%] h-[30pt] text-[#BBBBBB] border-2 border-[#2D373A] rounded-[4pt] bg-[#2D373A]">
+ <option disabled selected value="Select Organization" class=" text-[14pt] w-[90%] text-[#BBBBBB] rounded-[4pt] ">
+ Select Organization
+ </option>
+ <option *ngFor="let m of OrgList" class="text-Greyess text-[14pt] bg-white w-[90%]">
+ {{ m.attributes.OrgName }}
+ </option>
+ <option value="New Vision" class="text-Greyess text-[14pt] bg-white overflow-hidden">
+ Core Card
+ </option>
+ <option
+ value="New Vision"
+ class="text-Greyess text-[14pt] bg-white overflow-hidden"
+ >
+ GTS
+ </option>
+ <option
+ value="New Vision"
+ class="text-Greyess text-[14pt] bg-white overflow-hidden"
+ >
+ New Vision
+ </option>
+ </select>
+ </div>
+ <div class="sm:mt-[1rem] sm:w-[94%] md:w-[95%]">
+ <label
+ class="sm:text-[13pt] sm:ml-[0.6%] md:text-[20pt] text-[#D4D4D4] font-roboto-regular mb-2"
+ >Profession</label
+ >
+ <app-input
+ [control]="profession"
+ [inputDisable]="true"
+ [isEnabled]="false"
+ class="text-Greyess text-[14pt] bg-lightGreys w-[307pt] h-[40pt] rounded-[4pt]"
+ placeholder="Enter your Profession"
+ [inputDisable]="true">
+ </app-input>
+ </div>
+ </form>
+ </div>
+
+
+
+
+ ./profile.component.css
+
+ .fa-lg{
+ filter: invert(100%);
+}
+#svg{
+ filter: invert(100%);
+}
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/RegisterComponent.html b/documentation/components/RegisterComponent.html
index 9e7a1d3..0ca668c 100644
--- a/documentation/components/RegisterComponent.html
+++ b/documentation/components/RegisterComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
RegisterComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-register
+
+
styleUrls
./register.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -145,6 +153,9 @@ Properties
organization
+
+ OrgList
+
password
@@ -170,7 +181,13 @@ Methods
-
- register
+ checkFormValidity
+
+ -
+ matchValues
+
+ -
+ registeration
@@ -184,18 +201,18 @@ Methods
-
+
Constructor
-constructor(auth: AuthService, http: HttpClient)
+constructor(auth: AuthService, http: HttpClient, router: Router, toastr: ToastrService)
-
+
@@ -228,7 +245,31 @@ Constructor
http
- HttpClient
+ HttpClient
+
+
+
+ No
+
+
+
+
+ router
+
+
+ Router
+
+
+
+ No
+
+
+
+
+ toastr
+
+
+ ToastrService
@@ -249,7 +290,7 @@ Constructor
-
+
Methods
@@ -258,24 +299,130 @@
-
+
- register
-
+ checkFormValidity
+
-register()
+checkFormValidity()
-
+
+
+
+
+
+
+
+
+
+ Returns : boolean
+
+
+
+
+
+
+
+
+
+
+
+
+ matchValues
+
+
+
+
+
+
+matchValues(matchTo: string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ matchTo
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : ValidatorFn
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ registeration
+
+
+
+
+
+
+registeration()
+
+
+
+
+
+
+
@@ -292,7 +439,7 @@
-
+
Properties
@@ -321,7 +468,7 @@
-
+
@@ -352,7 +499,7 @@
-
+
@@ -372,12 +519,15 @@
- Default value : new FormControl('', [Validators.required])
+ Default value : new FormControl('', [
+ Validators.required,
+ this.matchValues('password'),
+ ])
-
+
@@ -397,12 +547,12 @@
- Default value : new FormControl('', [Validators.required])
+ Default value : new FormControl('', [Validators.required, Validators.email])
-
+
@@ -427,7 +577,7 @@
-
+
@@ -452,7 +602,51 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OrgList
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : [
+ {
+ id: '1',
+ orgName: 'GTS',
+ },
+ {
+ id: '2',
+ orgName: 'CoreCard',
+ },
+ {
+ id: '3',
+ orgName: 'NewVision',
+ },
+ ]
+
+
+
+
+
@@ -477,7 +671,7 @@
-
+
@@ -498,18 +692,19 @@
Default value : new FormGroup({
- name: this.username,
+ username: this.username,
email: this.email,
password: this.password,
- organization : this.organization,
- EmployeeId : this.EmployeeId,
+ organization: this.organization,
+ EmployeeId: this.EmployeeId,
confirm_password: this.confirm_password,
+
})
-
+
@@ -540,7 +735,7 @@
-
+
@@ -560,12 +755,12 @@
- Default value : new FormControl('', [Validators.required,Validators.min(3)])
+ Default value : new FormControl('', [Validators.required, Validators.min(3)])
-
+
@@ -577,120 +772,230 @@
-
+
import { HttpClient } from '@angular/common/http';
import { Component } from '@angular/core';
-import { FormControl, FormGroup, Validators } from '@angular/forms';
+import {
+ AbstractControl,
+ FormControl,
+ FormGroup,
+ ValidatorFn,
+ Validators,
+} from '@angular/forms';
+import { Router } from '@angular/router';
import { AuthService } from 'src/app/services/auth.service';
-
+import { ToastrService } from 'ngx-toastr';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
- styleUrls: ['./register.component.css']
+ styleUrls: ['./register.component.css'],
})
export class RegisterComponent {
-
AlertType = 'success';
- showAlert : boolean = false;
- alertMsg = 'Please Wait! Under Process'
-
- constructor(private auth: AuthService, private http: HttpClient){
-
- }
-
- username = new FormControl('', [Validators.required,Validators.min(3)]);
- email = new FormControl('', [Validators.required]);
+ showAlert: boolean = false;
+ alertMsg = 'Please Wait! Under Process';
+ OrgList: any[] = [
+ {
+ id: '1',
+ orgName: 'GTS',
+ },
+ {
+ id: '2',
+ orgName: 'CoreCard',
+ },
+ {
+ id: '3',
+ orgName: 'NewVision',
+ },
+ ];
+ constructor(private auth: AuthService, private http: HttpClient,private router: Router,private toastr: ToastrService) {}
+
+ username = new FormControl('', [Validators.required, Validators.min(3)]);
+ email = new FormControl('', [Validators.required, Validators.email]);
password = new FormControl('', [Validators.required]);
- confirm_password = new FormControl('', [Validators.required]);
+ confirm_password = new FormControl('', [
+ Validators.required,
+ this.matchValues('password'),
+ ]);
organization = new FormControl('', [Validators.required]);
EmployeeId = new FormControl('', [Validators.required]);
-
-
registerForm = new FormGroup({
- name: this.username,
+ username: this.username,
email: this.email,
password: this.password,
- organization : this.organization,
- EmployeeId : this.EmployeeId,
+ organization: this.organization,
+ EmployeeId: this.EmployeeId,
confirm_password: this.confirm_password,
- })
-
-
- register(){
-
-
+ });
+
+ registeration() {
+ this.AlertType = 'alert';
+ this.showAlert = true;
+
+ this.auth
+ .registration(this.registerForm)
+
+ .subscribe({
+ next: () => {
+ this.AlertType = 'success';
+ this.showAlert = true;
+ this.alertMsg = 'Account Created';
+ this.auth.isAuthenticated();
+ this.router.navigateByUrl('/')
+ this.toastr.success("Account Created Successfully")
+ },
+
+ error: (e) => {
+ this.AlertType = 'error';
+ this.showAlert = true;
+ this.alertMsg = e.error.error.message;
+ },
+ });
+
+ return;
}
-
+ checkFormValidity(): boolean {
+ return this.registerForm.valid && this.registerForm.dirty;
+ }
+
+ matchValues(matchTo: string): ValidatorFn {
+ return (control: AbstractControl) => {
+ return control.value === control.parent?.get(matchTo)?.value
+ ? null
+ : { notMatching: true };
+ };
+ }
}
-
- <form>
- <!-- Name -->
- <div class="mb-3">
+
+ <!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
+<!-- <form [formGroup]="registerForm" (ngSubmit)="registeration()">
+
+ <div class="mb-3" id="Name">
<label class="inline-block mb-2">Name</label>
- <app-input placeholder="Enter Name"> </app-input>
+ <app-input [control]="username" placeholder="Enter Name"> </app-input>
</div>
- <!-- Email -->
- <div class="mb-3">
+
+ <div class="mb-3" id="Email">
<label class="inline-block mb-2">Email</label>
- <app-input type="email" placeholder="Enter Email"> </app-input>
+ <app-input [control]="email" placeholder="Enter Email"> </app-input>
</div>
- <!-- Age -->
- <div class="mb-3">
+
+ <div class="mb-3" id="Selecting Organization">
<label class="inline-block mb-2">Organization</label>
<select
name="Organization"
id=""
- class="form-select form-select-lg mb-3 block w-full px-3 py-1.5 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-400 ransition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
+ class="form-select-lg mb-3 block w-full px-3 py-1.5 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-400 transition duration-500 focus:outline-none rounded bg-transparent focus:border-cyan-400 text-black"
>
<option disabled selected value="Select Organiztion">
Select Organiztion
</option>
- <option value="New Vision">New Vision</option>
- <option value="New Vision">Core Card</option>
- <option value="New Vision">GTS</option>
+ <option *ngFor="let m of OrgList">{{ m.orgName }}</option>
</select>
</div>
- <!-- Employee Id -->
- <div class="mb-3">
+
+ <div class="mb-3" id="EmployeeId">
<label class="inline-block mb-2">Employee Id</label>
- <app-input type="text" placeholder="Enter Employee Id"> </app-input>
+ <app-input [control]="EmployeeId" type="text" placeholder="Enter Employee Id"></app-input>
</div>
- <!-- Password -->
- <div class="mb-3">
+
+ <div class="mb-3" id="Password">
<label class="inline-block mb-2">Password</label>
- <app-input type="password" placeholder="Enter Password"> </app-input>
+ <app-input
+ type="password"
+ [control]="password"
+ placeholder="Enter Password"
+ >
+ </app-input>
</div>
- <!-- Confirm Password -->
- <div class="mb-3">
+
+ <div class="mb-3" id="Confirm Password">
<label class="inline-block mb-2">Confirm Password</label>
- <app-input type="password" placeholder="Enter Confirm Password">
- </app-input>
+ <app-input type="password" [control]="confirm_password" placeholder="Enter Confirm Password"></app-input>
</div>
- <button
- type="submit"
- class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500"
- >
+ <button type="submit" class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500">
Register
</button>
+</form> -->
+
+
+
+
+
+<!-- new updated design of register form or signup form -->
+<div class="fixed left-0 h-[100%] sm:h-[100vh] md:h-[100vh] sm:w-[100vw] w-[100%] md:h-[100%] md:w-[100%] bg-gradient-to-b from-[#3D484B38] from-20% via-[#424344e6] via-20% to-[#3D484B] to-60% opacity-[100%] z-10">
+</div>
+
+<div class=" w-[100%] flex flex-col items-center sm:h-[100%] md:h-[100%] bg-no-repeat bg-center bg-cover overflow-hidden" style="background-image: url('../../../assets/img/login_background.svg'); width: 100vw; height: 100%; background-size: 110%; overflow: hidden;">
+
+ <div class=" h-[7rem] w-[100%] mt-[-0.5rem] overflow-hidden relative flex flex-col justify-center items-center object-cover ">
+ <!-- <img src="../../../assets/img/navbarBg.svg" height="100%" width="100%" alt=""> -->
+ <div class="absolute h-[70pt] w-[87%] flex p-[4rem] items-center justify-center z-20">
+ <img src="../../../assets/img/canteenApp.png" height="100%" width="100%" alt="">
+ </div>
+</div>
+
+ <div id="heading part" class="w-[100%] mt-[-5%] p-[2rem] z-20">
+ <p class="text-[18pt] font-roboto-black text-[#FFFFFF]">Sign Up</p>
+ <p class="text-[12pt] text-[#D4D4D4]">Please provide your details below to register</p>
+ </div>
+
+<form [formGroup]="registerForm" (ngSubmit)="registeration()" class=" w-[100%] flex flex-col items-center p-[2rem] mt-[-10%] z-20">
+
+ <div class="w-[100%] mb-3" id="EmployeeId">
+ <label class="inline-block mb-2 text-[12pt] font-roboto-regular text-[#D4D4D4]">Employee Id <span class="text-[#FF2F2F]">*</span></label>
+ <app-input [control]="EmployeeId" [isEnabled]="true " type="text" placeholder="Enter Employee Id" class=" h-[40pt] w-[95%] rounded-[4pt] outline-none"></app-input>
+ </div>
+
+ <div class="w-[100%] mb-3" id="Name">
+ <label class="inline-block mb-2 text-[12pt] font-roboto-regular text-[#D4D4D4]">Name <span class="text-[#FF2F2F]">*</span></label>
+ <app-input [control]="username" placeholder="Enter Name" class="h-[40pt] w-[95%] rounded-[4pt] font-roboto-regular outline-none text-[12pt] text-Greyess"> </app-input>
+ </div>
+
+ <div class="w-[100%] mb-3" id="Email">
+ <label class="inline-block mb-2 text-[12pt] font-roboto-regular text-[#D4D4D4]">Email <span class="text-[#FF2F2F]">*</span></label>
+ <app-input [control]="email" placeholder="Enter Email" class="h-[40pt] w-[95%] rounded-[4pt] font-roboto-regular outline-none text-[12pt] text-Greyess"> </app-input>
+ </div>
+
+ <div class="w-[100%] mb-3" id="Password">
+ <label class="inline-block mb-2 text-[12pt] font-roboto-regular text-[#D4D4D4]">Password <span class="text-[#FF2F2F]">*</span></label>
+ <app-input type="password" [control]="password" placeholder="Enter Password" class="h-[40pt] w-[95%] rounded-[4pt] font-roboto-regular outline-none text-[12pt] text-Greyess"></app-input>
+ </div>
+
+ <div class="w-[100%] mb-3" id="Confirm Password">
+ <label class="inline-block mb-2 text-[12pt] font-roboto-regular text-[#D4D4D4]">Confirm Password <span class="text-[#FF2F2F]">*</span></label>
+ <app-input type="password" [control]="confirm_password" placeholder="Enter Confirm Password" class="h-[40pt] w-[95%] rounded-[4pt] font-roboto-regular outline-none text-[12pt] text-Greyess"></app-input>
+ </div>
+
+ <button type="submit" class="mt-[20%] z-20 block w-full bg-orangess text-white text-[16pt] font-roboto-regular py-1.5 px-3 rounded transition mt-[2rem]">
+ Sign up
+ </button>
+
+ <div class="mt-[3%] z-20">
+ <p [routerLink]="'/loginComponent'" class="text-[14pt] font-roboto-regular text-[#D4D4D4]">Already have an account? <span class="text-orangess">Log in</span></p>
+ </div>
</form>
-
+
+</div>
-
+
./register.component.css
-
+
@@ -715,8 +1020,8 @@
diff --git a/documentation/components/ResetPasswordComponent.html b/documentation/components/ResetPasswordComponent.html
new file mode 100644
index 0000000..4bcb328
--- /dev/null
+++ b/documentation/components/ResetPasswordComponent.html
@@ -0,0 +1,670 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ ResetPasswordComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/user/reset-password/reset-password.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-reset-password
+
+
+
+
+
+ styleUrls
+ ./reset-password.component.css
+
+
+
+
+
+ templateUrl
+ ./reset-password.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+ -
+ confirmpassword
+
+ -
+ email
+
+ -
+ password
+
+ -
+ resetForm
+
+ -
+ Public
+ userService
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ resetPassword
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(auth: AuthService, userService: UserService)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ userService
+
+
+ UserService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ resetPassword
+
+
+
+
+
+
+resetPassword()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ confirmpassword
+
+
+
+
+
+
+ Default value : new FormControl('', [Validators.required])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+
+ Default value : new FormControl('', [
+ Validators.required,
+ Validators.email,
+ ])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ password
+
+
+
+
+
+
+ Default value : new FormControl('', [Validators.required])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resetForm
+
+
+
+
+
+
+ Default value : new FormGroup({
+ email: this.email,
+ password :this.password,
+ confirmpassword:this.confirmpassword
+ })
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Public
+ userService
+
+
+
+
+
+
+ Type : UserService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import { FormControl, FormGroup, Validators } from '@angular/forms';
+import { AuthService } from 'src/app/services/auth.service';
+import { UserService } from 'src/app/services/user.service';
+
+@Component({
+ selector: 'app-reset-password',
+ templateUrl: './reset-password.component.html',
+ styleUrls: ['./reset-password.component.css']
+})
+export class ResetPasswordComponent {
+ constructor(public auth : AuthService,public userService : UserService){}
+ email = new FormControl('', [
+ Validators.required,
+ Validators.email,
+ ]);
+ password = new FormControl('', [Validators.required]);
+ confirmpassword = new FormControl('', [Validators.required]);
+
+ resetForm = new FormGroup({
+ email: this.email,
+ password :this.password,
+ confirmpassword:this.confirmpassword
+ });
+
+ resetPassword(){
+
+ }
+}
+
+
+
+
+ <!-- <app-alert *ngIf="showAlert" [AlertType]="AlertType">
+ {{ alertMsg }}
+</app-alert> -->
+
+<!-- Auth Modal -->
+
+<div class="fixed inset-0 overflow-y-auto" id="modal">
+ <div
+ class="flex flex-col items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
+ >
+ <div class="self-end m-1 mr-5">
+ <a routerLink="/">Back</a>
+ </div>
+
+ <div
+ class="inline-block align-bottom bg-secondary rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-4 sm:align-middle sm:max-w-lg sm:w-full bg-white"
+ >
+ <!-- Add margin if you want to see some of the overlay behind the modal-->
+ <div class="py-4 text-left px-12 bg-gray-100 mt-2">
+ <p class="text-2xl font-bold text-center">Reset Password</p>
+ <!--Title-->
+ <div class="flex justify-between items-center pb-4">
+ <!-- Modal Close Button -->
+ </div>
+
+ <form [formGroup]="resetForm" (submit)="resetPassword()">
+
+ <div class="mb-3">
+ <label class="inline-block mb-2">Email</label>
+ <app-input [control]="email" placeholder="Enter Email"> </app-input>
+ </div>
+ <div class="mb-3">
+ <label class="inline-block mb-2">Current Password</label>
+ <app-input
+ type="password"
+ [control]="password"
+ placeholder="Enter Current Password"
+ >
+ </app-input>
+ </div>
+ <div class="mb-3">
+ <label class="inline-block mb-2">New Password</label>
+ <app-input [control]="confirmpassword" type="password" placeholder="Enter New Password">
+ </app-input>
+ </div>
+ <button
+ type="submit"
+ class="block w-full bg-cyan-400 text-white py-1.5 px-3 rounded transition hover:bg-cyan-500 disabled:opacity-50 disabled:bg-cyan-400"
+ >
+ Update Password
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+
+
+
+ ./reset-password.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/RightArrowButtonComponent.html b/documentation/components/RightArrowButtonComponent.html
new file mode 100644
index 0000000..652732f
--- /dev/null
+++ b/documentation/components/RightArrowButtonComponent.html
@@ -0,0 +1,381 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ RightArrowButtonComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/shared/arrowButtons/right-arrow-button/right-arrow-button.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-right-arrow-button
+
+
+
+
+
+ styleUrls
+ ./right-arrow-button.component.css
+
+
+
+
+
+ templateUrl
+ ./right-arrow-button.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+
+
+ Inputs
+
+
+
+
+
+ -
+ currentSlide
+
+ -
+ slider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Inputs
+
+
+
+
+
+ currentSlide
+
+
+
+
+ Type : number
+
+
+
+
+
+ Default value : -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ slider
+
+
+
+
+ Type : KeenSliderInstance
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component, Input } from '@angular/core';
+import { KeenSliderInstance } from 'keen-slider';
+
+@Component({
+ selector: 'app-right-arrow-button',
+ templateUrl: './right-arrow-button.component.html',
+ styleUrls: ['./right-arrow-button.component.css'],
+})
+export class RightArrowButtonComponent {
+ @Input() currentSlide: number = -1;
+ @Input() slider!: KeenSliderInstance;
+}
+
+
+
+
+ <button
+ *ngIf="slider"
+ [ngClass]="{
+ hidden:
+ slider.track.details.slides.length - 1 === currentSlide ||
+ slider.track.details.slides.length === 1
+ }"
+ (click)="slider.next()"
+ 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-cyan-400 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>
+
+
+
+
+
+ ./right-arrow-button.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/ServerErrorComponent.html b/documentation/components/ServerErrorComponent.html
new file mode 100644
index 0000000..db17438
--- /dev/null
+++ b/documentation/components/ServerErrorComponent.html
@@ -0,0 +1,383 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ ServerErrorComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/errors/server-error/server-error.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-server-error
+
+
+
+
+
+ styleUrls
+ ./server-error.component.css
+
+
+
+
+
+ templateUrl
+ ./server-error.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(router: Router)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ router
+
+
+ Router
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ error
+
+
+
+
+
+
+ Type : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+
+@Component({
+ selector: 'app-server-error',
+ templateUrl: './server-error.component.html',
+ styleUrls: ['./server-error.component.css']
+})
+export class ServerErrorComponent {
+ error: any;
+
+ constructor(private router: Router) {
+ const navigation = this.router.getCurrentNavigation();
+ this.error = navigation?.extras?.state?.['error'];
+ }
+
+}
+
+
+
+
+ <p>server-error works!</p>
+
+
+
+
+
+ ./server-error.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/SidebarComponent.html b/documentation/components/SidebarComponent.html
index dc96ae3..769334d 100644
--- a/documentation/components/SidebarComponent.html
+++ b/documentation/components/SidebarComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
SidebarComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-sidebar
+
+
styleUrls
./sidebar.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -127,6 +135,9 @@ Properties
+ -
+ InventoryIco
+
-
Public
sidebar
@@ -158,7 +169,7 @@
Methods
-
+
Constructor
@@ -169,7 +180,7 @@ Constructor
- Defined in src/app/sidebar/sidebar.component.ts:9
+ Defined in src/app/sidebar/sidebar.component.ts:10
@@ -211,7 +222,7 @@ Constructor
-
+
Methods
@@ -236,8 +247,8 @@
- Defined in src/app/sidebar/sidebar.component.ts:12
+ Defined in src/app/sidebar/sidebar.component.ts:13
@@ -254,11 +265,36 @@
-
+
Properties
+
+
+
+
+
+
+ InventoryIco
+
+
+
+
+
+
+ Default value : faWarehouse
+
+
+
+
+ Defined in src/app/sidebar/sidebar.component.ts:12
+
+
+
+
+
+
@@ -279,7 +315,7 @@
- Defined in src/app/sidebar/sidebar.component.ts:10
+ Defined in src/app/sidebar/sidebar.component.ts:11
@@ -291,8 +327,9 @@
-
+
import { Component } from '@angular/core';
+import { faWarehouse } from '@fortawesome/free-solid-svg-icons';
import { SidebarService } from '../services/sidebar.service';
@Component({
@@ -302,55 +339,121 @@
})
export class SidebarComponent {
constructor(public sidebar: SidebarService) {}
-
- toggle(){
- this.sidebar.toggleSidebar()
+ InventoryIco = faWarehouse;
+ toggle() {
+ this.sidebar.toggleSidebar();
}
}
-
- <div class="fixed inset-0 " >
- <div
- class="flex items-start justify-end min-h-screen" id="sidebar"
- (click)="toggle()"
- >
- <div class=" w-52 overflow-y-auto mt-20 mr-2 py-4 px-3 bg-gray-200 rounded" >
- <ul class="space-y-2">
- <li>
- <a href="#" class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100">
- <svg aria-hidden="true" class="w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900 " fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
- <span class="ml-3">Dashboard</span>
- </a>
- </li>
-
- <li>
- <a href="#" class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100 ">
- <svg aria-hidden="true" class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900 " fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z" clip-rule="evenodd"></path></svg>
- <span class=" ml-3 ">Booking</span>
- </a>
- </li>
- <li>
- <a href="#" class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100 ">
- <svg aria-hidden="true" class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5 4a3 3 0 00-3 3v6a3 3 0 003 3h10a3 3 0 003-3V7a3 3 0 00-3-3H5zm-1 9v-1h5v2H5a1 1 0 01-1-1zm7 1h4a1 1 0 001-1v-1h-5v2zm0-4h5V8h-5v2zM9 8H4v2h5V8z" clip-rule="evenodd"></path></svg>
- <span class=" ml-3 ">FeedBack</span>
- </a>
- </li>
- </ul>
+
+ <div class="fixed inset-0 z-50">
+ <div
+ class="flex items-start justify-end min-h-screen"
+ id="sidebar"
+ (click)="toggle()"
+ >
+ <div class="w-52 overflow-y-auto mt-20 mr-2 py-4 px-3 bg-gray-200 rounded">
+ <ul class="space-y-2">
+ <li>
+ <a
+ routerLink=""
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100"
+ >
+ <svg
+ aria-hidden="true"
+ class="w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900"
+ fill="currentColor"
+ viewBox="0 0 20 20"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
+ <path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path>
+ </svg>
+ <span class="ml-3">Dashboard</span>
+ </a>
+ </li>
+
+ <li>
+ <a
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100"
+ >
+ <svg
+ aria-hidden="true"
+ class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900"
+ fill="currentColor"
+ viewBox="0 0 20 20"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M3 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z"
+ clip-rule="evenodd"
+ ></path>
+ </svg>
+
+ <a
+ class="nav-link text-gray-500 hover:text-gray-700 focus:text-gray-700 p-0"
+ routerLink="/booking"
+ >Booking</a
+ >
+ </a>
+ </li>
+ <li>
+ <a
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100"
+ >
+ <svg
+ aria-hidden="true"
+ class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900"
+ fill="currentColor"
+ viewBox="0 0 20 20"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M5 4a3 3 0 00-3 3v6a3 3 0 003 3h10a3 3 0 003-3V7a3 3 0 00-3-3H5zm-1 9v-1h5v2H5a1 1 0 01-1-1zm7 1h4a1 1 0 001-1v-1h-5v2zm0-4h5V8h-5v2zM9 8H4v2h5V8z"
+ clip-rule="evenodd"
+ ></path>
+ </svg>
+ <!-- <span class=" ml-3 ">FeedBack</span> -->
+ <a
+ class="nav-link text-gray-500 hover:text-gray-700 focus:text-gray-700 p-0"
+ routerLink="/feedback"
+ >Feedback</a
+ >
+ </a>
+ </li>
+ <li>
+ <a
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg hover:bg-gray-100"
+ >
+ <!-- <fa-icon [icon]="InventoryIco"></fa-icon> -->
+ <!-- <svg aria-hidden="true" class="flex-shrink-0 w-6 h-6 text-gray-500 transition duration-75 group-hover:text-gray-900" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5 4a3 3 0 00-3 3v6a3 3 0 003 3h10a3 3 0 003-3V7a3 3 0 00-3-3H5zm-1 9v-1h5v2H5a1 1 0 01-1-1zm7 1h4a1 1 0 001-1v-1h-5v2zm0-4h5V8h-5v2zM9 8H4v2h5V8z" clip-rule="evenodd"></path></svg> -->
+ <!-- <span class=" ml-3 ">FeedBack</span> -->
+ <a
+ class="nav-link text-gray-500 hover:text-gray-700 focus:text-gray-700 p-0"
+ routerLink="/foodInventory"
+ >Inventory</a
+ >
+ </a>
+ </li>
+ </ul>
</div>
+ </div>
</div>
- <!-- </div> -->
+
-
+
./sidebar.component.css
-
+
@@ -375,8 +478,8 @@
diff --git a/documentation/components/TabComponent.html b/documentation/components/TabComponent.html
index d8d8ca3..054672b 100644
--- a/documentation/components/TabComponent.html
+++ b/documentation/components/TabComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
TabComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -72,7 +77,7 @@
File
-
+
Metadata
@@ -87,11 +92,14 @@ Metadata
+
selector
app-tab
+
+
styleUrls
./tab.component.css
@@ -115,7 +123,7 @@ Metadata
-
+
Index
@@ -147,7 +155,7 @@ Inputs
-
+
Inputs
@@ -210,7 +218,7 @@ Inputs
-
+
import { Component, Input } from '@angular/core';
@Component({
@@ -226,20 +234,20 @@ Inputs
-
+
<div [class.hidden]="!active">
<ng-content></ng-content>
</div>
-
+
./tab.component.css
-
+
@@ -265,7 +273,7 @@ Inputs
diff --git a/documentation/components/TabsContainerComponent.html b/documentation/components/TabsContainerComponent.html
index 624cd8a..366fc9b 100644
--- a/documentation/components/TabsContainerComponent.html
+++ b/documentation/components/TabsContainerComponent.html
@@ -13,7 +13,7 @@
-
+
@@ -35,32 +35,37 @@
- - Components
- - Components
+ -
TabsContainerComponent
- -
- Info
+
-
+ Info
- -
- Source
+
-
+ Source
- -
- Template
+
-
+ Template
- -
- Styles
+
-
+ Styles
- -
- DOM Tree
+
-
+ DOM Tree
-
+
File
@@ -74,11 +79,11 @@
File
Implements
- AfterContentInit
+ AfterContentInit
-
+
Metadata
@@ -93,11 +98,14 @@ Metadata
+
selector
app-tabs-container
+
+
styleUrls
./tabs-container.component.css
@@ -121,7 +129,7 @@ Metadata
-
+
Index
@@ -134,6 +142,7 @@ Properties
-
+
tabs
@@ -166,7 +175,7 @@ Methods
-
+
Constructor
@@ -189,7 +198,7 @@ Constructor
-
+
Methods
@@ -301,7 +310,7 @@
-
+
Properties
@@ -312,6 +321,7 @@
+
tabs
@@ -351,7 +361,7 @@
-
+
import {
Component,
ContentChildren,
@@ -391,7 +401,7 @@
-
+
<!-- Tabs -->
<ul class="flex flex-wrap mb-4">
<li *ngFor="let tab of tabs" class="flex-auto text-center">
@@ -412,14 +422,14 @@
-
+
./tabs-container.component.css
-
+
@@ -445,7 +455,7 @@
diff --git a/documentation/components/TestErrorComponent.html b/documentation/components/TestErrorComponent.html
new file mode 100644
index 0000000..e430ee4
--- /dev/null
+++ b/documentation/components/TestErrorComponent.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ TestErrorComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/errors/test-error/test-error.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-test-error
+
+
+
+
+
+ styleUrls
+ ./test-error.component.css
+
+
+
+
+
+ templateUrl
+ ./test-error.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-test-error',
+ templateUrl: './test-error.component.html',
+ styleUrls: ['./test-error.component.css']
+})
+export class TestErrorComponent {
+
+}
+
+
+
+
+ <p>test-error works!</p>
+
+
+
+
+
+ ./test-error.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/UpdateFoodComponent.html b/documentation/components/UpdateFoodComponent.html
new file mode 100644
index 0000000..35f36ac
--- /dev/null
+++ b/documentation/components/UpdateFoodComponent.html
@@ -0,0 +1,269 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ UpdateFoodComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/admin-dashboard/update-food/update-food.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-update-food
+
+
+
+
+
+ styleUrls
+ ./update-food.component.css
+
+
+
+
+
+ templateUrl
+ ./update-food.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-update-food',
+ templateUrl: './update-food.component.html',
+ styleUrls: ['./update-food.component.css']
+})
+export class UpdateFoodComponent {
+
+}
+
+
+
+
+ <p>update-food works!</p>
+
+
+
+
+
+ ./update-food.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/UserTabComponent.html b/documentation/components/UserTabComponent.html
new file mode 100644
index 0000000..310beeb
--- /dev/null
+++ b/documentation/components/UserTabComponent.html
@@ -0,0 +1,630 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ UserTabComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/user/user-tab/user-tab.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-user-tab
+
+
+
+
+
+ styleUrls
+ ./user-tab.component.css
+
+
+
+
+
+ templateUrl
+ ./user-tab.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(sidebar: SidebarService, auth: AuthService)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ sidebar
+
+
+ SidebarService
+
+
+
+ No
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ logout
+
+
+
+
+
+
+logout()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ toggle
+
+
+
+
+
+
+toggle()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+
+ Default value : JSON.parse(localStorage.getItem('_email_canteen_app') || '')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Public
+ sidebar
+
+
+
+
+
+
+ Type : SidebarService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ username
+
+
+
+
+
+
+ Default value : JSON.parse(localStorage.getItem('_username_canteen_app') || '')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+import { AuthService } from 'src/app/services/auth.service';
+import { SidebarService } from 'src/app/services/sidebar.service';
+
+@Component({
+ selector: 'app-user-tab',
+ templateUrl: './user-tab.component.html',
+ styleUrls: ['./user-tab.component.css'],
+})
+export class UserTabComponent {
+ username = JSON.parse(localStorage.getItem('_username_canteen_app') || '');
+ email = JSON.parse(localStorage.getItem('_email_canteen_app') || '');
+
+ constructor(
+ public sidebar: SidebarService,
+ public auth: AuthService
+ ) {}
+
+ toggle() {
+ this.sidebar.toggleUserTab();
+ }
+
+ logout() {
+ this.auth.logout();
+
+ this.auth.isAuthenticated();
+ }
+}
+
+
+
+
+ <div class="fixed inset-0 z-50">
+ <div
+ class="flex items-start justify-start min-h-screen"
+ id="usercard"
+ (click)="toggle()"
+ >
+ <div
+ class="w-64 px-4 mt-20 ml-2 max-w-sm bg-white border border-gray-200 rounded-lg shadow-md"
+ >
+ <div class="flex justify-end px-4 pt-4">
+ <div class="flex flex-col items-center pb-10">
+ <img
+ class="w-24 h-24 mb-3 rounded-full shadow-lg"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAADgCAMAAAAt85rTAAAAk1BMVEUAAAD////09PT6+vr7+/v5+fn8/Pz4+Pj9/f319fX39/f+/v729vaOjo7q6urT09Pu7u59fX2Xl5e4uLjl5eXJycnCwsJWVlbMzMxkZGRNTU3d3d02Njbn5+d3d3cSEhKkpKSDg4OKiopFRUUxMTGxsbEcHBycnJwnJydpaWk8PDyoqKhaWlorKytvb29ISEgXFxfPiItuAAAXF0lEQVR4nN1dCXfjqg62bIwxOEubpUnTNOmSbmk78/9/3QWDEy9gY0Omd0bnvHteNQlCAYQkPkQAgNOQAIRpBJClFCBOQ84MQyyYMQBNM4AoDRmQMEWCmQhmqpgsZ6aCmQgmEs0xc3OZaK5LRqU5pppLRXOJ+GaXjKI5zgzyfxAKhuLToRAenj8dik8LZiSYJAyFgqFQMBTCw1y4YKaCmYgPoTAXLppLQ3pujssQvQaC+P9DmWzuLCPNZbCyjKQhgyoZlS7TZpezU5dxgHGUJAijJIkwjpM4/xuLvxHGFWbxIS0z/zsW32w0F3OJIDqRhsvR9fVoNBpn4ZR3kOHYLCM2yIi0MsxdDtLTeETn3yosjwczjEdtzDXjIZhCu8Xq+v37JajQzfp+MhHzSI05GGRUxkM75q1dToLwogoCOey/7gIT3X28TvlIpn0VtO9yEhCCKEUEUxoRktCEkIhSxSQVJhYfypkxIXGZGZ2Y8ps5k/dk/vrLqNuZrjYIkF4GrchIGjK6u4wuZGQgw/PDk4V2Ob0dNpj6NDK0ZGSEzU0xnybC5lJpc1Oxd3AmN8xnm5ty4ak04bGw1pJJFDMr2XXOhO23rXaSvsc1GYmSgZSMSMmITzJYWtomTF3GVmuwtD6aP6BmDcLso596gq42cJE1qLWiVruaYVJHEA5QT9B92LWr9do5lYKRZ2Lsaph6gViLMfbdn75GBrcbmRQmvwfrx+kGg29PpltB8xJA5SUghFP24KKeoAkrWerQRsHWLuMgy2LGkowyFmUZYSTLEGNZlghmxhjKMiyYfOpRwYxPTKaYVDFxlsF44Oor0yNEZRmxkhEpGUgxW7tMzl1uNTJpPyMTj3fu+nFzCukAI5OajAyt/hzyN8qZsWCaR1AyE8GU30RzL/pxa8qoSYZuBFu7HPtag2mIp37UC+QYeluDvqxoPH/p7rktPcSpNysaxxFCPGZT/0H5393M6MSUf5Otp/kpaQEaGRXBtl325snc+9SP7xbgy5Px44uya7/6BbsiSOzyRaHLFz111yrpFBqSThvP+glD05Z0Cv9s0gnDrXcF+TL0lXQqJWsSfQYnqTHjMpP/DXv/+gXPUJERlQX36LKXnMz07QIKBjPwEg/6ULBn9G5JH34UdJ6iKPJvYSQtSZECdZmi7kYGvV5IwafIfzyY6lJUaU3B0zahNkmvPkyZlnF1wlW3Casue0g64eOl9AsefGz0rq5aGn1eTMFgnLm7ajV3ttVzjTVMNL6cfsGBGXtn2WUPSafDBRW8/z8knQxHKzf305WzgjvkHvBSKuJ/ShmJaIYJzigiLGfGgokEk2Q0EkyRsqAZZ2YnZhLrOvZxFFLZxFnDRSRkcMGid0T1Lit3mbR3OXZNOkULjXpLQPIHdNbwGDknnVQGJ4NSDg6KHByoHFyaRQxU0iktUnqCyUgzEBwB//lkc84afrNz2jAt0oap6nLONHVZJJ0E03UNwrrWpbsJSc/Hmc6z9KeTTimupXrfEFQndegWKobE1Yq6HW3gbbU/XyGpf4I5OQIL5tZB56RTdZv/olQz5jOH85gF+eGkU8XGPKM6CEEKnz4PVnAErvEg0x1hs+p5MC3OgxtH2Lii4DQ2HS8PTrqtwXCEbTh1Z/UuO8aDqNzzGUtNkxqmA1fiGlyNjMJkEAMmIzbCSHKIBymdB16BFuIhmTFMBh2trcEIVSF1GU0YCWe65mRKfYlTHdLp1Bye7gcp6Ip0coRynbsySbRQrvOk5ut339uevoWuChbxUxKLZE2co+eSPJ7SMiPE/1ZM8c3ST53j7rCuOayai4Hu+55BjaNENodKzfXospuRSbPzACKbnRNBtOrn2vCg/vLxYGp21Yp+3AI17Jx1WE8Mq+seaaouBdMO97mvkam3f1bQAKfUJBoBb2fWueLxJZFOFvHgWcE+xzX8n+G4NsMsSzR1jQfbALcW2Nqzgq0Y4WZzhP9Eq4f3Lv2E7bLEIeu77BYupac1+ItU4ZQd8FYJ30sQTMNR62y18GSc48G2gDf+PilI+yuYNxdhiGez65u11iN3V9ASv1sH3CqM8MmL5lO007lLTPjdGAvU+nQzn28eHx4fHx8eRr9OClbwu4bmWjDCrkbmrGB/jHBtzDP+9QRxIwsYwaNq97PbVeswMhX8bg1w24qtlcySgm0Y4Tp+t4kRrskonPgHqMVrHTLqzdklncwbfXRSkA1dg9qdExUKTrrWYOdG7xYPZqHqyF1qleToUpD1VrDTVePONif5H1T8p/g71jHL/zkfvWxw+yeNMrTM0xTNk07cudZ9Usus/+0t6TQHVyNTGY9CwTH6E0mnFl/0lPjdgrUv2qJgWlNwB84gBAMkFJ8Bt3VkZoUJhbM1QU0wqRkjbMbv5kwolvYLVPG7bTL0XXYFIZxOH+7Bp5EpsKcz9/NB889hwtZWR7BQ8AE6R9Aev3sawQN0NdecJbURdFyDaLMrRtDjGsyKERxlzolfFyuKYHHOBWapPysan87FXw79kk5NK1rD72pAvZEJcEuy4n6ZwKplWAMH1jbXLaN88H8FHZDj9uZcjAxTw3cVwup3sPFpZEbBy2q8eCnM1w8lndQWuJvyCGAeHP34olKXF+44AFH3FDZOvmhaA/VqXfM6tja/IljYz2nOvD5EqQYj3GyOCU+/Qwa87EEEDtKV/4QCv0tSOxnn5lySTqNif5DMd+zNyNDJsxxelVceU6ekk4iEk4TgKKEYYyoSQhUmqjIpwYgzCdwUTigR34QjVp8sN4dogmrNNWWgmowIz2YyQQAy1b/CleZotTnU7HJJxuCcTErVBjjO1M0Xj/Hgg0Q0hngv3UD4ARBCSuWvu64L96EgVhNOQVGdFNTmE2tMLbYWPpSCHRhhU87SSoa0MhM8XIaDkZHC78LBF9Pb4kHVnJSxil2SToNdtdfCyFxQwTwsfGEuAe/gjT5LpIKr5HzF1dtGr9Z5ovbBH0k6ZSBT0Y+oh3tu66rJ8aATFRQ6Jp10oN4ubC1nFmkF6IkRtsfvqlXA3Xib5vQyLM7oTeORKRjXsjPLOXANEmmo74nTGb0DykJtFM9G4Q5JJyEDJGR4iZwUtMfJEHnMwRSTElBg2BkYMCy0jGFpysBlGbTBZNIZ/ELkdCQkm2PtOJm4ipNxSTrBUxFPXMTIyBW4jJ2TTjwGkfhdoAKqm4N6sWLGihkpJmLAmVyOwNbCUir4CAJbq5goR+GmCnCbNwcNGdXmGCjIcf7NVOJ3eYgp6CPKys2BtrmWLjuiDdUQ7pH3NVjUNFn+ZNIpKvKXu7l3TyaR+t04p+7d8LSgaqvstn7rpKBU5Xu2dQRxX3LFbMOX7MgV9mpkklWRLvjpmy9qrwq+qpPaMR4ELGfGi83Vng5fNGspQVU6czYCbov7rRuwKXNVP8Kul6BS+N2MqEajLshxZ5edy61k9EVNJo9GRs3Qa9MU6hMPVhyJJiYDlbElWr8E9nlnfseJyffRQzza8LvKjw+h2/fp6LKHciswlcmZg8c1KHefdWwa8z9380UIJ/IM9NaHgmrCzfIWj3aXlDsUNIRjPSIvpq6Zb3BXBGkrA+d7zxttxIEWUWq9OS/lViQu8hF7MjJMni3tzYUC+hgZH+VWZiqoYLosTk9fVJx4vqmNp9MI1LM4mhDWR8mjNJLZmRF4WYNUTvl7T9VIHEEIufBiCMeZD1eNyGO5+SXKrbRia7W1LPIcMoIiLuxRf9eE30XFALbkwnt02U8JXOU6BqmPeFDuOltaHfOfSDqdFczmxRA6K4hnagDDFgX7BLxYV+MXGwrmGvG7BYB1DF0Y4a7m4EVtqq0YYWNZ4oYMXzV+ozflcrsaGTWAuL6r9TIyjRq/lgVz6/jdEhMp4MfEorkWGQXEaZPo8budOOQL1viVe+Ev7LQG2X3hxNTHfOBG77HGr0ohXoOLq6YaiTrCmT5JpxpSSAMX6oAoFcxTaM/awUwtMnCk5jnpI7hdhr8av5HaKp6SdKiRwfI3WuvG46eSTmXhMrQP9rj1ep1ZwWKCTk8yQhsFO+JBAyS0G5lZYir8LlHImQVrQ5ga8buxOo47gBn92YlibfTOZ41fupXJi5dtPMDIpJnM9d5aTKE+8aDHEcyKObYbR/1HUCGnnoXn53MEPa5BSNQ2xnuZ9l2DTFUvmySlMfexBr1Z0fz4bKqOmx5I2k/BwkK9gmFXG2xFK5uKYY+KrLcj7txKuuLhXI99sNDvHvpuwF1d9v1aQayC++Aho/ZGptCPT+3W8bjUzRcrX1QJx8rQcEuTWCpIoKgeOE2Mk3qwL+opmjgDbgtTyncLbBVNJJkqHfB7HnfdBhwQTXiKB0uTGhezlAcFSbeRwfPiOus4bplww5NOXiL6SrQNp1prawFCaI3oT5g+kQ2wv/XbI6L3kpOpGYDTLOVmfwxtaxA2N8WSncetG8vgnMwlFKT4rOFuqRZPQ0G+1pLrU/0Vbl/sFeyTVfORF20CbmF6vvOzG4mu1JqLeZ8mo9Nn3uaku67BsLyofyOT75y0UsRpvRIHDUU19kjcxFsdSjX17rnd69jV/lTqvt1VKyUgMjhUiqo8jQ4z4N8W+KjD7LNS4EkVRa//iJYKdviivjf68+kSmtvVVLnZID1+18dGT/0/LHUecx4+dVdU+X1kYD3hhsSD7ie8LQetfMPoKDY24qr4wwjrTngvtQZPY94yim/7ubXrfMF4sEfAq1OQZZtHbQ2nz2MYsZqClu55HwWdcTKdGGHeP5hcf5QH8u3j4RADY33r3A3ByXhMOpl3ThEg0NVk+X3//f092aymoOyJGU5JfBkZV6xaHq2I9zC7nmSM89dcRSknSKgJq6aCn4y+YkI1tSYHYNV8rEHuUy6oz9tnPALe7ZOi2KUb2tDdilI2eQpuwCteVGwuu2sUe3DVXLG5GDZ5Jm0Pri2dqQi3nhbgDCR29WTwVl3w+R15KxQQnV9Ru9ra1nS6VNJp9lX05Yh8oe7hHEblIEbncis97k1k5XsTpXhcEGncm6Dq3kRTxvneBGvcm6BhUKabjbhePvzehEs8WC2D/u3JyOBRUKUJgIOR6XAkzHeXTlcKTjTGtXtFyvfJWu8uZbW7S6hZPV5UDx58d2lwTmbcKNX3Bh7WYAIax/V7OjwnM/D+IEw1/Rg5K5iZ3vlL0VAFh0VeRP/ep0IPuESQmvcr5PQfegN0oJExvKfoamQKuE2dZtFFQQhpdRsSvi7RV1v+dPVF9Q8V3+UXoTOdgt3lVnqGS3wviiK+VAyP9Rywkyez17c6Fy+kr/LXznuHSz0VhOniIXgLeUBiKF6/ZA4K6ixXIB5GERV5grfHOd8D+irYo84E/8biO5+aD4BYqu1L8DyFobUssEG/AHGXXqaJn2c8Vo571bKwDq4SSF9PFmCDwmip781blg5cgybLteK+2Nm43qywGB/fSSeAZfn5mg/uDYKhxPIIBiKdDA/Zi5p7aXlsd8cNxMxWQZuKQPxr9eLmD3wi6nwOqeGQikCw17d2x6dkY2y/lxGJ7SoCdRsZHjRcNVWZQJiYno58hAFGxvSQ2BYyNGuy7w7U0orWn9qtHZEneKOdih8Zj1tMTw+Kl1paqnLVZYgskemBpj2fgFvtpvs2E3NRJyMsV+VqX4Mp6NXj9C6O4x8N/zgi/dYgMY2fqKgEN4Z/fF52rsGOpBMOW55quQaUjb8M/ziCXgqaxu+D4ZC0PFF5NxNXNFuNTEuhQNbxwvWcxSQ0PZDxCPbAYfMTaVMWkfbXxXYbaBZVLNc2NBsZmHQ9fSF+IeP7iiOwNTJG+xIsYv7JrleMv6fRsKSTaX2die9QGTNriC0VNA7RURx611+Pa9JuBicFtUknHSQUxjbPP98DYeaX6J+nkUWFWGbY3wXKhjK7J6lGETVWiDUYmYPd89YLcYnAZOSCL3FlssvIGH+fd8Y3IoM/WKc1MhoZ7Qjav1y6AEJjs6k91PC79SrNMDY+qbHm34ysn4j95LamR43fHm8Hi1wlMo5hcJQjZ1qD+i08pw0lRUkSG/oSj2naJp00npGRnsSBVWy2tzfmM+G47YfcRCHEVq/CKFpHeisaNWrEI9TreflfCeaRl3kMxX0tbR16SIzLT9xQRoj0ey3tFbS17ptGxmJ/qNAvEf+1jKG4c6czMpuWr2yipP+bfhtqFw/2maA5PfHOZEnLGL7MIa0pSGmbfdyK+Lr3m4VrpoEONV4MyaL+zz0+ZdxekBYNg9eoerwM05bpGUwEmm3Am4xLonkxpG5kGkcfNvTEv85Qm2d3OxG7WnEmjFtnibAvZ5xsD3pjadPI1LC1bNjj5E+Im9K4bQyD9ykU13Q3bZNkPQdKB76peSDNV3tqaxCGDGAgZqmw0q375+4VZPqldXDWSEAwBr4Z+tZpZLLBr8t/CNNB2j2gb4EqMGXjJL2DSAQMfhN1pks6lQsRDB1ATr82DGGYtOyhH5SIRw9N5yuClhBjCPvs71V6jkj97bOKkQEyuOlAet5x89iwoL0wtWnCwOhBf6xYSgEP108MYWs8aOu8G2gJAulrmF97SMUbONz9ZnipdUE/Me8RLE1ZECt609x8Ka1BNPzJ45zEIQLW5xheRaJtwjs/I2J9NEdpdxTqOf7EfI/JWpNOPd6u1NLNlv+AtJnzflkKkJrU/CBeNwvr52R30/x4wOllcEGvqHK8hQOUv3aK89dP25a/tQBxg0Chn060m0OMTqmJb0a4q119z3XGJ24EE5flJ+mW1F5xLRsZ0p3/6KZ7DOJJ8/IT5vci1GbnmfspTlrI/KzhFc1X73ATXiJKzEYmeer+fje9LfNbEONTrmUCIutcmZMbcSm5yBt8LvI3+catjpA17aGqYAnDAoN3+RqtNyAeaJjmOl1txXuf45pzzUMogtiYu6+/uO0lMY69DF+QJ8KMNX7D7q9b0j4UV63Y9v52Jfw/mDX2hU++6fJZuVgRAZTFXeh8e9pBLelUwu/ufQnhZlOcqIsoSqSOkM775NtCLDHCCMbWz/Ja0KSCES6vQaSHOAyk2wXKM4MMJoalfTuRv3JrbNifFokp6YR65iq66GkSQ0Tauj8ac/U8SxWvC1SSTiWgra91fqbXY8es+HJyzLS0rmCPK0bmV/e3/wL6NMaD7Ke75odqCpaKXBiQL38b3cCpIEhWKbeC/G2DP0o3pJ504iOYw2j/nRHEAkgc5eDkf38Nlq1o15H130E1BUuH9hfYB3+CPqGMJr6kJ/NDVDMy4b+uYHkN/itTVEHTmkbmn1HQUON3eMb8f0WfFchxeQ0WL0X95WQ2MkWl3r+cagqWpujAs8H/G91Up2jZyEy7v/0X0MjgqqX/ioKrM4K5Vm4l/TemaJoakU7MR+r+p+m9ltkuI2SxCUb/N9GGVK7uVY/POjDMfwONonYQgp8DkJ+j52laL7dSwVe24FP/CvoKoYp/bd58YQv3Q8gfo+dpYqrxm53q76Lw1csx4Q/Q6zSW6GLSWuOXW5/VVeB6Wv9HabfbBVerEDErOGUOGGfTw+z49OSIurg0ffx6epjNZinOC0+kWlC6oUqJuFMnDvc2m83V1f/P8Hw83D/O5xuWd5IJlPLQciuE5oeYEWyP+/3X3V0vtLNvurv7uj8ej2MxFQEV9sRPuRXORJGYyYvFZLFer423AS5Bt+v399ViseF9jEDC2e0rIWhKULXV+MX5cIrb2NOEvI5G11e7379fzJcDhhJvc/d5PboejadTgbZl4opJS5krTR1hxxq/+bJGCOSvuuRLfTm6vb29uXHwhW7412+vZsvlcibu6BLRPBFAYacav+XCo4m+GmlSZpLiQjeRTP4hRABjAormkraPj6PRSPyP/6d5KHA3ksQ/8LjYym/I7wvzhpPodCNXyojKgnt0+T8Mq7d2qfiyYgAAAABJRU5ErkJggg=="
+ alt="Bonnie image"
+ />
+ <h5 class="mb-1 text-xl font-medium text-gray-900">
+ {{ username }}
+ </h5>
+ <span class="text-sm text-gray-500">{{ email }}</span>
+
+ <div class="flex mt-4 space-x-3 md:mt-6">
+ <a
+ routerLink="/edit"
+ class="inline-flex items-center px-4 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300"
+ >Edit Profile</a
+ >
+
+ <a
+ (click)="logout()"
+ class="inline-flex items-center px-4 py-2 text-sm font-medium text-center text-gray-900 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200"
+ >Log Out</a
+ >
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+
+
+
+ ./user-tab.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/components/WelcomeCardComponent.html b/documentation/components/WelcomeCardComponent.html
new file mode 100644
index 0000000..9c3d435
--- /dev/null
+++ b/documentation/components/WelcomeCardComponent.html
@@ -0,0 +1,356 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Components
+ -
+ WelcomeCardComponent
+
+
+
+
+
+
+
File
+
+
+ src/app/dashboard/welcome-card/welcome-card.component.ts
+
+
+
+
+
+
+
+
+ Metadata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ selector
+ app-welcome-card
+
+
+
+
+
+ styleUrls
+ ./welcome-card.component.css
+
+
+
+
+
+ templateUrl
+ ./welcome-card.component.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ userName
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ userName
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+ Default value : JSON.parse(localStorage.getItem('_username_canteen_app') || '')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-welcome-card',
+ templateUrl: './welcome-card.component.html',
+ styleUrls: ['./welcome-card.component.css']
+})
+export class WelcomeCardComponent {
+
+ userName : string = JSON.parse(localStorage.getItem('_username_canteen_app') || '');
+
+}
+
+
+
+
+ <div class="mx-2 shadow-lg bg-gray-100">
+ <div
+ id="toast-message-cta"
+ class="w-full max-w-full p-1 text-gray-500 bg-gray-100 rounded-lg shadow"
+ role="alert"
+ >
+ <div class="flex">
+ <div class="ml-3 text-sm font-normal">
+ <span class="mb-1 text-sm font-semibold text-gray-900"
+ >Welcome {{ userName }}</span
+ >
+
+ <div class="mb-2 text-sm font-normal">
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi
+ repellat corrupti architecto, odio, earum est sed sequi dicta error
+ maxime molestiae nobis! Nesciunt iure vero modi cumque facere,
+ perferendis fugit.
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+
+
+
+ ./welcome-card.component.css
+
+
+
+
+
+
+
+
+ Legend
+
+
+ Html element
+
+
+ Component
+
+
+ Html element with directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/coverage.html b/documentation/coverage.html
index 08da5c3..ad17922 100644
--- a/documentation/coverage.html
+++ b/documentation/coverage.html
@@ -13,7 +13,7 @@
-
+
@@ -50,7 +50,7 @@
- - Documentation coverage
+ - Documentation coverage
@@ -67,6 +67,66 @@
+
+
+
+ src/app/admin-dashboard/add-food/add-food.component.ts
+
+ component
+ AddFoodComponent
+
+ 0 %
+ (0/13)
+
+
+
+
+
+ src/app/admin-dashboard/delete-food/delete-food.component.ts
+
+ component
+ DeleteFoodComponent
+
+ 0 %
+ (0/1)
+
+
+
+
+
+ src/app/admin-dashboard/food-inventory/food-inventory.component.ts
+
+ component
+ FoodInventoryComponent
+
+ 0 %
+ (0/7)
+
+
+
+
+
+ src/app/admin-dashboard/time-pipe.ts
+
+ pipe
+ TimePipe
+
+ 0 %
+ (0/1)
+
+
+
+
+
+ src/app/admin-dashboard/update-food/update-food.component.ts
+
+ component
+ UpdateFoodComponent
+
+ 0 %
+ (0/1)
+
+
@@ -76,7 +136,19 @@
AppComponent
0 %
- (0/6)
+ (0/9)
+
+
+
+
+
+ src/app/booking/booking.component.ts
+
+ component
+ BookingComponent
+
+ 0 %
+ (0/1)
@@ -88,7 +160,7 @@
ChartCardComponent
0 %
- (0/2)
+ (0/5)
@@ -100,7 +172,7 @@
DashboardModalComponent
0 %
- (0/9)
+ (0/30)
@@ -115,6 +187,18 @@
(0/9)
+
+
+
+ src/app/dashboard/food-post/food-post.component.ts
+
+ component
+ FoodPostComponent
+
+ 0 %
+ (0/22)
+
+
@@ -127,6 +211,114 @@
(0/5)
+
+
+
+ src/app/dashboard/nav/nav.component.ts
+
+ component
+ NavComponent
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ src/app/dashboard/welcome-card/welcome-card.component.ts
+
+ component
+ WelcomeCardComponent
+
+ 0 %
+ (0/2)
+
+
+
+
+
+ src/app/errors/server-error/server-error.component.ts
+
+ component
+ ServerErrorComponent
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ src/app/errors/test-error/test-error.component.ts
+
+ component
+ TestErrorComponent
+
+ 0 %
+ (0/1)
+
+
+
+
+
+ src/app/feedback-history/feedback-history.component.ts
+
+ component
+ FeedbackHistoryComponent
+
+ 0 %
+ (0/8)
+
+
+
+
+
+ src/app/feedback/feedback.component.ts
+
+ component
+ FeedbackComponent
+
+ 0 %
+ (0/8)
+
+
+
+
+
+ src/app/interceptor/error.interceptor.ts
+
+ interceptor
+ ErrorInterceptor
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ src/app/interceptor/interceptor.interceptor.ts
+
+ interceptor
+ InterceptorInterceptor
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ src/app/models/currentUser.modal.ts
+
+ interface
+ ICurrentUser
+
+ 0 %
+ (0/10)
+
+
@@ -136,7 +328,31 @@
IFoodItem
0 %
- (0/5)
+ (0/6)
+
+
+
+
+
+ src/app/models/foodInventory.model.ts
+
+ interface
+ IFoodInventory
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ src/app/models/register.model.ts
+
+ interface
+ IRegister
+
+ 0 %
+ (0/2)
@@ -154,13 +370,13 @@
- src/app/nav/nav.component.ts
+ src/app/not-found/not-found.component.ts
component
- NavComponent
+ NotFoundComponent
0 %
- (0/5)
+ (0/1)
@@ -182,6 +398,18 @@
injectable
AuthService
+
+ 0 %
+ (0/19)
+
+
+
+
+
+ src/app/services/food-inventory-service.service.ts
+
+ injectable
+ FoodInventoryServiceService
0 %
(0/7)
@@ -196,7 +424,7 @@
FoodService
0 %
- (0/14)
+ (0/28)
@@ -211,6 +439,30 @@
(0/3)
+
+
+
+ src/app/services/footer.service.ts
+
+ injectable
+ FooterService
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ src/app/services/is-admin.guard.ts
+
+ guard
+ IsAdminGuard
+
+ 0 %
+ (0/3)
+
+
@@ -223,6 +475,18 @@
(0/4)
+
+
+
+ src/app/services/people-count.service.ts
+
+ injectable
+ PeopleCountService
+
+ 0 %
+ (0/4)
+
+
@@ -230,11 +494,71 @@
injectable
SidebarService
+
+ 0 %
+ (0/7)
+
+
+
+
+
+ src/app/services/user.service.ts
+
+ injectable
+ UserService
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ src/app/shared/accordion/accordion.component.ts
+
+ component
+ AccordionComponent
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ src/app/shared/add-item-button/add-item-button.component.ts
+
+ component
+ AddItemButtonComponent
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ src/app/shared/add-new-item/add-new-item.component.ts
+
+ component
+ AddNewItemComponent
0 %
(0/5)
+
+
+
+ src/app/shared/add-new-menu/add-new-menu.component.ts
+
+ component
+ AddNewMenuComponent
+
+ 0 %
+ (0/8)
+
+
@@ -247,6 +571,78 @@
(0/2)
+
+
+
+ src/app/shared/arrowButtons/left-arrow-button/left-arrow-button.component.ts
+
+ component
+ LeftArrowButtonComponent
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ src/app/shared/arrowButtons/right-arrow-button/right-arrow-button.component.ts
+
+ component
+ RightArrowButtonComponent
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ src/app/shared/back-button/back-button.component.ts
+
+ component
+ BackButtonComponent
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ src/app/shared/day-toggle-button/day-toggle-button.component.ts
+
+ component
+ DayToggleButtonComponent
+
+ 0 %
+ (0/10)
+
+
+
+
+
+ src/app/shared/edit-menu/edit-menu.component.ts
+
+ component
+ EditMenuComponent
+
+ 0 %
+ (0/7)
+
+
+
+
+
+ src/app/shared/footer/footer.component.ts
+
+ component
+ FooterComponent
+
+ 0 %
+ (0/4)
+
+
@@ -256,7 +652,7 @@
InputComponent
0 %
- (0/4)
+ (0/6)
@@ -302,11 +698,35 @@
component
SidebarComponent
+
+ 0 %
+ (0/5)
+
+
+
+
+
+ src/app/user/about/about.component.ts
+
+ component
+ AboutComponent
0 %
(0/4)
+
+
+
+ src/app/user/account/account.component.ts
+
+ component
+ AccountComponent
+
+ 0 %
+ (0/9)
+
+
@@ -328,7 +748,19 @@
ChangePasswordComponent
0 %
- (0/1)
+ (0/14)
+
+
+
+
+
+ src/app/user/edit-profile/edit-profile.component.ts
+
+ component
+ EditProfileComponent
+
+ 0 %
+ (0/20)
@@ -340,7 +772,19 @@
ForgetPasswordComponent
0 %
- (0/1)
+ (0/9)
+
+
+
+
+
+ src/app/user/invite-friend/invite-friend.component.ts
+
+ component
+ InviteFriendComponent
+
+ 0 %
+ (0/5)
@@ -352,7 +796,31 @@
LoginComponent
0 %
- (0/10)
+ (0/18)
+
+
+
+
+
+ src/app/user/please-login/please-login.component.ts
+
+ component
+ PleaseLoginComponent
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ src/app/user/profile/profile.component.ts
+
+ component
+ ProfileComponent
+
+ 0 %
+ (0/13)
@@ -364,7 +832,31 @@
RegisterComponent
0 %
- (0/13)
+ (0/16)
+
+
+
+
+
+ src/app/user/reset-password/reset-password.component.ts
+
+ component
+ ResetPasswordComponent
+
+ 0 %
+ (0/9)
+
+
+
+
+
+ src/app/user/user-tab/user-tab.component.ts
+
+ component
+ UserTabComponent
+
+ 0 %
+ (0/8)
diff --git a/documentation/dependencies.html b/documentation/dependencies.html
index 55b9c72..83f6233 100644
--- a/documentation/dependencies.html
+++ b/documentation/dependencies.html
@@ -13,7 +13,7 @@
-
+
@@ -46,11 +46,11 @@
- - Dependencies
+ - Dependencies
-
- @angular/animations : ^15.0.0
+ @angular/animations : ^15.2.9
-
@angular/common : ^15.0.0
-
@@ -68,21 +68,37 @@
-
@fortawesome/angular-fontawesome : ^0.12.0
-
- @fortawesome/fontawesome-free : ^6.2.1
+ @fortawesome/fontawesome-free : ^6.4.0
-
- @fortawesome/fontawesome-svg-core : ^6.2.0
+ @fortawesome/fontawesome-svg-core : ^6.4.0
-
- @fortawesome/free-brands-svg-icons : ^6.2.0
+ @fortawesome/free-brands-svg-icons : ^6.4.0
-
- @fortawesome/free-regular-svg-icons : ^6.2.0
+ @fortawesome/free-regular-svg-icons : ^6.4.0
-
- @fortawesome/free-solid-svg-icons : ^6.2.0
+ @fortawesome/free-solid-svg-icons : ^6.4.0
+ -
+ @ng-select/ng-select : ^10.0.3
-
@popperjs/core : ^2.11.6
+ -
+ angular-font-awesome : ^3.1.2
-
chart.js : ^2.9.4
+ -
+ font-awesome : ^4.7.0
+ -
+ ng-multiselect-dropdown : ^0.3.9
+ -
+ ng-otp-input : ^1.9.2
+ -
+ ngx-otp-input : ^0.11.4
+ -
+ ngx-toastr : ^17.0.2
-
rxjs : ~7.5.0
+ -
+ sweetalert2 : ^11.7.1
-
tslib : ^2.3.0
-
diff --git a/documentation/graph/dependencies.svg b/documentation/graph/dependencies.svg
index 0bf4e23..fcc2c96 100644
--- a/documentation/graph/dependencies.svg
+++ b/documentation/graph/dependencies.svg
@@ -1,420 +1,904 @@
-
-
-canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
+canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
- Defined in src/app/services/auth.guard.ts:13
+ Defined in src/app/services/auth.guard.ts:20
@@ -206,7 +212,7 @@
route
- ActivatedRouteSnapshot
+ ActivatedRouteSnapshot
@@ -218,7 +224,7 @@
state
- RouterStateSnapshot
+ RouterStateSnapshot
@@ -247,31 +253,57 @@
-
+
import { Injectable } from '@angular/core';
-import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
-import { Observable } from 'rxjs';
+import {
+ ActivatedRouteSnapshot,
+ CanActivate,
+ Router,
+ RouterStateSnapshot,
+ UrlTree,
+} from '@angular/router';
+import { Observable, from } from 'rxjs';
import { AuthService } from './auth.service';
@Injectable({
- providedIn: 'root'
+ providedIn: 'root',
})
+
export class AuthGuard implements CanActivate {
- constructor(private router: Router,private auth :AuthService){
-
- }
- canActivate(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
-
- var isAuthenticated = this.auth.isAuthenticated$;
- if(isAuthenticated){
- this.router.navigate(['/dashboard'])
- }
- return true;
- }
-
+
+ constructor(private router: Router, private auth: AuthService) {}
+
+canActivate(
+
+route: ActivatedRouteSnapshot,
+
+state: RouterStateSnapshot
+
+):
+| Observable<boolean | UrlTree>
+| Promise<boolean | UrlTree>
+ | boolean
+ | UrlTree {
+
+var isAuthenticated = this.auth.isAuthenticated$;
+
+if (isAuthenticated.getValue()) {
+
+return true;
+
}
+
+this.router.navigateByUrl('loginComponent');
+
+return false;
+ }
+
+}
+
+
+
+
+
diff --git a/documentation/guards/IsAdminGuard.html b/documentation/guards/IsAdminGuard.html
new file mode 100644
index 0000000..068cc95
--- /dev/null
+++ b/documentation/guards/IsAdminGuard.html
@@ -0,0 +1,357 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Guards
+ - IsAdminGuard
+
+
+
+
+
+
+
+
File
+
+
+ src/app/services/is-admin.guard.ts
+
+
+
+
+
+
+
+
+ Index
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ canActivate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(authService: AuthService, router: Router)
+
+
+
+
+ Defined in src/app/services/is-admin.guard.ts:9
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ authService
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ router
+
+
+ Router
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ canActivate
+
+
+
+
+
+
+canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
+
+
+
+
+
+
+ Defined in src/app/services/is-admin.guard.ts:15
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ route
+
+ ActivatedRouteSnapshot
+
+
+
+ No
+
+
+
+
+
+ state
+
+ RouterStateSnapshot
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : Observable | Promise | boolean | UrlTree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Injectable } from '@angular/core';
+import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
+import { Observable } from 'rxjs';
+import { AuthService } from './auth.service';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class IsAdminGuard implements CanActivate {
+
+ constructor(private authService : AuthService,private router : Router){
+
+ }
+
+ canActivate(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
+ if(this.authService.isAdmin()){
+ return this.authService.isAdmin();
+ }else{
+
+ this.router.navigateByUrl('/')
+ return this.authService.isAdmin();
+
+ }
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/index.html b/documentation/index.html
index 793a1a7..09ccfa7 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -13,7 +13,7 @@
-
+
@@ -31,19 +31,19 @@
-CanteenFe
+CanteenFe
This project was generated with Angular CLI version 15.0.3.
-Development server
+Development server
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
-Code scaffolding
+Code scaffolding
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
-Build
+Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
-Running unit tests
+Running unit tests
Run ng test
to execute the unit tests via Karma.
-Running end-to-end tests
+Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
-Further help
+Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
diff --git a/documentation/injectables/AuthService.html b/documentation/injectables/AuthService.html
index 9d81576..304f1e9 100644
--- a/documentation/injectables/AuthService.html
+++ b/documentation/injectables/AuthService.html
@@ -13,7 +13,7 @@
-
+
@@ -39,21 +39,27 @@
- - Injectables
- - AuthService
+ - Injectables
+ - AuthService
-
+
File
@@ -65,7 +71,7 @@ File
-
+
Index
@@ -77,12 +83,26 @@ Properties
+ -
+ baseUrl
+
-
isAuthenticated$
-
isAuthenticatedWithDelay
+ -
+ Public
+ location
+
+ -
+ Public
+ router
+
+ -
+ user$
+
@@ -95,6 +115,21 @@ Methods
+ -
+ backbutton
+
+ -
+ feedback
+
+ -
+ forgotPassword
+
+ -
+ getCurrentUser
+
+ -
+ getCurrentUserToken
+
-
isAuthenticated
@@ -104,6 +139,15 @@ Methods
-
logout
+ -
+ registration
+
+ -
+ setCurrentUser
+
+ -
+ update
+
@@ -116,18 +160,18 @@ Methods
-
+
Constructor
-constructor(http: HttpClient)
+constructor(http: HttpClient, location: Location, router: Router)
- Defined in src/app/services/auth.service.ts:12
+ Defined in src/app/services/auth.service.ts:17
@@ -148,7 +192,31 @@ Constructor
http
- HttpClient
+ HttpClient
+
+
+
+ No
+
+
+
+
+ location
+
+
+ Location
+
+
+
+ No
+
+
+
+
+ router
+
+
+ Router
@@ -165,7 +233,7 @@ Constructor
-
+
Methods
@@ -174,24 +242,24 @@
-
+
- isAuthenticated
-
+ backbutton
+
-isAuthenticated()
+backbutton()
- Defined in src/app/services/auth.service.ts:18
+ Defined in src/app/services/auth.service.ts:139
@@ -211,24 +279,24 @@
-
+
- login
-
+ feedback
+
-login(username: string, password: string)
+feedback(model: any)
- Defined in src/app/services/auth.service.ts:28
+ Defined in src/app/services/auth.service.ts:89
@@ -249,9 +317,9 @@
- username
+ model
- string
+ any
@@ -260,10 +328,67 @@
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ forgotPassword
+
+
+
+
+
+
+forgotPassword(data: FormGroup)
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:98
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
- password
+ data
- string
+ FormGroup
@@ -292,24 +417,24 @@
-
+
- logout
-
+ getCurrentUser
+
-logout()
+getCurrentUser()
- Defined in src/app/services/auth.service.ts:44
+ Defined in src/app/services/auth.service.ts:151
@@ -318,120 +443,742 @@
-
-
-
-
- Properties
-
-
+
- isAuthenticated$
-
+ getCurrentUserToken
+
-
-
- Default value : new BehaviorSubject<boolean>(false)
-
-
-
-
- Defined in src/app/services/auth.service.ts:11
-
-
+
+
+getCurrentUserToken()
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:143
+
+
+
+
+
+
+
+ Returns : string | null
+
+
+
-
+
- isAuthenticatedWithDelay
-
+ isAuthenticated
+
-
-
- Default value : new Observable<boolean>
-
-
-
-
- Defined in src/app/services/auth.service.ts:12
-
-
+
+
+isAuthenticated()
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:21
+
+
+
+
+
+
+
+ Returns : void
+
+
+
-
+
+
+
+
+
+
+ login
+
+
+
+
+
+
+login(username: string, password: string)
+
+
-
+
+
+ Defined in src/app/services/auth.service.ts:30
+
+
-
- import { Injectable } from '@angular/core';
-import { BehaviorSubject, delay, map, Observable } from 'rxjs';
-import { environment } from 'src/environments/environment';
-import { HttpClient } from '@angular/common/http';
-import IUser from '../models/user.model';
-import { Router } from '@angular/router';
-@Injectable({
- providedIn: 'root',
-})
-export class AuthService {
- isAuthenticated$ = new BehaviorSubject<boolean>(false);
- isAuthenticatedWithDelay =new Observable<boolean>;
- constructor(private http: HttpClient) {
-
- }
+
+
- isAuthenticated(){
- if(null !== localStorage.getItem('_token_canteen_app')){
- this.isAuthenticated$.next(true);
- this.isAuthenticatedWithDelay = this.isAuthenticated$.pipe(delay(1000))
- }
- else{
- this.isAuthenticated$.next(false)
- }
- }
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ username
+
+ string
+
- login(username: string, password: string) {
-
- return this.http
- .post<IUser>(`${environment.apiUrl}auth/local`, {
- identifier: username,
- password: password,
- })
+
+ No
+
- .pipe(
- map((user: IUser) => {
- localStorage.setItem('_token_canteen_app', JSON.stringify(user.jwt));
- return user;
- })
- );
- }
- logout() {
- localStorage.removeItem('user');
+
+
+ password
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ logout
+
+
+
+
+
+
+logout()
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:81
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ registration
+
+
+
+
+
+
+registration(registerForm: FormGroup)
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:54
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ registerForm
+
+ FormGroup
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setCurrentUser
+
+
+
+
+
+
+setCurrentUser(user: IUser)
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:105
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ user
+
+ IUser
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ update
+
+
+
+
+
+
+update(registerForm: FormGroup, id: number)
+
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:109
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ registerForm
+
+ FormGroup
+
+
+
+ No
+
+
+
+
+
+ id
+
+ number
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ baseUrl
+
+
+
+
+
+
+ Default value : environment.apiUrl
+
+
+
+
+ Defined in src/app/services/auth.service.ts:17
+
+
+
+
+
+
+
+
+
+
+
+
+ isAuthenticated$
+
+
+
+
+
+
+ Default value : new BehaviorSubject<boolean>(false)
+
+
+
+
+ Defined in src/app/services/auth.service.ts:14
+
+
+
+
+
+
+
+
+
+
+
+
+ isAuthenticatedWithDelay
+
+
+
+
+
+
+ Default value : new Observable<boolean>()
+
+
+
+
+ Defined in src/app/services/auth.service.ts:15
+
+
+
+
+
+
+
+
+
+
+
+
+ Public
+ location
+
+
+
+
+
+
+ Type : Location
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:19
+
+
+
+
+
+
+
+
+
+
+
+
+ Public
+ router
+
+
+
+
+
+
+ Type : Router
+
+
+
+
+
+ Defined in src/app/services/auth.service.ts:19
+
+
+
+
+
+
+
+
+
+
+
+
+ user$
+
+
+
+
+
+
+ Default value : new BehaviorSubject<ICurrentUser | null>(null)
+
+
+
+
+ Defined in src/app/services/auth.service.ts:16
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Injectable } from '@angular/core';
+import { BehaviorSubject, delay, map, Observable } from 'rxjs';
+import { environment } from 'src/environments/environment';
+import { HttpClient } from '@angular/common/http';
+import IUser from '../models/user.model';
+import { FormGroup } from '@angular/forms';
+import { Location } from '@angular/common';
+import ICurrentUser from '../models/currentUser.modal';
+import { Router } from '@angular/router';
+@Injectable({
+ providedIn: 'root',
+})
+export class AuthService {
+ isAuthenticated$ = new BehaviorSubject<boolean>(false);
+ isAuthenticatedWithDelay = new Observable<boolean>();
+ user$ = new BehaviorSubject<ICurrentUser | null>(null);
+ baseUrl = environment.apiUrl;
+
+ constructor(private http: HttpClient, public location: Location, public router:Router) {}
+
+ isAuthenticated() {
+ if (null !== localStorage.getItem('_token_canteen_app')) {
+ this.isAuthenticated$.next(true);
+ this.isAuthenticatedWithDelay = this.isAuthenticated$.pipe(delay(1000));
+ } else {
+ this.isAuthenticated$.next(false);
+ }
+ }
+
+ login(username: string, password: string) {
+ return this.http
+ .post<IUser>(`${environment.apiUrl}auth/local`, {
+ identifier: username,
+ password: password,
+ })
+
+ .pipe(
+ map((user: IUser) => {
+ localStorage.setItem('_token_canteen_app', JSON.stringify(user.jwt));
+ localStorage.setItem(
+ '_username_canteen_app',
+ JSON.stringify(user.user.username)
+ );
+ localStorage.setItem(
+ '_email_canteen_app',
+ JSON.stringify(user.user.email)
+ );
+ this.user$.next(user.user);
+ return user;
+ })
+ );
+ }
+
+ registration(registerForm: FormGroup) {
+ console.log(registerForm.value.username);
+
+ return this.http
+ .post<IUser>(`${environment.apiUrl}auth/local/register`, {
+ username: registerForm.value.username,
+ email: registerForm.value.email,
+ password: registerForm.value.password,
+ EmpId : registerForm.value.EmployeeId
+ })
+
+ .pipe(
+ map((user: IUser) => {
+ localStorage.setItem('_token_canteen_app', JSON.stringify(user.jwt));
+ localStorage.setItem(
+ '_username_canteen_app',
+ JSON.stringify(user.user.username)
+ );
+ localStorage.setItem(
+ '_email_canteen_app',
+ JSON.stringify(user.user.email)
+ );
+ return user;
+ })
+ );
+ }
+
+ logout() {
+ localStorage.removeItem('_token_canteen_app');
+ localStorage.removeItem('_email_canteen_app');
+ localStorage.removeItem('_username_canteen_app');
+ window.location.reload()
+ this.router.navigateByUrl('loginComponent');
+ }
+
+ feedback(model: any) {
+ return this.http.post(this.baseUrl + '/feedback', model).pipe(
+ map((user) => {
+ if (user) {
+ // this.setCurrentUser(user);
+ }
+ })
+ );
+ }
+ forgotPassword(data: FormGroup) {
+ return this.http.post(this.baseUrl + 'auth/forgot-password', {
+ email:data.value.email
+ }).pipe(
+
+ );
+ }
+ setCurrentUser(user: IUser) {
+ localStorage.setItem('user', JSON.stringify(user));
+ }
+
+ update(registerForm: FormGroup, id: number) {
+ console.log(registerForm.value.username);
+
+ return this.http
+ .put<IUser>(`${environment.apiUrl}users/${id}`, {
+ username: registerForm.value.username,
+ email: registerForm.value.email,
+ password: registerForm.value.password,
+ })
+
+ .pipe(
+ map((user: IUser) => {
+ localStorage.setItem('_token_canteen_app', JSON.stringify(user.jwt));
+ localStorage.setItem(
+ '_username_canteen_app',
+ JSON.stringify(user.user.username)
+ );
+ localStorage.setItem(
+ '_email_canteen_app',
+ JSON.stringify(user.user.email)
+ );
+ return user;
+ })
+ );
+ }
+
+ // getUser(username: string) {
+ // return this.http.get<IUser>(`${environment.apiUrl}user/` + username);
+ // }
+
+ backbutton() {
+ this.location.back();
+ }
+
+ getCurrentUserToken(): string | null {
+ const token = localStorage.getItem('_token_canteen_app');
+ if (token) {
+ return JSON.parse(token);
+ }
+ return null;
+ }
+
+ getCurrentUser() {
+ return this.http.get<any>(`${environment.apiUrl}users/me`);
}
}
diff --git a/documentation/injectables/FoodInventoryServiceService.html b/documentation/injectables/FoodInventoryServiceService.html
new file mode 100644
index 0000000..324456c
--- /dev/null
+++ b/documentation/injectables/FoodInventoryServiceService.html
@@ -0,0 +1,544 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Injectables
+ - FoodInventoryServiceService
+
+
+
+
+
+
+
+
File
+
+
+ src/app/services/food-inventory-service.service.ts
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ apiUrl
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ addFood
+
+ -
+ deleteFood
+
+ -
+ getAllFood
+
+ -
+ ngOnInit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(http: HttpClient)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ http
+
+
+ HttpClient
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ addFood
+
+
+
+
+
+
+addFood(addFoodForm: FormGroup)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ addFoodForm
+
+ FormGroup
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deleteFood
+
+
+
+
+
+
+deleteFood(id: number)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ id
+
+ number
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getAllFood
+
+
+
+
+
+
+getAllFood()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+ ngOnInit
+
+
+
+
+
+
+ngOnInit()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ apiUrl
+
+
+
+
+
+
+ Default value : environment.apiUrl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { HttpClient } from '@angular/common/http';
+import { Injectable, OnInit } from '@angular/core';
+import { FormGroup } from '@angular/forms';
+import { map } from 'rxjs';
+import { environment } from 'src/environments/environment';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class FoodInventoryServiceService implements OnInit {
+ apiUrl = environment.apiUrl;
+ constructor(private http: HttpClient) {}
+ ngOnInit(): void {}
+ getAllFood() {
+ return this.http.get<any>(`${this.apiUrl}food-inventories`).pipe(
+ map((res: any) => {
+ return res.data;
+ })
+ );
+ }
+
+ deleteFood(id: number) {
+ return this.http.delete<any>(`${this.apiUrl}food-inventories/${id}`);
+ }
+
+ addFood(addFoodForm: FormGroup) {
+ return this.http
+ .post<any>(`${this.apiUrl}food-inventories`, {
+ data: {
+ FoodName: addFoodForm.value.FoodName,
+ Price: addFoodForm.value.Price,
+ ImgUrl: addFoodForm.value.ImageUrl,
+ },
+ })
+ .pipe(
+ map((res: any) => {
+ return res;
+ })
+ );
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/injectables/FoodService.html b/documentation/injectables/FoodService.html
index 7db95e5..6f95c53 100644
--- a/documentation/injectables/FoodService.html
+++ b/documentation/injectables/FoodService.html
@@ -13,7 +13,7 @@
-
+
@@ -39,21 +39,27 @@
- - Injectables
- - FoodService
+ - Injectables
+ - FoodService
-
+
File
@@ -65,7 +71,7 @@ File
-
+
Index
@@ -85,6 +91,18 @@ Properties
Public
BCurrentIndex
+
+ fooditem
+
+
+ foodItemBreakFast
+
+
+ foodItemLunch
+
+
+ foodItemSnacks
+
Public
Hcards
@@ -101,6 +119,9 @@ Properties
Public
LCurrentIndex
+
+ selectedDay
+
@@ -113,24 +134,51 @@ Methods
+ -
+ foodCardPop
+
-
foodCardPush
+ -
+ formatDate
+
+ -
+ getDemo
+
-
getFood
+ -
+ getFoodInventory
+
-
isCardOpen
+ -
+ postFood
+
-
register
+ -
+ todayFood
+
-
toggleCard
+ -
+ toggleDay
+
-
toggleFood
+ -
+ tommorowFood
+
+ -
+ unregister
+
@@ -143,18 +191,18 @@ Methods
-
+
Constructor
-constructor(http: HttpClient)
+constructor(http: HttpClient)
- Defined in src/app/services/food.service.ts:15
+ Defined in src/app/services/food.service.ts:36
@@ -175,7 +223,7 @@ Constructor
http
- HttpClient
+ HttpClient
@@ -192,11 +240,92 @@ Constructor
-
+
Methods
+
+
+
+
+
+
+ foodCardPop
+
+
+
+
+
+
+foodCardPop(id: string, cards: IFoodCard[])
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:114
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ id
+
+ string
+
+
+
+ No
+
+
+
+
+
+ cards
+
+ IFoodCard[]
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
@@ -217,8 +346,8 @@
- Defined in src/app/services/food.service.ts:37
+ Defined in src/app/services/food.service.ts:100
@@ -278,6 +407,112 @@
+
+
+
+
+
+
+ formatDate
+
+
+
+
+
+
+formatDate(date: Date)
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:26
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ date
+
+ Date
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getDemo
+
+
+
+
+
+
+getDemo()
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:82
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
@@ -298,8 +533,45 @@
- Defined in src/app/services/food.service.ts:18
+ Defined in src/app/services/food.service.ts:57
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+
+
+ getFoodInventory
+
+
+
+
+
+
+getFoodInventory()
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:74
@@ -335,8 +607,8 @@
- Defined in src/app/services/food.service.ts:73
+ Defined in src/app/services/food.service.ts:155
@@ -396,6 +668,75 @@
+
+
+
+
+
+
+ postFood
+
+
+
+
+
+
+postFood(food: IFoodItem)
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:67
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ food
+
+ IFoodItem
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : Observable<IFoodItem>
+
+
+
+
+
+
+
+
+
@@ -409,15 +750,251 @@
-register(id: string, category: number)
+register(id: string, category: number)
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:118
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ id
+
+ string
+
+
+
+ No
+
+
+
+
+
+ category
+
+ number
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ todayFood
+
+
+
+
+
+
+todayFood()
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:230
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ toggleCard
+
+
+
+
+
+
+toggleCard(action: string, category: number)
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:216
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ action
+
+ string
+
+
+
+ No
+
+
+
+
+
+ category
+
+ number
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toggleDay
+
+
+
+
+
+
+toggleDay()
+
+
+
+
+
+
+ Defined in src/app/services/food.service.ts:48
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ toggleFood
+
+
+
+
+
+
+toggleFood(action: string, category: number, cards: IFoodCard[])
- Defined in src/app/services/food.service.ts:51
+ Defined in src/app/services/food.service.ts:170
@@ -438,7 +1015,7 @@
- id
+ action
string
@@ -460,6 +1037,18 @@
+
+
+ cards
+
+ IFoodCard[]
+
+
+
+ No
+
+
+
@@ -481,24 +1070,24 @@
-
+
- toggleCard
-
+ tommorowFood
+
-toggleCard(action: string, category: number)
+tommorowFood()
- Defined in src/app/services/food.service.ts:134
+ Defined in src/app/services/food.service.ts:292
@@ -506,53 +1095,9 @@
-
- Parameters :
-
-
-
-
- Name
- Type
- Optional
-
-
-
-
- action
-
- string
-
-
-
- No
-
-
-
-
-
- category
-
- number
-
-
-
- No
-
-
-
-
-
-
-
-
-
Returns : void
-
-
-
@@ -562,24 +1107,24 @@
-
+
- toggleFood
-
+ unregister
+
-toggleFood(action: string, category: number, cards: IFoodCard[])
+unregister(id: string, category: number)
- Defined in src/app/services/food.service.ts:88
+ Defined in src/app/services/food.service.ts:136
@@ -600,7 +1145,7 @@
- action
+ id
string
@@ -622,18 +1167,6 @@
-
-
- cards
-
- IFoodCard[]
-
-
-
- No
-
-
-
@@ -652,7 +1185,7 @@
-
+
Properties
@@ -682,7 +1215,7 @@
- Defined in src/app/services/food.service.ts:33
+ Defined in src/app/services/food.service.ts:96
@@ -714,7 +1247,131 @@
- Defined in src/app/services/food.service.ts:29
+ Defined in src/app/services/food.service.ts:92
+
+
+
+
+
+
+
+
+
+
+
+
+ fooditem
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/services/food.service.ts:24
+
+
+
+
+
+
+
+
+
+
+
+
+ foodItemBreakFast
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/services/food.service.ts:19
+
+
+
+
+
+
+
+
+
+
+
+
+ foodItemLunch
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/services/food.service.ts:21
+
+
+
+
+
+
+
+
+
+
+
+
+ foodItemSnacks
+
+
+
+
+
+
+ Type : any[]
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/services/food.service.ts:23
@@ -746,7 +1403,7 @@
- Defined in src/app/services/food.service.ts:35
+ Defined in src/app/services/food.service.ts:98
@@ -778,7 +1435,7 @@
- Defined in src/app/services/food.service.ts:31
+ Defined in src/app/services/food.service.ts:94
@@ -810,7 +1467,7 @@
- Defined in src/app/services/food.service.ts:34
+ Defined in src/app/services/food.service.ts:97
@@ -842,7 +1499,38 @@
- Defined in src/app/services/food.service.ts:30
+ Defined in src/app/services/food.service.ts:93
+
+
+
+
+
+
+
+
+
+
+
+
+ selectedDay
+
+
+
+
+
+
+ Type : boolean
+
+
+
+
+
+ Default value : true
+
+
+
+
+ Defined in src/app/services/food.service.ts:17
@@ -854,12 +1542,13 @@
-
+
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { map } from 'rxjs';
+import { map, Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import IFoodItem from '../models/food.model';
+import { DatePipe } from '@angular/common';
interface IFoodCard {
id: string;
@@ -870,12 +1559,49 @@
providedIn: 'root',
})
export class FoodService {
- constructor(private http: HttpClient) {}
+ selectedDay: boolean = true;
+
+ foodItemBreakFast: any[] = [];
+
+ foodItemLunch: any[] = [];
+
+ foodItemSnacks: any[] = [];
+ fooditem: any[] = [];
+
+ formatDate(date: Date) {
+ var d = new Date(date),
+ month = '' + (d.getMonth() + 1),
+ day = '' + d.getDate(),
+ year = d.getFullYear();
+
+ if (month.length < 2) month = '0' + month;
+ if (day.length < 2) day = '0' + day;
+
+ return [year, month, day].join('-');
+ }
+ constructor(private http: HttpClient) {
+ this.getFoodInventory().subscribe({
+ next: (response) => {
+ response.forEach((e: any) => {
+ this.fooditem.push(e.attributes);
+ console.log(e.attributes);
+ });
+ },
+ });
+ }
+
+ toggleDay() {
+ this.selectedDay = !this.selectedDay;
+ if (this.selectedDay) {
+ this.todayFood();
+ } else {
+ this.tommorowFood();
+ }
+ }
getFood() {
return this.http
- .get<any>(`${environment.apiUrl}food-inventories`)
-
+ .get<any>(`${environment.apiUrl}food-mains?populate=*`)
.pipe(
map((foodItem) => {
return foodItem.data;
@@ -883,6 +1609,31 @@
);
}
+ postFood(food: IFoodItem): Observable<IFoodItem> {
+ return this.http.post<IFoodItem>(
+ `${environment.apiUrl}food-mains?populate=*`,
+ food
+ );
+ }
+
+ getFoodInventory() {
+ return this.http.get<any>(`${environment.apiUrl}food-inventories`).pipe(
+ map((item) => {
+ return item.data;
+ })
+ );
+ }
+
+ getDemo() {
+ this.getFoodInventory().subscribe({
+ next: (response) => {
+ response.forEach((e: any) => {
+ this.fooditem.push(e.attributes);
+ });
+ },
+ });
+ }
+
public BCurrentIndex = 0;
public LCurrentIndex = 0;
public HCurrentIndex = 0;
@@ -905,6 +1656,10 @@
}
}
+ foodCardPop(id: string, cards: IFoodCard[]) {
+ cards = cards.filter((element) => element.id !== id);
+ }
+
register(id: string, category: number) {
switch (category) {
case 0: // Brekfast
@@ -923,9 +1678,24 @@
}
}
- // unregister(id: string) {
- // this.cards = this.cards.filter((element) => element.id !== id);
- // }
+ unregister(id: string, category: number) {
+ // this.cards = this.cards.filter((element) => element.id !== id);
+ switch (category) {
+ case 0: // Brekfast
+ this.foodCardPop(id, this.Bcards);
+
+ break;
+
+ case 1: // Lunch
+ this.foodCardPop(id, this.Lcards);
+
+ break;
+ case 2: // High Tea
+ this.foodCardPop(id, this.Hcards);
+
+ break;
+ }
+ }
isCardOpen(id: string, category: number): boolean {
if (category === 0) {
@@ -1001,6 +1771,130 @@
this.toggleFood(action, category, this.Hcards);
}
}
+
+ todayFood() {
+ console.log(
+ this.foodItemBreakFast.length,
+ this.foodItemLunch.length,
+ this.foodItemSnacks.length
+ );
+ if (this.foodItemBreakFast.length > 0) {
+ this.foodItemBreakFast = [];
+ this.Bcards = [];
+ }
+ if (this.foodItemLunch.length > 0) {
+ this.foodItemLunch = [];
+ this.Lcards = [];
+ }
+ if (this.foodItemSnacks.length > 0) {
+ this.foodItemSnacks = [];
+ this.Hcards = [];
+ }
+
+ var day = new Date();
+ // var nextDay = new Date(day);
+ // day.setDate(day.getDate());
+ console.log(this.formatDate(day));
+
+ this.getFood().subscribe({
+ next: async (value) => {
+ value.forEach((element: any) => {
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'BreakFast' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemBreakFast.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemBreakFast);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'Lunch' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemLunch.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemLunch);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'HighTea' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemSnacks.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemSnacks);
+ }
+ });
+ },
+ });
+ }
+
+ tommorowFood() {
+ console.log(
+ this.foodItemBreakFast.length,
+ this.foodItemLunch.length,
+ this.foodItemSnacks.length
+ );
+ if (this.foodItemBreakFast.length > 0) {
+ this.foodItemBreakFast = [];
+ this.Bcards = [];
+ }
+ if (this.foodItemLunch.length > 0) {
+ this.foodItemLunch = [];
+ this.Lcards = [];
+ }
+ if (this.foodItemSnacks.length > 0) {
+ this.foodItemSnacks = [];
+ this.Hcards = [];
+ }
+ var day = new Date();
+ var nextDay = new Date(day);
+ nextDay.setDate(day.getDate() + 1);
+
+ console.log(this.formatDate(nextDay));
+
+ this.getFood().subscribe({
+ next: async (value) => {
+ value.forEach((element: any) => {
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'BreakFast' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemBreakFast.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemBreakFast);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'Lunch' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemLunch.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemLunch);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'HighTea' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemSnacks.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemSnacks);
+ }
+ });
+ },
+ });
+ }
}
diff --git a/documentation/injectables/FooterService.html b/documentation/injectables/FooterService.html
new file mode 100644
index 0000000..436b416
--- /dev/null
+++ b/documentation/injectables/FooterService.html
@@ -0,0 +1,400 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Injectables
+ - FooterService
+
+
+
+
+
+
+
+
File
+
+
+ src/app/services/footer.service.ts
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Private
+ activeSection
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ isActive
+
+
+
+
+
+
+isActive(section: string)
+
+
+
+
+
+
+ Defined in src/app/services/footer.service.ts:23
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ section
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setActive
+
+
+
+
+
+
+setActive(section: string)
+
+
+
+
+
+
+ Defined in src/app/services/footer.service.ts:19
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ section
+
+ string
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Private
+ activeSection
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+ Default value : ''
+
+
+
+
+ Defined in src/app/services/footer.service.ts:17
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class FooterService {
+ private activeSection: string = '';
+
+ setActive(section: string): void {
+ this.activeSection = section;
+ }
+
+ isActive(section: string): boolean {
+ return this.activeSection === section;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/injectables/ModalService.html b/documentation/injectables/ModalService.html
index c9f0b26..f6891c2 100644
--- a/documentation/injectables/ModalService.html
+++ b/documentation/injectables/ModalService.html
@@ -13,7 +13,7 @@
-
+
@@ -39,21 +39,27 @@
- - Injectables
- - ModalService
+ - Injectables
+ - ModalService
-
+
File
@@ -65,7 +71,7 @@ File
-
+
Index
@@ -111,7 +117,7 @@ Methods
-
+
Methods
@@ -223,7 +229,7 @@
-
+
Properties
@@ -241,7 +247,7 @@
- Default value : true
+ Default value : false
@@ -258,14 +264,14 @@
-
+
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class ModalService {
- modal = true;
+ modal = false;
isModalOpen(): boolean {
return this.modal;
diff --git a/documentation/injectables/PeopleCountService.html b/documentation/injectables/PeopleCountService.html
new file mode 100644
index 0000000..0c15c8b
--- /dev/null
+++ b/documentation/injectables/PeopleCountService.html
@@ -0,0 +1,341 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Injectables
+ - PeopleCountService
+
+
+
+
+
+
+
+
File
+
+
+ src/app/services/people-count.service.ts
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ counts
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ getPeopleCount
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(http: HttpClient)
+
+
+
+
+ Defined in src/app/services/people-count.service.ts:9
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ http
+
+
+ HttpClient
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ getPeopleCount
+
+
+
+
+
+
+getPeopleCount()
+
+
+
+
+
+
+ Defined in src/app/services/people-count.service.ts:13
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ counts
+
+
+
+
+
+
+ Type : number
+
+
+
+
+
+ Default value : -1
+
+
+
+
+ Defined in src/app/services/people-count.service.ts:9
+
+
+
+
+
+
+
+
+
+
+
+
+ import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { environment } from 'src/environments/environment';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class PeopleCountService {
+ counts: number = -1;
+
+ constructor(private http: HttpClient) {}
+
+ getPeopleCount() {
+ return this.http.get<any>(`${environment.apiUrl}peopler-counts`);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/injectables/SidebarService.html b/documentation/injectables/SidebarService.html
index d77e91a..857e052 100644
--- a/documentation/injectables/SidebarService.html
+++ b/documentation/injectables/SidebarService.html
@@ -13,7 +13,7 @@
-
+
@@ -39,21 +39,27 @@
- - Injectables
- - SidebarService
+ - Injectables
+ - SidebarService
-
+
File
@@ -65,7 +71,7 @@ File
-
+
Index
@@ -80,6 +86,9 @@ Properties
isSidebarVisible$
+
+ isUserTabVisible
+
onHam
@@ -98,6 +107,9 @@ Methods
toggleSidebar
+
+ toggleUserTab
+
@@ -110,7 +122,7 @@ Methods
-
+
Constructor
@@ -121,7 +133,7 @@ Constructor
- Defined in src/app/services/sidebar.service.ts:8
+ Defined in src/app/services/sidebar.service.ts:7
@@ -159,7 +171,7 @@ Constructor
-
+
Methods
@@ -190,6 +202,43 @@
+
+
+
+
+ Returns : void
+
+
+
+
+
+
+
+
+
+
+
+
+ toggleUserTab
+
+
+
+
+
+
+toggleUserTab()
+
+
+
+
+
+
+ Defined in src/app/services/sidebar.service.ts:18
+
+
+
+
@@ -202,7 +251,7 @@
-
+
Properties
@@ -217,6 +266,31 @@
+
+
+
+ Default value : false
+
+
+
+
+ Defined in src/app/services/sidebar.service.ts:10
+
+
+
+
+
+
+
+
+
+
+
+
+ isUserTabVisible
+
+
+
@@ -262,9 +336,8 @@
-
+
import { Injectable } from '@angular/core';
-import { BehaviorSubject } from 'rxjs';
import { AuthService } from './auth.service';
@Injectable({
@@ -274,12 +347,16 @@
constructor(private auth: AuthService) {}
isSidebarVisible$ = false;
+ isUserTabVisible = false;
onHam = false;
toggleSidebar() {
this.isSidebarVisible$ = !this.isSidebarVisible$;
this.onHam = !this.onHam;
}
+ toggleUserTab() {
+ this.isUserTabVisible = !this.isUserTabVisible;
+ }
}
diff --git a/documentation/injectables/UserService.html b/documentation/injectables/UserService.html
new file mode 100644
index 0000000..20749ba
--- /dev/null
+++ b/documentation/injectables/UserService.html
@@ -0,0 +1,420 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Injectables
+ - UserService
+
+
+
+
+
+
+
+
File
+
+
+ src/app/services/user.service.ts
+
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+ -
+ Public
+ http
+
+ -
+ Organization
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ getOrganization
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(auth: AuthService, http: HttpClient)
+
+
+
+
+ Defined in src/app/services/user.service.ts:10
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+ http
+
+
+ HttpClient
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ getOrganization
+
+
+
+
+
+
+getOrganization()
+
+
+
+
+
+
+ Defined in src/app/services/user.service.ts:12
+
+
+
+
+
+
+
+
+ Returns : any
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+ Defined in src/app/services/user.service.ts:11
+
+
+
+
+
+
+
+
+
+
+
+
+ Public
+ http
+
+
+
+
+
+
+ Type : HttpClient
+
+
+
+
+
+ Defined in src/app/services/user.service.ts:11
+
+
+
+
+
+
+
+
+
+
+
+
+ Organization
+
+
+
+
+
+
+ Type : any
+
+
+
+
+
+ Default value : []
+
+
+
+
+ Defined in src/app/services/user.service.ts:10
+
+
+
+
+
+
+
+
+
+
+
+
+ import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { environment } from 'src/environments/environment';
+import { AuthService } from './auth.service';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class UserService {
+ Organization: any = [];
+ constructor(public auth: AuthService, public http: HttpClient) {}
+ getOrganization() {
+ return this.http
+ .get<any>(`${environment.apiUrl}organizations`)
+ .subscribe((val) => {
+ val.data.forEach((e: any) => {
+ this.Organization.push(e);
+ });
+ });
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/interceptors/ErrorInterceptor.html b/documentation/interceptors/ErrorInterceptor.html
new file mode 100644
index 0000000..71ab295
--- /dev/null
+++ b/documentation/interceptors/ErrorInterceptor.html
@@ -0,0 +1,407 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Interceptors
+ - ErrorInterceptor
+
+
+
+
+
+
+
+
File
+
+
+ src/app/interceptor/error.interceptor.ts
+
+
+
+
+
+
+ Index
+
+
+
+
+
+ Methods
+
+
+
+
+
+ -
+ intercept
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+
+
+constructor(router: Router, toastr: ToastrService)
+
+
+
+
+ Defined in src/app/interceptor/error.interceptor.ts:16
+
+
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ router
+
+
+ Router
+
+
+
+ No
+
+
+
+
+ toastr
+
+
+ ToastrService
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ intercept
+
+
+
+
+
+
+intercept(request: HttpRequest<>, next: HttpHandler)
+
+
+
+
+
+
+ Defined in src/app/interceptor/error.interceptor.ts:18
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ request
+
+ HttpRequest<>
+
+
+
+ No
+
+
+
+
+
+ next
+
+ HttpHandler
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : Observable<HttpEvent<>>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ import { Injectable } from '@angular/core';
+import {
+ HttpRequest,
+ HttpHandler,
+ HttpEvent,
+ HttpInterceptor,
+ HttpErrorResponse,
+ HttpStatusCode,
+} from '@angular/common/http';
+import { catchError, Observable } from 'rxjs';
+import { NavigationExtras, Router } from '@angular/router';
+import { ToastrService } from 'ngx-toastr';
+// const { toast, snackbar } = require('tailwind-toast');
+
+@Injectable()
+export class ErrorInterceptor implements HttpInterceptor {
+ constructor(private router: Router, private toastr: ToastrService) {}
+ intercept(
+ request: HttpRequest<unknown>,
+ next: HttpHandler
+ ): Observable<HttpEvent<unknown>> {
+ return next.handle(request).pipe(
+ catchError((error: HttpErrorResponse) => {
+ if (error) {
+ switch (error.status) {
+ case 400:
+ if (error.error.error.details.errors) {
+ console.log(error.error.error.details.errors);
+
+ const modelStateErrors = [];
+ for (const key in error.error.error.details.errors) {
+ console.log("Im here");
+
+ if (error.error.error.details.errors[key]) {
+ console.log(error.error.error.details.errors[key]);
+
+ this.toastr.error(
+ error.error.error.details.errors[key].message,
+ // error.status.toString()
+ );
+
+
+ modelStateErrors.push(error.error.error.details.errors[key]);
+ }
+ }
+ throw modelStateErrors.flat();
+ } else {
+ this.toastr.error(
+ error.error.error.message,
+ // error.status.toString()
+ );
+ }
+ break;
+ case 401:
+ this.toastr.error('Unauthorised');
+ break;
+ case 403:
+ this.toastr.error('Forbidden');
+ break;
+ case 404:
+ this.router.navigateByUrl('/not-found');
+ break;
+ case 500:
+ this.toastr.error('Internal Server Error');
+
+ break;
+ case 429:
+ this.toastr.error("Too Many Requests")
+ break;
+ default:
+ this.toastr.error('Something unexpected went wrong');
+
+ break;
+ }
+ }
+ throw error;
+ })
+ );
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/interceptors/InterceptorInterceptor.html b/documentation/interceptors/InterceptorInterceptor.html
index 73258f7..d0d0125 100644
--- a/documentation/interceptors/InterceptorInterceptor.html
+++ b/documentation/interceptors/InterceptorInterceptor.html
@@ -13,7 +13,7 @@
-
+
@@ -40,35 +40,56 @@
- - Interceptors
- - InterceptorInterceptor
+ - Interceptors
+ - InterceptorInterceptor
-
+
File
- src/app/Interceptors/interceptor.interceptor.ts
+ src/app/interceptor/interceptor.interceptor.ts
-
+
Index
+
+
+ Properties
+
+
+
+
+
+ -
+ Public
+ auth
+
+
+
+
@@ -93,26 +114,56 @@ Methods
-
+
Constructor
-constructor()
+constructor(auth: AuthService)
-
+
+
+
+
+ Parameters :
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ auth
+
+
+ AuthService
+
+
+
+ No
+
+
+
+
+
+
+
+
-
+
Methods
@@ -130,7 +181,7 @@
-intercept(request: HttpRequest<>, next: HttpHandler)
+intercept(httpRequest: HttpRequest, next: HttpHandler)
@@ -138,7 +189,7 @@
+ class="link-to-prism">src/app/interceptor/interceptor.interceptor.ts:15
@@ -159,9 +210,9 @@
- request
+ httpRequest
- HttpRequest<>
+ HttpRequest<any>
@@ -173,7 +224,7 @@
next
- HttpHandler
+ HttpHandler
@@ -188,7 +239,7 @@
- Returns : Observable<HttpEvent<>>
+ Returns : Observable<HttpEvent<any>>
@@ -196,6 +247,39 @@
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+ Public
+ auth
+
+
+
+
+
+
+ Type : AuthService
+
+
+
+
+
+
+
+
+
+
@@ -203,23 +287,33 @@
-
+
import { Injectable } from '@angular/core';
import {
HttpRequest,
HttpHandler,
HttpEvent,
- HttpInterceptor
+ HttpInterceptor,
} from '@angular/common/http';
import { Observable } from 'rxjs';
+import { AuthService } from '../services/auth.service';
@Injectable()
export class InterceptorInterceptor implements HttpInterceptor {
-
- constructor() {}
-
- intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
- return next.handle(request);
+ constructor(public auth: AuthService) {}
+
+ intercept(
+ httpRequest: HttpRequest<any>,
+ next: HttpHandler
+ ): Observable<HttpEvent<any>> {
+ if (this.auth.getCurrentUserToken() !== null) {
+ httpRequest = httpRequest.clone({
+ setHeaders: {
+ Authorization: `Bearer ${this.auth.getCurrentUserToken()}`,
+ },
+ });
+ }
+ return next.handle(httpRequest);
}
}
diff --git a/documentation/interfaces/ICurrentUser.html b/documentation/interfaces/ICurrentUser.html
new file mode 100644
index 0000000..ed79480
--- /dev/null
+++ b/documentation/interfaces/ICurrentUser.html
@@ -0,0 +1,539 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Interfaces
+ -
+ ICurrentUser
+
+
+
+
+
+
+
+
File
+
+
+ src/app/models/currentUser.modal.ts
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+
+ blocked
+
+
+ -
+
+ confirmed
+
+
+ -
+
+ createdAt
+
+
+ -
+
+ email
+
+
+ -
+
+ EmpId
+
+
+ -
+
+ id
+
+
+ -
+
+ provider
+
+
+ -
+
+ updatedAt
+
+
+ -
+
+ username
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ blocked
+
+
+
+
+
+
+
+
+ blocked: boolean
+
+
+
+
+
+
+
+ Type : boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ confirmed
+
+
+
+
+
+
+
+
+ confirmed: boolean
+
+
+
+
+
+
+
+ Type : boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ createdAt
+
+
+
+
+
+
+
+
+ createdAt: Date
+
+
+
+
+
+
+
+ Type : Date
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+
+
+
+ email: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EmpId
+
+
+
+
+
+
+
+
+ EmpId: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ id: number
+
+
+
+
+
+
+
+ Type : number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provider
+
+
+
+
+
+
+
+
+ provider: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ updatedAt
+
+
+
+
+
+
+
+
+ updatedAt: Date
+
+
+
+
+
+
+
+ Type : Date
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ username
+
+
+
+
+
+
+
+
+ username: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ export default interface ICurrentUser {
+ id: number;
+ username: string;
+ email: string;
+ provider: string;
+ confirmed: boolean;
+ blocked: boolean;
+ createdAt: Date;
+ updatedAt: Date;
+ EmpId: string;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/interfaces/IFoodCard.html b/documentation/interfaces/IFoodCard.html
index 70d8274..abd09d0 100644
--- a/documentation/interfaces/IFoodCard.html
+++ b/documentation/interfaces/IFoodCard.html
@@ -13,7 +13,7 @@
-
+
@@ -44,23 +44,29 @@
- - Interfaces
- - Interfaces
+ -
IFoodCard
-
+
File
@@ -71,7 +77,7 @@ File
-
+
Index
@@ -104,7 +110,7 @@ Properties
-
+
Properties
@@ -176,12 +182,13 @@ Properties
-
+
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { map } from 'rxjs';
+import { map, Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import IFoodItem from '../models/food.model';
+import { DatePipe } from '@angular/common';
interface IFoodCard {
id: string;
@@ -192,12 +199,49 @@ Properties
providedIn: 'root',
})
export class FoodService {
- constructor(private http: HttpClient) {}
+ selectedDay: boolean = true;
+
+ foodItemBreakFast: any[] = [];
+
+ foodItemLunch: any[] = [];
+
+ foodItemSnacks: any[] = [];
+ fooditem: any[] = [];
+
+ formatDate(date: Date) {
+ var d = new Date(date),
+ month = '' + (d.getMonth() + 1),
+ day = '' + d.getDate(),
+ year = d.getFullYear();
+
+ if (month.length < 2) month = '0' + month;
+ if (day.length < 2) day = '0' + day;
+
+ return [year, month, day].join('-');
+ }
+ constructor(private http: HttpClient) {
+ this.getFoodInventory().subscribe({
+ next: (response) => {
+ response.forEach((e: any) => {
+ this.fooditem.push(e.attributes);
+ console.log(e.attributes);
+ });
+ },
+ });
+ }
+
+ toggleDay() {
+ this.selectedDay = !this.selectedDay;
+ if (this.selectedDay) {
+ this.todayFood();
+ } else {
+ this.tommorowFood();
+ }
+ }
getFood() {
return this.http
- .get<any>(`${environment.apiUrl}food-inventories`)
-
+ .get<any>(`${environment.apiUrl}food-mains?populate=*`)
.pipe(
map((foodItem) => {
return foodItem.data;
@@ -205,6 +249,31 @@ Properties
);
}
+ postFood(food: IFoodItem): Observable<IFoodItem> {
+ return this.http.post<IFoodItem>(
+ `${environment.apiUrl}food-mains?populate=*`,
+ food
+ );
+ }
+
+ getFoodInventory() {
+ return this.http.get<any>(`${environment.apiUrl}food-inventories`).pipe(
+ map((item) => {
+ return item.data;
+ })
+ );
+ }
+
+ getDemo() {
+ this.getFoodInventory().subscribe({
+ next: (response) => {
+ response.forEach((e: any) => {
+ this.fooditem.push(e.attributes);
+ });
+ },
+ });
+ }
+
public BCurrentIndex = 0;
public LCurrentIndex = 0;
public HCurrentIndex = 0;
@@ -227,6 +296,10 @@ Properties
}
}
+ foodCardPop(id: string, cards: IFoodCard[]) {
+ cards = cards.filter((element) => element.id !== id);
+ }
+
register(id: string, category: number) {
switch (category) {
case 0: // Brekfast
@@ -245,9 +318,24 @@ Properties
}
}
- // unregister(id: string) {
- // this.cards = this.cards.filter((element) => element.id !== id);
- // }
+ unregister(id: string, category: number) {
+ // this.cards = this.cards.filter((element) => element.id !== id);
+ switch (category) {
+ case 0: // Brekfast
+ this.foodCardPop(id, this.Bcards);
+
+ break;
+
+ case 1: // Lunch
+ this.foodCardPop(id, this.Lcards);
+
+ break;
+ case 2: // High Tea
+ this.foodCardPop(id, this.Hcards);
+
+ break;
+ }
+ }
isCardOpen(id: string, category: number): boolean {
if (category === 0) {
@@ -323,6 +411,130 @@ Properties
this.toggleFood(action, category, this.Hcards);
}
}
+
+ todayFood() {
+ console.log(
+ this.foodItemBreakFast.length,
+ this.foodItemLunch.length,
+ this.foodItemSnacks.length
+ );
+ if (this.foodItemBreakFast.length > 0) {
+ this.foodItemBreakFast = [];
+ this.Bcards = [];
+ }
+ if (this.foodItemLunch.length > 0) {
+ this.foodItemLunch = [];
+ this.Lcards = [];
+ }
+ if (this.foodItemSnacks.length > 0) {
+ this.foodItemSnacks = [];
+ this.Hcards = [];
+ }
+
+ var day = new Date();
+ // var nextDay = new Date(day);
+ // day.setDate(day.getDate());
+ console.log(this.formatDate(day));
+
+ this.getFood().subscribe({
+ next: async (value) => {
+ value.forEach((element: any) => {
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'BreakFast' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemBreakFast.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemBreakFast);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'Lunch' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemLunch.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemLunch);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'HighTea' &&
+ element.attributes.Date === this.formatDate(new Date())
+ ) {
+ this.foodItemSnacks.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemSnacks);
+ }
+ });
+ },
+ });
+ }
+
+ tommorowFood() {
+ console.log(
+ this.foodItemBreakFast.length,
+ this.foodItemLunch.length,
+ this.foodItemSnacks.length
+ );
+ if (this.foodItemBreakFast.length > 0) {
+ this.foodItemBreakFast = [];
+ this.Bcards = [];
+ }
+ if (this.foodItemLunch.length > 0) {
+ this.foodItemLunch = [];
+ this.Lcards = [];
+ }
+ if (this.foodItemSnacks.length > 0) {
+ this.foodItemSnacks = [];
+ this.Hcards = [];
+ }
+ var day = new Date();
+ var nextDay = new Date(day);
+ nextDay.setDate(day.getDate() + 1);
+
+ console.log(this.formatDate(nextDay));
+
+ this.getFood().subscribe({
+ next: async (value) => {
+ value.forEach((element: any) => {
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'BreakFast' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemBreakFast.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemBreakFast);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'Lunch' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemLunch.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemLunch);
+ }
+ if (
+ element.attributes.food_catagory.data.attributes.catType ===
+ 'HighTea' &&
+ element.attributes.Date === this.formatDate(nextDay)
+ ) {
+ this.foodItemSnacks.push(
+ element.attributes.food_inventory.data.attributes
+ );
+ console.log(this.foodItemSnacks);
+ }
+ });
+ },
+ });
+ }
}
diff --git a/documentation/interfaces/IFoodInventory.html b/documentation/interfaces/IFoodInventory.html
new file mode 100644
index 0000000..4a14807
--- /dev/null
+++ b/documentation/interfaces/IFoodInventory.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Interfaces
+ -
+ IFoodInventory
+
+
+
+
+
+
+
+
File
+
+
+ src/app/models/foodInventory.model.ts
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+
+ FoodName
+
+
+ -
+
+ ImageUrl
+
+
+ -
+
+ Price
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ FoodName
+
+
+
+
+
+
+
+
+ FoodName: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ImageUrl
+
+
+
+
+
+
+
+
+ ImageUrl: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Price
+
+
+
+
+
+
+
+
+ Price: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ export default interface IFoodInventory {
+ FoodName: string;
+ Price: string;
+ ImageUrl: string;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/interfaces/IFoodItem.html b/documentation/interfaces/IFoodItem.html
index 30d3f64..82ffa44 100644
--- a/documentation/interfaces/IFoodItem.html
+++ b/documentation/interfaces/IFoodItem.html
@@ -13,7 +13,7 @@
-
+
@@ -44,23 +44,29 @@
- - Interfaces
- - Interfaces
+ -
IFoodItem
-
+
File
@@ -71,7 +77,7 @@ File
-
+
Index
@@ -83,6 +89,13 @@ Properties
+ -
+ Optional
+
+ date
+
+
-
@@ -90,21 +103,23 @@
Properties
-
+ Optional
id
-
+ Optional
imageUrl
-
-
- Price
+ price
@@ -116,8 +131,46 @@ Properties
-
+
Properties
+
+
+
+
+
+ date
+
+
+
+
+
+
+
+
+ date: string
+
+
+
+
+
+
+
+ Type : string
+
+
+
+
+
+
+ Optional
+
+
+
+
+
+
+
+
@@ -132,7 +185,7 @@ Properties
- FoodName: string
+ FoodName: string[]
@@ -140,7 +193,7 @@ Properties
- Type : string
+ Type : string[]
@@ -178,6 +231,11 @@ Properties
+
+
+ Optional
+
+
@@ -211,6 +269,11 @@ Properties
+
+
+ Optional
+
+
@@ -221,9 +284,9 @@ Properties
-
- Price
-
+
+ price
+
@@ -231,7 +294,7 @@ Properties
- Price: number
+ price: string
@@ -239,7 +302,7 @@ Properties
- Type : number
+ Type : string
@@ -254,12 +317,13 @@ Properties
-
+
export default interface IFoodItem {
- id: number;
- FoodName: string;
- Price: number;
- imageUrl: string;
+ id?: number;
+ FoodName: string[];
+ price: string;
+ date?: string;
+ imageUrl?: string;
}
diff --git a/documentation/interfaces/IRegister.html b/documentation/interfaces/IRegister.html
new file mode 100644
index 0000000..dc24e14
--- /dev/null
+++ b/documentation/interfaces/IRegister.html
@@ -0,0 +1,226 @@
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+ canteen-fe documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Interfaces
+ -
+ IRegister
+
+
+
+
+
+
+
+
File
+
+
+ src/app/models/register.model.ts
+
+
+
+
+
+
+ Index
+
+
+
+
+ Properties
+
+
+
+
+
+ -
+
+ user
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+ user
+
+
+
+
+
+
+
+
+ user: literal type
+
+
+
+
+
+
+
+ Type : literal type
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ export default interface IRegister {
+ user: {
+ name: string;
+ email: string;
+ organizationId: string;
+ employeeId: string;
+ password: string;
+ confirm_password: string;
+ };
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/documentation/interfaces/IUser.html b/documentation/interfaces/IUser.html
index f8f179c..35d52f2 100644
--- a/documentation/interfaces/IUser.html
+++ b/documentation/interfaces/IUser.html
@@ -13,7 +13,7 @@
-
+
@@ -44,23 +44,29 @@
- - Interfaces
- - Interfaces
+ -
IUser
-
+
File
@@ -71,7 +77,7 @@ File
-
+
Index
@@ -104,7 +110,7 @@ Properties
-
+
Properties
@@ -176,7 +182,7 @@ Properties
-
+
export default interface IUser {
jwt: string;
user: {
@@ -188,6 +194,7 @@ Properties
blocked: boolean;
createdAt: Date;
updatedAt: Date;
+ EmpId: string;
};
}
diff --git a/documentation/js/libs/bootstrap-native.js b/documentation/js/libs/bootstrap-native.js
index 717cd6e..25e1e56 100644
--- a/documentation/js/libs/bootstrap-native.js
+++ b/documentation/js/libs/bootstrap-native.js
@@ -1,2 +1 @@
-// Native Javascript for Bootstrap 3 v1.1.0 | © dnp_theme | MIT-License
-!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var o=e();t.Affix=o.Affix,t.Alert=o.Alert,t.Button=o.Button,t.Carousel=o.Carousel,t.Collapse=o.Collapse,t.Dropdown=o.Dropdown,t.Modal=o.Modal,t.Popover=o.Popover,t.ScrollSpy=o.ScrollSpy,t.Tab=o.Tab,t.Tooltip=o.Tooltip}}(this,function(){for(var t=function(t,e){t.classList?t.classList.add(e):(t.className+=" "+e,t.offsetWidth)},e=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")},o=null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&parseFloat(RegExp.$1),n=function(t,e){for(var o=e.charAt(0);t&&t!==document;t=t.parentNode){if("."===o&&void 0!==document.querySelector(e))return t;if("#"===o&&t.id===e.substr(1))return t}return!1},i=(document,function(i,a){a=a||{},this.btn="object"==typeof i?i:document.querySelector(i),this.accordion=null,this.collapse=null,this.duration=300,this.options={},this.options.duration=o&&o<10?0:a.duration||this.duration;var r=this,s=function(t){var e=t&&(t.currentStyle||window.getComputedStyle(t)),o=/px/.test(e.borderTopWidth)?Math.round(e.borderTopWidth.replace("px","")):0,n=/px/.test(e.marginTop)?Math.round(e.marginTop.replace("px","")):0,i=/px/.test(e.marginBottom)?Math.round(e.marginBottom.replace("px","")):0,a=/em/.test(e.marginTop)?Math.round(e.marginTop.replace("em","")*parseInt(e.fontSize)):0,r=/em/.test(e.marginBottom)?Math.round(e.marginBottom.replace("em","")*parseInt(e.fontSize)):0;return t.clientHeight+parseInt(o)+parseInt(n)+parseInt(i)+parseInt(a)+parseInt(r)};this.toggle=function(t){t.preventDefault(),/\bin/.test(r.collapse.className)?r.close():r.open()},this.close=function(){this._close(this.collapse),t(this.btn,"collapsed")},this.open=function(){if(this._open(this.collapse),e(this.btn,"collapsed"),null!==this.accordion){var t=this.accordion.querySelectorAll(".collapse.in"),o=t.length,n=0;for(n;n1?t[t.length-1]:void 0:t[0]},this.getActiveContent=function(){var t=this.getActiveTab().getElementsByTagName("A")[0].getAttribute("href").replace("#","");return t&&document.getElementById("c-"+t)},this.tab.addEventListener("click",this.handle,!1)},d=document.querySelectorAll("[data-toggle='tab'], [data-toggle='pill']"),u=0,h=d.length;uj in H?sc(H,j,{enumerable:!0,configurable:!0,writable:!0,value:rt}):H[j]=rt;var h=(H,j,rt)=>(nc(H,typeof j!="symbol"?j+"":j,rt),rt);const j={},rt=t=>{const{type:e,currentTarget:s}=t;[...j[e]].forEach(([n,o])=>{s===n&&[...o].forEach(([i,a])=>{i.apply(n,[t]),typeof a=="object"&&a.once&&O(n,e,i,a)})})},N=(t,e,s,n)=>{j[e]||(j[e]=new Map);const o=j[e];o.has(t)||o.set(t,new Map);const i=o.get(t),{size:a}=i;i.set(s,n),a||t.addEventListener(e,rt,n)},O=(t,e,s,n)=>{const o=j[e],i=o&&o.get(t),a=i&&i.get(s),c=a!==void 0?a:n;i&&i.has(s)&&i.delete(s),o&&(!i||!i.size)&&o.delete(t),(!o||!o.size)&&delete j[e],(!i||!i.size)&&t.removeEventListener(e,rt,c)},qo=Object.freeze(Object.defineProperty({__proto__:null,addListener:N,globalListener:rt,off:O,on:N,registry:j,removeListener:O},Symbol.toStringTag,{value:"Module"})),Ws="aria-describedby",He="aria-expanded",Se="aria-hidden",Pe="aria-modal",Fs="aria-pressed",Ze="aria-selected",Go="DOMContentLoaded",qe="focus",Ge="focusin",js="focusout",De="keydown",Qo="keyup",M="click",zs="mousedown",Jo="hover",Ae="mouseenter",Qe="mouseleave",ti="pointerdown",ei="pointermove",si="pointerup",xe="resize",Ie="scroll",Je="touchstart",ni="dragstart",ts="ArrowDown",es="ArrowUp",Ks="ArrowLeft",Vs="ArrowRight",ss="Escape",oi="transitionDuration",ii="transitionDelay",ns="transitionend",Xs="transitionProperty",ai=navigator.userAgentData,ke=ai,{userAgent:ci}=navigator,Ne=ci,Ys=/iPhone|iPad|iPod|Android/i;ke?ke.brands.some(t=>Ys.test(t.brand)):Ys.test(Ne);const Us=/(iPhone|iPod|iPad)/,ri=ke?ke.brands.some(t=>Us.test(t.brand)):Us.test(Ne);Ne&&Ne.includes("Firefox");const{head:Oe}=document;["webkitPerspective","perspective"].some(t=>t in Oe.style);const li=(t,e,s,n)=>{const o=n||!1;t.addEventListener(e,s,o)},di=(t,e,s,n)=>{const o=n||!1;t.removeEventListener(e,s,o)},hi=(t,e,s,n)=>{const o=i=>{(i.target===t||i.currentTarget===t)&&(s.apply(t,[i]),di(t,e,o,n))};li(t,e,o,n)},re=()=>{};(()=>{let t=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});hi(document,Go,re,e)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in Oe.style),["webkitAnimation","animation"].some(t=>t in Oe.style),["webkitTransition","transition"].some(t=>t in Oe.style);const mt=(t,e)=>t.getAttribute(e),Me=(t,e)=>t.hasAttribute(e),L=(t,e,s)=>t.setAttribute(e,s),xt=(t,e)=>t.removeAttribute(e),p=(t,...e)=>{t.classList.add(...e)},v=(t,...e)=>{t.classList.remove(...e)},f=(t,e)=>t.classList.contains(e),le=t=>t!=null&&typeof t=="object"||!1,I=t=>le(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(e=>t.nodeType===e)||!1,T=t=>I(t)&&t.nodeType===1||!1,zt=new Map,It={data:zt,set:(t,e,s)=>{T(t)&&(zt.has(e)||zt.set(e,new Map),zt.get(e).set(t,s))},getAllFor:t=>zt.get(t)||null,get:(t,e)=>{if(!T(t)||!e)return null;const s=It.getAllFor(e);return t&&s&&s.get(t)||null},remove:(t,e)=>{const s=It.getAllFor(e);!s||!T(t)||(s.delete(t),s.size===0&&zt.delete(e))}},z=(t,e)=>It.get(t,e),de=t=>typeof t=="string"||!1,os=t=>le(t)&&t.constructor.name==="Window"||!1,_s=t=>I(t)&&t.nodeType===9||!1,w=t=>os(t)?t.document:_s(t)?t:I(t)?t.ownerDocument:window.document,lt=(t,...e)=>Object.assign(t,...e),vt=t=>{if(!t)return;if(de(t))return w().createElement(t);const{tagName:e}=t,s=vt(e);if(!s)return;const n={...t};return delete n.tagName,lt(s,n)},b=(t,e)=>t.dispatchEvent(e),V=(t,e)=>{const s=getComputedStyle(t),n=e.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return s.getPropertyValue(n)},fi=t=>{const e=V(t,Xs),s=V(t,ii),n=s.includes("ms")?1:1e3,o=e&&e!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},Kt=t=>{const e=V(t,Xs),s=V(t,oi),n=s.includes("ms")?1:1e3,o=e&&e!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},P=(t,e)=>{let s=0;const n=new Event(ns),o=Kt(t),i=fi(t);if(o){const a=c=>{c.target===t&&(e.apply(t,[c]),t.removeEventListener(ns,a),s=1)};t.addEventListener(ns,a),setTimeout(()=>{s||b(t,n)},o+i+17)}else e.apply(t,[n])},dt=(t,e)=>t.focus(e),Zs=t=>["true",!0].includes(t)?!0:["false",!1].includes(t)?!1:["null","",null,void 0].includes(t)?null:t!==""&&!Number.isNaN(+t)?+t:t,Le=t=>Object.entries(t),Vt=t=>t.toLowerCase(),pi=(t,e,s,n)=>{const o={...s},i={...t.dataset},a={...e},c={},r="title";return Le(i).forEach(([l,d])=>{const g=n&&typeof l=="string"&&l.includes(n)?l.replace(n,"").replace(/[A-Z]/g,C=>Vt(C)):l;c[g]=Zs(d)}),Le(o).forEach(([l,d])=>{o[l]=Zs(d)}),Le(e).forEach(([l,d])=>{l in o?a[l]=o[l]:l in c?a[l]=c[l]:a[l]=l===r?mt(t,r):d}),a},qs=t=>Object.keys(t),$=(t,e)=>{const s=new CustomEvent(t,{cancelable:!0,bubbles:!0});return le(e)&<(s,e),s},et={passive:!0},kt=t=>t.offsetHeight,k=(t,e)=>{Le(e).forEach(([s,n])=>{if(n&&de(s)&&s.includes("--"))t.style.setProperty(s,n);else{const o={};o[s]=n,lt(t.style,o)}})},is=t=>le(t)&&t.constructor.name==="Map"||!1,gi=t=>typeof t=="number"||!1,bt=new Map,u={set:(t,e,s,n)=>{T(t)&&(n&&n.length?(bt.has(t)||bt.set(t,new Map),bt.get(t).set(n,setTimeout(e,s))):bt.set(t,setTimeout(e,s)))},get:(t,e)=>{if(!T(t))return null;const s=bt.get(t);return e&&s&&is(s)?s.get(e)||null:gi(s)?s:null},clear:(t,e)=>{if(!T(t))return;const s=bt.get(t);e&&e.length&&is(s)?(clearTimeout(s.get(e)),s.delete(e),s.size===0&&bt.delete(t)):(clearTimeout(s),bt.delete(t))}},he=(t,e)=>{const{width:s,height:n,top:o,right:i,bottom:a,left:c}=t.getBoundingClientRect();let r=1,l=1;if(e&&T(t)){const{offsetWidth:d,offsetHeight:g}=t;r=d>0?Math.round(s)/d:1,l=g>0?Math.round(n)/g:1}return{width:s/r,height:n/l,top:o/l,right:i/r,bottom:a/l,left:c/r,x:c/r,y:o/l}},wt=t=>w(t).body,ht=t=>w(t).documentElement,Gs=t=>I(t)&&t.constructor.name==="ShadowRoot"||!1,ui=t=>t.nodeName==="HTML"?t:T(t)&&t.assignedSlot||I(t)&&t.parentNode||Gs(t)&&t.host||ht(t);let Qs=0,Js=0;const Xt=new Map,tn=(t,e)=>{let s=e?Qs:Js;if(e){const n=tn(t),o=Xt.get(n)||new Map;Xt.has(n)||Xt.set(n,o),is(o)&&!o.has(e)?(o.set(e,s),Qs+=1):s=o.get(e)}else{const n=t.id||t;Xt.has(n)?s=Xt.get(n):(Xt.set(n,s),Js+=1)}return s},Yt=t=>{var e;return t?_s(t)?t.defaultView:I(t)?(e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView:t:window},mi=t=>Array.isArray(t)||!1,en=t=>{if(!I(t))return!1;const{top:e,bottom:s}=he(t),{clientHeight:n}=ht(t);return e<=n&&s>=0},vi=t=>typeof t=="function"||!1,bi=t=>le(t)&&t.constructor.name==="NodeList"||!1,$t=t=>ht(t).dir==="rtl",wi=t=>I(t)&&["TABLE","TD","TH"].includes(t.nodeName)||!1,B=(t,e)=>t?t.closest(e)||B(t.getRootNode().host,e):null,D=(t,e)=>T(t)?t:(I(e)?e:w()).querySelector(t),as=(t,e)=>(I(e)?e:w()).getElementsByTagName(t),st=(t,e)=>(I(e)?e:w()).querySelectorAll(t),ft=(t,e)=>(e&&I(e)?e:w()).getElementsByClassName(t),sn=(t,e)=>t.matches(e),W="fade",m="show",Be="data-bs-dismiss",Re="alert",nn="Alert",$i="5.0.6";class nt{constructor(e,s){const n=D(e);if(!n)throw de(e)?Error(`${this.name} Error: "${e}" is not a valid selector.`):Error(`${this.name} Error: your target is not an instance of HTMLElement.`);const o=It.get(n,this.name);o&&o.dispose(),this.element=n,this.options=this.defaults&&qs(this.defaults).length?pi(n,this.defaults,s||{},"bs"):{},It.set(n,this.name,this)}get version(){return $i}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){It.remove(this.element,this.name),qs(this).forEach(e=>{delete this[e]})}}const Ti=`.${Re}`,yi=`[${Be}="${Re}"]`,Ei=t=>z(t,nn),Ci=t=>new Ut(t),on=$(`close.bs.${Re}`),Hi=$(`closed.bs.${Re}`),an=t=>{const{element:e}=t;cs(t),b(e,Hi),t.dispose(),e.remove()},cs=(t,e)=>{const s=e?N:O,{dismiss:n,close:o}=t;n&&s(n,M,o)};class Ut extends nt{constructor(s){super(s);h(this,"dismiss");h(this,"close",()=>{const{element:s}=this;s&&f(s,m)&&(b(s,on),on.defaultPrevented||(v(s,m),f(s,W)?P(s,()=>an(this)):an(this)))});this.dismiss=D(yi,this.element),cs(this,!0)}get name(){return nn}dispose(){cs(this),super.dispose()}}h(Ut,"selector",Ti),h(Ut,"init",Ci),h(Ut,"getInstance",Ei);const E="active",at="data-bs-toggle",Si="button",cn="Button",Pi=`[${at}="${Si}"]`,Di=t=>z(t,cn),Ai=t=>new _t(t),rn=(t,e)=>{(e?N:O)(t.element,M,t.toggle)};class _t extends nt{constructor(s){super(s);h(this,"isActive",!1);h(this,"toggle",s=>{s&&s.preventDefault();const{element:n,isActive:o}=this;!f(n,"disabled")&&!mt(n,"disabled")&&((o?v:p)(n,E),L(n,Fs,o?"false":"true"),this.isActive=f(n,E))});const{element:n}=this;this.isActive=f(n,E),L(n,Fs,String(!!this.isActive)),rn(this,!0)}get name(){return cn}dispose(){rn(this),super.dispose()}}h(_t,"selector",Pi),h(_t,"init",Ai),h(_t,"getInstance",Di);const rs="data-bs-target",Nt="carousel",ln="Carousel",dn="data-bs-parent",xi="data-bs-container",X=t=>{const e=[rs,dn,xi,"href"],s=w(t);return e.map(n=>{const o=mt(t,n);return o?n===dn?B(t,o):D(o,s):null}).filter(n=>n)[0]},fe=`[data-bs-ride="${Nt}"]`,G=`${Nt}-item`,ls="data-bs-slide-to",Tt="data-bs-slide",yt="paused",hn={pause:"hover",keyboard:!1,touch:!0,interval:5e3},pt=t=>z(t,ln),Ii=t=>new Zt(t);let pe=0,We=0,ds=0;const hs=$(`slide.bs.${Nt}`),fs=$(`slid.bs.${Nt}`),fn=t=>{const{index:e,direction:s,element:n,slides:o,options:i}=t;if(t.isAnimating){const a=gs(t),c=s==="left"?"next":"prev",r=s==="left"?"start":"end";p(o[e],E),v(o[e],`${G}-${c}`),v(o[e],`${G}-${r}`),v(o[a],E),v(o[a],`${G}-${r}`),b(n,fs),u.clear(n,Tt),t.cycle&&!w(n).hidden&&i.interval&&!t.isPaused&&t.cycle()}};function ki(){const t=pt(this);t&&!t.isPaused&&!u.get(this,yt)&&p(this,yt)}function Ni(){const t=pt(this);t&&t.isPaused&&!u.get(this,yt)&&t.cycle()}function Oi(t){t.preventDefault();const e=B(this,fe)||X(this),s=pt(e);if(s&&!s.isAnimating){const n=+(mt(this,ls)||0);this&&!f(this,E)&&!Number.isNaN(n)&&s.to(n)}}function Mi(t){t.preventDefault();const e=B(this,fe)||X(this),s=pt(e);if(s&&!s.isAnimating){const n=mt(this,Tt);n==="next"?s.next():n==="prev"&&s.prev()}}const Li=({code:t,target:e})=>{const s=w(e),[n]=[...st(fe,s)].filter(i=>en(i)),o=pt(n);if(o&&!o.isAnimating&&!/textarea|input/i.test(e.nodeName)){const i=$t(n);t===(i?Vs:Ks)?o.prev():t===(i?Ks:Vs)&&o.next()}};function pn(t){const{target:e}=t,s=pt(this);s&&s.isTouch&&(s.indicator&&!s.indicator.contains(e)||!s.controls.includes(e))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}function Bi(t){const{target:e}=t,s=pt(this);if(s&&!s.isAnimating&&!s.isTouch){const{controls:n,indicators:o}=s;[...n,...o].every(i=>i===e||i.contains(e))||(pe=t.pageX,this.contains(e)&&(s.isTouch=!0,gn(s,!0)))}}const Ri=t=>{We=t.pageX},Wi=t=>{var o;const{target:e}=t,s=w(e),n=[...st(fe,s)].map(i=>pt(i)).find(i=>i.isTouch);if(n){const{element:i,index:a}=n,c=$t(i);ds=t.pageX,n.isTouch=!1,gn(n),!((o=s.getSelection())!=null&&o.toString().length)&&i.contains(e)&&Math.abs(pe-ds)>120&&(Wepe&&n.to(a+(c?1:-1))),pe=0,We=0,ds=0}},ps=(t,e)=>{const{indicators:s}=t;[...s].forEach(n=>v(n,E)),t.indicators[e]&&p(s[e],E)},gn=(t,e)=>{const{element:s}=t,n=e?N:O;n(w(s),ei,Ri,et),n(w(s),si,Wi,et)},un=(t,e)=>{const{element:s,options:n,slides:o,controls:i,indicators:a}=t,{touch:c,pause:r,interval:l,keyboard:d}=n,g=e?N:O;r&&l&&(g(s,Ae,ki),g(s,Qe,Ni)),c&&o.length>2&&(g(s,ti,Bi,et),g(s,Je,pn,{passive:!1}),g(s,ni,pn,{passive:!1})),i.length&&i.forEach(C=>{C&&g(C,M,Mi)}),a.length&&a.forEach(C=>{g(C,M,Oi)}),d&&g(w(s),De,Li)},gs=t=>{const{slides:e,element:s}=t,n=D(`.${G}.${E}`,s);return T(n)?[...e].indexOf(n):-1};class Zt extends nt{constructor(e,s){super(e,s);const{element:n}=this;this.direction=$t(n)?"right":"left",this.isTouch=!1,this.slides=ft(G,n);const{slides:o}=this;if(o.length>=2){const i=gs(this),a=[...o].find(l=>sn(l,`.${G}-next,.${G}-next`));this.index=i;const c=w(n);this.controls=[...st(`[${Tt}]`,n),...st(`[${Tt}][${rs}="#${n.id}"]`,c)].filter((l,d,g)=>d===g.indexOf(l)),this.indicator=D(`.${Nt}-indicators`,n),this.indicators=[...this.indicator?st(`[${ls}]`,this.indicator):[],...st(`[${ls}][${rs}="#${n.id}"]`,c)].filter((l,d,g)=>d===g.indexOf(l));const{options:r}=this;this.options.interval=r.interval===!0?hn.interval:r.interval,a?this.index=[...o].indexOf(a):i<0&&(this.index=0,p(o[0],E),this.indicators.length&&ps(this,0)),this.indicators.length&&ps(this,this.index),un(this,!0),r.interval&&this.cycle()}}get name(){return ln}get defaults(){return hn}get isPaused(){return f(this.element,yt)}get isAnimating(){return D(`.${G}-next,.${G}-prev`,this.element)!==null}cycle(){const{element:e,options:s,isPaused:n,index:o}=this;u.clear(e,Nt),n&&(u.clear(e,yt),v(e,yt)),u.set(e,()=>{this.element&&!this.isPaused&&!this.isTouch&&en(e)&&this.to(o+1)},s.interval,Nt)}pause(){const{element:e,options:s}=this;!this.isPaused&&s.interval&&(p(e,yt),u.set(e,()=>{},1,yt))}next(){this.isAnimating||this.to(this.index+1)}prev(){this.isAnimating||this.to(this.index-1)}to(e){const{element:s,slides:n,options:o}=this,i=gs(this),a=$t(s);let c=e;if(!this.isAnimating&&i!==c&&!u.get(s,Tt)){ic||i===n.length-1&&c===0)&&(this.direction=a?"left":"right");const{direction:r}=this;c<0?c=n.length-1:c>=n.length&&(c=0);const l=r==="left"?"next":"prev",d=r==="left"?"start":"end",g={relatedTarget:n[c],from:i,to:c,direction:r};lt(hs,g),lt(fs,g),b(s,hs),hs.defaultPrevented||(this.index=c,ps(this,c),Kt(n[c])&&f(s,"slide")?u.set(s,()=>{p(n[c],`${G}-${l}`),kt(n[c]),p(n[c],`${G}-${d}`),p(n[i],`${G}-${d}`),P(n[c],()=>this.slides&&this.slides.length&&fn(this))},0,Tt):(p(n[c],E),v(n[i],E),u.set(s,()=>{u.clear(s,Tt),s&&o.interval&&!this.isPaused&&this.cycle(),b(s,fs)},0,Tt)))}}dispose(){const{isAnimating:e}=this,s={...this,isAnimating:e};un(s),super.dispose(),s.isAnimating&&P(s.slides[s.index],()=>{fn(s)})}}h(Zt,"selector",fe),h(Zt,"init",Ii),h(Zt,"getInstance",pt);const Ot="collapsing",Y="collapse",mn="Collapse",Fi=`.${Y}`,vn=`[${at}="${Y}"]`,ji={parent:null},Fe=t=>z(t,mn),zi=t=>new qt(t),bn=$(`show.bs.${Y}`),Ki=$(`shown.bs.${Y}`),wn=$(`hide.bs.${Y}`),Vi=$(`hidden.bs.${Y}`),Xi=t=>{const{element:e,parent:s,triggers:n}=t;b(e,bn),bn.defaultPrevented||(u.set(e,re,17),s&&u.set(s,re,17),p(e,Ot),v(e,Y),k(e,{height:`${e.scrollHeight}px`}),P(e,()=>{u.clear(e),s&&u.clear(s),n.forEach(o=>L(o,He,"true")),v(e,Ot),p(e,Y),p(e,m),k(e,{height:""}),b(e,Ki)}))},$n=t=>{const{element:e,parent:s,triggers:n}=t;b(e,wn),wn.defaultPrevented||(u.set(e,re,17),s&&u.set(s,re,17),k(e,{height:`${e.scrollHeight}px`}),v(e,Y),v(e,m),p(e,Ot),kt(e),k(e,{height:"0px"}),P(e,()=>{u.clear(e),s&&u.clear(s),n.forEach(o=>L(o,He,"false")),v(e,Ot),p(e,Y),k(e,{height:""}),b(e,Vi)}))},Tn=(t,e)=>{const s=e?N:O,{triggers:n}=t;n.length&&n.forEach(o=>s(o,M,Yi))},Yi=t=>{const{target:e}=t,s=e&&B(e,vn),n=s&&X(s),o=n&&Fe(n);o&&o.toggle(),s&&s.tagName==="A"&&t.preventDefault()};class qt extends nt{constructor(e,s){super(e,s);const{element:n,options:o}=this,i=w(n);this.triggers=[...st(vn,i)].filter(a=>X(a)===n),this.parent=T(o.parent)?o.parent:de(o.parent)?X(n)||D(o.parent,i):null,Tn(this,!0)}get name(){return mn}get defaults(){return ji}toggle(){f(this.element,m)?this.hide():this.show()}hide(){const{triggers:e,element:s}=this;u.get(s)||($n(this),e.length&&e.forEach(n=>p(n,`${Y}d`)))}show(){const{element:e,parent:s,triggers:n}=this;let o,i;s&&(o=[...st(`.${Y}.${m}`,s)].find(a=>Fe(a)),i=o&&Fe(o)),(!s||!u.get(s))&&!u.get(e)&&(i&&o!==e&&($n(i),i.triggers.forEach(a=>{p(a,`${Y}d`)})),Xi(this),n.length&&n.forEach(a=>v(a,`${Y}d`)))}dispose(){Tn(this),super.dispose()}}h(qt,"selector",Fi),h(qt,"init",zi),h(qt,"getInstance",Fe);const Mt=["dropdown","dropup","dropstart","dropend"],yn="Dropdown",En="dropdown-menu",Cn=t=>{const e=B(t,"A");return t.tagName==="A"&&Me(t,"href")&&t.href.slice(-1)==="#"||e&&Me(e,"href")&&e.href.slice(-1)==="#"},[ot,us,ms,vs]=Mt,Hn=`[${at}="${ot}"]`,Gt=t=>z(t,yn),Ui=t=>new Qt(t),_i=`${En}-end`,Sn=[ot,us],Pn=[ms,vs],Dn=["A","BUTTON"],Zi={offset:5,display:"dynamic"},bs=$(`show.bs.${ot}`),An=$(`shown.bs.${ot}`),ws=$(`hide.bs.${ot}`),xn=$(`hidden.bs.${ot}`),In=$(`updated.bs.${ot}`),kn=t=>{const{element:e,menu:s,parentElement:n,options:o}=t,{offset:i}=o;if(V(s,"position")!=="static"){const a=$t(e),c=f(s,_i);["margin","top","bottom","left","right"].forEach(R=>{const Pt={};Pt[R]="",k(s,Pt)});let l=Mt.find(R=>f(n,R))||ot;const d={dropdown:[i,0,0],dropup:[0,0,i],dropstart:a?[-1,0,0,i]:[-1,i,0],dropend:a?[-1,i,0]:[-1,0,0,i]},g={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:a?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:a?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:a?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:a?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:C,offsetHeight:F}=s,{clientWidth:tt,clientHeight:y}=ht(e),{left:U,top:q,width:ie,height:ut}=he(e),S=U-C-i<0,it=U+C+ie+i>=tt,ct=q+F+i>=y,K=q+F+ut+i>=y,_=q-F-i<0,x=(!a&&c||a&&!c)&&U+ie-C<0,ae=(a&&c||!a&&!c)&&U+C>=tt;if(Pn.includes(l)&&S&&it&&(l=ot),l===ms&&(a?it:S)&&(l=vs),l===vs&&(a?S:it)&&(l=ms),l===us&&_&&!K&&(l=ot),l===ot&&K&&!_&&(l=us),Pn.includes(l)&&ct&<(g[l],{top:"auto",bottom:0}),Sn.includes(l)&&(x||ae)){let R={left:"auto",right:"auto"};!x&&ae&&!a&&(R={left:"auto",right:0}),x&&!ae&&a&&(R={left:0,right:"auto"}),R&<(g[l],R)}const St=d[l];k(s,{...g[l],margin:`${St.map(R=>R&&`${R}px`).join(" ")}`}),Sn.includes(l)&&c&&c&&k(s,g[!a&&x||a&&ae?"menuStart":"menuEnd"]),b(n,In)}},qi=t=>[...t.children].map(e=>{if(e&&Dn.includes(e.tagName))return e;const{firstElementChild:s}=e;return s&&Dn.includes(s.tagName)?s:null}).filter(e=>e),Nn=t=>{const{element:e,options:s}=t,n=t.open?N:O,o=w(e);n(o,M,Mn),n(o,qe,Mn),n(o,De,Qi),n(o,Qo,Ji),s.display==="dynamic"&&[Ie,xe].forEach(i=>{n(Yt(e),i,ta,et)})},On=(t,e)=>{(e?N:O)(t.element,M,Gi)},je=t=>{const e=[...Mt,"btn-group","input-group"].map(s=>ft(`${s} ${m}`,w(t))).find(s=>s.length);if(e&&e.length)return[...e[0].children].find(s=>Mt.some(n=>n===mt(s,at)))},Mn=t=>{const{target:e,type:s}=t;if(e&&T(e)){const n=je(e),o=n&&Gt(n);if(o){const{parentElement:i,menu:a}=o,c=i&&i.contains(e)&&(e.tagName==="form"||B(e,"form")!==null);[M,zs].includes(s)&&Cn(e)&&t.preventDefault(),!c&&s!==qe&&e!==n&&e!==a&&o.hide()}}},Gi=t=>{const{target:e}=t,s=e&&B(e,Hn),n=s&&Gt(s);n&&(t.stopPropagation(),n.toggle(),s&&Cn(s)&&t.preventDefault())},Qi=t=>{[ts,es].includes(t.code)&&t.preventDefault()};function Ji(t){const{code:e}=t,s=je(this),n=s&&Gt(s),{activeElement:o}=s&&w(s);if(n&&o){const{menu:i,open:a}=n,c=qi(i);if(c&&c.length&&[ts,es].includes(e)){let r=c.indexOf(o);o===s?r=0:e===es?r=r>1?r-1:0:e===ts&&(r=r{c.relatedTarget=e}),b(o,bs),bs.defaultPrevented||(p(n,m),p(o,m),L(e,He,"true"),kn(this),this.open=!s,dt(e),Nn(this),b(o,An))}}hide(){const{element:e,open:s,menu:n,parentElement:o}=this;s&&([ws,xn].forEach(i=>{i.relatedTarget=e}),b(o,ws),ws.defaultPrevented||(v(n,m),v(o,m),L(e,He,"false"),this.open=!s,Nn(this),b(o,xn)))}dispose(){this.open&&this.hide(),On(this),super.dispose()}}h(Qt,"selector",Hn),h(Qt,"init",Ui),h(Qt,"getInstance",Gt);const Z="modal",$s="Modal",Ts="Offcanvas",ea="fixed-top",sa="fixed-bottom",Ln="sticky-top",Bn="position-sticky",Rn=t=>[...ft(ea,t),...ft(sa,t),...ft(Ln,t),...ft(Bn,t),...ft("is-fixed",t)],na=t=>{const e=wt(t);k(e,{paddingRight:"",overflow:""});const s=Rn(e);s.length&&s.forEach(n=>{k(n,{paddingRight:"",marginRight:""})})},Wn=t=>{const{clientWidth:e}=ht(t),{innerWidth:s}=Yt(t);return Math.abs(s-e)},Fn=(t,e)=>{const s=wt(t),n=parseInt(V(s,"paddingRight"),10),i=V(s,"overflow")==="hidden"&&n?0:Wn(t),a=Rn(s);e&&(k(s,{overflow:"hidden",paddingRight:`${n+i}px`}),a.length&&a.forEach(c=>{const r=V(c,"paddingRight");if(c.style.paddingRight=`${parseInt(r,10)+i}px`,[Ln,Bn].some(l=>f(c,l))){const l=V(c,"marginRight");c.style.marginRight=`${parseInt(l,10)-i}px`}}))},Q="offcanvas",Et=vt({tagName:"div",className:"popup-container"}),jn=(t,e)=>{const s=I(e)&&e.nodeName==="BODY",n=I(e)&&!s?e:Et,o=s?e:wt(t);I(t)&&(n===Et&&o.append(Et),n.append(t))},zn=(t,e)=>{const s=I(e)&&e.nodeName==="BODY",n=I(e)&&!s?e:Et;I(t)&&(t.remove(),n===Et&&!Et.children.length&&Et.remove())},ys=(t,e)=>{const s=I(e)&&e.nodeName!=="BODY"?e:Et;return I(t)&&s.contains(t)},Kn="backdrop",Vn=`${Z}-${Kn}`,Xn=`${Q}-${Kn}`,Yn=`.${Z}.${m}`,Es=`.${Q}.${m}`,A=vt("div"),Lt=t=>D(`${Yn},${Es}`,w(t)),Cs=t=>{const e=t?Vn:Xn;[Vn,Xn].forEach(s=>{v(A,s)}),p(A,e)},Un=(t,e,s)=>{Cs(s),jn(A,wt(t)),e&&p(A,W)},_n=()=>{f(A,m)||(p(A,m),kt(A))},ze=()=>{v(A,m)},Zn=t=>{Lt(t)||(v(A,W),zn(A,wt(t)),na(t))},qn=t=>T(t)&&V(t,"visibility")!=="hidden"&&t.offsetParent!==null,oa=`.${Z}`,Gn=`[${at}="${Z}"]`,ia=`[${Be}="${Z}"]`,Qn=`${Z}-static`,aa={backdrop:!0,keyboard:!0},ge=t=>z(t,$s),ca=t=>new Jt(t),Ke=$(`show.bs.${Z}`),Jn=$(`shown.bs.${Z}`),Hs=$(`hide.bs.${Z}`),to=$(`hidden.bs.${Z}`),eo=t=>{const{element:e}=t,s=Wn(e),{clientHeight:n,scrollHeight:o}=ht(e),{clientHeight:i,scrollHeight:a}=e,c=i!==a;if(!c&&s){const r=$t(e)?"paddingLeft":"paddingRight",l={};l[r]=`${s}px`,k(e,l)}Fn(e,c||n!==o)},so=(t,e)=>{const s=e?N:O,{element:n,update:o}=t;s(n,M,da),s(Yt(n),xe,o,et),s(w(n),De,la)},no=(t,e)=>{const s=e?N:O,{triggers:n}=t;n.length&&n.forEach(o=>s(o,M,ra))},oo=t=>{const{triggers:e,element:s,relatedTarget:n}=t;Zn(s),k(s,{paddingRight:"",display:""}),so(t);const o=Ke.relatedTarget||e.find(qn);o&&dt(o),to.relatedTarget=n,b(s,to)},io=t=>{const{element:e,relatedTarget:s}=t;dt(e),so(t,!0),Jn.relatedTarget=s,b(e,Jn)},ao=t=>{const{element:e,hasFade:s}=t;k(e,{display:"block"}),eo(t),Lt(e)||k(wt(e),{overflow:"hidden"}),p(e,m),xt(e,Se),L(e,Pe,"true"),s?P(e,()=>io(t)):io(t)},co=t=>{const{element:e,options:s,hasFade:n}=t;s.backdrop&&n&&f(A,m)&&!Lt(e)?(ze(),P(A,()=>oo(t))):oo(t)},ra=t=>{const{target:e}=t,s=e&&B(e,Gn),n=s&&X(s),o=n&&ge(n);o&&(s&&s.tagName==="A"&&t.preventDefault(),o.relatedTarget=s,o.toggle())},la=({code:t,target:e})=>{const s=D(Yn,w(e)),n=s&&ge(s);if(n){const{options:o}=n;o.keyboard&&t===ss&&f(s,m)&&(n.relatedTarget=null,n.hide())}};function da(t){var s,n;const e=ge(this);if(e&&!u.get(this)){const{options:o,isStatic:i,modalDialog:a}=e,{backdrop:c}=o,{target:r}=t,l=(n=(s=w(this))==null?void 0:s.getSelection())==null?void 0:n.toString().length,d=a.contains(r),g=r&&B(r,ia);i&&!d?u.set(this,()=>{p(this,Qn),P(a,()=>ha(e))},17):(g||!l&&!i&&!d&&c)&&(e.relatedTarget=g||null,e.hide(),t.preventDefault())}}const ha=t=>{const{element:e,modalDialog:s}=t,n=(Kt(s)||0)+17;v(e,Qn),u.set(e,()=>u.clear(e),n)};class Jt extends nt{constructor(s,n){super(s,n);h(this,"update",()=>{f(this.element,m)&&eo(this)});const{element:o}=this,i=D(`.${Z}-dialog`,o);i&&(this.modalDialog=i,this.triggers=[...st(Gn,w(o))].filter(a=>X(a)===o),this.isStatic=this.options.backdrop==="static",this.hasFade=f(o,W),this.relatedTarget=null,no(this,!0))}get name(){return $s}get defaults(){return aa}toggle(){f(this.element,m)?this.hide():this.show()}show(){const{element:s,options:n,hasFade:o,relatedTarget:i}=this,{backdrop:a}=n;let c=0;if(!f(s,m)&&(Ke.relatedTarget=i||void 0,b(s,Ke),!Ke.defaultPrevented)){const r=Lt(s);if(r&&r!==s){const l=ge(r)||z(r,Ts);l&&l.hide()}a?(ys(A)?Cs(!0):Un(s,o,!0),c=Kt(A),_n(),setTimeout(()=>ao(this),c)):(ao(this),r&&f(A,m)&&ze())}}hide(){const{element:s,hasFade:n,relatedTarget:o}=this;f(s,m)&&(Hs.relatedTarget=o||void 0,b(s,Hs),Hs.defaultPrevented||(v(s,m),L(s,Se,"true"),xt(s,Pe),n?P(s,()=>co(this)):co(this)))}dispose(){const s={...this},{element:n,modalDialog:o}=s,i=()=>setTimeout(()=>super.dispose(),17);no(s),this.hide(),f(n,"fade")?P(o,i):i()}}h(Jt,"selector",oa),h(Jt,"init",ca),h(Jt,"getInstance",ge);const fa=`.${Q}`,Ss=`[${at}="${Q}"]`,pa=`[${Be}="${Q}"]`,Ve=`${Q}-toggling`,ga={backdrop:!0,keyboard:!0,scroll:!1},ue=t=>z(t,Ts),ua=t=>new te(t),Xe=$(`show.bs.${Q}`),ro=$(`shown.bs.${Q}`),Ps=$(`hide.bs.${Q}`),lo=$(`hidden.bs.${Q}`),ma=t=>{const{element:e}=t,{clientHeight:s,scrollHeight:n}=ht(e);Fn(e,s!==n)},ho=(t,e)=>{const s=e?N:O;t.triggers.forEach(n=>s(n,M,ba))},fo=(t,e)=>{const s=e?N:O,n=w(t.element);s(n,De,$a),s(n,M,wa)},po=t=>{const{element:e,options:s}=t;s.scroll||(ma(t),k(wt(e),{overflow:"hidden"})),p(e,Ve),p(e,m),k(e,{visibility:"visible"}),P(e,()=>Ta(t))},va=t=>{const{element:e,options:s}=t,n=Lt(e);e.blur(),!n&&s.backdrop&&f(A,m)?(ze(),P(A,()=>go(t))):go(t)},ba=t=>{const e=B(t.target,Ss),s=e&&X(e),n=s&&ue(s);n&&(n.relatedTarget=e,n.toggle(),e&&e.tagName==="A"&&t.preventDefault())},wa=t=>{const{target:e}=t,s=D(Es,w(e)),n=D(pa,s),o=s&&ue(s);if(o){const{options:i,triggers:a}=o,{backdrop:c}=i,r=B(e,Ss),l=w(s).getSelection();(!A.contains(e)||c!=="static")&&(!(l&&l.toString().length)&&(!s.contains(e)&&c&&(!r||a.includes(e))||n&&n.contains(e))&&(o.relatedTarget=n&&n.contains(e)?n:null,o.hide()),r&&r.tagName==="A"&&t.preventDefault())}},$a=({code:t,target:e})=>{const s=D(Es,w(e)),n=s&&ue(s);n&&n.options.keyboard&&t===ss&&(n.relatedTarget=null,n.hide())},Ta=t=>{const{element:e}=t;v(e,Ve),xt(e,Se),L(e,Pe,"true"),L(e,"role","dialog"),b(e,ro),fo(t,!0),dt(e)},go=t=>{const{element:e,triggers:s}=t;L(e,Se,"true"),xt(e,Pe),xt(e,"role"),k(e,{visibility:""});const n=Xe.relatedTarget||s.find(qn);n&&dt(n),Zn(e),b(e,lo),v(e,Ve),Lt(e)||fo(t)};class te extends nt{constructor(e,s){super(e,s);const{element:n}=this;this.triggers=[...st(Ss,w(n))].filter(o=>X(o)===n),this.relatedTarget=null,ho(this,!0)}get name(){return Ts}get defaults(){return ga}toggle(){f(this.element,m)?this.hide():this.show()}show(){const{element:e,options:s,relatedTarget:n}=this;let o=0;if(!f(e,m)&&(Xe.relatedTarget=n||void 0,ro.relatedTarget=n||void 0,b(e,Xe),!Xe.defaultPrevented)){const i=Lt(e);if(i&&i!==e){const a=ue(i)||z(i,$s);a&&a.hide()}s.backdrop?(ys(A)?Cs():Un(e,!0),o=Kt(A),_n(),setTimeout(()=>po(this),o)):(po(this),i&&f(A,m)&&ze())}}hide(){const{element:e,relatedTarget:s}=this;f(e,m)&&(Ps.relatedTarget=s||void 0,lo.relatedTarget=s||void 0,b(e,Ps),Ps.defaultPrevented||(p(e,Ve),v(e,m),va(this)))}dispose(){const e={...this},{element:s,options:n}=e,o=n.backdrop?Kt(A):0,i=()=>setTimeout(()=>super.dispose(),o+17);ho(e),this.hide(),f(s,m)?P(s,i):i()}}h(te,"selector",fa),h(te,"init",ua),h(te,"getInstance",ue);const Bt="popover",Ye="Popover",gt="tooltip",uo=t=>{const e=t===gt,s=e?`${t}-inner`:`${t}-body`,n=e?"":``,o=``,i=``;return`${n+o+i}`},mo={top:"top",bottom:"bottom",left:"start",right:"end"},Ds=t=>{const e=/\b(top|bottom|start|end)+/,{element:s,tooltip:n,container:o,options:i,arrow:a}=t;if(n){const c={...mo},r=$t(s);k(n,{top:"",left:"",right:"",bottom:""});const l=t.name===Ye,{offsetWidth:d,offsetHeight:g}=n,{clientWidth:C,clientHeight:F,offsetWidth:tt}=ht(s);let{placement:y}=i;const{clientWidth:U,offsetWidth:q}=o,ut=V(o,"position")==="fixed",S=Math.abs(ut?U-q:C-tt),it=r&&ut?S:0,ct=C-(r?0:S)-1,{width:K,height:_,left:x,right:ae,top:St}=he(s,!0),{x:R,y:Pt}={x,y:St};k(a,{top:"",left:"",right:"",bottom:""});let Ft=0,$e="",Dt=0,Ms="",ce="",Ue="",Ls="";const jt=a.offsetWidth||0,At=a.offsetHeight||0,Bs=jt/2;let Te=St-g-At<0,ye=St+g+_+At>=F,Ee=x-d-jt=ct;const _e=["left","right"],Rs=["top","bottom"];Te=_e.includes(y)?St+_/2-g/2-At<0:Te,ye=_e.includes(y)?St+g/2+_/2+At>=F:ye,Ee=Rs.includes(y)?x+K/2-d/2=ct:Ce,y=_e.includes(y)&&Ee&&Ce?"top":y,y=y==="top"&&Te?"bottom":y,y=y==="bottom"&&ye?"top":y,y=y==="left"&&Ee?"right":y,y=y==="right"&&Ce?"left":y,n.className.includes(y)||(n.className=n.className.replace(e,c[y])),_e.includes(y)?(y==="left"?Dt=R-d-(l?jt:0):Dt=R+K+(l?jt:0),Te&&ye?(Ft=0,$e=0,ce=St+_/2-At/2):Te?(Ft=Pt,$e="",ce=_/2-jt):ye?(Ft=Pt-g+_,$e="",ce=g-_/2-jt):(Ft=Pt-g/2+_/2,ce=g/2-At/2)):Rs.includes(y)&&(y==="top"?Ft=Pt-g-(l?At:0):Ft=Pt+_+(l?At:0),Ee?(Dt=0,Ue=R+K/2-Bs):Ce?(Dt="auto",Ms=0,Ls=K/2+ct-ae-Bs):(Dt=R-d/2+K/2,Ue=d/2-Bs)),k(n,{top:`${Ft}px`,bottom:$e===""?"":`${$e}px`,left:Dt==="auto"?Dt:`${Dt}px`,right:Ms!==""?`${Ms}px`:""}),T(a)&&(ce!==""&&(a.style.top=`${ce}px`),Ue!==""?a.style.left=`${Ue}px`:Ls!==""&&(a.style.right=`${Ls}px`));const ec=$(`updated.bs.${Vt(t.name)}`);b(s,ec)}},As={template:uo(gt),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},vo="data-original-title",Rt="Tooltip",Ct=(t,e,s)=>{if(de(e)&&e.length){let n=e.trim();vi(s)&&(n=s(n));const i=new DOMParser().parseFromString(n,"text/html");t.append(...i.body.childNodes)}else T(e)?t.append(e):(bi(e)||mi(e)&&e.every(I))&&t.append(...e)},ya=t=>{const e=t.name===Rt,{id:s,element:n,options:o}=t,{title:i,placement:a,template:c,animation:r,customClass:l,sanitizeFn:d,dismissible:g,content:C,btnClose:F}=o,tt=e?gt:Bt,y={...mo};let U=[],q=[];$t(n)&&(y.left="end",y.right="start");const ie=`bs-${tt}-${y[a]}`;let ut;if(T(c))ut=c;else{const it=vt("div");Ct(it,c,d),ut=it.firstChild}t.tooltip=T(ut)?ut.cloneNode(!0):void 0;const{tooltip:S}=t;if(S){L(S,"id",s),L(S,"role",gt);const it=e?`${gt}-inner`:`${Bt}-body`,ct=e?null:D(`.${Bt}-header`,S),K=D(`.${it}`,S);t.arrow=D(`.${tt}-arrow`,S);const{arrow:_}=t;if(T(i))U=[i.cloneNode(!0)];else{const x=vt("div");Ct(x,i,d),U=[...x.childNodes]}if(T(C))q=[C.cloneNode(!0)];else{const x=vt("div");Ct(x,C,d),q=[...x.childNodes]}if(g)if(i)if(T(F))U=[...U,F.cloneNode(!0)];else{const x=vt("div");Ct(x,F,d),U=[...U,x.firstChild]}else if(ct&&ct.remove(),T(F))q=[...q,F.cloneNode(!0)];else{const x=vt("div");Ct(x,F,d),q=[...q,x.firstChild]}e?i&&K&&Ct(K,i,d):(i&&ct&&Ct(ct,U,d),C&&K&&Ct(K,q,d),t.btn=D(".btn-close",S)||void 0),p(S,"position-fixed"),p(_,"position-absolute"),f(S,tt)||p(S,tt),r&&!f(S,W)&&p(S,W),l&&!f(S,l)&&p(S,l),f(S,ie)||p(S,ie)}},Ea=t=>{const e=["HTML","BODY"],s=[];let{parentNode:n}=t;for(;n&&!e.includes(n.nodeName);)n=ui(n),Gs(n)||wi(n)||s.push(n);return s.find((o,i)=>V(o,"position")!=="relative"&&s.slice(i+1).every(a=>V(a,"position")==="static")?o:null)||w(t).body},Ca=`[${at}="${gt}"],[data-tip="${gt}"]`,bo="title";let wo=t=>z(t,Rt);const Ha=t=>new Ht(t),Sa=t=>{const{element:e,tooltip:s,container:n,offsetParent:o}=t;xt(e,Ws),zn(s,n===o?n:o)},me=t=>{const{tooltip:e,container:s,offsetParent:n}=t;return e&&ys(e,s===n?s:n)},Pa=(t,e)=>{const{element:s}=t;ve(t),Me(s,vo)&&t.name===Rt&&Co(t),e&&e()},$o=(t,e)=>{const s=e?N:O,{element:n}=t;s(w(n),Je,t.handleTouch,et),[Ie,xe].forEach(o=>{s(Yt(n),o,t.update,et)})},To=t=>{const{element:e}=t,s=$(`shown.bs.${Vt(t.name)}`);$o(t,!0),b(e,s),u.clear(e,"in")},yo=t=>{const{element:e}=t,s=$(`hidden.bs.${Vt(t.name)}`);$o(t),Sa(t),b(e,s),u.clear(e,"out")},ve=(t,e)=>{const s=e?N:O,{element:n,options:o,btn:i}=t,{trigger:a}=o,r=!!(t.name!==Rt&&o.dismissible);a.includes("manual")||(t.enabled=!!e,a.split(" ").forEach(d=>{d===Jo?(s(n,zs,t.handleShow),s(n,Ae,t.handleShow),r||(s(n,Qe,t.handleHide),s(w(n),Je,t.handleTouch,et))):d===M?s(n,d,r?t.handleShow:t.toggle):d===qe&&(s(n,Ge,t.handleShow),r||s(n,js,t.handleHide),ri&&s(n,M,t.handleFocus)),r&&i&&s(i,M,t.handleHide)}))},Eo=(t,e)=>{const s=e?N:O,{element:n,container:o,offsetParent:i}=t,{offsetHeight:a,scrollHeight:c}=o,r=B(n,`.${Z}`),l=B(n,`.${Q}`),d=Yt(n),C=o===i&&a!==c?o:d;s(C,xe,t.update,et),s(C,Ie,t.update,et),r&&s(r,`hide.bs.${Z}`,t.handleHide),l&&s(l,`hide.bs.${Q}`,t.handleHide)},Co=(t,e)=>{const s=[vo,bo],{element:n}=t;L(n,s[e?0:1],e||mt(n,s[0])||""),xt(n,s[e?1:0])};class Ht extends nt{constructor(s,n){super(s,n);h(this,"handleFocus",()=>dt(this.element));h(this,"handleShow",()=>this.show());h(this,"handleHide",()=>this.hide());h(this,"update",()=>{Ds(this)});h(this,"toggle",()=>{const{tooltip:s}=this;s&&!me(this)?this.show():this.hide()});h(this,"handleTouch",({target:s})=>{const{tooltip:n,element:o}=this;n&&n.contains(s)||s===o||s&&o.contains(s)||this.hide()});const{element:o}=this,i=this.name===Rt,a=i?gt:Bt,c=i?Rt:Ye;wo=l=>z(l,c),this.enabled=!0,this.id=`${a}-${tn(o,a)}`;const{options:r}=this;!r.title&&i||!i&&!r.content||(lt(As,{titleAttr:""}),Me(o,bo)&&i&&typeof r.title=="string"&&Co(this,r.title),this.container=Ea(o),this.offsetParent=["sticky","fixed"].some(l=>V(this.container,"position")===l)?this.container:w(this.element).body,ya(this),ve(this,!0))}get name(){return Rt}get defaults(){return As}show(){const{options:s,tooltip:n,element:o,container:i,offsetParent:a,id:c}=this,{animation:r}=s,l=u.get(o,"out"),d=i===a?i:a;u.clear(o,"out"),n&&!l&&!me(this)&&u.set(o,()=>{const g=$(`show.bs.${Vt(this.name)}`);b(o,g),g.defaultPrevented||(jn(n,d),L(o,Ws,`#${c}`),this.update(),Eo(this,!0),f(n,m)||p(n,m),r?P(n,()=>To(this)):To(this))},17,"in")}hide(){const{options:s,tooltip:n,element:o}=this,{animation:i,delay:a}=s;u.clear(o,"in"),n&&me(this)&&u.set(o,()=>{const c=$(`hide.bs.${Vt(this.name)}`);b(o,c),c.defaultPrevented||(this.update(),v(n,m),Eo(this),i?P(n,()=>yo(this)):yo(this))},a+17,"out")}enable(){const{enabled:s}=this;s||(ve(this,!0),this.enabled=!s)}disable(){const{tooltip:s,options:n,enabled:o}=this,{animation:i}=n;o&&(s&&me(this)&&i?(this.hide(),P(s,()=>ve(this))):ve(this),this.enabled=!o)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:s,options:n}=this,o={...this,name:this.name},i=()=>setTimeout(()=>Pa(o,()=>super.dispose()),17);n.animation&&me(o)?(this.options.delay=0,this.hide(),P(s,i)):i()}}h(Ht,"selector",Ca),h(Ht,"init",Ha),h(Ht,"getInstance",wo),h(Ht,"styleTip",Ds);const Da=`[${at}="${Bt}"],[data-tip="${Bt}"]`,Aa=lt({},As,{template:uo(Bt),content:"",dismissible:!1,btnClose:''}),xa=t=>z(t,Ye),Ia=t=>new Wt(t);class Wt extends Ht{constructor(s,n){super(s,n);h(this,"show",()=>{super.show();const{options:s,btn:n}=this;s.dismissible&&n&&setTimeout(()=>dt(n),17)})}get name(){return Ye}get defaults(){return Aa}}h(Wt,"selector",Da),h(Wt,"init",Ia),h(Wt,"getInstance",xa),h(Wt,"styleTip",Ds);const ka="scrollspy",Ho="ScrollSpy",Na='[data-bs-spy="scroll"]',Oa={offset:10,target:null},Ma=t=>z(t,Ho),La=t=>new ee(t),So=$(`activate.bs.${ka}`),Ba=t=>{const{target:e,scrollTarget:s,options:n,itemsLength:o,scrollHeight:i,element:a}=t,{offset:c}=n,r=os(s),l=e&&as("A",e),d=s?Po(s):i;if(t.scrollTop=r?s.scrollY:s.scrollTop,l&&(d!==i||o!==l.length)){let g,C,F;t.items=[],t.offsets=[],t.scrollHeight=d,t.maxScroll=t.scrollHeight-Ra(t),[...l].forEach(tt=>{g=mt(tt,"href"),C=g&&g.charAt(0)==="#"&&g.slice(-1)!=="#"&&D(g,w(a)),C&&(t.items.push(tt),F=he(C),t.offsets.push((r?F.top+t.scrollTop:C.offsetTop)-c))}),t.itemsLength=t.items.length}},Po=t=>T(t)?t.scrollHeight:ht(t).scrollHeight,Ra=({element:t,scrollTarget:e})=>os(e)?e.innerHeight:he(t).height,Do=t=>{[...as("A",t)].forEach(e=>{f(e,E)&&v(e,E)})},Ao=(t,e)=>{const{target:s,element:n}=t;T(s)&&Do(s),t.activeItem=e,p(e,E);const o=[];let i=e;for(;i!==wt(n);)i=i.parentElement,(f(i,"nav")||f(i,"dropdown-menu"))&&o.push(i);o.forEach(a=>{const c=a.previousElementSibling;c&&!f(c,E)&&p(c,E)}),So.relatedTarget=e,b(n,So)},xo=(t,e)=>{(e?N:O)(t.scrollTarget,Ie,t.refresh,et)};class ee extends nt{constructor(s,n){super(s,n);h(this,"refresh",()=>{const{target:s}=this;if(T(s)&&s.offsetHeight>0){Ba(this);const{scrollTop:n,maxScroll:o,itemsLength:i,items:a,activeItem:c}=this;if(n>=o){const l=a[i-1];c!==l&&Ao(this,l);return}const{offsets:r}=this;if(c&&n0){this.activeItem=null,s&&Do(s);return}a.forEach((l,d)=>{c!==l&&n>=r[d]&&(typeof r[d+1]>"u"||nz(t,Io),Wa=t=>new se(t),xs=$(`show.bs.${be}`),Oo=$(`shown.bs.${be}`),Is=$(`hide.bs.${be}`),Mo=$(`hidden.bs.${be}`),we=new Map,Lo=t=>{const{tabContent:e,nav:s}=t;e&&f(e,Ot)&&(e.style.height="",v(e,Ot)),s&&u.clear(s)},Bo=t=>{const{element:e,tabContent:s,content:n,nav:o}=t,{tab:i}=T(o)&&we.get(o)||{tab:null};if(s&&n&&f(n,W)){const{currentHeight:a,nextHeight:c}=we.get(e)||{currentHeight:0,nextHeight:0};a===c?Lo(t):setTimeout(()=>{s.style.height=`${c}px`,kt(s),P(s,()=>Lo(t))},50)}else o&&u.clear(o);Oo.relatedTarget=i,b(e,Oo)},Ro=t=>{const{element:e,content:s,tabContent:n,nav:o}=t,{tab:i,content:a}=o&&we.get(o)||{tab:null,content:null};let c=0;if(n&&s&&f(s,W)&&([a,s].forEach(r=>{T(r)&&p(r,"overflow-hidden")}),c=T(a)?a.scrollHeight:0),xs.relatedTarget=i,Mo.relatedTarget=e,b(e,xs),!xs.defaultPrevented){if(s&&p(s,E),a&&v(a,E),n&&s&&f(s,W)){const r=s.scrollHeight;we.set(e,{currentHeight:c,nextHeight:r,tab:null,content:null}),p(n,Ot),n.style.height=`${c}px`,kt(n),[a,s].forEach(l=>{l&&v(l,"overflow-hidden")})}s&&s&&f(s,W)?setTimeout(()=>{p(s,m),P(s,()=>{Bo(t)})},1):(s&&p(s,m),Bo(t)),i&&b(i,Mo)}},Wo=t=>{const{nav:e}=t;if(!T(e))return{tab:null,content:null};const s=ft(E,e);let n=null;s.length===1&&!Mt.some(i=>f(s[0].parentElement,i))?[n]=s:s.length>1&&(n=s[s.length-1]);const o=T(n)?X(n):null;return{tab:n,content:o}},Fo=t=>{if(!T(t))return null;const e=B(t,`.${Mt.join(",.")}`);return e?D(`.${Mt[0]}-toggle`,e):null},jo=(t,e)=>{(e?N:O)(t.element,M,Fa)},Fa=t=>{const e=No(t.target);e&&(t.preventDefault(),e.show())};class se extends nt{constructor(e){super(e);const{element:s}=this,n=X(s);if(n){const o=B(s,".nav"),i=B(n,".tab-content");this.nav=o,this.content=n,this.tabContent=i,this.dropdown=Fo(s);const{tab:a}=Wo(this);if(o&&!a){const c=D(ko,o),r=c&&X(c);r&&(p(c,E),p(r,m),p(r,E),L(s,Ze,"true"))}jo(this,!0)}}get name(){return Io}show(){const{element:e,content:s,nav:n,dropdown:o}=this;if(!(n&&u.get(n))&&!f(e,E)){const{tab:i,content:a}=Wo(this);if(n&&we.set(n,{tab:i,content:a,currentHeight:0,nextHeight:0}),Is.relatedTarget=e,T(i)&&(b(i,Is),!Is.defaultPrevented)){p(e,E),L(e,Ze,"true");const c=T(i)&&Fo(i);if(c&&f(c,E)&&v(c,E),n){const r=()=>{i&&(v(i,E),L(i,Ze,"false")),o&&!f(o,E)&&p(o,E)};a&&(f(a,W)||s&&f(s,W))?u.set(n,r,1):r()}a&&(v(a,m),f(a,W)?P(a,()=>Ro(this)):Ro(this))}}}dispose(){jo(this),super.dispose()}}h(se,"selector",ko),h(se,"init",Wa),h(se,"getInstance",No);const J="toast",zo="Toast",ja=`.${J}`,za=`[${Be}="${J}"]`,Ko=`[${at}="${J}"]`,ne="showing",Vo="hide",Ka={animation:!0,autohide:!0,delay:5e3},ks=t=>z(t,zo),Va=t=>new oe(t),Xo=$(`show.bs.${J}`),Xa=$(`shown.bs.${J}`),Yo=$(`hide.bs.${J}`),Ya=$(`hidden.bs.${J}`),Uo=t=>{const{element:e,options:s}=t;v(e,ne),u.clear(e,ne),b(e,Xa),s.autohide&&u.set(e,()=>t.hide(),s.delay,J)},_o=t=>{const{element:e}=t;v(e,ne),v(e,m),p(e,Vo),u.clear(e,J),b(e,Ya)},Ua=t=>{const{element:e,options:s}=t;p(e,ne),s.animation?(kt(e),P(e,()=>_o(t))):_o(t)},_a=t=>{const{element:e,options:s}=t;u.set(e,()=>{v(e,Vo),kt(e),p(e,m),p(e,ne),s.animation?P(e,()=>Uo(t)):Uo(t)},17,ne)},Zo=(t,e)=>{const s=e?N:O,{element:n,triggers:o,dismiss:i,options:a,hide:c}=t;i&&s(i,M,c),a.autohide&&[Ge,js,Ae,Qe].forEach(r=>s(n,r,Ga)),o.length&&o.forEach(r=>s(r,M,qa))},Za=t=>{u.clear(t.element,J),Zo(t)},qa=t=>{const{target:e}=t,s=e&&B(e,Ko),n=s&&X(s),o=n&&ks(n);o&&(s&&s.tagName==="A"&&t.preventDefault(),o.relatedTarget=s,o.show())},Ga=t=>{const e=t.target,s=ks(e),{type:n,relatedTarget:o}=t;s&&e!==o&&!e.contains(o)&&([Ae,Ge].includes(n)?u.clear(e,J):u.set(e,()=>s.hide(),s.options.delay,J))};class oe extends nt{constructor(s,n){super(s,n);h(this,"show",()=>{const{element:s,isShown:n}=this;s&&!n&&(b(s,Xo),Xo.defaultPrevented||_a(this))});h(this,"hide",()=>{const{element:s,isShown:n}=this;s&&n&&(b(s,Yo),Yo.defaultPrevented||Ua(this))});const{element:o,options:i}=this;i.animation&&!f(o,W)?p(o,W):!i.animation&&f(o,W)&&v(o,W),this.dismiss=D(za,o),this.triggers=[...st(Ko,w(o))].filter(a=>X(a)===o),Zo(this,!0)}get name(){return zo}get defaults(){return Ka}get isShown(){return f(this.element,m)}dispose(){const{element:s,isShown:n}=this;n&&v(s,m),Za(this),super.dispose()}}h(oe,"selector",ja),h(oe,"init",Va),h(oe,"getInstance",ks);const Ns=new Map;[Ut,_t,Zt,qt,Qt,Jt,te,Wt,ee,se,oe,Ht].forEach(t=>Ns.set(t.prototype.name,t));const Qa=(t,e)=>{[...e].forEach(s=>t(s))},Ja=(t,e)=>{const s=It.getAllFor(t);s&&[...s].forEach(([n,o])=>{e.contains(n)&&o.dispose()})},Os=t=>{const e=t&&t.nodeName?t:document,s=[...as("*",e)];Ns.forEach(n=>{const{init:o,selector:i}=n;Qa(o,s.filter(a=>sn(a,i)))})},tc=t=>{const e=t&&t.nodeName?t:document;Ns.forEach(s=>{Ja(s.prototype.name,e)})};return document.body?Os():N(document,"DOMContentLoaded",()=>Os(),{once:!0}),H.Alert=Ut,H.Button=_t,H.Carousel=Zt,H.Collapse=qt,H.Dropdown=Qt,H.Listener=qo,H.Modal=Jt,H.Offcanvas=te,H.Popover=Wt,H.ScrollSpy=ee,H.Tab=se,H.Toast=oe,H.Tooltip=Ht,H.initCallback=Os,H.removeDataAPI=tc,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({});
\ No newline at end of file
diff --git a/documentation/js/libs/prism.js b/documentation/js/libs/prism.js
index bb9d7eb..9267591 100644
--- a/documentation/js/libs/prism.js
+++ b/documentation/js/libs/prism.js
@@ -1,46 +1,46 @@
-/* PrismJS 1.23.0
+/* PrismJS 1.29.0
https://prismjs.com/download.html?#themes=prism&languages=markup+css+clike+javascript+apacheconf+aspnet+bash+c+csharp+cpp+coffeescript+dart+docker+elm+git+go+graphql+handlebars+haskell+http+ignore+java+json+kotlin+less+markdown+markup-templating+nginx+php+powershell+ruby+rust+sass+scss+sql+swift+typescript+wasm+yaml&plugins=line-highlight+line-numbers+toolbar+copy-to-clipboard */
-var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""+a.tag+">"},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
-Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
-!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);
-Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
-Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;
-Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/};
-!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp;
-Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/i,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/i,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/i,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(
+
+
+
+
+
+
+
+
+
File
+
+
+ src/app/admin-dashboard/admin-dashboard.module.ts
+
+
+
+
+
+
+
+
+
+ Declarations
+
+ -
+ AddFoodComponent
+
+ -
+ DeleteFoodComponent
+
+ -
+ FoodInventoryComponent
+
+ -
+ UpdateFoodComponent
+
+
+
+
+ Imports
+
+ -
+ AdminDashboardRoutingModule
+
+ -
+ SharedModule
+
+
+
+
+
+
+
+
+
+
+
+ import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { AddFoodComponent } from './add-food/add-food.component';
+import { UpdateFoodComponent } from './update-food/update-food.component';
+import { DeleteFoodComponent } from './delete-food/delete-food.component';
+import { FoodInventoryComponent } from './food-inventory/food-inventory.component';
+import { AdminDashboardRoutingModule } from './admin-dashboard.routing.module';
+import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
+import { SharedModule } from '../shared/shared.module';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+
+@NgModule({
+ declarations: [
+ AddFoodComponent,
+ UpdateFoodComponent,
+ DeleteFoodComponent,
+ FoodInventoryComponent,
+ ],
+ imports: [
+ CommonModule,
+ FontAwesomeModule,
+ AdminDashboardRoutingModule,
+ SharedModule,
+ FormsModule,
+ ReactiveFormsModule,
+ ],
+ exports: [],
+})
+export class AdminDashboardModule {}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results matching ""
+
+
+
+ No results matching ""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+