Changeset 6e6f04b for Farmatiko/ClientApp/src/app/dashboard
- Timestamp:
- 02/11/21 03:50:10 (4 years ago)
- Branches:
- master
- Children:
- f554983
- Parents:
- 8eb1e21 (diff), dae4cde (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
r8eb1e21 r6e6f04b 60 60 .subscribe((req) => { 61 61 if(req) { 62 this.openSnackBar("Claiming request sent!", "OK"); 63 } 64 else { 65 this.openSnackBar("Unable to send a request", "Try again"); 62 this.openSnackBar("Request sent!", "OK"); 66 63 } 67 64 }, … … 78 75 .subscribe((req) => { 79 76 if(req) { 80 this.openSnackBar("Claiming request sent!", "OK"); 81 } 82 else { 83 this.openSnackBar("Unable to send a request", "Try again"); 77 this.openSnackBar("Request sent!", "OK"); 84 78 } 85 79 }, … … 98 92 saveDeletedMedicines() { 99 93 this.dataService.updatePharmacyHead(this.head) 100 .subscribe((hd) => { 101 if(hd) { 102 this.openSnackBar("Success! Medicine deleted", "OK"); 94 .subscribe(() => { 95 this.openSnackBar("Success!", "OK"); 103 96 this.editedMedicine = false; 104 }105 else {106 this.openSnackBar("Unable to delete Medicine", "Try again");107 }108 97 }, 109 (err: any) => console.log(err), 98 (err: any) => { 99 console.log(err); 100 this.openSnackBar("Failed!", "Try again"); 101 }, 110 102 () => console.log('Update sent!')); 111 103 } … … 132 124 this.editedMedicine = true; 133 125 } 134 this.openSnackBar("Success! Medicine added, please save changes now", "OK"); 135 } 136 else { 137 this.openSnackBar("Failed! Please try again", "OK"); 126 this.openSnackBar("Success!", "OK"); 138 127 } 139 128 }, () => this.openSnackBar("Failed! Please try again", "OK")); … … 160 149 this.editedMedicine = true; 161 150 } 162 this.openSnackBar("Success! Medicines added, please save changes now", "OK"); 163 } 164 else { 165 this.openSnackBar("Failed! Please try again", "OK"); 151 this.openSnackBar("Success!", "OK"); 166 152 } 167 153 }, () => this.openSnackBar("Failed! Please try again", "OK")); … … 215 201 this.head.Pharmacy.push(editedPharmacy); 216 202 this.dataService.updatePharmacyHead(this.head) 217 .subscribe((hd: IPharmacyHead) => { 218 if(hd) { 219 this.openSnackBar("Success! Pharmacy edited", "OK").onAction().subscribe(() => { 203 .subscribe((hd) => { 204 this.openSnackBar("Success!", "OK").onAction().subscribe(() => { 220 205 window.location.reload(); 221 206 }); 222 }223 else {224 this.openSnackBar("Pharmacy edit failed", "Try again");225 }226 207 }, 227 208 (err: any) => console.log(err),
Note:
See TracChangeset
for help on using the changeset viewer.