Pull request #376: RED-4706: Updated toast note when changing default color or entity.
Merge in RED/ui from RED-4706 to master * commit '4e3c243fa1b44c0356b9afdebcec487072478501': RED-4706: Removed unused service from constructor && updated config.json RED-4706: Updated toast note when changing default color or entity.
This commit is contained in:
commit
447bc294f0
@ -3,7 +3,6 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { DefaultColorType } from '@red/domain';
|
||||
import { BaseDialogComponent } from '@iqser/common-ui';
|
||||
import { UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { defaultColorsTranslations } from '@translations/default-colors-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
@ -23,7 +22,6 @@ export class EditColorDialogComponent extends BaseDialogComponent {
|
||||
|
||||
constructor(
|
||||
private readonly _defaultColorsService: DefaultColorsService,
|
||||
private readonly _translateService: TranslateService,
|
||||
protected readonly _dialogRef: MatDialogRef<EditColorDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) readonly data: IEditColorData,
|
||||
) {
|
||||
@ -43,8 +41,7 @@ export class EditColorDialogComponent extends BaseDialogComponent {
|
||||
await firstValueFrom(this._defaultColorsService.update(colors, this.data.dossierTemplateId));
|
||||
this._dialogRef.close(true);
|
||||
this._loadingService.stop();
|
||||
const color = this._translateService.instant(defaultColorsTranslations[this.data.colorKey]);
|
||||
this._toaster.info(_('edit-color-dialog.success'), { params: { color: color } });
|
||||
this._toaster.info(_('edit-color-dialog.success'));
|
||||
} catch (e) {
|
||||
this._toaster.error(_('edit-color-dialog.error'));
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
},
|
||||
"success": {
|
||||
"create": "Entity added!",
|
||||
"edit": "Entity updated!"
|
||||
"edit": "Entity updated. Please note that other users need to refresh the browser to see your changes."
|
||||
}
|
||||
},
|
||||
"add-edit-file-attribute": {
|
||||
@ -1053,7 +1053,7 @@
|
||||
"color-placeholder": "Color"
|
||||
},
|
||||
"save": "Save",
|
||||
"success": "Successfully updated color for {color}."
|
||||
"success": "Color saved successfully. Please note that the users need to refresh the browser to see the updated color."
|
||||
},
|
||||
"edit-dossier-dialog": {
|
||||
"actions": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user