Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
be1b6df610
|
@ -36,22 +36,32 @@
|
|||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form (ngSubmit)="formSubmit()" [formGroup]="formGroup" *ngIf="formGroup">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 pt-1 pb-1">
|
||||
<span>
|
||||
{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.FIELDS.NAME' | translate}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 mt-1">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<mat-form-field class="w-100">
|
||||
<input matInput placeholder="{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.FIELDS.NAME' | translate}}" type="text" name="name" [formControl]="formGroup.get('name')" required>
|
||||
<mat-error *ngIf="formGroup.get('name').hasError('backendError')">
|
||||
{{formGroup.get('name').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('name').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('name').hasError('backendError')">{{formGroup.get('name').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('name').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form (ngSubmit)="formSubmit()" [formGroup]="formGroup" *ngIf="formGroup">
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -47,7 +50,14 @@
|
|||
<mat-error *ngIf="formGroup.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-3 mb-3">
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="col-auto">
|
||||
|
@ -58,7 +68,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- FIELDS -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div *ngFor="let field of formGroup.get('definition').get('fields').controls; let fieldIndex=index;" class="row mb-3">
|
||||
<div class="col-12">
|
||||
|
@ -143,6 +161,9 @@
|
|||
<mat-error *ngIf="formGroup.get('definition').get('sources').hasError('backendError')">{{formGroup.get('definition').get('sources').getError('backendError').message}}</mat-error>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -45,8 +46,8 @@
|
|||
<mat-error *ngIf="formGroup.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div class="col-12" *ngIf="formGroup.get('type').value == externalFetcherSourceType.API">
|
||||
<ng-container *ngIf="formGroup.get('type').value == externalFetcherSourceType.API">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -108,7 +109,11 @@
|
|||
<mat-error *ngIf="formGroup.get('filterType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Results info -->
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<h3 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.RESULTS' | translate}}</h3>
|
||||
<div class="col-12">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -118,8 +123,14 @@
|
|||
<mat-error *ngIf="formGroup.get('results').get('resultsArrayPath').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- fields mapping -->
|
||||
<h3 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.FIELD-MAPPINGS' | translate}}</h3>
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h3>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.FIELD-MAPPINGS' | translate}}</h3>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div *ngFor="let field of formGroup.get('results').get('fieldsMapping').controls; let fieldMappingIndex=index;" class="row mb-3">
|
||||
<div class="col-12">
|
||||
|
@ -147,7 +158,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auth info -->
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<h3 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.AUTHENTICATION' | translate}}
|
||||
<mat-checkbox [formControl]="formGroup.get('auth').get('enabled')"></mat-checkbox>
|
||||
</h3>
|
||||
|
@ -199,16 +214,25 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Queries info -->
|
||||
<h3 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERIES' | translate}}
|
||||
<div class="col-12">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto pr-0">
|
||||
<h3 class="m-0">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERIES' | translate}}</h3>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button mat-button type="button" class="action-btn" (click)="addQuery()" [disabled]="formGroup.disabled">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.ACTIONS.ADD-QUERY' | translate}}</button>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div *ngFor="let query of formGroup.get('queries').controls; let queryIndex=index;" class="row mb-3">
|
||||
<div *ngFor="let query of formGroup.get('queries').controls; let queryIndex=index;" class="row">
|
||||
<div class="col-12">
|
||||
<div class="row mb-3 d-flex align-items-center">
|
||||
<div class="row d-flex align-items-center">
|
||||
<div class="col-auto d-flex">
|
||||
<h4 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}</h4>
|
||||
<h4>{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}</h4>
|
||||
</div>
|
||||
<div class="col-auto d-flex">
|
||||
<button mat-icon-button class="action-list-icon" matTooltip="{{'EXTERNAL-FETCHER-SOURCE-EDITOR.ACTIONS.REMOVE-QUERY' | translate}}" (click)="removeQuery(queryIndex)" [disabled]="formGroup.disabled">
|
||||
|
@ -236,13 +260,18 @@
|
|||
</div>
|
||||
|
||||
<!-- Query Cases -->
|
||||
<h3 class="col-12">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CASES' | translate}}
|
||||
<div class="row mb-2">
|
||||
<div class="col-auto pr-0">
|
||||
<h3 class="m-0">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.FIELDS.CASES' | translate}}</h3>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button mat-button class="action-btn" type="button" (click)="addCase(queryIndex)" [disabled]="formGroup.disabled">{{'EXTERNAL-FETCHER-SOURCE-EDITOR.ACTIONS.ADD-CASE' | translate}}</button>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngFor="let case of query.get('cases').controls; let caseIndex=index;" class="row">
|
||||
<div class="col-12">
|
||||
<div class="row mb d-flex align-items-center">
|
||||
<div class="col-auto d-flex">
|
||||
<div class="col-auto mb-4">
|
||||
<span>{{caseIndex + 1}}</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
@ -297,7 +326,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto d-flex">
|
||||
<div class="col-auto mb-4">
|
||||
<button mat-icon-button class="action-list-icon" matTooltip="{{'EXTERNAL-FETCHER-SOURCE-EDITOR.ACTIONS.REMOVE-CASE' | translate}}" (click)="removeCase(queryIndex, caseIndex)" [disabled]="formGroup.disabled">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
|
@ -306,11 +335,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Static Items -->
|
||||
<div class="col-12" *ngIf="formGroup.get('type').value == externalFetcherSourceType.STATIC">
|
||||
|
|
|
@ -29,7 +29,10 @@
|
|||
<mat-card-title *ngIf="isNew">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.NEW' | translate}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div class="d-flex flex-wrap mt-4">
|
||||
<div class="row mt-4">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-wrap">
|
||||
<div class="col-md-12">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.NOTIFICATION-TYPE' | translate}}</mat-label>
|
||||
|
@ -79,9 +82,15 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Subject -->
|
||||
<div class="d-flex flex-wrap">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-wrap">
|
||||
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.SUBJECT-SECTION' | translate}}</h3>
|
||||
<div class="col-md-6">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -100,9 +109,20 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<h4 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.SUBJECT-FIELD-OPTIONS' | translate}}
|
||||
<mat-checkbox [checked]="subjectFieldOptionsEnabled" (change)="subjectFieldOptionsSelectionChanged($event)"></mat-checkbox>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="subjectFieldOptionsEnabled == true">
|
||||
<app-notification-template-field-options-component
|
||||
[form]="formGroup.get('value').get('subjectFieldOptions')"
|
||||
|
@ -114,7 +134,10 @@
|
|||
</ng-container>
|
||||
|
||||
<!-- Body -->
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BODY-SECTION' | translate}}</h3>
|
||||
<div class="col-md-6">
|
||||
<mat-form-field class="w-100">
|
||||
|
@ -149,9 +172,20 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('bodyText').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<h4 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BODY-FIELD-OPTIONS' | translate}}
|
||||
<mat-checkbox [checked]="bodyFieldOptionsEnabled" (change)="bodyFieldOptionsSelectionChanged($event)"></mat-checkbox>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="bodyFieldOptionsEnabled == true">
|
||||
<app-notification-template-field-options-component
|
||||
[form]="formGroup.get('value').get('bodyFieldOptions')"
|
||||
|
@ -162,6 +196,9 @@
|
|||
</app-notification-template-field-options-component>
|
||||
</ng-container>
|
||||
<!--Extra Options -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.EXTRA-OPTIONS' | translate}}</h3>
|
||||
<div>
|
||||
|
@ -170,16 +207,24 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('allowAttachments').hasError('backendError')">{{formGroup.get('value').get('allowAttachments').getError('backendError').message}}</mat-error>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<mat-form-field class="col-md-12">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.PRIORITY-KEY' | translate}}</mat-label>
|
||||
<input matInput [formControl]="formGroup.get('value').get('priorityKey')">
|
||||
<mat-error *ngIf="formGroup.get('value').get('priorityKey').hasError('backendError')">{{formGroup.get('value').get('priorityKey').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('value').get('priorityKey').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-4" >
|
||||
<mat-form-field class="chip-list">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100 chip-list">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.CC' | translate}}</mat-label>
|
||||
<mat-chip-grid #cc [formControl]="formGroup.get('value').get('cc')">
|
||||
<mat-chip-row *ngFor="let field of ccValues"
|
||||
|
@ -200,8 +245,8 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('cc').hasError('backendError')">{{formGroup.get('value').get('cc').getError('backendError').message}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<mat-form-field class="col-auto">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.CC-MODE' | translate}}</mat-label>
|
||||
<mat-select name="ccMode" [formControl]="formGroup.get('value').get('ccMode')">
|
||||
<mat-option *ngFor="let emailOverrideMode of emailOverrideModeEnum" [value]="emailOverrideMode">
|
||||
|
@ -212,8 +257,8 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('ccMode').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-4" >
|
||||
<mat-form-field class="chip-list">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100 chip-list">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BCC' | translate}}</mat-label>
|
||||
<mat-chip-grid #bcc [formControl]="formGroup.get('value').get('bcc')">
|
||||
<mat-chip-row *ngFor="let field of bccValues"
|
||||
|
@ -234,8 +279,8 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('bcc').hasError('backendError')">{{formGroup.get('value').get('bcc').getError('backendError').message}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<mat-form-field class="col-auto">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.BCC-MODE' | translate}}</mat-label>
|
||||
<mat-select name="bccMode" [formControl]="formGroup.get('value').get('bccMode')">
|
||||
<mat-option *ngFor="let emailOverrideMode of emailOverrideModeEnum" [value]="emailOverrideMode">
|
||||
|
@ -246,8 +291,8 @@
|
|||
<mat-error *ngIf="formGroup.get('value').get('bccMode').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-4" >
|
||||
<mat-form-field class="chip-list">
|
||||
<div class="col-12 col-lg-4">
|
||||
<mat-form-field class="w-100 chip-list">
|
||||
<mat-label>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.EXTRA-DATA-KEYS' | translate}}</mat-label>
|
||||
<mat-chip-grid #extraDataKeys [formControl]="formGroup.get('value').get('extraDataKeys')">
|
||||
<mat-chip-row *ngFor="let field of extraDataKeys"
|
||||
|
@ -269,6 +314,9 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue