Skip to content

Commit 9a61b48

Browse files
committed
modified guest entry to not show already paid and no_show guest tokens
1 parent 98b88e4 commit 9a61b48

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/app/guest-entry/guest-entry.component.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,18 @@ export class GuestEntryComponent implements OnInit {
6565
}
6666
}
6767

68-
cleanData(history:any){
69-
let body=[];
70-
for(let i=0; i<3;i++){
71-
if ( Object.keys(history[i]["data"]).length ){
72-
for(let key in history[i]["data"]){
73-
let booking=[];
74-
let withdrawable=this.guestService.withdrawValidity(key,i);
68+
cleanData(history: any) {
69+
let body = [];
70+
for (let i = 0; i < 3; i++) {
71+
if (Object.keys(history[i]["data"]).length) {
72+
for (let key in history[i]["data"]) {
73+
if (history[i]["data"][key]["payment_status"] === 'paid' ||
74+
history[i]["data"][key]["payment_status"] === 'no_show') {
75+
continue;
76+
}
77+
78+
let booking = [];
79+
let withdrawable = this.guestService.withdrawValidity(key, i);
7580
booking.push(history[i]["data"][key]["index"])
7681
booking.push(history[i]["data"][key]["guesthostel"])
7782
booking.push(this.legel_date[i])

0 commit comments

Comments
 (0)