[#41944] fixed toast creation

pull/10517/head
Eric Schubert 3 years ago
parent 08d505c0de
commit 70763035fa
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 2
      docker/dev/backend/Dockerfile
  2. 11
      frontend/src/app/shared/components/toaster/toast.service.ts

@ -7,7 +7,7 @@ ARG DEV_GID=1001
ENV USER=dev
ENV RAILS_ENV=development
ENV BUNDLER_VERSION "2.0.2"
ENV BUNDLER_VERSION "2.2.32"
# `--no-log-init` is required as a workaround to avoid disk exhaustion.
#

@ -161,8 +161,15 @@ export class ToastService {
this.stack.putValue([]);
}
private createToast(message:IToast|string, type:ToastType):IToast {
return (typeof message === 'string') ? { message, type } : { message: message.message, type };
private createToast(toast:IToast|string, type:ToastType):IToast {
return (typeof toast === 'string')
? { message: toast, type }
: {
message: toast.message,
type,
link: toast.link,
data: toast.data,
};
}
private createAttachmentUploadToast(message:IToast|string, uploads:UploadInProgress[]) {

Loading…
Cancel
Save