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 { DefaultColorType } from '@red/domain';
|
||||||
import { BaseDialogComponent } from '@iqser/common-ui';
|
import { BaseDialogComponent } from '@iqser/common-ui';
|
||||||
import { UntypedFormGroup, Validators } from '@angular/forms';
|
import { UntypedFormGroup, Validators } from '@angular/forms';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { defaultColorsTranslations } from '@translations/default-colors-translations';
|
import { defaultColorsTranslations } from '@translations/default-colors-translations';
|
||||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
import { firstValueFrom } from 'rxjs';
|
import { firstValueFrom } from 'rxjs';
|
||||||
@ -23,7 +22,6 @@ export class EditColorDialogComponent extends BaseDialogComponent {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly _defaultColorsService: DefaultColorsService,
|
private readonly _defaultColorsService: DefaultColorsService,
|
||||||
private readonly _translateService: TranslateService,
|
|
||||||
protected readonly _dialogRef: MatDialogRef<EditColorDialogComponent>,
|
protected readonly _dialogRef: MatDialogRef<EditColorDialogComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) readonly data: IEditColorData,
|
@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));
|
await firstValueFrom(this._defaultColorsService.update(colors, this.data.dossierTemplateId));
|
||||||
this._dialogRef.close(true);
|
this._dialogRef.close(true);
|
||||||
this._loadingService.stop();
|
this._loadingService.stop();
|
||||||
const color = this._translateService.instant(defaultColorsTranslations[this.data.colorKey]);
|
this._toaster.info(_('edit-color-dialog.success'));
|
||||||
this._toaster.info(_('edit-color-dialog.success'), { params: { color: color } });
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this._toaster.error(_('edit-color-dialog.error'));
|
this._toaster.error(_('edit-color-dialog.error'));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,7 @@
|
|||||||
},
|
},
|
||||||
"success": {
|
"success": {
|
||||||
"create": "Entity added!",
|
"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": {
|
"add-edit-file-attribute": {
|
||||||
@ -1053,7 +1053,7 @@
|
|||||||
"color-placeholder": "Color"
|
"color-placeholder": "Color"
|
||||||
},
|
},
|
||||||
"save": "Save",
|
"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": {
|
"edit-dossier-dialog": {
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user