Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Apr 2, 2024
2 parents 0bb7740 + 34883f2 commit f5e3384
Show file tree
Hide file tree
Showing 14 changed files with 411 additions and 385 deletions.
54 changes: 48 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@denbi/cloud-portal-webapp",
"version": "4.808.0",
"version": "4.809.0",
"description": "de.NBI Cloud Portal",
"scripts": {
"ng": "ng serve",
Expand Down
56 changes: 28 additions & 28 deletions src/app/layouts/full-layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
><i class="nav-icon fas fa-archive"></i> Applications</a
>
</li>
<li class="nav-item">
<!-- <li class="nav-item">
<a
class="nav-link"
routerLinkActive="active"
Expand All @@ -98,7 +98,7 @@
<i class="nav-icon ccs-credits_icon"> </i>
Credits Calculator
</a>
</li>
</li> -->
<li class="nav-item">
<a
class="nav-link"
Expand Down Expand Up @@ -151,7 +151,7 @@
data-toggle="tooltip"
data-placement="right"
title="This project was initially approved within the last 2 weeks."
*ngIf="application | hasstatusinlist : Application_States.APPROVED_LAST_2_WEEKS"
*ngIf="application | hasstatusinlist: Application_States.APPROVED_LAST_2_WEEKS"
>
<i class="fas fa-plus-circle"></i>
</div>
Expand All @@ -161,8 +161,8 @@
data-placement="right"
title="The project lifetime expires soon."
*ngIf="
(application | hasstatusinlist : Application_States.EXPIRES_SOON) &&
!(application | hasstatusinlist : Application_States.EXPIRED)
(application | hasstatusinlist: Application_States.EXPIRES_SOON) &&
!(application | hasstatusinlist: Application_States.EXPIRED)
"
>
<i class="fas fa-exclamation-circle"></i>
Expand All @@ -172,7 +172,7 @@
data-toggle="tooltip"
data-placement="right"
title="The lifetime of this project is expired."
*ngIf="application | hasstatusinlist : Application_States.EXPIRED"
*ngIf="application | hasstatusinlist: Application_States.EXPIRED"
>
<i class="fas fa-ban"></i>
</div>
Expand All @@ -181,7 +181,7 @@
data-toggle="tooltip"
data-placement="right"
title="The termination of the project was requested."
*ngIf="application | hasstatusinlist : Application_States.TERMINATION_REQUESTED"
*ngIf="application | hasstatusinlist: Application_States.TERMINATION_REQUESTED"
>
<i class="fas fa-trash"></i>
</div>
Expand All @@ -190,7 +190,7 @@
data-toggle="tooltip"
data-placement="right"
title="This project is disabled!"
*ngIf="application | hasstatusinlist : Application_States.DISABLED"
*ngIf="application | hasstatusinlist: Application_States.DISABLED"
>
<i class="fa fa-lock"></i>
</div>
Expand All @@ -200,8 +200,8 @@
data-placement="right"
title="An extension request was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.LIFETIME_EXTENSION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_EXTENSION)
(application | hasstatusinlist: Application_States.LIFETIME_EXTENSION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_EXTENSION)
"
>
<i class="fas fa-edit"></i>
Expand All @@ -212,8 +212,8 @@
data-placement="right"
title="A modification request was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.MODIFICATION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_MODIFICATION)
(application | hasstatusinlist: Application_States.MODIFICATION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_MODIFICATION)
"
>
<i class="fas fa-edit"></i>
Expand All @@ -223,7 +223,7 @@
data-toggle="tooltip"
data-placement="right"
title="The project application was submitted but not approved yet."
*ngIf="application | hasstatusinlist : Application_States.SUBMITTED"
*ngIf="application | hasstatusinlist: Application_States.SUBMITTED"
>
<i class="fas fa-edit"></i>
</div>
Expand All @@ -233,8 +233,8 @@
data-placement="right"
title="A request for additional credits was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.CREDITS_EXTENSION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_CREDITS)
(application | hasstatusinlist: Application_States.CREDITS_EXTENSION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_CREDITS)
"
>
<i class="fas fa-coins"></i>
Expand Down Expand Up @@ -300,7 +300,7 @@
data-toggle="tooltip"
data-placement="right"
title="This project was initially approved within the last 2 weeks."
*ngIf="application | hasstatusinlist : Application_States.APPROVED_LAST_2_WEEKS"
*ngIf="application | hasstatusinlist: Application_States.APPROVED_LAST_2_WEEKS"
>
<i class="fas fa-plus-circle"></i>
</div>
Expand All @@ -310,8 +310,8 @@
data-placement="right"
title="The project lifetime expires soon."
*ngIf="
(application | hasstatusinlist : Application_States.EXPIRES_SOON) &&
!(application | hasstatusinlist : Application_States.EXPIRED)
(application | hasstatusinlist: Application_States.EXPIRES_SOON) &&
!(application | hasstatusinlist: Application_States.EXPIRED)
"
>
<i class="fas fa-exclamation-circle"></i>
Expand All @@ -321,7 +321,7 @@
data-toggle="tooltip"
data-placement="right"
title="The lifetime of this project is expired."
*ngIf="application | hasstatusinlist : Application_States.EXPIRED"
*ngIf="application | hasstatusinlist: Application_States.EXPIRED"
>
<i class="fas fa-ban"></i>
</div>
Expand All @@ -330,7 +330,7 @@
data-toggle="tooltip"
data-placement="right"
title="The termination of the project was requested."
*ngIf="application | hasstatusinlist : Application_States.TERMINATION_REQUESTED"
*ngIf="application | hasstatusinlist: Application_States.TERMINATION_REQUESTED"
>
<i class="fas fa-trash"></i>
</div>
Expand All @@ -339,7 +339,7 @@
data-toggle="tooltip"
data-placement="right"
title="This project is disabled!"
*ngIf="application | hasstatusinlist : Application_States.DISABLED"
*ngIf="application | hasstatusinlist: Application_States.DISABLED"
>
<i class="fa fa-lock"></i>
</div>
Expand All @@ -349,8 +349,8 @@
data-placement="right"
title="An extension request was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.LIFETIME_EXTENSION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_EXTENSION)
(application | hasstatusinlist: Application_States.LIFETIME_EXTENSION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_EXTENSION)
"
>
<i class="fas fa-edit"></i>
Expand All @@ -361,8 +361,8 @@
data-placement="right"
title="A modification request was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.MODIFICATION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_MODIFICATION)
(application | hasstatusinlist: Application_States.MODIFICATION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_MODIFICATION)
"
>
<i class="fas fa-edit"></i>
Expand All @@ -372,7 +372,7 @@
data-toggle="tooltip"
data-placement="right"
title="The project application was submitted but not approved yet."
*ngIf="application | hasstatusinlist : Application_States.SUBMITTED"
*ngIf="application | hasstatusinlist: Application_States.SUBMITTED"
>
<i class="fas fa-edit"></i>
</div>
Expand All @@ -382,8 +382,8 @@
data-placement="right"
title="A request for additional credits was submitted for this project."
*ngIf="
(application | hasstatusinlist : Application_States.CREDITS_EXTENSION_REQUESTED) ||
(application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION_CREDITS)
(application | hasstatusinlist: Application_States.CREDITS_EXTENSION_REQUESTED) ||
(application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION_CREDITS)
"
>
<i class="fas fa-coins"></i>
Expand Down
37 changes: 25 additions & 12 deletions src/app/projectmanagement/modals/result/result.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ export class ResultComponent implements OnInit, OnDestroy {
this.setToResultState();

this.subscription.add(
this.applicationsService
.requestModification(this.extension as ApplicationModification)
.subscribe((result: { [key: string]: string }): void => {
this.applicationsService.requestModification(this.extension as ApplicationModification).subscribe(
(result: { [key: string]: string }): void => {
if (result['Error']) {
this.extensionStatus = 2;
this.errorMessage = result['Error'];
Expand All @@ -70,7 +69,12 @@ export class ResultComponent implements OnInit, OnDestroy {
}

this.event.emit({ reload: true });
}),
},
() => {
this.extensionStatus = 2;
this.errorMessage = 'Submitting the modification request was not successful. Please reload this page and try again!';
},
),
);
}

Expand All @@ -89,12 +93,12 @@ export class ResultComponent implements OnInit, OnDestroy {
),
);
}

