mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-7755] added cancel button to modal and updated message returned when a supervision order already exists
This commit is contained in:
@@ -30,11 +30,16 @@
|
||||
(select)="updateGroupObjectSelected($event)"></ds-eperson-group-list>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-row-reverse m-2">
|
||||
<button class="btn btn-primary save"
|
||||
(click)="save()">
|
||||
<i class="fas fa-save"></i> {{"supervision-group-selector.button.save" | translate}}
|
||||
</button>
|
||||
<!-- <div class="d-flex flex-row-reverse m-2"> -->
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-outline-secondary"
|
||||
(click)="close()">
|
||||
<i class="fas fa-times"></i> {{"supervision-group-selector.button.cancel" | translate}}
|
||||
</button>
|
||||
<button class="btn btn-primary save"
|
||||
(click)="save()">
|
||||
<i class="fas fa-save"></i> {{"supervision-group-selector.button.save" | translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -79,13 +79,13 @@ export class SupervisionGroupSelectorComponent {
|
||||
if (rd.state === 'Success') {
|
||||
this.supervisionOrderDataService.searchByItem(this.itemUUID, null, null, followLink('group'));
|
||||
this.notificationsService.success(this.translateService.get('supervision-group-selector.notification.create.success.title', { name: this.selectedGroup.name }));
|
||||
this.close();
|
||||
} else {
|
||||
this.notificationsService.error(
|
||||
this.translateService.get('supervision-group-selector.notification.create.failure.title'),
|
||||
rd.errorMessage);
|
||||
this.translateService.get('supervision-group-selector.notification.create.failure.title'),
|
||||
rd.statusCode == 422 ? this.translateService.get('supervision-group-selector.notification.create.already-existing') : rd.errorMessage);
|
||||
}
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -100,7 +100,7 @@ export class ItemSearchResultListElementComponent extends SearchResultListElemen
|
||||
).pipe(
|
||||
getAllSucceededRemoteData(),
|
||||
).subscribe((result) => {
|
||||
this.supervisionOrder$ = this.supervisionOrderDataService.searchByItem(this.dso.uuid, null, null, followLink('group')).pipe(
|
||||
this.supervisionOrder$ = this.supervisionOrderDataService.searchByItem(this.dso.uuid, false, true, followLink('group')).pipe(
|
||||
getAllSucceededRemoteListPayload(),
|
||||
switchMap((supervisionOrders: SupervisionOrder[]) => {
|
||||
const supervisionOrdersArray = supervisionOrders.map((supervisionOrder: SupervisionOrder) => {
|
||||
|
@@ -1443,6 +1443,8 @@
|
||||
|
||||
"supervision-group-selector.select.group.label": "Select a Group",
|
||||
|
||||
"supervision-group-selector.button.cancel": "Cancel",
|
||||
|
||||
"supervision-group-selector.button.save": "Save",
|
||||
|
||||
"supervision-group-selector.select.type-of-order.error": "Please select a type of order",
|
||||
@@ -1453,6 +1455,8 @@
|
||||
|
||||
"supervision-group-selector.notification.create.failure.title": "Error",
|
||||
|
||||
"supervision-group-selector.notification.create.already-existing" : "A supervision order already exists on this item for selected group",
|
||||
|
||||
"confirmation-modal.export-metadata.header": "Export metadata for {{ dsoName }}",
|
||||
|
||||
"confirmation-modal.export-metadata.info": "Are you sure you want to export metadata for {{ dsoName }}",
|
||||
|
Reference in New Issue
Block a user