Compare commits
No commits in common. "ef5134c6296a1158c506a94a97060945d7724939" and "42c7712763aad1216724604856255973f178b564" have entirely different histories.
ef5134c629
...
42c7712763
|
@ -22,6 +22,7 @@ export class DescriptionLookup extends Lookup implements DescriptionFilter {
|
||||||
|
|
||||||
showAllVersions: boolean; //TODO
|
showAllVersions: boolean; //TODO
|
||||||
descriptionTemplateIds: Guid[]; //TODO
|
descriptionTemplateIds: Guid[]; //TODO
|
||||||
|
associatedDmpIds: Guid[]; //TODO
|
||||||
roleInDmp: DmpUserRole[]; //TODO
|
roleInDmp: DmpUserRole[]; //TODO
|
||||||
descriptionTagSubQuery: DescriptionTagLookup;
|
descriptionTagSubQuery: DescriptionTagLookup;
|
||||||
descriptionReferenceSubQuery: DescriptionReferenceLookup;
|
descriptionReferenceSubQuery: DescriptionReferenceLookup;
|
||||||
|
@ -44,6 +45,7 @@ export interface DescriptionFilter {
|
||||||
statuses: DescriptionStatus[];
|
statuses: DescriptionStatus[];
|
||||||
showAllVersions: boolean;
|
showAllVersions: boolean;
|
||||||
descriptionTemplateIds: Guid[];
|
descriptionTemplateIds: Guid[];
|
||||||
|
associatedDmpIds: Guid[];
|
||||||
roleInDmp: DmpUserRole[];
|
roleInDmp: DmpUserRole[];
|
||||||
descriptionTagSubQuery: DescriptionTagLookup;
|
descriptionTagSubQuery: DescriptionTagLookup;
|
||||||
descriptionReferenceSubQuery: DescriptionReferenceLookup;
|
descriptionReferenceSubQuery: DescriptionReferenceLookup;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="listingItems && listingItems.length > 0 || lookup.like || lookup.descriptionTemplateIds || lookup.dmpSubQuery || lookup.roleInDmp || lookup.descriptionTagSubQuery || lookup.descriptionReferenceSubQuery"
|
<div *ngIf="listingItems && listingItems.length > 0 || lookup.like || lookup.descriptionTemplateIds || lookup.associatedDmpIds || lookup.roleInDmp || lookup.descriptionTagSubQuery || lookup.descriptionReferenceSubQuery"
|
||||||
class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
||||||
<button mat-raised-button class="p-0">
|
<button mat-raised-button class="p-0">
|
||||||
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
||||||
|
|
|
@ -39,8 +39,6 @@ import { Guid } from '@common/types/guid';
|
||||||
import { DescriptionReferenceLookup } from '@app/core/query/reference.lookup';
|
import { DescriptionReferenceLookup } from '@app/core/query/reference.lookup';
|
||||||
import { DescriptionTagLookup } from '@app/core/query/tag.lookup';
|
import { DescriptionTagLookup } from '@app/core/query/tag.lookup';
|
||||||
import { Tag } from '@app/core/model/tag/tag';
|
import { Tag } from '@app/core/model/tag/tag';
|
||||||
import { D } from '@angular/cdk/keycodes';
|
|
||||||
import { DmpLookup } from '@app/core/query/dmp.lookup';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-description-listing-component',
|
selector: 'app-description-listing-component',
|
||||||
|
@ -218,19 +216,6 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
||||||
|
|
||||||
return lookup;
|
return lookup;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initializeDmpLookup(): DmpLookup {
|
|
||||||
const lookup = new DmpLookup();
|
|
||||||
lookup.metadata = { countAll: true };
|
|
||||||
lookup.isActive = [IsActive.Active];
|
|
||||||
lookup.project = {
|
|
||||||
fields: [
|
|
||||||
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
return lookup;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected setupColumns() {
|
protected setupColumns() {
|
||||||
}
|
}
|
||||||
|
@ -409,18 +394,12 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
||||||
lookup.statuses = formGroup.get("status")?.value !== null ? [formGroup.get("status")?.value] : null;
|
lookup.statuses = formGroup.get("status")?.value !== null ? [formGroup.get("status")?.value] : null;
|
||||||
lookup.showAllVersions = formGroup.get("showAllVersions")?.value ?? false;
|
lookup.showAllVersions = formGroup.get("showAllVersions")?.value ?? false;
|
||||||
lookup.roleInDmp = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null;
|
lookup.roleInDmp = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null;
|
||||||
|
lookup.associatedDmpIds = formGroup.get("associatedDmpIds")?.value ?? null;
|
||||||
lookup.descriptionTemplateIds = formGroup.get("descriptionTemplates")?.value ?? null;
|
lookup.descriptionTemplateIds = formGroup.get("descriptionTemplates")?.value ?? null;
|
||||||
|
|
||||||
// Dmps
|
|
||||||
let dmps = formGroup.get("associatedDmpIds")?.value ?? null;
|
|
||||||
if (dmps && dmps?.length > 0) {
|
|
||||||
lookup.dmpSubQuery = this.initializeDmpLookup();
|
|
||||||
lookup.dmpSubQuery.ids = dmps;
|
|
||||||
} else lookup.dmpSubQuery = null;
|
|
||||||
|
|
||||||
// Tags
|
// Tags
|
||||||
let tags = formGroup.get("tags")?.value ?? null;
|
let tags = formGroup.get("tags")?.value ?? null;
|
||||||
if (tags && tags?.length > 0) {
|
if (tags && tags.length > 0) {
|
||||||
lookup.descriptionTagSubQuery = this.initializeTagLookup();
|
lookup.descriptionTagSubQuery = this.initializeTagLookup();
|
||||||
lookup.descriptionTagSubQuery.tagIds = tags;
|
lookup.descriptionTagSubQuery.tagIds = tags;
|
||||||
} else lookup.descriptionTagSubQuery = null;
|
} else lookup.descriptionTagSubQuery = null;
|
||||||
|
@ -459,7 +438,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
||||||
role: [lookup.roleInDmp?.length > 0 ? lookup.roleInDmp[0] : null],
|
role: [lookup.roleInDmp?.length > 0 ? lookup.roleInDmp[0] : null],
|
||||||
showAllVersions: [lookup.showAllVersions ?? false],
|
showAllVersions: [lookup.showAllVersions ?? false],
|
||||||
descriptionTemplates: [lookup.descriptionTemplateIds],
|
descriptionTemplates: [lookup.descriptionTemplateIds],
|
||||||
associatedDmpIds: lookup.dmpSubQuery?.ids ? [lookup.dmpSubQuery?.ids] : [],
|
associatedDmpIds: [lookup.associatedDmpIds],
|
||||||
tags: lookup.descriptionTagSubQuery?.tagIds ? [lookup.descriptionTagSubQuery?.tagIds] : [],
|
tags: lookup.descriptionTagSubQuery?.tagIds ? [lookup.descriptionTagSubQuery?.tagIds] : [],
|
||||||
references: formArray
|
references: formArray
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-7">
|
<div class="col-12 col-lg-7">
|
||||||
<button class="w-100 dmp-btn p-1" (click)="dmpClicked(description.dmp)">
|
<button class="w-100 dmp-btn p-1" (click)="dmpClicked(description.dmp)">
|
||||||
<div class="dmp-btn-label">
|
<div class="w-100 dmp-btn-label">
|
||||||
{{ this.description.dmp.label }}
|
{{ this.description.dmp.label }}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-auto">
|
<div class="w-auto">
|
||||||
|
|
|
@ -187,13 +187,10 @@
|
||||||
|
|
||||||
.dmp-btn-label {
|
.dmp-btn-label {
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
|
overflow: hidden;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
min-width: 0;
|
|
||||||
text-wrap: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.doi-label {
|
.doi-label {
|
||||||
|
|
Loading…
Reference in New Issue