submitLifetimeExtensionRequest(): void {
this.setToResultState();

this.applicationsService
.requestAdditionalLifetime(this.extension as ApplicationLifetimeExtension)
.subscribe((result: { [key: string]: string }): void => {
this.applicationsService.requestAdditionalLifetime(this.extension as ApplicationLifetimeExtension).subscribe(
(result: { [key: string]: string }): void => {
if (result['Error']) {
this.extensionStatus = 2;
this.errorMessage = result['Error'];
Expand All @@ -103,23 +107,32 @@ export class ResultComponent implements OnInit, OnDestroy {
}

this.event.emit({ reload: true });
});
},
() => {
this.extensionStatus = 2;
this.errorMessage = 'Submitting the extension request was not successful. Please reload this page and try again!';
},
);
}

submitCreditsModification(): void {
this.setToResultState();

this.subscription.add(
this.applicationsService
.requestAdditionalCredits(this.extension as ApplicationCreditRequest)
.subscribe((result: { [key: string]: string }): void => {
this.applicationsService.requestAdditionalCredits(this.extension as ApplicationCreditRequest).subscribe(
(result: { [key: string]: string }): void => {
if (result['Error']) {
this.extensionStatus = 2;
} else {
this.extensionStatus = 1;
}
this.event.emit({ reload: true });
}),
},
() => {
this.extensionStatus = 2;
this.errorMessage = 'Submitting the credit request was not successful. Please reload this page and try again!';
},
),
);
}

Expand Down
Loading

0 comments on commit f5e3384

Please sign in to comment.