editor-screens spacing changes

This commit is contained in:
Sofia Papacharalampous 2024-04-16 18:03:59 +03:00
parent 6bb091868c
commit 1421dcf009
4 changed files with 430 additions and 371 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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">

View File

@ -31,7 +31,7 @@
<mat-card-content>
<div class="row mt-4">
<div class="col-12">
<div class="container">
<div class="container-fluid">
<div class="row flex-wrap">
<div class="col-md-12">
<mat-form-field class="w-100">
@ -89,7 +89,7 @@
<!-- Subject -->
<div class="row">
<div class="col-12">
<div class="container">
<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">
@ -114,7 +114,7 @@
</div>
<div class="row">
<div class="col-12">
<div class="container">
<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>
@ -136,7 +136,7 @@
<!-- Body -->
<div class="row">
<div class="col-12">
<div class="container">
<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">
@ -177,7 +177,7 @@
</div>
<div class="row">
<div class="col-12">
<div class="container">
<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>
@ -198,7 +198,7 @@
<!--Extra Options -->
<div class="row">
<div class="col-12">
<div class="container">
<div class="container-fluid">
<div class="row">
<h3 class="col-md-12">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.FIELDS.EXTRA-OPTIONS' | translate}}</h3>
<div>