{{fieldIndex + 1}}
- drag_indicator
+ drag_indicator
{{fieldIndex + 1}}
- drag_indicator
+ drag_indicator
@@ -238,16 +238,16 @@
-
+
{{descriptionTemplateIndex + 1}}
- drag_indicator
+ drag_indicator
-
@@ -255,7 +255,7 @@
{{descriptionTemplateIndex + 1}}
- drag_indicator
+ drag_indicator
@@ -297,7 +297,7 @@
-
+
delete
diff --git a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss
index 948baf217..e52566192 100644
--- a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss
+++ b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.scss
@@ -67,22 +67,6 @@
transform: translateX(-50%);
}
-.action-list-item{
- display: flex;
- align-items: center;
- cursor: pointer;
-
- .action-list-icon{
- font-size: 1.2em;
- color: var(--primary-color);
- }
-
- .action-list-text{
- font-size: 1em;
- color: var(--primary-color);
- }
-}
-
.field-delete{
align-items: center;
display: flex;
diff --git a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html
index ea9749673..925a151db 100644
--- a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html
+++ b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.component.html
@@ -70,7 +70,7 @@
{{'PREFILLING-SOURCE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}}
-
+
delete
@@ -112,7 +112,7 @@
{{'PREFILLING-SOURCE-EDITOR.FIELDS.FIELD' | translate}} {{fieldIndex + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html
index 1b18dd1e0..307c7321a 100644
--- a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html
+++ b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.html
@@ -86,7 +86,7 @@
edit{{'PREFILLING-SOURCE-LISTING.ACTIONS.EDIT' | translate}}
-
+
delete
{{'PREFILLING-SOURCE-LISTING.ACTIONS.DELETE' | translate}}
diff --git a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html
index 6b1b33f2f..74270b0fb 100644
--- a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html
+++ b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.html
@@ -117,7 +117,7 @@
-
+
delete
@@ -144,7 +144,7 @@
{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-CONFIGURATION' | translate}} {{sourceIndex + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss
index 77591bcb1..cf8c26656 100644
--- a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss
+++ b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.scss
@@ -39,22 +39,6 @@
transform: translateX(-50%);
}
-.action-list-item{
- display: flex;
- align-items: center;
- cursor: pointer;
-
- .action-list-icon{
- font-size: 1.2em;
- color: var(--primary-color);
- }
-
- .action-list-text{
- font-size: 1em;
- color: var(--primary-color);
- }
-}
-
.field-delete{
align-items: center;
display: flex;
diff --git a/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html b/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html
index bb288a0fc..494eebf23 100644
--- a/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html
+++ b/frontend/src/app/ui/admin/reference/editor/reference-editor.component.html
@@ -129,7 +129,7 @@
-
+
delete
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html
index 96e4d0694..997e2b38f 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html
@@ -18,7 +18,7 @@
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.DEPOSIT-PLUGINS' | translate}} {{sourceIndex + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html
index dad1c387b..342e767a3 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/description-workflow/description-workflow-editor/description-workflow-editor.component.html
@@ -27,7 +27,7 @@
{{'WORKFLOW-EDITOR.FIELDS.STATUS-TRANSITION' | translate}} {{index + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html
index 608f0e314..1b2d89e70 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html
@@ -9,7 +9,7 @@
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
{{'TENANT-CONFIGURATION-EDITOR.ACTIONS.ADD-SOURCE' | translate}}
+
{{'TENANT-CONFIGURATION-EDITOR.ACTIONS.ADD-SOURCE' | translate}}
@@ -17,7 +17,7 @@
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.FILE-TRANSFORMER-PLUGINS' | translate}} {{sourceIndex + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html b/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html
index 594607a0b..458fd70d2 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/plan-workflow/plan-workflow-editor/plan-workflow-editor.component.html
@@ -27,7 +27,7 @@
{{'WORKFLOW-EDITOR.FIELDS.STATUS-TRANSITION' | translate}} {{index + 1}}
-
+
delete
diff --git a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html
index 5f706640e..3e19a08f6 100644
--- a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html
+++ b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.html
@@ -37,14 +37,13 @@
-
- edit
-
+
+ edit
-
- save
+
+ save
diff --git a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss
index aa35222a8..b71c301ce 100644
--- a/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss
+++ b/frontend/src/app/ui/admin/user/listing/role-editor/user-role-editor.component.scss
@@ -18,10 +18,6 @@
margin-right: 8px;
}
- .row-action {
- color: var(--primary-color);
- cursor: pointer;
- }
.user-role{
text-align: center;
width: auto;
@@ -150,10 +146,6 @@
padding-left: 10px;
padding-right: 10px;
}
-
- .save-button {
- margin-bottom: 1em;
- }
}
:host ::ng-deep .mat-form-field-wrapper {
diff --git a/frontend/src/app/ui/dashboard/dashboard.component.html b/frontend/src/app/ui/dashboard/dashboard.component.html
index 08159db03..ad4614a5c 100644
--- a/frontend/src/app/ui/dashboard/dashboard.component.html
+++ b/frontend/src/app/ui/dashboard/dashboard.component.html
@@ -59,16 +59,30 @@
{{'DASHBOARD.LATEST-ACTIVITY' | translate}}
-
+
-
+
-
+
-
+
diff --git a/frontend/src/app/ui/dashboard/dashboard.component.ts b/frontend/src/app/ui/dashboard/dashboard.component.ts
index b779007bb..db8ce7474 100644
--- a/frontend/src/app/ui/dashboard/dashboard.component.ts
+++ b/frontend/src/app/ui/dashboard/dashboard.component.ts
@@ -31,10 +31,12 @@ export class DashboardComponent extends BaseComponent implements OnInit {
public dashboardStatistics: DashboardStatistics;
public grantCount = 0;
public organizationCount = 0;
- currentType: string = "recent";
+ currentType: ActivityListingType = ActivityListingType.Recent;
newReleaseNotificationVisible = false;
isIntroCardVisible = true;
+ ActivityListingType = ActivityListingType;
+
constructor(
public routerUtils: RouterUtilsService,
private router: Router,
@@ -57,11 +59,7 @@ export class DashboardComponent extends BaseComponent implements OnInit {
ngOnInit() {
this.route.queryParams.subscribe(params => {
let type = params['type'];
- if (type || type == "recent" || (type == "drafts" && this.isAuthenticated()) || type == "plans" || type == "descriptions") {
- this.currentType = type;
- } else {
- this.currentType = "recent";
- }
+ this.currentType = type ?? ActivityListingType.Recent
});
this.analyticsService.trackPageView(AnalyticsService.Dashboard);
@@ -92,20 +90,13 @@ export class DashboardComponent extends BaseComponent implements OnInit {
}
public get indexFromCurrentType() {
- if (this.currentType == "recent") {
- return 0;
- }
- if (this.currentType == "drafts") {
- return 1;
- }
- if (this.currentType == "plans") {
- return this.isAuthenticated() ? 2 : 1;
- }
- if (this.currentType == "descriptions") {
- return this.isAuthenticated() ? 3 : 2;
- }
- return 0;
+ switch(this.currentType){
+ case ActivityListingType.Recent: return 0;
+ case ActivityListingType.Drafts: return 1;
+ case ActivityListingType.Plans: return this.isAuthenticated() ? 2 : 1;
+ case ActivityListingType.Descriptions: return this.isAuthenticated() ? 3 : 2;
+ }
}
public isAuthenticated(): boolean {
@@ -255,3 +246,10 @@ export class DashboardComponent extends BaseComponent implements OnInit {
return true;
}
}
+
+export enum ActivityListingType {
+ 'Recent'= 'recent',
+ 'Drafts' = 'drafts',
+ 'Plans' = 'plans',
+ 'Descriptions' = 'descriptions'
+}
\ No newline at end of file
diff --git a/frontend/src/app/ui/dashboard/dashboard.module.ts b/frontend/src/app/ui/dashboard/dashboard.module.ts
index 3967e273e..ac043ec2b 100644
--- a/frontend/src/app/ui/dashboard/dashboard.module.ts
+++ b/frontend/src/app/ui/dashboard/dashboard.module.ts
@@ -25,7 +25,7 @@ import { RecentEditedActivityComponent } from './recent-edited-activity/recent-e
],
declarations: [
DashboardComponent,
- RecentEditedActivityComponent,
+ RecentEditedActivityComponent,
]
})
export class DashboardModule { }
diff --git a/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts b/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
index 797e684c3..36c761abf 100644
--- a/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
+++ b/frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
@@ -1,5 +1,5 @@
import { Location } from '@angular/common';
-import { Component, Input, OnInit, Output } from '@angular/core';
+import { Component, computed, effect, input, Input, OnInit, Output } from '@angular/core';
import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { DescriptionStatusEnum } from '@app/core/common/enum/description-status';
@@ -27,6 +27,7 @@ import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/
import { BehaviorSubject } from 'rxjs';
import { debounceTime, map, takeUntil } from 'rxjs/operators';
import { nameof } from 'ts-simple-nameof';
+import { ActivityListingType } from '../dashboard.component';
@Component({
selector: 'app-recent-edited-activity',
@@ -43,15 +44,32 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
pageSize: number = 5;
listingItems: RecentActivityItem[]= [];
- @Input() type: string;
- @Input() selectedType: string;
- @Input() includeDescriptions: boolean = false;
- @Input() includePlans: boolean = false;
- @Input() onlyDrafts: boolean = false;
+ @Input() type: ActivityListingType = ActivityListingType.Recent;
@Input() hasPlans: boolean = false;
-
+
@Output() addNewDescription: BehaviorSubject
= new BehaviorSubject(false);
+
+ currentType = input();
+ isActive = computed(() => this.currentType() === this.type);
+
+ get onlyDrafts(): boolean {
+ return this.type === ActivityListingType.Drafts;
+ }
+
+ get includeDescriptions(): boolean {
+ const activityListingTypes = [ActivityListingType.Recent, ActivityListingType.Drafts, ActivityListingType.Descriptions]
+ return activityListingTypes.includes(this.type);
+ }
+
+ get includePlans(): boolean {
+ const activityListingTypes = [ActivityListingType.Recent, ActivityListingType.Drafts, ActivityListingType.Plans]
+ return activityListingTypes.includes(this.type);
+ }
+ get isDefault(): boolean {
+ return this.type === ActivityListingType.Recent;
+ }
+
get onlyPlans(): boolean {
return this.includePlans && !this.includeDescriptions;
}
@@ -72,7 +90,6 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
totalCount: number;
offsetLess: number = 0;
- @Input() isActive: boolean = false;
constructor(
private route: ActivatedRoute,
@@ -86,12 +103,17 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
private httpErrorHandlingService: HttpErrorHandlingService
) {
super();
+ effect(() => {
+ if(this.isActive()){ //on Type Changes
+ this.updateUrl();
+ }
+ })
}
ngOnInit() {
this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity);
this.route.queryParams.subscribe(params => {
- if (this.isActive) {
+ if (this.isActive()) {
let page = (params['page'] === undefined) ? 0 : + params['page'];
this.currentPage = (page <= 0) ? 0 : page;
@@ -123,24 +145,20 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
this.refresh()
});
- if (!this.formGroup.get('order').value) this.formGroup.get('order').setValue(this.order.UpdatedAt);
-
+ if (!this.formGroup.get('order').value){
+ this.formGroup.get('order').setValue(this.order.UpdatedAt);
+ }
+
this.formGroup.get('order').valueChanges
.pipe(takeUntil(this._destroyed))
- .subscribe(x => this.refresh());
+ .subscribe(x => {this.refresh()});
this.refresh();
}
- ngOnChanges() {
- if (this.isActive) {
- this.updateUrl();
- }
- }
-
updateUrl() {
let parametersArray: string[] = [
- ...( this.selectedType && this.type === this.selectedType ? ["type=" + this.selectedType] : []),
+ ...( !this.isDefault && this.isActive() ? ["type=" + this.type] : []),
...(this.currentPage > 1 ? ["page=" + this.currentPage] : []),
...(this.formGroup.get("like").value ? ["keyword=" + this.formGroup.get("like").value] : [])
]