mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +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,7 +30,12 @@
|
|||||||
(select)="updateGroupObjectSelected($event)"></ds-eperson-group-list>
|
(select)="updateGroupObjectSelected($event)"></ds-eperson-group-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-row-reverse m-2">
|
<!-- <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"
|
<button class="btn btn-primary save"
|
||||||
(click)="save()">
|
(click)="save()">
|
||||||
<i class="fas fa-save"></i> {{"supervision-group-selector.button.save" | translate}}
|
<i class="fas fa-save"></i> {{"supervision-group-selector.button.save" | translate}}
|
||||||
|
@@ -79,13 +79,13 @@ export class SupervisionGroupSelectorComponent {
|
|||||||
if (rd.state === 'Success') {
|
if (rd.state === 'Success') {
|
||||||
this.supervisionOrderDataService.searchByItem(this.itemUUID, null, null, followLink('group'));
|
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.notificationsService.success(this.translateService.get('supervision-group-selector.notification.create.success.title', { name: this.selectedGroup.name }));
|
||||||
|
this.close();
|
||||||
} else {
|
} else {
|
||||||
this.notificationsService.error(
|
this.notificationsService.error(
|
||||||
this.translateService.get('supervision-group-selector.notification.create.failure.title'),
|
this.translateService.get('supervision-group-selector.notification.create.failure.title'),
|
||||||
rd.errorMessage);
|
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(
|
).pipe(
|
||||||
getAllSucceededRemoteData(),
|
getAllSucceededRemoteData(),
|
||||||
).subscribe((result) => {
|
).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(),
|
getAllSucceededRemoteListPayload(),
|
||||||
switchMap((supervisionOrders: SupervisionOrder[]) => {
|
switchMap((supervisionOrders: SupervisionOrder[]) => {
|
||||||
const supervisionOrdersArray = supervisionOrders.map((supervisionOrder: SupervisionOrder) => {
|
const supervisionOrdersArray = supervisionOrders.map((supervisionOrder: SupervisionOrder) => {
|
||||||
|
@@ -1443,6 +1443,8 @@
|
|||||||
|
|
||||||
"supervision-group-selector.select.group.label": "Select a Group",
|
"supervision-group-selector.select.group.label": "Select a Group",
|
||||||
|
|
||||||
|
"supervision-group-selector.button.cancel": "Cancel",
|
||||||
|
|
||||||
"supervision-group-selector.button.save": "Save",
|
"supervision-group-selector.button.save": "Save",
|
||||||
|
|
||||||
"supervision-group-selector.select.type-of-order.error": "Please select a type of order",
|
"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.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.header": "Export metadata for {{ dsoName }}",
|
||||||
|
|
||||||
"confirmation-modal.export-metadata.info": "Are you sure you want to 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