Skip to content
Snippets Groups Projects
Commit bab4d0cd authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #15056 TIME 2 add lifeCycle to admin parameters + unit type for freeze and binding privileges

parent 091cb95a
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,7 @@ import { IssuingSiteComponent } from './registered-mail/issuing-site/issuing-sit
import { RegisteredMailListComponent } from './registered-mail/registered-mail-list.component';
import { SearchAdministrationComponent } from './search/search-administration.component';
import { SsoAdministrationComponent } from './connection/sso/sso-administration.component';
import { LifeCycleComponent } from './parameter/lifeCycle/life-cycle.component';
@NgModule({
......@@ -160,7 +161,8 @@ import { SsoAdministrationComponent } from './connection/sso/sso-administration.
IssuingSiteComponent,
RegisteredMailListComponent,
SearchAdministrationComponent,
SsoAdministrationComponent
SsoAdministrationComponent,
LifeCycleComponent
],
entryComponents: [
AccountLinkComponent,
......
<mat-form-field appearance="outline">
<mat-label>{{'lang.bindingDocumentFinalAction' | translate}}</mat-label>
<mat-select [(ngModel)]="bindingDocumentFinalAction.param_value_string" title="{{'lang.bindingDocumentFinalAction' | translate}}">
<mat-option *ngFor="let item of finalActionValues" [value]="item">
{{ 'lang.' + item | translate}}
</mat-option>
</mat-select>
</mat-form-field>
<br>
<mat-form-field appearance="outline">
<mat-label>{{'lang.nonBindingDocumentFinalAction' | translate}}</mat-label>
<mat-select [(ngModel)]="nonBindingDocumentFinalAction.param_value_string" title="{{'lang.bindingDocumentFinalAction' | translate}}">
<mat-option *ngFor="let item of finalActionValues" [value]="item">
{{ 'lang.' + item | translate}}
</mat-option>
</mat-select>
</mat-form-field>
import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { tap, catchError } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
import { of } from 'rxjs';
@Component({
selector: 'app-life-cyle',
templateUrl: './life-cycle.component.html',
})
export class LifeCycleComponent implements OnInit {
finalActionValues: any[] = ['restrictAccess', 'transfer', 'copy', 'delete'];
bindingDocumentFinalAction: any[] = [];
nonBindingDocumentFinalAction: any[] = [];
notify: any;
constructor(public translate: TranslateService, public http: HttpClient) {}
async ngOnInit(): Promise<void> {
await this.getFinalAction();
}
getFinalAction() {
return new Promise((resolve) => {
this.http.get('../rest/parameters').pipe(
tap((data: any) => {
const bindDocumentFinalAction = data.parameters.filter((t: { id: any; }) => t.id === 'bindingDocumentFinalAction');
const nonBindDocumentFinalAction = data.parameters.filter((t: { id: any; }) => t.id === 'nonBindingDocumentFinalAction');
this.bindingDocumentFinalAction = bindDocumentFinalAction[0];
this.nonBindingDocumentFinalAction = nonBindDocumentFinalAction[0];
resolve(true);
}),
catchError((err: any) => {
this.notify.handleSoftErrors(err);
return of(false);
})
).subscribe();
});
}
}
......@@ -88,6 +88,11 @@
<app-parameters-customization></app-parameters-customization>
</ng-template>
</mat-tab>
<mat-tab [label]="'lang.lifeCycle' | translate">
<ng-template matTabContent>
<app-life-cyle></app-life-cyle>
</ng-template>
</mat-tab>
</mat-tab-group>
</mat-card>
</div>
......
......@@ -502,13 +502,13 @@ export class PrivilegeService {
'id': 'set_binding_document',
'label': 'lang.setBindingDocument',
'comment': 'lang.setBindingDocument',
'unit': 'application'
'unit': 'lifeCycle'
},
{
'id': 'freeze_retention_rule',
'label': 'lang.freezeRetentionRule',
'comment': 'lang.freezeRetentionRule',
'unit': 'application'
'unit': 'lifeCycle'
}
];
......
......@@ -2118,6 +2118,12 @@
"ssoUrl": "Url du portail SSO",
"ssoUrlDesc": "Permet d'activer le bouton de déconnexion de l'application afin de retourner sur le portail de connexion SSO.",
"warning": "Attention",
"fieldUserIdDescSso": "Permet faire le lien entre l'identifiant utilisateur maarch et l'identifiant SSO"
"fieldUserIdDescSso": "Permet faire le lien entre l'identifiant utilisateur maarch et l'identifiant SSO",
"lifeCycle": "Cycle de vie",
"bindingDocumentFinalAction": "Action finale relative au document contraignant",
"nonBindingDocumentFinalAction": "Action finale relative aux documents non contraignants",
"restrictAccess": "Accès retreint",
"transfer": "Transfert SAE + destruction",
"copy": "Transfert SAE + accès restreint",
"deleteAction": "Suppression"
}
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