mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix missing label in modal, add search-labels, fix reprocess message
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<div *ngFor="let key of notifyMessageKeys">
|
<div *ngFor="let key of notifyMessageKeys">
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="font-weight-bold col">{{ key + '.notify-detail-modal' | translate}}</div>
|
<div class="font-weight-bold col">{{ key + '.notify-detail-modal' | translate}}</div>
|
||||||
<div class="col text-right">{{'notify-detail-modal.' + notifyMessage[key] | translate: {default: notifyMessage[key]} }}</div>
|
<div class="col text-right">{{'notify-detail-modal.' + notifyMessage[key] | translate: {default: notifyMessage[key] ?? "n/a" } }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
||||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { MissingTranslationHelper } from "../../../shared/translate/missing-translation.helper";
|
import { MissingTranslationHelper } from '../../../shared/translate/missing-translation.helper';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-detail-modal',
|
selector: 'ds-admin-notify-detail-modal',
|
||||||
|
@@ -15,9 +15,16 @@
|
|||||||
<a class="nav-link" [routerLink]="'../outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
<a class="nav-link" [routerLink]="'../outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.inbound' | translate}}</div>
|
<div class="container my-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-md-3 text-left h4">{{'admin.notify.dashboard.inbound' | translate}}</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<ds-search-labels [inPlaceSearch]="true"></ds-search-labels>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<ds-themed-search
|
<ds-themed-search
|
||||||
[configuration]="'NOTIFY.incoming'"
|
[configuration]="defaultConfiguration"
|
||||||
[showViewModes]="false"
|
[showViewModes]="false"
|
||||||
[searchEnabled]="false"
|
[searchEnabled]="false"
|
||||||
[context]="context"
|
[context]="context"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
||||||
@@ -14,8 +14,14 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AdminNotifyIncomingComponent {
|
export class AdminNotifyIncomingComponent implements OnInit{
|
||||||
|
public defaultConfiguration = 'NOTIFY.incoming';
|
||||||
protected readonly context = Context.CoarNotify;
|
protected readonly context = Context.CoarNotify;
|
||||||
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.searchConfigService.getCurrentConfiguration('').subscribe(x => console.log(x));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,16 @@
|
|||||||
<a class="nav-link active">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
<a class="nav-link active">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.outbound' | translate}}</div>
|
<div class="container my-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-md-3 text-left h4">{{'admin.notify.dashboard.outbound' | translate}}</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<ds-search-labels [inPlaceSearch]="true"></ds-search-labels>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<ds-themed-search
|
<ds-themed-search
|
||||||
[configuration]="'NOTIFY.outgoing'"
|
[configuration]="'NOTIFY.outgoing'"
|
||||||
[showViewModes]="false"
|
[showViewModes]="false"
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<div class="mb-2">{{ row.title | translate }}</div>
|
<div class="mb-2">{{ row.title | translate }}</div>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col-sm" *ngFor="let box of row.boxes">
|
<div class="col-sm" *ngFor="let box of row.boxes">
|
||||||
<ds-notification-box [boxConfig]="box"></ds-notification-box>
|
<ds-notification-box (selectedBoxConfig)="navigateToSelectedSearchConfig($event)" [boxConfig]="box"></ds-notification-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -9,4 +9,8 @@ export class AdminNotifyMetricsComponent {
|
|||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
boxesConfig: AdminNotifyMetricsRow[];
|
boxesConfig: AdminNotifyMetricsRow[];
|
||||||
|
|
||||||
|
public navigateToSelectedSearchConfig($event: string) {
|
||||||
|
console.log($event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="table-responsive mt-2">
|
<div class="table-responsive mt-2">
|
||||||
<table class="table table-striped table-hover">
|
<table class="table table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="text-nowrap">
|
<tr class="text-nowrap">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<button class="btn mb-2 btn-dark" (click)="openDetailModal(message)">{{ 'notify-message-result.detail' | translate }}</button>
|
<button class="btn mb-2 btn-dark" (click)="openDetailModal(message)">{{ 'notify-message-result.detail' | translate }}</button>
|
||||||
<button *ngIf="message.queueStatusLabel === reprocessStatus" (click)="reprocessMessage(message)" class="btn btn-warning">
|
<button *ngIf="message.queueStatusLabel !== reprocessStatus" (click)="reprocessMessage(message)" class="btn btn-warning">
|
||||||
{{ 'notify-message-result.reprocess' | translate }}
|
{{ 'notify-message-result.reprocess' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,4 +38,4 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -70,7 +70,7 @@ export class AdminNotifySearchResultComponent extends TabulatableResultListEleme
|
|||||||
this.mapDetailsToMessages();
|
this.mapDetailsToMessages();
|
||||||
this.subs.push(this.searchConfigService.getCurrentConfiguration('')
|
this.subs.push(this.searchConfigService.getCurrentConfiguration('')
|
||||||
.subscribe(configuration => {
|
.subscribe(configuration => {
|
||||||
this.isInbound = configuration === 'NOTIFY.incoming';
|
this.isInbound = configuration.startsWith('NOTIFY.incoming');
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -79,16 +79,19 @@ export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNot
|
|||||||
switchMap((request: RestRequest) => this.rdbService.buildFromRequestUUID<AdminNotifyMessage>(request.uuid)),
|
switchMap((request: RestRequest) => this.rdbService.buildFromRequestUUID<AdminNotifyMessage>(request.uuid)),
|
||||||
getFirstCompletedRemoteData(),
|
getFirstCompletedRemoteData(),
|
||||||
getAllSucceededRemoteDataPayload(),
|
getAllSucceededRemoteDataPayload(),
|
||||||
|
mergeMap(reprocessedMessage => this.getDetailedMessages([reprocessedMessage])),
|
||||||
).pipe(
|
).pipe(
|
||||||
mergeMap((newMessage) => messageSubject.pipe(
|
mergeMap((newMessages) => messageSubject.pipe(
|
||||||
map(messages => {
|
map(messages => {
|
||||||
|
const detailedReprocessedMessage = newMessages[0];
|
||||||
const messageToUpdate = messages.find(currentMessage => currentMessage.id === message.id);
|
const messageToUpdate = messages.find(currentMessage => currentMessage.id === message.id);
|
||||||
const indexOfMessageToUpdate = messages.indexOf(messageToUpdate);
|
const indexOfMessageToUpdate = messages.indexOf(messageToUpdate);
|
||||||
newMessage.target = messageToUpdate.target;
|
detailedReprocessedMessage.target = message.target;
|
||||||
newMessage.object = messageToUpdate.object;
|
detailedReprocessedMessage.object = message.object;
|
||||||
newMessage.origin = messageToUpdate.origin;
|
detailedReprocessedMessage.origin = message.origin;
|
||||||
newMessage.context = messageToUpdate.context;
|
detailedReprocessedMessage.context = message.context;
|
||||||
messages[indexOfMessageToUpdate] = newMessage;
|
messages[indexOfMessageToUpdate] = detailedReprocessedMessage;
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
})
|
})
|
||||||
)),
|
)),
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="w-100 h-100 pt-4 pb-3 px-2 box-container" [ngStyle]="{'background-color': boxConfig.color}">
|
<div (click)="onClick(boxConfig)" class="w-100 h-100 pt-4 pb-3 px-2 box-container" [ngStyle]="{'background-color': boxConfig.color}">
|
||||||
<div [ngStyle]="{'color': boxConfig.textColor}" class="d-flex flex-column justify-content-center align-items-center">
|
<div [ngStyle]="{'color': boxConfig.textColor}" class="d-flex flex-column justify-content-center align-items-center">
|
||||||
<div class="mb-3 font-weight-bold box-counter">{{ boxConfig.count ?? 0 }}</div>
|
<div class="mb-3 font-weight-bold box-counter">{{ boxConfig.count ?? 0 }}</div>
|
||||||
<div class="font-weight-bold d-flex justify-content-center w-100">{{ boxConfig.title | translate }}</div>
|
<div class="font-weight-bold d-flex justify-content-center w-100">{{ boxConfig.title | translate }}</div>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AdminNotifyMetricsBox
|
AdminNotifyMetricsBox
|
||||||
} from '../../admin/admin-notify-dashboard/admin-notify-metrics/admin-notify-metrics.model';
|
} from '../../admin/admin-notify-dashboard/admin-notify-metrics/admin-notify-metrics.model';
|
||||||
@@ -16,4 +16,9 @@ import { ViewMode } from '../../core/shared/view-mode.model';
|
|||||||
})
|
})
|
||||||
export class NotificationBoxComponent {
|
export class NotificationBoxComponent {
|
||||||
@Input() boxConfig: AdminNotifyMetricsBox;
|
@Input() boxConfig: AdminNotifyMetricsBox;
|
||||||
|
@Output() selectedBoxConfig: EventEmitter<string> = new EventEmitter();
|
||||||
|
|
||||||
|
public onClick(boxConfig: AdminNotifyMetricsBox) {
|
||||||
|
this.selectedBoxConfig.emit(boxConfig.config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user