Skip to content

Commit

Permalink
Resolving Issue #48 and #51 (#54)
Browse files Browse the repository at this point in the history
UPDATE: 
* mess-i-token added to session Storage

* added confirmation popup for activation of student card and guest entry withdraw

* modified placeholder value in search bar

* modified style of rebate request button to match guest entry button

---------

Co-authored-by: Sajjad Nakhwa <[email protected]>
  • Loading branch information
kumar-09 and Sajjad Nakhwa authored Jan 6, 2025
1 parent 9dd4b1a commit 8f5228c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/app/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class AuthService {
this.is_sso_login = false;
this.token = 'null'

sessionStorage.setItem("mess-i-token",this.token);
sessionStorage.setItem("mess-i-admin","false");
sessionStorage.setItem("mess-i-staff","true");
sessionStorage.setItem("mess-i-rebate","true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export class CardStatusButtonComponent implements OnInit {
}

async toggl(){
const confirmation = window.confirm(
`Are you sure you want to ${this.cardStatus ? 'deactivate' : 'activate'} this card?`
);

if (!confirmation) {
return;
}
this.process=true;
await this.service.togglActive(this.rollNumber).then((res)=>{
if (res){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export class GuestStatusButtonComponent implements OnInit {
}

async toggl(){
const confirmation = window.confirm(
`Are you sure you want to ${this.guestStatus ? 'withdraw' : ""} this entry?`
);

if (!confirmation) {
return;
}
this.process=true;
await this.service.removeGuest(this.guestHostel, this.meal.toLowerCase(), this.date).then((res)=>{
if (res){
Expand Down
16 changes: 7 additions & 9 deletions src/app/rebate/rebate.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
border-bottom:3px solid #FFC42B;
}
#new-request-btn{
background-color: #FFC42B;
border-color: #FFC42B;
border-radius: 120rem;

padding-right: 24px;
padding-left: 24px;

background-color: #28282b;
color: white;
border: 0px;
border-radius: 4px;
float:right;
height: max-content;
margin: auto 0px;

font-weight: bold;
}
#new-request-btn:hover{
background-color: #FFC42B;
}
2 changes: 1 addition & 1 deletion src/app/student-list/student-list.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="student-list-table-container">
<h1 style="border-bottom:3px solid #ffc42b;"> Students' List </h1>
<div class="search-main-area">
<input type="search" class="form-control nosubmit" [(ngModel)]="searchText" placeholder="Search by roll number" aria-label="search" aria-describedby="search by roll" (keyup)="search($event)">
<input type="search" class="form-control nosubmit" [(ngModel)]="searchText" placeholder="Search by name or roll number" aria-label="search" aria-describedby="search by roll" (keyup)="search($event)">
</div>
<table class="table">
<thead>
Expand Down

0 comments on commit 8f5228c

Please sign in to comment.