Adds Filters Dialog on Dmp Listing ( 2nd Commit )
This commit is contained in:
parent
f8ab6a8024
commit
132f5675d3
|
@ -32,6 +32,7 @@ import { FormValidationErrorsDialogModule } from '@common/forms/form-validation-
|
||||||
import { CommonUiModule } from '@common/ui/common-ui.module';
|
import { CommonUiModule } from '@common/ui/common-ui.module';
|
||||||
import { MultipleChoiceDialogModule } from '@common/modules/multiple-choice-dialog/multiple-choice-dialog.module';
|
import { MultipleChoiceDialogModule } from '@common/modules/multiple-choice-dialog/multiple-choice-dialog.module';
|
||||||
import { AddOrganizationComponent } from './editor/add-organization/add-organization.component';
|
import { AddOrganizationComponent } from './editor/add-organization/add-organization.component';
|
||||||
|
import { DmpCriteriaDialogComponent } from './listing/criteria/dmp-criteria-dialog.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -69,7 +70,8 @@ import { AddOrganizationComponent } from './editor/add-organization/add-organiza
|
||||||
GrantTabComponent,
|
GrantTabComponent,
|
||||||
DatasetsTabComponent,
|
DatasetsTabComponent,
|
||||||
DmpCloneComponent,
|
DmpCloneComponent,
|
||||||
AddOrganizationComponent
|
AddOrganizationComponent,
|
||||||
|
DmpCriteriaDialogComponent
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
DmpInvitationDialogComponent,
|
DmpInvitationDialogComponent,
|
||||||
|
@ -77,7 +79,8 @@ import { AddOrganizationComponent } from './editor/add-organization/add-organiza
|
||||||
AvailableProfilesComponent,
|
AvailableProfilesComponent,
|
||||||
DmpFinalizeDialogComponent,
|
DmpFinalizeDialogComponent,
|
||||||
DmpUploadDialogue,
|
DmpUploadDialogue,
|
||||||
AddOrganizationComponent
|
AddOrganizationComponent,
|
||||||
|
DmpCriteriaDialogComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class DmpModule { }
|
export class DmpModule { }
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<a class="col-auto d-flex pointer" (click)="onClose()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a>
|
||||||
|
<app-dmp-criteria-component [showGrant]="data.showGrant" [isPublic]="data.isPublic" class="col-auto"></app-dmp-criteria-component>
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { Inject, Component } from '@angular/core';
|
||||||
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'dmp-criteria-dialog-component',
|
||||||
|
templateUrl: './dmp-criteria-dialog.component.html',
|
||||||
|
})
|
||||||
|
|
||||||
|
export class DmpCriteriaDialogComponent {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
public dialogRef: MatDialogRef<DmpCriteriaDialogComponent>,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: { showGrant: boolean, isPublic: boolean }
|
||||||
|
) { }
|
||||||
|
|
||||||
|
onNoClick(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
onClose(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
<div class="main-content listing-main-container h-100">
|
<div class="main-content listing-main-container h-100">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
<div class="d-flex flex-direction-row">
|
||||||
<div class="card mt-0" [style.display]="isVisible ? 'block' : 'none'">
|
<div class="card mt-0" [style.display]="isVisible ? 'block' : 'none'">
|
||||||
<a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a>
|
<a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a>
|
||||||
<div class="card-content info-text mb-0 pt-0">
|
<div class="card-content info-text mb-0 pt-0">
|
||||||
|
@ -7,6 +8,8 @@
|
||||||
<p class="mt-4 pt-2">{{'DMP-LISTING.TEXT-INFO-QUESTION' | translate}} <u>{{'DMP-LISTING.LINK-ZENODO' | translate}}</u> {{'DMP-LISTING.GET-IDEA' | translate}}</p>
|
<p class="mt-4 pt-2">{{'DMP-LISTING.TEXT-INFO-QUESTION' | translate}} <u>{{'DMP-LISTING.LINK-ZENODO' | translate}}</u> {{'DMP-LISTING.GET-IDEA' | translate}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="filter-btn"><button mat-raised-button><mat-icon class="mr-2" (click)="openFiltersDialog()">filter_alt</mat-icon></button></div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="listing row pb-2">
|
<div class="listing row pb-2">
|
||||||
<div class="col-12 col-sm-12 col-md-3">
|
<div class="col-12 col-sm-12 col-md-3">
|
||||||
|
|
|
@ -185,6 +185,19 @@
|
||||||
color: #212121;
|
color: #212121;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filter-btn {
|
||||||
|
position: fixed;
|
||||||
|
right: 0px;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-btn button {
|
||||||
|
color: white;
|
||||||
|
background-color: #23BCBA;
|
||||||
|
width: 52px;
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
// .bot-paginator {
|
// .bot-paginator {
|
||||||
// margin-top: auto;
|
// margin-top: auto;
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -23,6 +23,7 @@ import { DmpUploadDialogue } from './upload-dialogue/dmp-upload-dialogue.compone
|
||||||
import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/services/notification/ui-notification-service';
|
import { UiNotificationService, SnackBarNotificationLevel } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { isNullOrUndefined } from 'util';
|
import { isNullOrUndefined } from 'util';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { DmpCriteriaDialogComponent } from './criteria/dmp-criteria-dialog.component';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -315,6 +316,22 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
|
||||||
private onCallbackImportFail(error: any) {
|
private onCallbackImportFail(error: any) {
|
||||||
this.uiNotificationService.snackBarNotification(error.message, SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(error.message, SnackBarNotificationLevel.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openFiltersDialog(): void {
|
||||||
|
const dialogRef = this.dialog.open(DmpCriteriaDialogComponent, {
|
||||||
|
width: '456px',
|
||||||
|
height: '100%',
|
||||||
|
restoreFocus: false,
|
||||||
|
data: {
|
||||||
|
showGrant: this.showGrant,
|
||||||
|
isPublic: this.isPublic
|
||||||
|
},
|
||||||
|
position: { right: '0px;' }
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// export class DmpDataSource extends DataSource<DmpListingModel> {
|
// export class DmpDataSource extends DataSource<DmpListingModel> {
|
||||||
|
|
|
@ -657,6 +657,15 @@ hr {
|
||||||
margin-top: 4.125rem;
|
margin-top: 4.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-load-more:hover {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 576px) {
|
@media (min-width: 576px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 540px;
|
max-width: 540px;
|
||||||
|
|
Loading…
Reference in New Issue