frontend code clean up

This commit is contained in:
amentis 2024-07-11 12:22:42 +03:00
parent 80d34ccbf4
commit c2343defab
21 changed files with 3 additions and 88 deletions

View File

@ -9,12 +9,6 @@
<mat-error *ngIf="form.get('data').get('options').hasError('backendError')">{{form.get('data').get('options').getError('backendError').message}}</mat-error> <mat-error *ngIf="form.get('data').get('options').hasError('backendError')">{{form.get('data').get('options').getError('backendError').message}}</mat-error>
</div> </div>
<!-- <mat-form-field class="col-12">
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-PLACEHOLDER' | translate}}</mat-label>
<input matInput type="string"
[formControl]="form.get('data').get('label')">
</mat-form-field> -->
<div class="col-12"> <div class="col-12">
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row"> <div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row">
<mat-form-field class="col"> <mat-form-field class="col">

View File

@ -1,4 +1,3 @@
<!--[formGroup]="form"-->
<form class="row" *ngIf="form.get('data')"> <form class="row" *ngIf="form.get('data')">
<h5 style="font-weight: bold" class="col-12">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-UPLOAD-TITLE' | translate}}</h5> <h5 style="font-weight: bold" class="col-12">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-UPLOAD-TITLE' | translate}}</h5>

View File

@ -15,9 +15,6 @@
{{'GENERAL.VALIDATION.URL.LABEL' | translate}} {{'GENERAL.VALIDATION.URL.LABEL' | translate}}
</mat-slide-toggle> </mat-slide-toggle>
</li> </li>
<!-- <li class="list-inline-item" *ngIf="!viewOnly && fieldType && canApplyVisibility">
<mat-icon style="cursor: pointer;" (click)="addNewRule()" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.ADD-VISIBILITY-RULE' | translate">visibility</mat-icon>
</li> -->
<li class="text-muted" *ngIf="!viewOnly && fieldType && canBeDeleted"> <li class="text-muted" *ngIf="!viewOnly && fieldType && canBeDeleted">
<mat-icon style="cursor: pointer; opacity: 0.7; transform:translateY(2px) translateX(10px) ;" (click)="onDelete()" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.DELETE-INPUT' | translate">delete</mat-icon> <mat-icon style="cursor: pointer; opacity: 0.7; transform:translateY(2px) translateX(10px) ;" (click)="onDelete()" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.DELETE-INPUT' | translate">delete</mat-icon>
</li> </li>
@ -117,8 +114,6 @@
</mat-select> </mat-select>
<mat-error *ngIf="this.form.get('data').get('fieldType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="this.form.get('data').get('fieldType').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<mat-error *ngIf="form.get('data').get('fieldType').hasError('backendError')">{{form.get('data').get('fieldType').getError('backendError').message}}</mat-error> <mat-error *ngIf="form.get('data').get('fieldType').hasError('backendError')">{{form.get('data').get('fieldType').getError('backendError').message}}</mat-error>
<!-- <mat-error>{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
<!-- <mat-error *ngIf="this.form.hasError('inputTypeNotValid')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> -->
</mat-form-field> </mat-form-field>
</div> </div>
@ -162,9 +157,6 @@
<h4 class="col-12" style="font-weight: bold">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.RULES-TITLE' | translate}} <h4 class="col-12" style="font-weight: bold">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.RULES-TITLE' | translate}}
</h4> </h4>
<app-description-template-editor-visibility-rule-component class="col-12" [form]="form.get('visibilityRules')" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath" [fieldTypeForCheck]="form.get('data').get('fieldType').value" [formArrayOptionsForCheck]="this.form.get('data')?.get('options')" [viewOnly]="viewOnly"></app-description-template-editor-visibility-rule-component> <app-description-template-editor-visibility-rule-component class="col-12" [form]="form.get('visibilityRules')" [validationErrorModel]="validationErrorModel" [validationRootPath]="validationRootPath" [fieldTypeForCheck]="form.get('data').get('fieldType').value" [formArrayOptionsForCheck]="this.form.get('data')?.get('options')" [viewOnly]="viewOnly"></app-description-template-editor-visibility-rule-component>
<!-- <div class="col-12" *ngIf="!viewOnly">
<button mat-button class="full-width" (click)="addNewRule()" [disabled]="!form.get('data').get('fieldType').value">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.ACTIONS.ADD-RULE' | translate}}</button>
</div> -->
</ng-container> </ng-container>
</div> </div>
<div class="row" [ngSwitch]="form.get('data')?.get('fieldType')?.value"> <div class="row" [ngSwitch]="form.get('data')?.get('fieldType')?.value">

View File

