Compare commits
3 Commits
579b2cba06
...
b45bff4452
Author | SHA1 | Date |
---|---|---|
Efstratios Giannopoulos | b45bff4452 | |
Efstratios Giannopoulos | 9a455ad873 | |
Efstratios Giannopoulos | 9ec90d6c8d |
|
@ -1,5 +1,6 @@
|
|||
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;
|
||||
|
@ -9,7 +10,6 @@ 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 id;
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
|
@ -118,7 +118,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
return this.label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
|
@ -126,7 +126,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Short getVersion() {
|
||||
return version;
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public void setVersion(Short version) {
|
||||
|
@ -134,7 +134,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpStatus getStatus() {
|
||||
return status;
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(DmpStatus status) {
|
||||
|
@ -142,7 +142,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getProperties() {
|
||||
return properties;
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
public void setProperties(String properties) {
|
||||
|
@ -150,7 +150,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getGroupId() {
|
||||
return groupId;
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(UUID groupId) {
|
||||
|
@ -158,7 +158,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
|
@ -166,7 +166,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getCreatedAt() {
|
||||
return createdAt;
|
||||
return this.createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Instant createdAt) {
|
||||
|
@ -174,7 +174,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getUpdatedAt() {
|
||||
return updatedAt;
|
||||
return this.updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Instant updatedAt) {
|
||||
|
@ -182,7 +182,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public IsActive getIsActive() {
|
||||
return isActive;
|
||||
return this.isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(IsActive isActive) {
|
||||
|
@ -190,7 +190,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getFinalizedAt() {
|
||||
return finalizedAt;
|
||||
return this.finalizedAt;
|
||||
}
|
||||
|
||||
public void setFinalizedAt(Instant finalizedAt) {
|
||||
|
@ -198,7 +198,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getCreatorId() {
|
||||
return creatorId;
|
||||
return this.creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(UUID creatorId) {
|
||||
|
@ -206,7 +206,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpAccessType getAccessType() {
|
||||
return accessType;
|
||||
return this.accessType;
|
||||
}
|
||||
|
||||
public void setAccessType(DmpAccessType accessType) {
|
||||
|
@ -214,7 +214,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public UUID getBlueprintId() {
|
||||
return blueprintId;
|
||||
return this.blueprintId;
|
||||
}
|
||||
|
||||
public void setBlueprintId(UUID blueprintId) {
|
||||
|
@ -222,7 +222,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
return this.language;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
|
@ -230,7 +230,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public Instant getPublicAfter() {
|
||||
return publicAfter;
|
||||
return this.publicAfter;
|
||||
}
|
||||
|
||||
public void setPublicAfter(Instant publicAfter) {
|
||||
|
@ -238,7 +238,7 @@ public class DmpEntity extends TenantScopedBaseEntity {
|
|||
}
|
||||
|
||||
public DmpVersionStatus getVersionStatus() {
|
||||
return versionStatus;
|
||||
return this.versionStatus;
|
||||
}
|
||||
|
||||
public void setVersionStatus(DmpVersionStatus versionStatus) {
|
||||
|
|
|
@ -97,6 +97,10 @@ 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.getHandleNackRetries());
|
||||
Thread.sleep(this.outboxProperties.getHandleNackWaitInMilliSeconds());
|
||||
} catch (Exception ex) {
|
||||
logger.error("Problem executing purge. rolling back any db changes and marking error. Continuing...", ex);
|
||||
if (transaction != null) transaction.rollback();
|
||||
|
|
|
@ -2,4 +2,5 @@ export enum RecentActivityOrder {
|
|||
UpdatedAt = 0,
|
||||
Label = 1,
|
||||
Status = 2,
|
||||
PublishedAt = 3,
|
||||
}
|
||||
|
|
|
@ -230,6 +230,7 @@ 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,6 +46,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 [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
|
||||
<mat-option *ngIf="!isPublic" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
|
||||
</mat-select>
|
||||
|
@ -55,7 +56,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.toAscSortField(nameof<Description>(x => x.label)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toDescSortField(nameof<Description>(x => x.finalizedAt)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
lookup.order = { items: [recentActivityOrder] };
|
||||
|
||||
|
||||
this.updateOrderUiFields(lookup.order);
|
||||
|
||||
lookup.project = {
|
||||
|
@ -247,7 +247,9 @@ 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 {
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.PublishedAt) {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.finalizedAt)] };
|
||||
}else {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.updatedAt)] };
|
||||
}
|
||||
this.filterChanged(this.lookup);
|
||||
|
@ -371,6 +373,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@ -379,7 +382,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) {
|
||||
|
@ -392,7 +395,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) {
|
||||
|
@ -420,7 +423,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;
|
||||
}
|
||||
|
@ -438,18 +441,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.PUBLISHED">{{enumUtils.toRecentActivityOrderString(order.PUBLISHED)}}</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>
|
||||
|
@ -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.toAscSortField(nameof<Description>(x => x.label)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
|
||||
let recentActivityOrder = this.isPublic ? this.toDescSortField(nameof<Description>(x => x.finalizedAt)) : this.toDescSortField(nameof<Description>(x => x.updatedAt));
|
||||
lookup.order = { items: [recentActivityOrder] };
|
||||
|
||||
|
||||
this.updateOrderUiFields(lookup.order);
|
||||
|
||||
lookup.project = {
|
||||
|
@ -246,7 +246,9 @@ 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 {
|
||||
} else if (this.formGroup.get('order').value == RecentActivityOrder.PublishedAt){
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.finalizedAt)] };
|
||||
}else {
|
||||
this.lookup.order = { items: [this.sortingDirectionPrefix + nameof<Dmp>(x => x.updatedAt)] };
|
||||
}
|
||||
this.filterChanged(this.lookup);
|
||||
|
@ -283,7 +285,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
updateDataFn(filterForm: UntypedFormGroup): void {
|
||||
this.referenceFilters = this._patchReferenceFiltersFromForm(filterForm);
|
||||
this.lookup = this._patchLookupFromForm(this.lookup, filterForm);
|
||||
|
@ -319,7 +321,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();
|
||||
|
@ -342,6 +344,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@ -350,7 +353,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) {
|
||||
|
@ -363,11 +366,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;
|
||||
|
@ -382,7 +385,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
|||
lookup.dmpReferenceSubQuery.referenceIds = references;
|
||||
} else lookup.dmpReferenceSubQuery = null;
|
||||
|
||||
|
||||
|
||||
return lookup;
|
||||
}
|
||||
|
||||
|
@ -394,7 +397,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,
|
||||
});
|
||||
}
|
||||
|
@ -402,12 +405,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,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiketa",
|
||||
"MODIFIED": "Aldatuta",
|
||||
"STATUS": "Egoera"
|
||||
"STATUS": "Egoera",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Label",
|
||||
"MODIFIED": "Modified",
|
||||
"STATUS": "Status"
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Label",
|
||||
"MODIFIED": "Modified",
|
||||
"STATUS": "Status"
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiqueta",
|
||||
"MODIFIED": "Modificado",
|
||||
"STATUS": "Estado"
|
||||
"STATUS": "Estado",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Ετικέτα",
|
||||
"MODIFIED": "Τροποποιημένο",
|
||||
"STATUS": "Κατάσταση"
|
||||
"STATUS": "Κατάσταση",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Oznaka",
|
||||
"MODIFIED": "Izmijenjeno",
|
||||
"STATUS": "Status"
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etykieta",
|
||||
"MODIFIED": "Zmodyfikowany",
|
||||
"STATUS": "Status"
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiqueta",
|
||||
"MODIFIED": "Modificado",
|
||||
"STATUS": "Estado"
|
||||
"STATUS": "Estado",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Označenie",
|
||||
"MODIFIED": "Modifikované",
|
||||
"STATUS": "Stav"
|
||||
"STATUS": "Stav",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Oznaka",
|
||||
"MODIFIED": "Izmenjeno",
|
||||
"STATUS": "Status"
|
||||
"STATUS": "Status",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"EDIT":"Edit",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Delete"
|
||||
}
|
||||
},
|
||||
"STATUS-EDITOR": {
|
||||
|
@ -1916,7 +1916,8 @@
|
|||
"RECENT-ACTIVITY-ORDER": {
|
||||
"LABEL": "Etiket",
|
||||
"MODIFIED": "Değiştirilmiş",
|
||||
"STATUS": "Durum"
|
||||
"STATUS": "Durum",
|
||||
"PUBLISHED-AT": "Published"
|
||||
},
|
||||
"DESCRIPTION-TEMPLATE-TYPE-STATUS": {
|
||||
"FINALIZED": "Finalized",
|
||||
|
@ -2285,4 +2286,4 @@
|
|||
"copy": "Copy",
|
||||
"clone": "Clone",
|
||||
"new-version": "New Version"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue