diff options
Diffstat (limited to 'ufund-ui/src/app')
3 files changed, 12 insertions, 8 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.ts b/ufund-ui/src/app/components/cupboard/cupboard.component.ts index fff8760..662def4 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.ts +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.ts @@ -100,11 +100,11 @@ export class CupboardComponent implements OnInit {          this.cupboardService.updateNeed(need.id, need)              .pipe(catchError((ex, _) => {                  if (ex.status == 500) { -                    this.toastService.sendToast(ToastType.INFO, 'Fields cannot be blank'); +                    this.toastService.sendToast(ToastType.ERROR, 'Fields cannot be blank');                  } else if (ex.status == 400) { -                    this.toastService.sendToast(ToastType.INFO, ex.error); +                    this.toastService.sendToast(ToastType.ERROR, ex.error);                  } else { -                    this.toastService.sendToast(ToastType.INFO, "Error on creating need"); +                    this.toastService.sendToast(ToastType.ERROR, "Error on creating need");                  }                  return of()              })) @@ -139,11 +139,11 @@ export class CupboardComponent implements OnInit {          this.cupboardService.createNeed(need)              .pipe(catchError((ex, _) => {                  if (ex.status == 500) { -                    this.toastService.sendToast(ToastType.INFO, "Fields cannot be blank"); +                    this.toastService.sendToast(ToastType.ERROR, "Fields cannot be blank");                  } else if (ex.status == 400) { -                    this.toastService.sendToast(ToastType.INFO, ex.error); +                    this.toastService.sendToast(ToastType.ERROR, ex.error);                  } else { -                    this.toastService.sendToast(ToastType.INFO, "Error on creating need"); +                    this.toastService.sendToast(ToastType.ERROR, "Error on creating need");                  }                  return of()              })) diff --git a/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts b/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts index 24e2c0b..54ae720 100644 --- a/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts +++ b/ufund-ui/src/app/components/funding-basket/funding-basket.component.ts @@ -46,7 +46,11 @@ export class FundingBasketComponent implements OnInit {                  this.isValid = false;                  contribution.setAttribute("style", "color: #ff0000"); -                this.toastService.sendToast(ToastType.WARNING, "Invalid input in funding basket!") +                this.toastService.sendToast(ToastType.ERROR, "Invalid input in funding basket!") + +                setTimeout(() => { +                    contribution.setAttribute("style", "color: #ffffff"); +                }, 3000);              }          }          // if (this.usersService.getBasket().value != await firstValueFrom(this.usersService.getUser(1)) diff --git a/ufund-ui/src/app/components/signup/signup.component.ts b/ufund-ui/src/app/components/signup/signup.component.ts index 5ec84ae..a20d828 100644 --- a/ufund-ui/src/app/components/signup/signup.component.ts +++ b/ufund-ui/src/app/components/signup/signup.component.ts @@ -47,7 +47,7 @@ export class SignupComponent {          this.usersService.createUser(username, password).then(() => {              this.showSuccessMessage.next(true);          }).catch(ex => { -            this.toastService.sendToast(ToastType.INFO, "Unable to create account: " + friendlyHttpStatus[ex.status]) +            this.toastService.sendToast(ToastType.ERROR, "Unable to create account: " + friendlyHttpStatus[ex.status])              console.log(ex)          })      }  | 