@ -56,7 +56,6 @@
[ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}"> [ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}">
<mat-card-content> <mat-card-content>
<!-- <mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly"> -->
<mat-card-header *ngIf="!viewOnly"> <mat-card-header *ngIf="!viewOnly">
<mat-icon *ngIf="reorderingMode" class="handle dragpan enabled-dragpan">drag_indicator</mat-icon> <mat-icon *ngIf="reorderingMode" class="handle dragpan enabled-dragpan">drag_indicator</mat-icon>
<button mat-icon-button class="ml-auto mr-auto" *ngIf="!reorderingMode && (fieldset.get('id').value === selectedFieldSetId)" (click)="enableReordering()"> <button mat-icon-button class="ml-auto mr-auto" *ngIf="!reorderingMode && (fieldset.get('id').value === selectedFieldSetId)" (click)="enableReordering()">

View File

@ -49,7 +49,6 @@
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="heading">1.2 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION'| translate}} *</div> <div class="heading">1.2 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION'| translate}} *</div>
<!-- <div class="hint">{{'PLAN-EDITOR.MAIN-INFO.HINT' | translate}}</div> -->
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-HINT'| translate}}</div> <div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
<div class="full-width basic-info-input"> <div class="full-width basic-info-input">
<rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-PLACEHOLDER'" [wrapperClasses]="(formGroup.get('description').touched && formGroup.get('description').hasError('required')) ? 'required' : ''" [editable]="formGroup.controls['description'].status !== 'DISABLED'"> <rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-PLACEHOLDER'" [wrapperClasses]="(formGroup.get('description').touched && formGroup.get('description').hasError('required')) ? 'required' : ''" [editable]="formGroup.controls['description'].status !== 'DISABLED'">
@ -118,9 +117,6 @@
<div class="col-12"> <div class="col-12">
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-12 col-lg-4 d-flex justify-content-end" style="overflow: hidden;"> <div class="col-12 col-lg-4 d-flex justify-content-end" style="overflow: hidden;">
<!-- <mat-form-field>
<input matInput #email placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS'| translate}}" (focus)="onUserFieldFocus()" (blur)="onUserFieldBlur()" (keyup.enter)="addUser(email)">
</mat-form-field> -->
<mat-form-field class="full-width basic-info-input" *ngIf="!formGroup.disabled"> <mat-form-field class="full-width basic-info-input" *ngIf="!formGroup.disabled">
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS' | translate}}</mat-label> <mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS' | translate}}</mat-label>
<app-single-auto-complete [required]="false" [formControl]="userFormControl" (optionSelected)="addUser($event)" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS' | translate}}" [configuration]="userService.singleAutocompleteConfiguration"> <app-single-auto-complete [required]="false" [formControl]="userFormControl" (optionSelected)="addUser($event)" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS' | translate}}" [configuration]="userService.singleAutocompleteConfiguration">
@ -128,27 +124,10 @@
<mat-error *ngIf="formGroup.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="formGroup.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <div class="col-auto">
<button mat-mini-fab color="primary" (click)="addUser(email)" (focus)="onUserButtonFocus()" (blur)="onUserButtonBlur()" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-VALIDATE-AND-ADD-USER'| translate" [disabled]="userFormDisabled">
<ng-container *ngIf="inputUserState === 'untriggered' else triggericon">
<mat-icon>add</mat-icon>
</ng-container>
<ng-template #triggericon>
<mat-icon>person_add</mat-icon>
</ng-template>
</button>
</div> -->
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="col-12">
<button mat-button class="full-width" (click)="addPage()"
[disabled]="viewOnly">{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.NEXT' | translate}}</button>
</div> -->
</div> </div>
</mat-step> </mat-step>
<mat-step [label]="fromStepperLabel" [completed]="formGroup.valid"> <mat-step [label]="fromStepperLabel" [completed]="formGroup.valid">

View File

@ -148,7 +148,6 @@
<!-- BUILD TYPE OF SAME LEVEL AS LINK OF LINKS --> <!-- BUILD TYPE OF SAME LEVEL AS LINK OF LINKS -->
<!-- Only for the page --> <!-- Only for the page -->
<!-- style="margin-left: -0.5em;" -->
<div *ngIf="parentLink?.subEntriesType == tocEntryType.Page && !viewOnly"> <div *ngIf="parentLink?.subEntriesType == tocEntryType.Page && !viewOnly">
<button mat-button class="mt-2" (click)="createNewEntry({childType:parentLink.subEntriesType,parent:parentLink})" style="padding-left:0px"> <button mat-button class="mt-2" (click)="createNewEntry({childType:parentLink.subEntriesType,parent:parentLink})" style="padding-left:0px">
<!-- <mat-icon>add</mat-icon> --> <!-- <mat-icon>add</mat-icon> -->

View File

@ -26,9 +26,7 @@
<app-description-template-listing-filters hybrid-listing-filters [(filter)]="lookup" (filterChange)="filterChanged($event)" /> <app-description-template-listing-filters hybrid-listing-filters [(filter)]="lookup" (filterChange)="filterChanged($event)" />
<app-user-settings-picker [key]="userSettingsKey" [userPreference]="lookup" (onSettingSelected)="changeSetting($event)" [autoSelectUserSettings]="autoSelectUserSettings" user-preference-settings /> <app-user-settings-picker [key]="userSettingsKey" [userPreference]="lookup" (onSettingSelected)="changeSetting($event)" [autoSelectUserSettings]="autoSelectUserSettings" user-preference-settings />
<!-- <button mat-icon-button download-listing-report>
<mat-icon>download</mat-icon>
</button> -->
</app-hybrid-listing> </app-hybrid-listing>
</div> </div>
</div> </div>

View File

@ -62,10 +62,6 @@
<ng-template #roleCellTemplate let-row="row" let-item> <ng-template #roleCellTemplate let-row="row" let-item>
<div class="row"> <div class="row">
<app-user-role-editor-component style="width: 100%;" [item]="row" [hasTenantAdminMode]="hasTenantAdminMode"></app-user-role-editor-component> <app-user-role-editor-component style="width: 100%;" [item]="row" [hasTenantAdminMode]="hasTenantAdminMode"></app-user-role-editor-component>
<!-- <div class="col-auto status-chip"
[ngClass]="{'status-chip-finalized': row.status === userStatuses.Finalized, 'status-chip-draft' : row.status === userStatuses.Draft}">
{{enumUtils.toUserStatusString(row.status) | nullifyValue}}
</div> -->
</div> </div>
</ng-template> </ng-template>

View File

@ -30,10 +30,6 @@
<mat-form-field appearance="outline" class="w-100"> <mat-form-field appearance="outline" class="w-100">
<mat-label>{{'ANNOTATION-DIALOG.THREADS.NEW-THREAD' | translate}}</mat-label> <mat-label>{{'ANNOTATION-DIALOG.THREADS.NEW-THREAD' | translate}}</mat-label>
<textarea matInput name="text" rows="2" formControlName="text" required></textarea> <textarea matInput name="text" rows="2" formControlName="text" required></textarea>
<!--<input matInput formControlName="text" required>
<mat-icon matSuffix class="material-symbols-outlined">
add_reaction
</mat-icon> -->
<mat-error *ngIf="threadFormGroup.get('text').hasError('backendError')">{{threadFormGroup.get('text').getError('backendError')?.message}}</mat-error> <mat-error *ngIf="threadFormGroup.get('text').hasError('backendError')">{{threadFormGroup.get('text').getError('backendError')?.message}}</mat-error>
<mat-error *ngIf="threadFormGroup.get('text').hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="threadFormGroup.get('text').hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
@ -120,20 +116,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <mat-divider [vertical]="true"></mat-divider>
<div class="col-auto mt-2 mr-1">
<div class="row flex-column align-items-center pr-1 pl-1">
<div *ngFor="let status of listingStatuses" class="col-12">
<button mat-icon-button color="primary" type="submit"
[matTooltip]="status?.label"
[ngClass]="{'selected': status?.id == getAnnotationStatusFormControl(annotationStatusFormGroup.get('annotationsStatusArray'), getParentAnnotation(thread).id).get('statusId')?.value}"
(click)="setAnnotationStatus(annotationStatusFormGroup?.get('annotationsStatusArray'), getParentAnnotation(thread).id, status?.id); persistAnnotationStatus(annotationStatusFormGroup.get('annotationsStatusArray'), getParentAnnotation(thread).id)"
>
<mat-icon>{{getStatusIcon(status)}}</mat-icon>
</button>
</div>
</div>
</div> -->
</div> </div>
<!-- Previous Replies --> <!-- Previous Replies -->
@ -175,9 +157,6 @@
<mat-form-field appearance="outline" class="w-100"> <mat-form-field appearance="outline" class="w-100">
<mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label> <mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label>
<input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required> <input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required>
<!-- <mat-icon matSuffix class="material-symbols-outlined">
add_reaction
</mat-icon> -->
</mat-form-field> </mat-form-field>
</div> </div>
<div class="col-auto p-0 send-msg"> <div class="col-auto p-0 send-msg">

View File

@ -150,7 +150,6 @@
.plan-card, .plan-card,
.description-card { .description-card {
min-width: 712px; min-width: 712px;
/* min-height: 308px; */
background: #ffffff 0% 0% no-repeat padding-box; background: #ffffff 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 6px #0000001a; box-shadow: 0px 3px 6px #0000001a;
border-radius: 4px; border-radius: 4px;

View File

@ -26,8 +26,6 @@ input[type="text"] {
.icon-align { .icon-align {
display: inline-flex; display: inline-flex;
vertical-align: middle; vertical-align: middle;
/* line-height: .9em; */
/* padding-bottom: 0.4rem; */
} }
.description-card-actions, .description-card-actions,

View File

@ -109,7 +109,6 @@ p {
.plan-card, .plan-card,
.description-card { .description-card {
min-width: 712px; min-width: 712px;
/* min-height: 308px; */
background: #ffffff 0% 0% no-repeat padding-box; background: #ffffff 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 6px #0000001a; box-shadow: 0px 3px 6px #0000001a;
border-radius: 4px; border-radius: 4px;

View File

@ -5,12 +5,12 @@
<div class="col-12 pl-2 mb-3"> <div class="col-12 pl-2 mb-3">
<app-navigation-breadcrumb /> <app-navigation-breadcrumb />
</div> </div>
<!-- <div class="col-12 mb-4 pl-1"> <div class="col-12 mb-4 pl-1">
<a (click)="goBack()" role="button"> <a (click)="goBack()" role="button">
<mat-icon class="back-icon pointer">chevron_left</mat-icon> <mat-icon class="back-icon pointer">chevron_left</mat-icon>
<span class="label-txt pointer">{{'PLAN-OVERVIEW.ACTIONS.BACK' | translate}}</span> <span class="label-txt pointer">{{'PLAN-OVERVIEW.ACTIONS.BACK' | translate}}</span>
</a> </a>
</div> --> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-8 pl-2"> <div class="col-12 col-lg-8 pl-2">

View File

@ -270,7 +270,6 @@ select {
} }
textarea{ textarea{
// height: auto !important;
resize: none; resize: none;
line-height: $bmd-line-height !important; line-height: $bmd-line-height !important;
} }
@ -376,13 +375,10 @@ form .ng-valid{
&.mat-focused .mat-form-field-label, &.mat-focused .mat-form-field-label,
.mat-focused .mat-form-field-label, .mat-focused .mat-form-field-label,
.mat-form-field-label{ .mat-form-field-label{
// color: #4caf50;
} }
.mat-input-underline{ .mat-input-underline{
// background-color: #4caf50;
height: 2px; height: 2px;
.mat-input-ripple{ .mat-input-ripple{
// background-color: #4caf50;
} }
} }

View File

@ -75,7 +75,6 @@
display: block; display: block;
height: 1px; height: 1px;
margin-left: 15px; margin-left: 15px;
// background-color: #e5e5e5;
} }
&:last-child { &:last-child {
@ -412,7 +411,6 @@
box-shadow: none; box-shadow: none;
.sidebar-wrapper{ .sidebar-wrapper{
// padding-bottom: 60px;
top: 80px; top: 80px;
} }
@ -822,9 +820,6 @@
display: none; display: none;
} }
} }
// .navbar {
// width: calc(100% - 260px);
// }
} }
.nav-mobile-menu, .nav-mobile-menu,

View File

@ -49,7 +49,6 @@
overflow: auto; overflow: auto;
width: 260px; width: 260px;
z-index: 4; z-index: 4;
// padding-bottom: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
top: 80px; top: 80px;
@ -123,7 +122,6 @@
} }
.nav { .nav {
//margin-top: 20px;
display: block; display: block;
.caret { .caret {

View File

@ -10,7 +10,6 @@
} }
.tooltip, .tooltip.in { .tooltip, .tooltip.in {
//opacity: 1;
} }
.tooltip.in{ .tooltip.in{
opacity: 1; opacity: 1;

View File

@ -27,7 +27,6 @@ $enable-flex: true; // fully adopt flexbox layouts
$enable-shadows: true; // enable shadows, set to false to turn off shadows $enable-shadows: true; // enable shadows, set to false to turn off shadows
@import "variables/layout";
@import "variables/menu"; @import "variables/menu";
@import "variables/drawer"; @import "variables/drawer";
@import "variables/snackbar"; @import "variables/snackbar";

View File

@ -1 +0,0 @@
// Layout variables - evidently nothing to see here...remove now?

View File

@ -77,5 +77,4 @@
</div> </div>
</mat-menu> </mat-menu>
<!-- <app-expandable-search-field [(value)]=internalFilters.like (valueChange)="onSearchTermChange($event)" /> -->
</div> </div>

View File

@ -109,5 +109,4 @@
</div> </div>
</mat-menu> </mat-menu>
<!-- <app-expandable-search-field [(value)]=internalFilters.like (valueChange)="onSearchTermChange($event)" /> -->
</div> </div>