Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 900a65a8 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

small fixes

parent 274242ae
No related branches found
No related tags found
No related merge requests found
......@@ -10,4 +10,5 @@ import { Component, Input } from '@angular/core';
export class SmpWarningPanelComponent {
@Input() label:string;
@Input() icon:string;
}
......@@ -28,10 +28,9 @@
</mat-tab-group>
</data-panel>
<ng-template #noUserAdminGroupsDataFound>
<div class="panel smp-no-data-panel">
<mat-icon>warning</mat-icon>
<span>User is not administrator of any of the domains </span>
</div>
<smp-warning-panel class="smp-no-data-panel"
icon="warning"
label="User is not administrator of any of the domains"></smp-warning-panel>
</ng-template>
</div>
......
......@@ -34,10 +34,9 @@
</mat-tab>
</mat-tab-group>
<ng-template #noUserAdminGroupsDataFound>
<div class="panel smp-no-data-panel">
<mat-icon >warning</mat-icon>
<span>User is not administrator of any of the groups </span>
</div>
<smp-warning-panel class="smp-no-data-panel"
icon="warning"
label="User is not administrator of any of the groups "></smp-warning-panel>
</ng-template>
</data-panel>
......
......@@ -45,10 +45,9 @@
</mat-tab-group>
</data-panel>
<ng-template #noUserAdminGroupsDataFound>
<div class="panel smp-no-data-panel">
<mat-icon>warning</mat-icon>
<span>User is not administrator of any of the resources </span>
</div>
<smp-warning-panel class="smp-no-data-panel"
icon="warning"
label="User is not administrator of any of the resources"></smp-warning-panel>
</ng-template>
</div>
......
......@@ -2,6 +2,10 @@
<form [formGroup]="domainForm" >
<h3>Domain details</h3>
<div class="panel" *ngIf="_domain!=null && !_domain.domainId"><p style="font-weight: bold">Enter data and click 'Save' to create new domain</div>
<smp-warning-panel *ngIf=" !!_domain?.domainId && !domainResourceTypes?.length"
icon="warning"
label="To complete domain configuration please select at least one resource type on tab 'Resource Types'"></smp-warning-panel>
<mat-form-field style="width:100%">
<mat-label>Domain Code</mat-label>
<input matInput
......
......@@ -233,7 +233,7 @@ a:hover {
.error-data-panel {
display:flex;
flex-direction: row;
gap:0.5em;
gap:0.7em;
align-items: center;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
padding: 0.5em;
......
......@@ -31,7 +31,6 @@ import static eu.europa.ec.edelivery.smp.ui.ResourceConstants.*;
public class DomainAdminController {
private static final SMPLogger LOG = SMPLoggerFactory.getLogger(DomainAdminController.class);
final UIDomainService uiDomainService;
final DomainService domainService;
......@@ -55,8 +54,9 @@ public class DomainAdminController {
logAdminAccess("deleteDomain:" + domainEncId);
Long domainId = SessionSecurityUtils.decryptEntityId(domainEncId);
LOG.info("Delete domain with id [{}]", domainId);
return uiDomainService.deleteDomain(domainId);
DomainRO domainRO = uiDomainService.deleteDomain(domainId);
domainRO.setDomainId(domainEncId);
return domainRO;
}
@PutMapping(path = "/{user-enc-id}/create", produces = MimeTypeUtils.APPLICATION_JSON_VALUE, consumes = MimeTypeUtils.APPLICATION_JSON_VALUE)
......@@ -83,6 +83,7 @@ public class DomainAdminController {
DomainRO domainRO = uiDomainService.getDomainData(domainId);
domainRO.setStatus(EntityROStatus.UPDATED.getStatusNumber());
domainRO.setDomainId(domainEncId);
return domainRO;
}
......@@ -97,6 +98,7 @@ public class DomainAdminController {
uiDomainService.updateResourceDefDomainList(domainId, resourceDefs);
DomainRO domainRO = uiDomainService.getDomainData(domainId);
domainRO.setStatus(EntityROStatus.UPDATED.getStatusNumber());
domainRO.setDomainId(domainEncId);
return domainRO;
}
......@@ -111,6 +113,7 @@ public class DomainAdminController {
uiDomainService.updateDomainSmlIntegrationData(domainId, domainData);
DomainRO domainRO = uiDomainService.getDomainData(domainId);
domainRO.setStatus(EntityROStatus.UPDATED.getStatusNumber());
domainRO.setDomainId(domainEncId);
return domainRO;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment