Skip to content

Commit 8f5228c

Browse files
kumar-09Sajjad Nakhwa
andauthored
Resolving Issue #48 and #51 (#54)
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]>
1 parent 9dd4b1a commit 8f5228c

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

src/app/auth.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export class AuthService {
8787
this.is_sso_login = false;
8888
this.token = 'null'
8989

90+
sessionStorage.setItem("mess-i-token",this.token);
9091
sessionStorage.setItem("mess-i-admin","false");
9192
sessionStorage.setItem("mess-i-staff","true");
9293
sessionStorage.setItem("mess-i-rebate","true");

src/app/components/card-status-button/card-status-button.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export class CardStatusButtonComponent implements OnInit {
1919
}
2020

2121
async toggl(){
22+
const confirmation = window.confirm(
23+
`Are you sure you want to ${this.cardStatus ? 'deactivate' : 'activate'} this card?`
24+
);
25+
26+
if (!confirmation) {
27+
return;
28+
}
2229
this.process=true;
2330
await this.service.togglActive(this.rollNumber).then((res)=>{
2431
if (res){

src/app/components/guest-status-button/guest-status-button.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ export class GuestStatusButtonComponent implements OnInit {
2222
}
2323

2424
async toggl(){
25+
const confirmation = window.confirm(
26+
`Are you sure you want to ${this.guestStatus ? 'withdraw' : ""} this entry?`
27+
);
28+
29+
if (!confirmation) {
30+
return;
31+
}
2532
this.process=true;
2633
await this.service.removeGuest(this.guestHostel, this.meal.toLowerCase(), this.date).then((res)=>{
2734
if (res){

src/app/rebate/rebate.component.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@
1212
border-bottom:3px solid #FFC42B;
1313
}
1414
#new-request-btn{
15-
background-color: #FFC42B;
16-
border-color: #FFC42B;
17-
border-radius: 120rem;
18-
19-
padding-right: 24px;
20-
padding-left: 24px;
21-
15+
background-color: #28282b;
16+
color: white;
17+
border: 0px;
18+
border-radius: 4px;
2219
float:right;
2320
height: max-content;
2421
margin: auto 0px;
25-
26-
font-weight: bold;
22+
}
23+
#new-request-btn:hover{
24+
background-color: #FFC42B;
2725
}

src/app/student-list/student-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="student-list-table-container">
22
<h1 style="border-bottom:3px solid #ffc42b;"> Students' List </h1>
33
<div class="search-main-area">
4-
<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)">
4+
<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)">
55
</div>
66
<table class="table">
77
<thead>

0 commit comments

Comments
 (0)