Merge pull request #5995 from pinkevmladchy/add-copyDashboardId-button-in-details-panel
[3.4] UI: Add copyDashboardId button in details-panel
This commit is contained in:
commit
d3b7a334aa
@ -66,6 +66,16 @@
|
||||
{{'dashboard.delete' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<button mat-raised-button
|
||||
ngxClipboard
|
||||
(cbOnSuccess)="onDashboardIdCopied($event)"
|
||||
[cbContent]="entity?.id?.id"
|
||||
[fxShow]="!isEdit">
|
||||
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
|
||||
<span translate>dashboard.copyId</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mat-padding" fxLayout="column">
|
||||
<mat-form-field class="mat-block"
|
||||
[fxShow]="!isEdit && assignedCustomersText?.length
|
||||
|
||||
@ -119,6 +119,17 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> {
|
||||
}));
|
||||
}
|
||||
|
||||
onDashboardIdCopied($event) {
|
||||
this.store.dispatch(new ActionNotificationShow(
|
||||
{
|
||||
message: this.translate.instant('dashboard.idCopiedMessage'),
|
||||
type: 'success',
|
||||
duration: 750,
|
||||
verticalPosition: 'bottom',
|
||||
horizontalPosition: 'right'
|
||||
}));
|
||||
}
|
||||
|
||||
private updateFields(entity: Dashboard): void {
|
||||
if (entity && !isEqual(entity, {})) {
|
||||
this.assignedCustomersText = getDashboardAssignedCustomersText(entity);
|
||||
|
||||
@ -937,6 +937,8 @@
|
||||
"assignedToCustomer": "Assigned to customer",
|
||||
"assignedToCustomers": "Assigned to customers",
|
||||
"public": "Public",
|
||||
"copyId": "Copy dashboard id",
|
||||
"idCopiedMessage": "Dashboard Id has been copied to clipboard",
|
||||
"public-link": "Public link",
|
||||
"copy-public-link": "Copy public link",
|
||||
"public-link-copied-message": "Dashboard public link has been copied to clipboard",
|
||||
|
||||
@ -483,6 +483,8 @@
|
||||
"add-widget": "Добавить новый виджет",
|
||||
"title": "Название",
|
||||
"select-widget-title": "Выберите виджет",
|
||||
"copyId": "Копировать идентификатор дашборда",
|
||||
"idCopiedMessage": "Идентификатор дашборда скопирован в буфер обмена",
|
||||
"select-widget-subtitle": "Список доступных виджетов",
|
||||
"delete": "Удалить дашборд",
|
||||
"title-required": "Название обязательно.",
|
||||
|
||||
@ -594,6 +594,8 @@
|
||||
"add-widget": "Додати новий віджет",
|
||||
"title": "Назва",
|
||||
"select-widget-title": "Вибрати віджет",
|
||||
"copyId": "Копіювати ідентифікатор панелі приладів",
|
||||
"idCopiedMessage": "Ідентифікатор панелі приладів скопійовано в буфер обміну",
|
||||
"select-widget-subtitle": "Список доступних типів віджетів",
|
||||
"delete": "Видалити панель приладів",
|
||||
"title-required": "Необхідно задати назву.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user