diff --git a/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/dto/ElementProperties.java b/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/dto/ElementProperties.java index 4fa52ae74efacb241cc16acfab16ce9c2f85a5de..39a858018441d4133f79a5dcbab3d5fb623b7b88 100644 --- a/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/dto/ElementProperties.java +++ b/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/dto/ElementProperties.java @@ -51,6 +51,7 @@ import java.util.stream.Stream; @NoArgsConstructor public class ElementProperties { + private String additionalProperties; private String name; private String type; private String cardinality; diff --git a/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/service/PuaFromJSON.java b/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/service/PuaFromJSON.java index 04acf626bbe10c462cc042b304ff9ee655ab2792..066bb571911fc5577155407503c8e178d40fdfa2 100644 --- a/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/service/PuaFromJSON.java +++ b/api/api-pastis/pastis-commons/src/main/java/fr/gouv/vitamui/pastis/common/service/PuaFromJSON.java @@ -53,20 +53,20 @@ public class PuaFromJSON { private static final String SCHEMA = "http://json-schema.org/draft-04/schema"; private static final String TYPE = "object"; - private static final Boolean ADDITIONALPROPERTIES = false; @Autowired private PuaPastisValidator puaPastisValidator; public String getControlSchemaFromElementProperties(ElementProperties elementProperties) throws IOException { // We use a JSONObject instead of POJO, since Jackson and Gson will add unnecessary // backslashes during mapping string object values back to string + JSONObject controlSchema = puaPastisValidator.sortedJSON(); // 1. Add Schema controlSchema.put("$schema", SCHEMA); // 2. Add type controlSchema.put("type", TYPE); // 3. Add additionProperties - controlSchema.put("additionalProperties", ADDITIONALPROPERTIES); + controlSchema.put("additionalProperties", elementProperties.getAdditionalProperties()); // 4. Check if tree contains Management metadata addPatternProperties(elementProperties, controlSchema); List<ElementProperties> elementsForTree = puaPastisValidator.ignoreMetadata(elementProperties); diff --git a/ui/ui-frontend/projects/pastis/src/app/models/file-node.ts b/ui/ui-frontend/projects/pastis/src/app/models/file-node.ts index 29959356a88e5b846f926e5d525fbf7a57cfb77c..d47b753796a25d4953a57136747aa60500cb7b22 100644 --- a/ui/ui-frontend/projects/pastis/src/app/models/file-node.ts +++ b/ui/ui-frontend/projects/pastis/src/app/models/file-node.ts @@ -94,6 +94,7 @@ export enum ValueOrDataConstants { } export interface FileNode { + additionalProperties:boolean; id: number; parentId: number; name: string; diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html index a310989b4ab7717a0d96c8dd447c736fb3177ecc..0e414ec622424d729d3a8d4fa1e237fac6c52f4f 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html @@ -25,11 +25,17 @@ <!--Top right panel container--> <div class="pastis-metadata-option-entete-2"> + <!--Toggle button allow additional properties--> + <div *ngIf="this.profileService.profileMode==='PUA' && this.isStandalone" class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.ADDITIONAL_PROPERTIES_TOOLTIP' | + translate}}"> + <allow-additional-properties + (stateToggleButton)="changeStatusAditionalProperties($event)"></allow-additional-properties> + </div> <!--Button save--> <div class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.ENREGISTRER_PROFIL_TOOLTIP' | translate}}" placement="top" show-delay="0"> - <pastis-user-action-save-profile></pastis-user-action-save-profile> + <pastis-user-action-save-profile [additional]="additionalProperties"></pastis-user-action-save-profile> </div> <!--Button setting--> <div class="panel-buttons" matTooltip="{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.TELECHARGER_MANUEL_TOOLTIP' | @@ -50,7 +56,8 @@ (search)="applyFilterTier($event)" [searchbarPlaceholder]="'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.SEARCH_PLACEHOLDER' | translate"> <!--Button add metadata--> - <button (click)="onAddNode()" *ngIf="checkElementType() && resolveButtonLabel(clickedNode) !== null" class="btn primary ml-5" + <button (click)="onAddNode()" *ngIf="checkElementType() && resolveButtonLabel(clickedNode) !== null" + class="btn primary ml-5" style="text-transform: uppercase;">{{resolveButtonLabel(clickedNode)}} </button> </vitamui-common-banner> @@ -59,7 +66,8 @@ <!--Metatada table container--> <div class="pastis-table-container"> - <table *ngIf="shouldLoadMetadataTable(); else complexElementWithouChild" [dataSource]="matDataSource" class="list-profile-table" + <table *ngIf="shouldLoadMetadataTable(); else complexElementWithouChild" [dataSource]="matDataSource" + class="list-profile-table" mat-table> <!-- Name Column --> <ng-container matColumnDef="nomDuChamp"> @@ -71,7 +79,8 @@ <span [matTooltipShowDelay]="0" [ngClass]="{'pastis-table-content': isSedaCardinalityConform(element.cardinalite,selectedCardinalities[j]), - 'pastis-table-content-with-errors': !isSedaCardinalityConform(element.cardinalite,selectedCardinalities[j])}" matTooltip="{{getSedaDefinition(element.nomDuChamp)}}" matTooltipClass="pastis-matTooltipClass" + 'pastis-table-content-with-errors': !isSedaCardinalityConform(element.cardinalite,selectedCardinalities[j])}" + matTooltip="{{getSedaDefinition(element.nomDuChamp)}}" matTooltipClass="pastis-matTooltipClass" placement="right"> <i *ngIf="isElementComplex(element.nomDuChamp)" class="vitamui-icon vitamui-icon-complex-element-1-1"> <span class="path1"></span><span class="path2"></span @@ -101,7 +110,8 @@ <ng-container [ngSwitch]="getMetadataInputType(element)"> <ng-container *ngSwitchCase="'date'"> <div class="pastis-vitamui-container-editable-valeur-fixe"> - <vitamui-common-editable-textarea (ngModelChange)="setNodeValue(element,$event)" [dpDayPicker]="config" + <vitamui-common-editable-textarea (ngModelChange)="setNodeValue(element,$event)" + [dpDayPicker]="config" [maxlength]="120" [ngModel]="element.valeurFixe" class="valeur-fixe-pastis"> @@ -138,7 +148,8 @@ translate}} </th> <td *matCellDef="let element;index as i" class="pastis-metadata-table-col-small" mat-cell> - <mat-select (ngModelChange)="setNodeChildrenCardinalities(element,$event)" [ngModel]="selectedCardinalities[i]" + <mat-select (ngModelChange)="setNodeChildrenCardinalities(element,$event)" + [ngModel]="selectedCardinalities[i]" class="select-border" disableRipple="true" panelClass="vitamui-mat-select"> <mat-option *ngFor="let c of element.cardinalite" [value]="c"> @@ -169,7 +180,8 @@ <ng-container matColumnDef="menuoption"> <th *matHeaderCellDef class="pastis-font-table-header pastis-col" mat-header-cell></th> <td *matCellDef="let element;index as i" class="pastis-metadata-table-col-small" mat-cell> - <button (click)="onButtonClicked(element.id,$event)" *ngIf="isRowHovered(element.id)" [center-mat-menu]="menuTrigger" [ngClass]="{'pastis-btn-metadata-options-active': isButtonClicked(element.id,matDataSource.data[rowIndex]), + <button (click)="onButtonClicked(element.id,$event)" *ngIf="isRowHovered(element.id)" + [center-mat-menu]="menuTrigger" [ngClass]="{'pastis-btn-metadata-options-active': isButtonClicked(element.id,matDataSource.data[rowIndex]), 'pastis-btn-metadata-options': !isButtonClicked(element.id,matDataSource.data[rowIndex]) }" disableRipple="true" id="menuBtn" mat-icon-button> @@ -188,7 +200,8 @@ <mat-divider *ngIf="isDuplicated(element.nomDuChamp) && this.profileService.profileMode==='PA'" style="border-top-color:#E0E0E0;"> </mat-divider> - <button (click)="onDuplicateNode(element.id)" *ngIf="isDuplicated(element.nomDuChamp) && this.profileService.profileMode==='PA'" + <button (click)="onDuplicateNode(element.id)" + *ngIf="isDuplicated(element.nomDuChamp) && this.profileService.profileMode==='PA'" mat-menu-item> <mat-icon style="color:#757575">filter_none</mat-icon> <span class="text normal">{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.DUPLIQUER' | translate}}</span> @@ -207,6 +220,24 @@ <span class="text normal">{{'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA.ATTRIBUT_METADONNEE' | translate}}</span> </button> + + <!-- Autoriser la présence de métadonnées non déclarées--> + <mat-divider + *ngIf="isElementComplex(element.nomDuChamp) && this.profileService.profileMode==='PUA'&& isElementNameNotContentManagement(element.nomDuChamp)" + style="border-top-color:#E0E0E0;"> + </mat-divider> + <mat-checkbox + *ngIf="isElementComplex(element.nomDuChamp) && this.profileService.profileMode==='PUA'&& isElementNameNotContentManagement(element.nomDuChamp)" + class="mat-menu-item" (change)="changeAutorisation($event, element)"> + <span class="allow_presence_text">Autoriser la presence de <br/> métadonnées non déclarées</span> + <div class="placement-tooltip"> + <i class="vitamui-icon vitamui-icon-info primary clickable" + matTooltip="Permet de modifier l’autorisation dans le manifeste de la présence de métadonnées non déclarées dans le PUA" + matTooltipClass="vitamui-tooltip" + style="font-size: 1.5em"></i> + </div> + </mat-checkbox> + <!-- @Supprimer--> <mat-divider *ngIf="!isSedaObligatory(element.nomDuChamp)" style="border-top-color:#E0E0E0;"> </mat-divider> @@ -222,7 +253,8 @@ </ng-container> <tr *matHeaderRowDef="displayedColumns;sticky: true" class="pastis-table-row-header" mat-header-row></tr> - <tr (mouseenter)="onMouseOver(row)" (mouseleave)="onMouseLeave(row)" *matRowDef="let row; columns: displayedColumns;" + <tr (mouseenter)="onMouseOver(row)" (mouseleave)="onMouseLeave(row)" + *matRowDef="let row; columns: displayedColumns;" class="pastis-table-row" mat-row></tr> </table> </div> diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.scss b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.scss index 4e068b072c29c7be632d45cf575e05dab6e086f3..836e7ce1add88587bd7207322c1ac4cc5b5d70fd 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.scss +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.scss @@ -179,7 +179,7 @@ td { font-style: normal; font-weight: 400; line-height: 24px; - letter-spacing: 0px; + letter-spacing: 0; text-align: left; } @extend .editable-field-control; @@ -310,11 +310,12 @@ tr:hover .pastis-btn-appear { } .pastis-metadata-option-entete-1 { - position: relative; + position: absolute; height: 117px; - float: left; - padding-left: 35px; - padding-top: 20px; + width: 50%; + float: right; + left: 35px; + top: 20px; } .pastis-metadata-option-entete-1 .vitamui-icon-dossier-physique { @@ -325,11 +326,11 @@ tr:hover .pastis-btn-appear { } .pastis-metadata-option-entete-2 { - position: relative; + position: absolute; height: 117px; - width: 172px; display: inline-flex; - float: right; + right: 20px; + top: 5px; } @@ -368,7 +369,7 @@ dp-date-picker { dp-day-calendar .dp-day-calendar-container { border-radius: 20px !important; - box-shadow: 0px 11px 15px rgba(0, 0, 0, 0.1), 0px 9px 46px rgba(0, 0, 0, 0.06), 0px 24px 38px rgba(0, 0, 0, 0.07) !important; + box-shadow: 0 11px 15px rgba(0, 0, 0, 0.1), 0 9px 46px rgba(0, 0, 0, 0.06), 0 24px 38px rgba(0, 0, 0, 0.07) !important; } .dp-selected { @@ -448,3 +449,16 @@ dp-day-calendar .dp-day-calendar-container { overflow: visible; z-index: 999; } + +.allow_presence_text{ + font-size: 11px !important; + font-family: 'Mulish', sans-serif !important; + color: #212121 !important; + font-weight: 400; +} + +.placement-tooltip{ + position: absolute; + left: 13em; + top: 1em; +} diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts index 0e256894e447e5dfd55a22ece8c6bd88a37b6767..3b4e90bfaa3349748d544b321055b4ec79b06649 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts @@ -188,10 +188,12 @@ export class FileTreeMetadataComponent { cardinalite: string[]; commentaire: string; enumeration: string[]; + additionalProperties: boolean; + additionalPropertiesMetadonnee : boolean; constructor(private fileService: FileService, private fileMetadataService: FileTreeMetadataService, private sedaService: SedaService, private fb: FormBuilder, private notificationService: NotificationService, - private router: Router, private startupService: StartupService, public profileService: ProfileService, + private router: Router, private startupService: StartupService, public profileService: ProfileService, private fileTreeService:FileTreeService, private metadataLanguageService: PastisPopupMetadataLanguageService, private translateService: TranslateService) { @@ -218,7 +220,8 @@ export class FileTreeMetadataComponent { this.popupAnnuler= "Annuler" } - + this.additionalProperties = false; + this.additionalPropertiesMetadonnee = false; this.docPath = this.isStandalone ? 'assets/doc/Standalone - Documentation APP - PASTIS.pdf' : 'assets/doc/VITAM UI - Documentation APP - PASTIS.pdf'; this.languagePopup = false; this._sedalanguageSub = this.metadataLanguageService.sedaLanguage.subscribe( @@ -690,4 +693,23 @@ export class FileTreeMetadataComponent { return this.sedaService.isDuplicated(nomDuChamp, this.selectedSedaNode); } + changeStatusAditionalProperties($event: boolean) { + this.additionalProperties = $event; + } + + + isElementNameNotContentManagement(nomDuChamp: string) { + return !(nomDuChamp == "Content" || nomDuChamp == "Management"); + } + + changeAutorisation($event: MatCheckboxChange, element : any) { + console.log($event.checked + "test" + element.nomDuChamp); + this.additionalPropertiesMetadonnee = $event.checked; + this.setNodeAdditionalPropertiesChange(this.additionalPropertiesMetadonnee, element) + } + + private setNodeAdditionalPropertiesChange(additionalPropertiesMetadonnee: boolean, element: FileNode) { +//TODO Mettre additional properties à true dans la métadonnée complexe element. + console.log(element.nomDuChamp + " nom metadonnee" + additionalPropertiesMetadonnee + " nouveau addition à setter") + } } diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.html b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.html new file mode 100644 index 0000000000000000000000000000000000000000..9876b41e98202e0e980236f2649246f46583c878 --- /dev/null +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.html @@ -0,0 +1,13 @@ +<div> + <vitamui-common-slide-toggle + [(ngModel)]="checked" + (change)="changed()"> + </vitamui-common-slide-toggle> +</div> +<div> + <span class="span2">{{text1}}</span> +</div> +<div> + <span class="span1">{{text}}</span> +</div> + diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.scss b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..bf7519f419c645132157e4f0b25dcdc6e905928c --- /dev/null +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.scss @@ -0,0 +1,11 @@ +.span1{ +font-size: 11px; + font-family: 'Mulish', sans-serif; + font-style: normal; + color: #212121; + letter-spacing: normal; + font-weight: 700; +} +.span2{ + @extend .span1 +} diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.spec.ts b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..978e728bef4a736dff2ddd7a92a9c87719f0bd23 --- /dev/null +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AllowAdditionalPropertiesComponent } from './allow-additional-properties.component'; + +describe('AllowAdditionalPropertiesComponent', () => { + let component: AllowAdditionalPropertiesComponent; + let fixture: ComponentFixture<AllowAdditionalPropertiesComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ AllowAdditionalPropertiesComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(AllowAdditionalPropertiesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.ts b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..aaab3bc2667d7754403146fed7a5748f617e34cc --- /dev/null +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/allow-additional-properties/allow-additional-properties.component.ts @@ -0,0 +1,36 @@ +import {Component, EventEmitter, OnInit, Output} from '@angular/core'; + +@Component({ + selector: 'allow-additional-properties', + templateUrl: './allow-additional-properties.component.html', + styleUrls: ['./allow-additional-properties.component.scss'] +}) +export class AllowAdditionalPropertiesComponent implements OnInit { + constructor() { } + + ngOnInit(): void { + this.text1="Métadonnées supplémentaires" + this.text=" non autorisées" + + } + @Output() stateToggleButton = new EventEmitter<boolean>(); + + checked: false; + text : string; + text1: string; + + + changed(){ + if(this.checked){ + this.text1="Métadonnées supplémentaires " + this.text="autorisées" + } + else{ + this.text1="Métadonnées supplémentaires " + this.text = "non autorisées" + } + this.stateToggleButton.emit(this.checked) + } +} + + diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/save-profile/save-profile.component.ts b/ui/ui-frontend/projects/pastis/src/app/user-actions/save-profile/save-profile.component.ts index e87d703bcc3ae84586ca97c1caf1e596eee26461..466d446fc2983fe52a083fa3906eea123e424b55 100644 --- a/ui/ui-frontend/projects/pastis/src/app/user-actions/save-profile/save-profile.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/save-profile/save-profile.component.ts @@ -35,7 +35,7 @@ same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL-C license and that you accept its terms. */ -import {Component, EventEmitter, OnDestroy, OnInit, Output} from '@angular/core'; +import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core'; import {ProfileService} from '../../core/services/profile.service'; import {FileService} from '../../core/services/file.service'; import {FileNode} from '../../models/file-node'; @@ -103,7 +103,6 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy { data: FileNode[] = []; donnees: string[]; - subscription1$: Subscription; subscription2$: Subscription; subscriptions: Subscription[] = []; @@ -113,6 +112,8 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy { profileDescription: ProfileDescription; fileRng : File; + @Input() additional : boolean; + @Output() close = new EventEmitter(); constructor(private profileService: ProfileService, private fileService: FileService, @@ -159,6 +160,7 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy { saveProfileToFile() { //Retrieve the current file tree data as a JSON this.data = this.fileService.allData.getValue(); + this.data[0].additionalProperties = this.additional; if(this.isStandalone){ this.downloadProfiles(true); } @@ -202,7 +204,6 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy { let retour; if (result.success) { retour = result.data - //TODO : Vérifier mode PA PUA : faire la pop up de sauvegarde qui envoie un pa ou un pua avec modele à completer par le retour if (result.mode === "PUA") { if(!this.editProfile){ this.profileDescription = Object.assign(this.noticeService.profileFromNotice(retour,this.editProfile, true), this.profileDescription) @@ -328,6 +329,7 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy { downloadProfiles(local: boolean): void{ if (this.data) { + console.log(this.data[0].additionalProperties + " TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT addional result") // Get Notice changement let notice: any; if (this.profileService.profileMode === "PUA") { diff --git a/ui/ui-frontend/projects/pastis/src/app/user-actions/user-actions.module.ts b/ui/ui-frontend/projects/pastis/src/app/user-actions/user-actions.module.ts index 0b0713892c77e670948881d77ea1928938c9d2b1..e828855f3b9000a6a35b9e3d016643097376fda7 100644 --- a/ui/ui-frontend/projects/pastis/src/app/user-actions/user-actions.module.ts +++ b/ui/ui-frontend/projects/pastis/src/app/user-actions/user-actions.module.ts @@ -54,10 +54,11 @@ import {CreateNoticeComponent} from "./create-notice/create-notice.component"; import {CoreModule} from "../core/core.module"; import { SaveProfileOptionsComponent } from './save-profile-options/save-profile-options.component'; import {MatSlideToggleModule} from "@angular/material/slide-toggle"; +import { AllowAdditionalPropertiesComponent } from './allow-additional-properties/allow-additional-properties.component'; @NgModule({ - declarations: [UserActionUploadProfileComponent,FilterByNamePipe, UserActionSaveProfileComponent, UserActionsDownloadDocComponent, DuplicateMetadataComponent, CreateNoticeComponent, SaveProfileOptionsComponent], + declarations: [UserActionUploadProfileComponent,FilterByNamePipe, UserActionSaveProfileComponent, UserActionsDownloadDocComponent, DuplicateMetadataComponent, CreateNoticeComponent, SaveProfileOptionsComponent, AllowAdditionalPropertiesComponent], imports: [ CommonModule, PastisMaterialModule, @@ -71,7 +72,7 @@ import {MatSlideToggleModule} from "@angular/material/slide-toggle"; FormsModule, MatSlideToggleModule ], - exports: [UserActionUploadProfileComponent, UserActionSaveProfileComponent,UserActionsDownloadDocComponent,FilterByNamePipe ], + exports: [UserActionUploadProfileComponent, UserActionSaveProfileComponent, UserActionsDownloadDocComponent, FilterByNamePipe, AllowAdditionalPropertiesComponent], }) export class UserActionsModule { diff --git a/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json b/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json index f5fcf9050ad66e8dcf71b8950d63d71f0acd694d..d239a8377d91726e29513a2d2e80cffc12dbf76c 100644 --- a/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json +++ b/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json @@ -169,6 +169,8 @@ "DUPLIQUER": "Duplicate", "ATTRIBUT_METADONNEE": "Metadata attributes", "SUPPRIMER": "Remove", + "AUTORISER_PRESENCE_METADONNEE": "Allow the presence of undeclared metadata", + "ADDITIONAL_PROPERTIES_TOOLTIP": "Authorize or not the presence, in a slip, of metadata not declared in the PUA", "MESSAGE_METADONNEE_SANS_FILLES": { "PARTIEUN": "The metadata", "PARTIEDEUX": "does not contain any child metadata. You must add at least one to it to be able to use it in your profile." diff --git a/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json b/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json index 780e60afefd22aa6e6161850cb1dc2a94b61af6d..1017184a0d0f861f0020b082da9650e46241679f 100644 --- a/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json +++ b/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json @@ -169,6 +169,8 @@ "DUPLIQUER": "Dupliquer", "ATTRIBUT_METADONNEE": "Attributs de métadonnée", "SUPPRIMER": "Supprimer", + "AUTORISER_PRESENCE_METADONNEE": "Autoriser la presence de metadonnee non declarees", + "ADDITIONAL_PROPERTIES_TOOLTIP": "Autoriser ou non la présence, dans un bordereau, de métadonnées non déclarées dans le PUA", "MESSAGE_METADONNEE_SANS_FILLES": { "PARTIEUN": "La métadonnée", "PARTIEDEUX": "ne contient pas de métadonnées filles. Vous devez lui en ajouter au moins une pour pouvoir l'utiliser dans votre profil."