|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.KEY' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="key" [formControl]="formGroup.get('key')" required>
|
|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('key').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.LABEL' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="label" [formControl]="formGroup.get('label')" required>
|
|
|
|
@ -15,7 +15,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.ORDINAL' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="number" name="ordinal" [formControl]="formGroup.get('ordinal')" required>
|
|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('ordinal').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="referenceTypeSourceIndex != null">
|
|
|
|
|
<div class="col-3" *ngIf="referenceTypeSourceIndex != null">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCIES' | translate}}</mat-label>
|
|
|
|
|
<mat-select multiple (selectionChange)="setReferenceTypeDependenciesMap($event.value, referenceTypeSourceIndex)" [formControl]="formGroup.get('referenceTypeDependencyIds')">
|
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('referenceTypeDependencyIds').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="referenceTypeSourceIndex != null">
|
|
|
|
|
<div class="col-12" *ngIf="referenceTypeSourceIndex != null">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-TYPE' | translate}}</mat-label>
|
|
|
|
|
<mat-select name="type" [formControl]="formGroup.get('type')" required>
|
|
|
|
@ -64,7 +64,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('paginationPath').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.CONTENT-TYPE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="contentType" [formControl]="formGroup.get('contentType')">
|
|
|
|
@ -72,7 +72,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('contentType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.FIRST-PAGE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="firstPage" [formControl]="formGroup.get('firstPage')">
|
|
|
|
@ -80,7 +80,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('firstPage').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.HTTP-METHOD' | translate}}</mat-label>
|
|
|
|
|
<mat-select name="httpMethod" [formControl]="formGroup.get('httpMethod')">
|
|
|
|
@ -92,7 +92,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('httpMethod').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="formGroup.get('httpMethod').value == externalFetcherApiHTTPMethodType.POST">
|
|
|
|
|
<div class="col-3" *ngIf="formGroup.get('httpMethod').value == externalFetcherApiHTTPMethodType.POST">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="requestBody" [formControl]="formGroup.get('requestBody')">
|
|
|
|
@ -100,7 +100,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('requestBody').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.FILTER-TYPE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="filterType" [formControl]="formGroup.get('filterType')">
|
|
|
|
@ -110,7 +110,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Results info -->
|
|
|
|
|
<h3 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.RESULTS' | translate}}</h3>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.RESULTS-PATH' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="resultsArrayPath" [formControl]="formGroup.get('results').get('resultsArrayPath')">
|
|
|
|
@ -119,36 +119,31 @@
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- fields mapping -->
|
|
|
|
|
<h3 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.FIELD-MAPPINGS' | translate}}</h3>
|
|
|
|
|
<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">
|
|
|
|
|
<mat-card-header>
|
|
|
|
|
<div class="row mb-3 d-flex align-items-center">
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<h4 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.FIELD-MAPPING' | translate}} {{fieldMappingIndex + 1}}</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row d-flex align-items-center">
|
|
|
|
|
<div class="col-auto pb-3 d-flex">
|
|
|
|
|
<span>{{fieldMappingIndex + 1}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-header>
|
|
|
|
|
<mat-card-content>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" [readonly]="field.get('code').disabled" name="code" [formControl]="field.get('code')" [readOnly]="true">
|
|
|
|
|
<mat-error *ngIf="field.get('code').hasError('backendError')">{{field.get('code').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="field.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.RESPONSE-PATH' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="responsePath" [formControl]="field.get('responsePath')">
|
|
|
|
|
<mat-error *ngIf="field.get('responsePath').hasError('backendError')">{{field.get('responsePath').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="field.get('responsePath').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.CODE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" [readonly]="field.get('code').disabled" name="code" [formControl]="field.get('code')" [readOnly]="true">
|
|
|
|
|
<mat-error *ngIf="field.get('code').hasError('backendError')">{{field.get('code').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="field.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-content>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.RESPONSE-PATH' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="responsePath" [formControl]="field.get('responsePath')">
|
|
|
|
|
<mat-error *ngIf="field.get('responsePath').hasError('backendError')">{{field.get('responsePath').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="field.get('responsePath').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -158,7 +153,7 @@
|
|
|
|
|
</h3>
|
|
|
|
|
<div class="col-12" *ngIf="formGroup.get('auth').get('enabled').value == true">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.URL' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="authUrl" [formControl]="formGroup.get('auth').get('authUrl')">
|
|
|
|
@ -166,7 +161,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authUrl').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.HTTP-METHOD' | translate}}</mat-label>
|
|
|
|
|
<mat-select name="httpMethod" [formControl]="formGroup.get('auth').get('authMethod')">
|
|
|
|
@ -178,7 +173,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authMethod').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.TOKEN-PATH' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="authTokenPath" [formControl]="formGroup.get('auth').get('authTokenPath')">
|
|
|
|
@ -186,15 +181,7 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authTokenPath').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="authRequestBody" [formControl]="formGroup.get('auth').get('authRequestBody')">
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authRequestBody').hasError('backendError')">{{formGroup.get('auth').get('authRequestBody').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authRequestBody').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.TYPE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="type" [formControl]="formGroup.get('auth').get('type')">
|
|
|
|
@ -202,6 +189,14 @@
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.REQUEST-BODY' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="authRequestBody" [formControl]="formGroup.get('auth').get('authRequestBody')">
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authRequestBody').hasError('backendError')">{{formGroup.get('auth').get('authRequestBody').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="formGroup.get('auth').get('authRequestBody').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Queries info -->
|
|
|
|
@ -211,49 +206,96 @@
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div *ngFor="let query of formGroup.get('queries').controls; let queryIndex=index;" class="row mb-3">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-card-header>
|
|
|
|
|
<div class="row mb-3 d-flex align-items-center">
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<h4 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<button mat-icon-button class="action-list-icon" matTooltip="{{'REFERENCE-TYPE-EDITOR.ACTIONS.REMOVE-QUERY' | translate}}" (click)="removeQuery(queryIndex)" [disabled]="formGroup.disabled">
|
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-auto">
|
|
|
|
|
<button mat-button class="action-btn" type="button" (click)="addCase(queryIndex)" [disabled]="formGroup.disabled">{{'REFERENCE-TYPE-EDITOR.ACTIONS.ADD-CASE' | translate}}</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row mb-3 d-flex align-items-center">
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<h4 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.QUERY' | translate}} {{queryIndex + 1}}</h4>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-header>
|
|
|
|
|
<mat-card-content>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.NAME' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="name" [formControl]="query.get('name')" required>
|
|
|
|
|
<mat-error *ngIf="query.get('name').hasError('backendError')">{{query.get('name').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="query.get('name').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.DEFAULT-VALUE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="defaultValue" [formControl]="query.get('defaultValue')">
|
|
|
|
|
<mat-error *ngIf="query.get('defaultValue').hasError('backendError')">{{query.get('defaultValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="query.get('defaultValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<button mat-icon-button class="action-list-icon" matTooltip="{{'REFERENCE-TYPE-EDITOR.ACTIONS.REMOVE-QUERY' | translate}}" (click)="removeQuery(queryIndex)" [disabled]="formGroup.disabled">
|
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-content>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Query Cases -->
|
|
|
|
|
<div *ngFor="let case of query.get('cases').controls; let caseIndex=index;" class="row mb-3">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-card-header>
|
|
|
|
|
<div class="row mb-3 d-flex align-items-center">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.NAME' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="name" [formControl]="query.get('name')" required>
|
|
|
|
|
<mat-error *ngIf="query.get('name').hasError('backendError')">{{query.get('name').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="query.get('name').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.DEFAULT-VALUE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="defaultValue" [formControl]="query.get('defaultValue')">
|
|
|
|
|
<mat-error *ngIf="query.get('defaultValue').hasError('backendError')">{{query.get('defaultValue').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="query.get('defaultValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Query Cases -->
|
|
|
|
|
<h3 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.CASES' | translate}}
|
|
|
|
|
<button mat-button class="action-btn" type="button" (click)="addCase(queryIndex)" [disabled]="formGroup.disabled">{{'REFERENCE-TYPE-EDITOR.ACTIONS.ADD-CASE' | translate}}</button>
|
|
|
|
|
</h3>
|
|
|
|
|
<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">
|
|
|
|
|
<h4 class="col-12">{{'REFERENCE-TYPE-EDITOR.FIELDS.CASE' | translate}} {{caseIndex + 1}}</h4>
|
|
|
|
|
<span>{{caseIndex + 1}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.LIKE-PATTERN' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="likePattern" [formControl]="case.get('likePattern')">
|
|
|
|
|
<mat-error *ngIf="case.get('likePattern').hasError('backendError')">{{case.get('likePattern').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('likePattern').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.SEPARATOR' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="separator" [formControl]="case.get('separator')">
|
|
|
|
|
<mat-error *ngIf="case.get('separator').hasError('backendError')">{{case.get('separator').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('separator').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.VALUE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="value" [formControl]="case.get('value')">
|
|
|
|
|
<mat-error *ngIf="case.get('value').hasError('backendError')">{{case.get('value').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="formGroup.get('referenceTypeDependencyIds').value">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCY' | translate}}</mat-label>
|
|
|
|
|
<mat-select name="referenceTypeId" [formControl]="case.get('referenceTypeId')">
|
|
|
|
|
<mat-option *ngFor="let referenceType of referenceTypeDependenciesMap.get(referenceTypeSourceIndex)" [value]="referenceType.id">
|
|
|
|
|
{{referenceType.code}}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeId').hasError('backendError')">{{case.get('referenceTypeId').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeId').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="case.get('referenceTypeId').value">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-KEY' | translate}}</mat-label>
|
|
|
|
|
<mat-select name='referenceTypeSourceKey' [formControl]="case.get('referenceTypeSourceKey')">
|
|
|
|
|
<mat-option *ngFor="let sourceKey of sourceKeysMap.get(case.get('referenceTypeId').value)" [value]="sourceKey">
|
|
|
|
|
{{sourceKey}}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeSourceKey').hasError('backendError')">{{case.get('referenceTypeSourceKey').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeSourceKey').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-auto d-flex">
|
|
|
|
|
<button mat-icon-button class="action-list-icon" matTooltip="{{'REFERENCE-TYPE-EDITOR.ACTIONS.REMOVE-CASE' | translate}}" (click)="removeCase(queryIndex, caseIndex)" [disabled]="formGroup.disabled">
|
|
|
|
@ -261,61 +303,10 @@
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-header>
|
|
|
|
|
<mat-card-content>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.LIKE-PATTERN' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="likePattern" [formControl]="case.get('likePattern')">
|
|
|
|
|
<mat-error *ngIf="case.get('likePattern').hasError('backendError')">{{case.get('likePattern').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('likePattern').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.SEPARATOR' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="separator" [formControl]="case.get('separator')">
|
|
|
|
|
<mat-error *ngIf="case.get('separator').hasError('backendError')">{{case.get('separator').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('separator').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.VALUE' | translate}}</mat-label>
|
|
|
|
|
<input matInput type="text" name="value" [formControl]="case.get('value')">
|
|
|
|
|
<mat-error *ngIf="case.get('value').hasError('backendError')">{{case.get('value').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="formGroup.get('referenceTypeDependencyIds').value">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.DEPENDENCY' | translate}}</mat-label>
|
|
|
|
|
<mat-select name="referenceTypeId" [formControl]="case.get('referenceTypeId')">
|
|
|
|
|
<mat-option *ngFor="let referenceType of referenceTypeDependenciesMap.get(referenceTypeSourceIndex)" [value]="referenceType.id">
|
|
|
|
|
{{referenceType.code}}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeId').hasError('backendError')">{{case.get('referenceTypeId').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeId').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" *ngIf="case.get('referenceTypeId').value">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{'REFERENCE-TYPE-EDITOR.FIELDS.SOURCE-KEY' | translate}}</mat-label>
|
|
|
|
|
<mat-select name='referenceTypeSourceKey' [formControl]="case.get('referenceTypeSourceKey')">
|
|
|
|
|
<mat-option *ngFor="let sourceKey of sourceKeysMap.get(case.get('referenceTypeId').value)" [value]="sourceKey">
|
|
|
|
|
{{sourceKey}}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeSourceKey').hasError('backendError')">{{case.get('referenceTypeSourceKey').getError('backendError').message}}</mat-error>
|
|
|
|
|
<mat-error *ngIf="case.get('referenceTypeSourceKey').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-content>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|