Compare commits
No commits in common. "b45bff44527c05ba0cedb3c71b49afe09cf7b134" and "579b2cba068253b0dbf8f46abafe5264d07f909c" have entirely different histories.
b45bff4452
...
579b2cba06
|
@ -1,6 +1,5 @@
|
|||
package org.opencdmp.data;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import org.opencdmp.commons.enums.DmpAccessType;
|
||||
import org.opencdmp.commons.enums.DmpStatus;
|
||||
import org.opencdmp.commons.enums.DmpVersionStatus;
|
||||
|
@ -10,6 +9,7 @@ import org.opencdmp.data.converters.enums.DmpStatusConverter;
|
|||
import org.opencdmp.data.converters.enums.DmpVersionStatusConverter;
|
||||
import org.opencdmp.data.converters.enums.IsActiveConverter;
|
||||
import org.opencdmp.data.tenant.TenantScopedBaseEntity;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
@ -110,7 +110,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
public static final String _publicAfter = "publicAfter";
|
||||
|
||||
public UUID getId() {
|
||||
return this.id;
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
|
@ -118,7 +118,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getLabel() {
|
||||
return this.label;
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
|
@ -126,7 +126,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Short getVersion() {
|
||||
return this.version;
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Short version) {
|
||||
|
@ -134,7 +134,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpStatus getStatus() {
|
||||
return this.status;
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(DmpStatus status) {
|
||||
|
@ -142,7 +142,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getProperties() {
|
||||
return this.properties;
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(String properties) {
|
||||
|
@ -150,7 +150,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getGroupId() {
|
||||
return this.groupId;
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(UUID groupId) {
|
||||
|
@ -158,7 +158,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
|
@ -166,7 +166,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getCreatedAt() {
|
||||
return this.createdAt;
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Instant createdAt) {
|
||||
|
@ -174,7 +174,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getUpdatedAt() {
|
||||
return this.updatedAt;
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Instant updatedAt) {
|
||||
|
@ -182,7 +182,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public IsActive getIsActive() {
|
||||
return this.isActive;
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(IsActive isActive) {
|
||||
|
@ -190,7 +190,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getFinalizedAt() {
|
||||
return this.finalizedAt;
|
||||
return finalizedAt;
|
||||
}
|
||||
|
||||
public void setFinalizedAt(Instant finalizedAt) {
|
||||
|
@ -198,7 +198,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getCreatorId() {
|
||||
return this.creatorId;
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(UUID creatorId) {
|
||||
|
@ -206,7 +206,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpAccessType getAccessType() {
|
||||
return this.accessType;
|
||||
return accessType;
|
||||
}
|
||||
|
||||
public void setAccessType(DmpAccessType accessType) {
|
||||
|
@ -214,7 +214,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getBlueprintId() {
|
||||
return this.blueprintId;
|
||||
return blueprintId;
|
||||
}
|
||||
|
||||
public void setBlueprintId(UUID blueprintId) {
|
||||
|
@ -222,7 +222,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return this.language;
|
||||
return language;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
|
@ -230,7 +230,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getPublicAfter() {
|
||||
return this.publicAfter;
|
||||
return publicAfter;
|
||||
}
|
||||
|
||||
public void setPublicAfter(Instant publicAfter) {
|
||||
|
@ -238,7 +238,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpVersionStatus getVersionStatus() {
|
||||
return this.versionStatus;
|
||||
return versionStatus;
|
||||
}
|
||||
|
||||
public void setVersionStatus(DmpVersionStatus versionStatus) {
|
||||
|
|
|
@ -97,10 +97,6 @@ public class OutboxProperties {
|
|||
return this.handleAckWaitInMilliSeconds;
|
||||
}
|
||||
|
||||
public int getHandleNackWaitInMilliSeconds() {
|
||||
return this.handleNackWaitInMilliSeconds;
|
||||
}
|
||||
|
||||
public String getTenantDefaultLocaleRemovalTopic() {
|
||||
return this.tenantDefaultLocaleRemovalTopic;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ public class OutboxRepositoryImpl implements OutboxRepository {
|
|||
} catch (OptimisticLockException ex) {
|
||||
logger.warn("Problem handle nack {}. Rolling back any message emit db changes and marking error. Retrying...", nackedMessages.stream().map(UUID::toString).collect(Collectors.joining(",")));
|
||||
if (transaction != null) transaction.rollback();
|
||||
Thread.sleep(this.outboxProperties.getHandleNackWaitInMilliSeconds());
|
||||
Thread.sleep(this.outboxProperties.getHandleNackRetries());
|
||||
} catch (Exception ex) {
|
||||
logger.error("Problem executing purge. rolling back any db changes and marking error. Continuing...", ex);
|
||||
if (transaction != null) transaction.rollback();
|
||||
|
|
|
@ -2,5 +2,4 @@ export enum RecentActivityOrder {
|
|||
UpdatedAt = 0,
|
||||
Label = 1,
|
||||
Status = 2,
|
||||
PublishedAt = 3,
|
||||
}
|
||||
|
|
|
@ -230,7 +230,6 @@ export class EnumUtils {
|
|||
case RecentActivityOrder.Label: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.LABEL');
|
||||
case RecentActivityOrder.UpdatedAt: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.MODIFIED');
|
||||
case RecentActivityOrder.Status: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.STATUS');
|
||||
case RecentActivityOrder.PublishedAt: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.PUBLISHED-AT');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="listingItems && listingItems.length > 0 || lookup.like || lookup.descriptionTemplateSubQuery || lookup.dmpSubQuery || lookup.descriptionTagSubQuery || lookup.descriptionReferenceSubQuery"
|
||||
<div *ngIf="listingItems && listingItems.length > 0 || lookup.like || lookup.descriptionTemplateSubQuery || lookup.dmpSubQuery || lookup.descriptionTagSubQuery || lookup.descriptionReferenceSubQuery"
|
||||
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" [matBadge]="filtersCount" [matBadgeHidden]="!hasFilters" matBadgePosition="before">
|
||||
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
||||
|
@ -46,7 +46,6 @@
|
|||
<mat-form-field class="sort-form w-100">
|
||||
<mat-select placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" [formControl]="formGroup.get('order')" (selectionChange)="orderByChanged()">
|
||||
<mat-option *ngIf="!isPublic" [value]="order.UpdatedAt">{{enumUtils.toRecentActivityOrderString(order.UpdatedAt)}}</mat-option>
|
||||
<mat-option *ngIf="isPublic" [value]="order.PublishedAt">{{enumUtils.toRecentActivityOrderString(order.PublishedAt)}}</mat-option>
|
||||
<mat-option [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
|
||||
<mat-option *ngIf="!isPublic" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
|
||||
</mat-select>
|
||||
|
@ -56,7 +55,7 @@
|
|||
<button mat-icon-button (click)="toggleSortDirection()" [matTooltip]="sortingTooltipText">
|
||||
<mat-icon *ngIf="isAscending">keyboard_double_arrow_up</mat-icon>
|
||||
<mat-icon *ngIf="isDescending">keyboard_double_arrow_down</mat-icon>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<!-- End of Sort by -->
|
||||
<div class="col-12 col-xl-auto ml-auto order-4">
|
||||
|
|
|
@ -94,9 +94,9 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
return this.listingItems != null && this.listingItems.length > 0;
|
||||
}
|
||||
get hasFilters(): boolean {
|
||||
return (this.lookup.like != null && this.lookup.like != '') || this.lookup.statuses != null ||
|
||||
this.lookup.dmpSubQuery != null || this.lookup.descriptionTemplateSubQuery != null ||
|
||||
this.lookup.descriptionTagSubQuery != null || this.lookup.descriptionReferenceSubQuery != null;
|
||||
return (this.lookup.like != null && this.lookup.like != '') || this.lookup.statuses != null ||
|
||||
this.lookup.dmpSubQuery != null || this.lookup.descriptionTemplateSubQuery != null ||
|
||||
this.lookup.descriptionTagSubQuery != null || this.lookup.descriptionReferenceSubQuery != null;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@ -139,7 +139,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
referenceIds: this.lookup?.descriptionReferenceSubQuery?.referenceIds ?? [],
|
||||
}];
|
||||
this.filtersCount = this._countFilters(this.lookup);
|
||||
}
|
||||
}
|
||||
else if (!this.lookup) this.lookup = this.initializeLookup();
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
this.formGroup.get('order').setValue(this._getRecentActivityOrder(sortBy));
|
||||
ordering.charAt(0) == '-' ? this.sortDirection = SortDirection.Descending : this.sortDirection = SortDirection.Ascending;
|
||||
}
|
||||
|
||||
|
||||
this.onPageLoad({ offset: this.lookup.page.offset / this.lookup.page.size } as PageLoadEvent);
|
||||
});
|
||||
|
||||
|
@ -191,10 +191,10 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
lookup.metadata = { countAll: true };
|
||||
lookup.page = { offset: 0, size: this.ITEMS_PER_PAGE };
|
||||
lookup.isActive = [IsActive.Active];
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toDescSortField(nameof<Description>(x => x.finalizedAt)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toAscSortField(nameof<Description>(x => x.label)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
lookup.order = { items: [recentActivityOrder] };
|
||||
|
||||
|
||||
this.updateOrderUiFields(lookup.order);
|
||||
|
||||
lookup.project = {
|
||||
|
@ -247,9 +247,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.status)] };
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.Label) {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.label)] };
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.PublishedAt) {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.finalizedAt)] };
|
||||
}else {
|
||||
} else {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.updatedAt)] };
|
||||
}
|
||||
this.filterChanged(this.lookup);
|
||||
|
@ -373,7 +371,6 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
switch (recentActivityOrderValue) {
|
||||
case nameof<Description>(x => x.updatedAt): return RecentActivityOrder.UpdatedAt;
|
||||
case nameof<Description>(x => x.label): return RecentActivityOrder.Label;
|
||||
case nameof<Description>(x => x.finalizedAt): return RecentActivityOrder.PublishedAt;
|
||||
case nameof<Description>(x => x.status): return RecentActivityOrder.Status;
|
||||
}
|
||||
}
|
||||
|
@ -382,7 +379,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
if (!formGroup) return;
|
||||
|
||||
lookup.statuses = formGroup.get("status")?.value !== null ? [formGroup.get("status")?.value] : null;
|
||||
|
||||
|
||||
// Description Templates
|
||||
let descriptionTemplates = formGroup.get("descriptionTemplates")?.value ?? null;
|
||||
if (descriptionTemplates && descriptionTemplates?.length > 0) {
|
||||
|
@ -395,7 +392,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null; let addRoles = roles && roles?.length > 0;
|
||||
if (addDmps || addRoles) {
|
||||
lookup.dmpSubQuery = DescriptionFilterService.initializeDmpLookup();
|
||||
|
||||
|
||||
if (addDmps) lookup.dmpSubQuery.ids = dmps?.length > 0 ? dmps : null;
|
||||
|
||||
if (addRoles) {
|
||||
|
@ -423,7 +420,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
|
||||
return lookup;
|
||||
}
|
||||
|
||||
|
||||
_patchReferenceFiltersFromForm(formGroup: UntypedFormGroup): ReferencesWithType[] {
|
||||
return formGroup?.get("references")?.value?.filter(( referencesWithType: ReferencesWithType ) => referencesWithType.referenceTypeId != null && referencesWithType.referenceIds?.length > 0) ?? null;
|
||||
}
|
||||
|
@ -441,18 +438,18 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
|
|||
private _countFilters(lookup: DescriptionLookup): number {
|
||||
let count = 0;
|
||||
|
||||
if (lookup.statuses) count += lookup.statuses.length;
|
||||
if (lookup.statuses) count += lookup.statuses.length;
|
||||
if (lookup.descriptionTemplateSubQuery) count += lookup.descriptionTemplateSubQuery.ids?.length;
|
||||
if (lookup.descriptionTagSubQuery) count += lookup.descriptionTagSubQuery.tagIds?.length;
|
||||
if (lookup.descriptionTagSubQuery) count += lookup.descriptionTagSubQuery.tagIds?.length;
|
||||
if (lookup.dmpSubQuery) {
|
||||
if (lookup.dmpSubQuery.ids) count += lookup.dmpSubQuery.ids?.length;
|
||||
if (lookup.dmpSubQuery.dmpUserSubQuery) count += lookup.dmpSubQuery.dmpUserSubQuery.userRoles?.length;
|
||||
}
|
||||
if (lookup.descriptionReferenceSubQuery) count += lookup.descriptionReferenceSubQuery.referenceIds?.length;
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
private get _lookupFields(): string[] {
|
||||
return [
|
||||
nameof<Description>(x => x.id),
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<mat-form-field class="sort-form w-100">
|
||||
<mat-select placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" [formControl]="formGroup.get('order')" (selectionChange)="orderByChanged()">
|
||||
<mat-option *ngIf="!isPublic" [value]="order.UpdatedAt">{{enumUtils.toRecentActivityOrderString(order.UpdatedAt)}}</mat-option>
|
||||
<mat-option *ngIf="isPublic" [value]="order.PublishedAt">{{enumUtils.toRecentActivityOrderString(order.PublishedAt)}}</mat-option>
|
||||
<!-- <mat-option *ngIf="isPublic" [value]="order.PUBLISHED">{{enumUtils.toRecentActivityOrderString(order.PUBLISHED)}}</mat-option> -->
|
||||
<mat-option [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
|
||||
<mat-option *ngIf="!isPublic" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
|
||||
</mat-select>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<button mat-icon-button (click)="toggleSortDirection()" [matTooltip]="sortingTooltipText">
|
||||
<mat-icon *ngIf="isAscending">keyboard_double_arrow_up</mat-icon>
|
||||
<mat-icon *ngIf="isDescending">keyboard_double_arrow_down</mat-icon>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12 col-xl-auto ml-auto order-4">
|
||||
<div class="row">
|
||||
|
|
|
@ -43,7 +43,7 @@ import { DmpFilterService } from './filtering/services/dmp-filter.service';
|
|||
styleUrls: ['./dmp-listing.component.scss'],
|
||||
})
|
||||
export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup> implements OnInit {
|
||||
|
||||
|
||||
userSettingsKey = { key: 'DmpListingUserSettings' };
|
||||
|
||||
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
||||
|
@ -86,9 +86,9 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
return this.listingItems != null && this.listingItems.length > 0;
|
||||
}
|
||||
get hasFilters(): boolean {
|
||||
return (this.lookup.like != null && this.lookup.like != '') || this.lookup.statuses != null ||
|
||||
this.lookup.dmpReferenceSubQuery != null || this.lookup.dmpDescriptionTemplateSubQuery != null ||
|
||||
this.lookup.dmpBlueprintSubQuery != null || this.lookup.dmpUserSubQuery != null;
|
||||
return (this.lookup.like != null && this.lookup.like != '') || this.lookup.statuses != null ||
|
||||
this.lookup.dmpReferenceSubQuery != null || this.lookup.dmpDescriptionTemplateSubQuery != null ||
|
||||
this.lookup.dmpBlueprintSubQuery != null || this.lookup.dmpUserSubQuery != null;
|
||||
}
|
||||
|
||||
constructor(
|
||||
|
@ -116,7 +116,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
if (!this.isPublic && !this.authService.currentAccountIsAuthenticated()) {
|
||||
this.router.navigateByUrl("/explore-plans");
|
||||
}
|
||||
|
||||
|
||||
this.route.queryParamMap
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(async (params: Params) => {
|
||||
|
@ -129,7 +129,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
referenceIds: this.lookup?.dmpReferenceSubQuery?.referenceIds ?? [],
|
||||
}];
|
||||
this.filtersCount = this._countFilters(this.lookup);
|
||||
}
|
||||
}
|
||||
else if (!this.lookup) this.lookup = this.initializeLookup();
|
||||
|
||||
if ((this.formGroup.get('order')?.value == null || (!this.isAscending && !this.isDescending)) && this.lookup.order.items && this.lookup.order.items.length > 0) {
|
||||
|
@ -140,7 +140,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
this.formGroup.get('order').setValue(this._getRecentActivityOrder(sortBy));
|
||||
ordering.charAt(0) == '-' ? this.sortDirection = SortDirection.Descending : this.sortDirection = SortDirection.Ascending;
|
||||
}
|
||||
|
||||
|
||||
this.onPageLoad({ offset: this.lookup.page.offset / this.lookup.page.size } as PageLoadEvent);
|
||||
});
|
||||
|
||||
|
@ -205,10 +205,10 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
lookup.metadata = { countAll: true };
|
||||
lookup.page = { offset: 0, size: this.ITEMS_PER_PAGE };
|
||||
lookup.isActive = [IsActive.Active];
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toDescSortField(nameof<Description>(x => x.finalizedAt)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toAscSortField(nameof<Description>(x => x.label)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
lookup.order = { items: [recentActivityOrder] };
|
||||
|
||||
|
||||
this.updateOrderUiFields(lookup.order);
|
||||
|
||||
lookup.project = {
|
||||
|
@ -246,9 +246,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.status)] };
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.Label) {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.label)] };
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.PublishedAt){
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.finalizedAt)] };
|
||||
}else {
|
||||
} else {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.updatedAt)] };
|
||||
}
|
||||
this.filterChanged(this.lookup);
|
||||
|
@ -285,7 +283,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
updateDataFn(filterForm: UntypedFormGroup): void {
|
||||
this.referenceFilters = this._patchReferenceFiltersFromForm(filterForm);
|
||||
this.lookup = this._patchLookupFromForm(this.lookup, filterForm);
|
||||
|
@ -321,7 +319,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
hasLikeFilters(): boolean {
|
||||
return this.lookup.like !== undefined && this.lookup.like !== null;
|
||||
}
|
||||
|
||||
|
||||
toggleSortDirection(): void {
|
||||
this.sortDirection = this.isAscending ? this.sortDirection = SortDirection.Descending : this.sortDirection = SortDirection.Ascending;
|
||||
this.orderByChanged();
|
||||
|
@ -344,7 +342,6 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
switch (recentActivityOrderValue) {
|
||||
case nameof<Dmp>(x => x.updatedAt): return RecentActivityOrder.UpdatedAt;
|
||||
case nameof<Dmp>(x => x.label): return RecentActivityOrder.Label;
|
||||
case nameof<Dmp>(x => x.finalizedAt): return RecentActivityOrder.PublishedAt;
|
||||
case nameof<Dmp>(x => x.status): return RecentActivityOrder.Status;
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +350,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
if (!formGroup) return;
|
||||
|
||||
lookup.statuses = formGroup.get("status")?.value !== null ? [formGroup.get("status")?.value] : null;
|
||||
|
||||
|
||||
// Description Templates
|
||||
let descriptionTemplates = formGroup.get("descriptionTemplates")?.value ?? null;
|
||||
if (descriptionTemplates && descriptionTemplates?.length > 0) {
|
||||
|
@ -366,11 +363,11 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
let dmpBlueprints = formGroup.get("dmpBlueprints")?.value ?? null;
|
||||
if (dmpBlueprints && dmpBlueprints?.length > 0) {
|
||||
lookup.dmpBlueprintSubQuery = DmpFilterService.initializeDmpBlueprintLookup();
|
||||
lookup.dmpBlueprintSubQuery.ids = dmpBlueprints;
|
||||
lookup.dmpBlueprintSubQuery.ids = dmpBlueprints;
|
||||
} else lookup.dmpBlueprintSubQuery = null;
|
||||
|
||||
// Dmps
|
||||
let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null;
|
||||
let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null;
|
||||
if (roles && roles?.length > 0) {
|
||||
lookup.dmpUserSubQuery = DmpFilterService.initializeDmpUserLookup();
|
||||
lookup.dmpUserSubQuery.userRoles = roles;
|
||||
|
@ -385,7 +382,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
lookup.dmpReferenceSubQuery.referenceIds = references;
|
||||
} else lookup.dmpReferenceSubQuery = null;
|
||||
|
||||
|
||||
|
||||
return lookup;
|
||||
}
|
||||
|
||||
|
@ -397,7 +394,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
return (new UntypedFormBuilder()).group({
|
||||
status: [lookup.statuses?.length > 0 ? lookup.statuses[0] : null],
|
||||
descriptionTemplates: lookup.dmpDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? [lookup.dmpDescriptionTemplateSubQuery?.descriptionTemplateGroupIds] : [],
|
||||
dmpBlueprints: lookup.dmpBlueprintSubQuery?.ids ? [lookup.dmpBlueprintSubQuery?.ids]: [],
|
||||
dmpBlueprints: lookup.dmpBlueprintSubQuery?.ids ? [lookup.dmpBlueprintSubQuery?.ids]: [],
|
||||
role: lookup.dmpUserSubQuery?.userRoles ? lookup.dmpUserSubQuery?.userRoles[0] : null,
|
||||
});
|
||||
}
|
||||
|
@ -405,12 +402,12 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
private _countFilters(lookup: DmpLookup): number {
|
||||
let count = 0;
|
||||
|
||||
if (lookup.statuses) count += lookup.statuses.length;
|
||||
if (lookup.statuses) count += lookup.statuses.length;
|
||||
if (lookup.dmpDescriptionTemplateSubQuery) count += lookup.dmpDescriptionTemplateSubQuery.descriptionTemplateGroupIds?.length;
|
||||
if (lookup.dmpBlueprintSubQuery) count += lookup.dmpBlueprintSubQuery.ids?.length;
|
||||
if (lookup.dmpBlueprintSubQuery) count += lookup.dmpBlueprintSubQuery.ids?.length;
|
||||
if (lookup.dmpUserSubQuery) count += lookup.dmpUserSubQuery.userRoles?.length;
|
||||
if (lookup.dmpReferenceSubQuery) count += lookup.dmpReferenceSubQuery.referenceIds?.length;
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiketa",
|
||||
"MODIFIED": "Aldatuta",
|
||||
"STATUS": "Egoera",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Egoera"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Label",
|
||||
"MODIFIED": "Modified",
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Status"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Label",
|
||||
"MODIFIED": "Modified",
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Status"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiqueta",
|
||||
"MODIFIED": "Modificado",
|
||||
"STATUS": "Estado",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Estado"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Ετικέτα",
|
||||
"MODIFIED": "Τροποποιημένο",
|
||||
"STATUS": "Κατάσταση",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Κατάσταση"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Oznaka",
|
||||
"MODIFIED": "Izmijenjeno",
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Status"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etykieta",
|
||||
"MODIFIED": "Zmodyfikowany",
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Status"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiqueta",
|
||||
"MODIFIED": "Modificado",
|
||||
"STATUS": "Estado",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Estado"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Označenie",
|
||||
"MODIFIED": "Modifikované",
|
||||
"STATUS": "Stav",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Stav"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Oznaka",
|
||||
"MODIFIED": "Izmenjeno",
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Status"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,8 +1916,7 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiket",
|
||||
"MODIFIED": "Değiştirilmiş",
|
||||
"STATUS": "Durum",
|
||||
"PUBLISHED-AT": "Published"
|
||||
"STATUS": "Durum"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2286,4 +2285,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue