[ACS-5645]modified changes

This commit is contained in:
Yasa-Nataliya
2023-10-13 16:20:27 +05:30
committed by Anukriti Singh
parent 2ac50ad3cc
commit 24cbdb1ae9
2 changed files with 12 additions and 12 deletions
@@ -28,12 +28,12 @@
<div *ngIf="editable"
class="adf-metadata-action-buttons">
<button mat-icon-button
(click)="cancelChanges(buttonType.GeneralInfo, $event)"
(click)="cancelChanges(buttonType.GeneralInfo, $event, group)"
data-automation-id="reset-metadata">
<mat-icon>clear</mat-icon>
</button>
<button mat-icon-button
(click)="saveChanges(buttonType.GeneralInfo, $event)"
(click)="saveChanges(buttonType.GeneralInfo, $event, group)"
color="primary"
data-automation-id="save-general-info-metadata"
[disabled]="!hasMetadataChanged">
@@ -80,12 +80,12 @@
</div>
<div *ngIf="editableTags" class="adf-metadata-action-buttons">
<button mat-icon-button
(click)="cancelChanges(buttonType.Tags, $event)"
(click)="cancelChanges(buttonType.Tags, $event, group)"
data-automation-id="reset-tags-metadata">
<mat-icon>clear</mat-icon>
</button>
<button mat-icon-button
(click)="saveChanges(buttonType.Tags, $event)"
(click)="saveChanges(buttonType.Tags, $event, group)"
color="primary"
data-automation-id="save-tags-metadata"
[disabled]="!hasMetadataChanged">
@@ -140,12 +140,12 @@
</div>
<div *ngIf="editableCategories" class="adf-metadata-action-buttons">
<button mat-icon-button
(click)="cancelChanges(buttonType.Categories, $event)"
(click)="cancelChanges(buttonType.Categories, $event, group)"
data-automation-id="reset-metadata">
<mat-icon>clear</mat-icon>
</button>
<button mat-icon-button
(click)="saveChanges(buttonType.Categories, $event)"
(click)="saveChanges(buttonType.Categories, $event, group)"
color="primary"
data-automation-id="save-categories-metadata"
[disabled]="!hasMetadataChanged">
@@ -205,12 +205,12 @@
</button>
<div class="adf-metadata-action-buttons" *ngIf="group.editable">
<button mat-icon-button
(click)="cancelChanges(buttonType.Group, $event)"
(click)="cancelChanges(buttonType.Group, $event, group)"
data-automation-id="reset-metadata">
<mat-icon>clear</mat-icon>
</button>
<button mat-icon-button
(click)="saveChanges(buttonType.Group, $event)"
(click)="saveChanges(buttonType.Group, $event, group)"
color="primary"
data-automation-id="save-metadata"
[disabled]="!hasMetadataChanged">
@@ -282,9 +282,9 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
* Called after clicking save button. It confirms all changes done for metadata and hides both category and tag name controls.
* Before clicking on that button they are not saved.
*/
saveChanges(buttonType: ButtonType, event: MouseEvent) {
saveChanges(buttonType: ButtonType, event: MouseEvent, group?: CardViewGroup) {
event.stopPropagation();
this.toggleEditMode(buttonType);
this.toggleEditMode(buttonType, group);
this._saving = true;
this.tagNameControlVisible = false;
this.categoryControlVisible = false;
@@ -347,9 +347,9 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
this.categoryControlVisible = false;
}
cancelChanges(buttonType: ButtonType, event: MouseEvent) {
cancelChanges(buttonType: ButtonType, event: MouseEvent, group?: CardViewGroup) {
event.stopPropagation();
this.toggleEditMode(buttonType);
this.toggleEditMode(buttonType, group);
this.revertChanges();
this.loadProperties(this.node);
}