frontend code clean up

This commit is contained in:
amentis 2024-07-10 13:47:16 +03:00
parent ee00fb2c53
commit 2b2f4f28c4
16 changed files with 1 additions and 75 deletions

View File

@ -7,8 +7,6 @@ export enum ResponseErrorCode {
SystemError = 102,
MissingTenant = 103,
ModelValidation = 106,
// TenantCodeRequired = 108, not used
// TenantNameRequired = 109, not used
TenantNotAllowed = 112,
DescriptionTemplateNewVersionConflict = 113,
DescriptionTemplateIsNotFinalized = 114,

View File

@ -73,11 +73,9 @@
</mat-form-field>
</div>
<div class="col-12">
<!-- <div class="heading">1.4 {{'PLAN-EDITOR.FIELDS.LANGUAGE' | translate}}</div> -->
<div class="heading">1.4 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE'| translate}} *</div>
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE-HINT'| translate}}</div>
<mat-form-field class="full-width basic-info-input">
<!-- <input matInput formControlName="description" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.FIELDS.DESCRIPTION' | translate}}" required> -->
<mat-select [formControl]="formGroup.get('language')" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-LANGUAGE'| translate}}">
<mat-option *ngFor="let lang of availableLanguages" [value]="lang.code">
{{ lang.name }}
@ -293,7 +291,6 @@
<ng-template #actions>
<div>
<button mat-raised-button class="template_action_btn mr-3" (click)="cancel()">{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.CLOSE' | translate}}</button>
<!-- <button *ngIf="!formGroup.disabled && formGroup.get('status').value!=1" [disabled]="!formGroup.valid" mat-raised-button class="template_action_btn save-btn" type="button"> -->
<button [disabled]="!formGroup.valid" *ngIf="!formGroup.disabled && formGroup.get('status').value!=finalized" mat-raised-button class="template_action_btn save-btn" type="button">
<span class="d-flex flex-row row">
<span (click)="save(); formSubmit()" class="col">{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.SAVE' | translate}}</span>
@ -308,19 +305,6 @@
<button [disabled]="!formGroup.valid" mat-menu-item (click)="saveWithClose(false)" type="button">{{ 'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
</mat-menu>
<!-- <button *ngIf="formGroup.disabled || formGroup.get('status').value==1" [@finalize_btn] mat-raised-button class="template_action_btn save-btn" [disabled]="!formGroup.valid" (click)="updateAndFinalize()">
{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.UPDATE' |translate}}
<mat-icon (click)="$event.stopPropagation();" style="width: 14px;" [matMenuTriggerFor]="menuUpdate">expand_more</mat-icon>
</button> -->
<!-- <button *ngIf="formGroup.disabled || formGroup.get('status').value==1" [@finalize_btn] mat-raised-button class="template_action_btn save-btn" (click)="formSubmit()">
{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.UPDATE' | translate}}
<mat-icon (click)="$event.stopPropagation();" style="width: 14px;" [matMenuTriggerFor]="menuUpdate">expand_more</mat-icon>
</button> -->
<!-- <mat-menu #menuUpdate="matMenu">
<button [disabled]="!formGroup.valid" mat-menu-item (click)="updateAndFinalize(true)" type="button">{{ 'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.UPDATE-AND-CLOSE' | translate }}</button>
<button [disabled]="!formGroup.valid" mat-menu-item (click)="updateAndFinalize()" type="button">{{ 'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.UPDATE-AND-CONTINUE' | translate }}</button>
</mat-menu> -->
<button *ngIf="!formGroup.disabled && formGroup.get('status').value!= finalized && steps?.length-1 === stepper?.selectedIndex" [@finalize_btn] mat-button class="finalize-btn ml-3" [disabled]="!formGroup.valid" [class.invisible]="steps?.length-1 !== stepper?.selectedIndex" (click)="finalize()">
{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FINALIZE' | translate}}
</button>

View File

@ -27,9 +27,6 @@
<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>
</div>
</div>

View File

@ -58,15 +58,6 @@
</small>
</span>
</ng-container>
<!-- <ng-container *ngIf="isColumnSelected('contactTypeHint')">
<span class="col-12">
{{'LOCK-LISTING.FIELDS.CONTACT-TYPE' | translate}}:
<small>
{{enumUtils.toNotificationContactTypeString(item.contactTypeHint) | nullifyValue}}
</small>
</span>
<br>
</ng-container> -->
</div>
</div>

View File

@ -26,9 +26,6 @@
<app-plan-blueprint-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 />
<!-- <button mat-icon-button download-listing-report>
<mat-icon>download</mat-icon>
</button> -->
</app-hybrid-listing>
</div>
</div>

View File

@ -28,9 +28,6 @@
<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>
</div>
@ -80,15 +77,6 @@
</div>
</ng-template>
<!-- <ng-template #descriptionTemplateTypeStatus let-row="row" let-item>
<div class="row">
<div class="col-auto status-chip"
[ngClass]="{'status-chip-finalized': row.status === descriptionTemplateTypeStatuses.Finalized, 'status-chip-draft' : row.status === descriptionTemplateTypeStatuses.Draft}">
{{enumUtils.toDescriptionTemplateTypeStatusString(row.status) | nullifyValue}}
</div>
</div>
</ng-template> -->
<ng-template #actions let-row="row" let-item>
<div class="row" (click)="$event.stopPropagation()">
<div class="col-auto">

View File

@ -10,12 +10,10 @@
<span>
{{ 'MERGE-ACCOUNT.MESSAGES.CONFIRMATION' | translate }}
</span>
<!-- <span>Duo ea clita doming eu stet. Nonummy voluptua accusam sit eos aliquyam sit kasd lorem ut feugait no et soluta invidunt ea sanctus. Ut erat molestie sit sit diam dolores lorem nonumy quis consetetur. Elitr sed euismod illum sit consetetur esse at eum elitr sit dolores ut facer. Autem in aliquyam magna eos dolore eos amet ut magna sadipscing sea eum. Justo elitr aliquip praesent est exerci dolore commodo accusam dolor hendrerit rebum feugiat aliquyam sadipscing sed. Dolores dolore autem in et dolor at adipiscing ullamcorper invidunt vel. Et takimata ea amet et at sit kasd erat magna sed.</span> -->
</div>
</div>
<div class="row justify-content-center">
<div class="col-auto mt-4">
<!-- -->
<button type="button" class="normal-btn" (click)="onConfirm()">{{ 'MERGE-ACCOUNT.ACTIONS.CONFIRM' | translate }}</button>
</div>
</div>

View File

@ -11,12 +11,10 @@
<span>
{{ 'UNLINK-ACCOUNT.MESSAGES.CONFIRMATION' | translate }}
</span>
<!-- <span>Duo ea clita doming eu stet. Nonummy voluptua accusam sit eos aliquyam sit kasd lorem ut feugait no et soluta invidunt ea sanctus. Ut erat molestie sit sit diam dolores lorem nonumy quis consetetur. Elitr sed euismod illum sit consetetur esse at eum elitr sit dolores ut facer. Autem in aliquyam magna eos dolore eos amet ut magna sadipscing sea eum. Justo elitr aliquip praesent est exerci dolore commodo accusam dolor hendrerit rebum feugiat aliquyam sadipscing sed. Dolores dolore autem in et dolor at adipiscing ullamcorper invidunt vel. Et takimata ea amet et at sit kasd erat magna sed.</span> -->
</div>
</div>
<div class="row justify-content-center">
<div class="col-auto mt-4">
<!-- -->
<button type="button" class="normal-btn" (click)="onConfirm()">{{ 'UNLINK-ACCOUNT.ACTIONS.CONFIRM' | translate }}</button>
</div>
</div>

View File

@ -13,7 +13,6 @@
<mat-form-field appearance="outline" class="w-100 sort-form">
<mat-select placeholder="{{'GENERAL.CRITERIA.LIKE'| translate}}" [formControl]="formGroup.get('order')">
<mat-option *ngIf="!publicMode" [value]="order.UpdatedAt">{{enumUtils.toRecentActivityOrderString(order.UpdatedAt)}}</mat-option>
<!-- <mat-option *ngIf="publicMode" [value]="order.PUBLISHED">{{enumUtils.toRecentActivityOrderString(order.PUBLISHED)}}</mat-option> -->
<mat-option [value]="order.Label">{{enumUtils.toRecentActivityOrderString(order.Label)}}</mat-option>
<mat-option *ngIf="!publicMode" [value]="order.Status">{{enumUtils.toRecentActivityOrderString(order.Status)}}</mat-option>
</mat-select>

View File

@ -22,7 +22,6 @@ export class DescriptionBaseFieldsEditorComponent extends BaseComponent {
@Input() formGroup: UntypedFormGroup;
@Input() description: Description;
availableDescriptionTemplates: DescriptionTemplate[] = [];
viewOnly = false; //TODO: not used.
@Output() refresh: EventEmitter<any> = new EventEmitter<any>();

View File

@ -14,9 +14,6 @@
<button class="navbar-toggler ml-auto" type="button" [matMenuTriggerFor]="toggleMenu">
<img *ngIf="this.isAuthenticated();else loginoption" mat-card-avatar class="my-mat-card-avatar" [src]="getPrincipalAvatar() ?? getDefaultAvatar()" (error)="this.applyFallbackAvatar($event)">
</button>
<!-- <button class="navbar-toggler ml-auto" type="button" [matMenuTriggerFor]="toggleMenu" (mouseenter)="openMyMenu()">
<mat-icon class="toggle-icon">view_headline</mat-icon>
</button> -->
<div class="collapse navbar-collapse justify-content-end" id="navigation">
@ -25,7 +22,6 @@
</div>
<div class="col-md-auto pl-0" *ngIf="!(isAuthenticated() && onInvalidUrl())">
<a class="ml-4 mr-4 faq-title" (click)="openFaqDialog()"><b>{{ 'FAQ.TITLE' | translate }}</b></a>
<!-- <button mat-icon-button class="lang" [matMenuTriggerFor]="languageMenu"></button> -->
<button mat-button [matMenuTriggerFor]="languageMenu" class="p-0 lang">
<mat-icon class="mr-2">language</mat-icon><span class="text-uppercase">{{selectedLanguage}}</span>
<mat-icon>arrow_drop_down</mat-icon>
@ -52,13 +48,11 @@
</button>
</div>
<!-- <app-search></app-search> -->
<div class="col-auto pr-0">
<ul class="navbar-nav">
<!-- Login -->
<li class="nav-item" *ngIf="this.isAuthenticated();else loginoption">
<img mat-card-avatar class="my-mat-card-avatar" [src]="getPrincipalAvatar() ?? getDefaultAvatar()" (error)="this.applyFallbackAvatar($event)" (click)="openProfile()" [matTooltip]="userName">
<!--<img mat-card-avatar class="my-mat-card-avatar" *ngIf="!this.principalHasAvatar()" [src]="this.getDefaultAvatar()" (click)="openProfile()"> -->
</li>
<ng-template #loginoption>
<button mat-button [routerLink]=" ['/login'] ">
@ -72,7 +66,6 @@
<mat-menu #toggleMenu="matMenu">
<div *ngIf="!(isAuthenticated() && onInvalidUrl())">
<!-- <div *ngIf="!(isAuthenticated() && onInvalidUrl())" (mouseleave)="closeMyMenu()"> -->
<ul class="list m-2">
<ng-template #loginoption>
<li class="d-flex justify-content-center avatar">

View File

@ -146,14 +146,6 @@ export class NavbarComponent extends BaseComponent implements OnInit {
return this.currentRoute === '/language-editor' || this.currentRoute === '/profile';
}
openMyMenu() {
this.trigger.openMenu();
}
closeMyMenu() {
this.trigger.closeMenu();
}
sidebarOpen() {
const toggleButton = this.toggleButton;
const body = document.getElementsByTagName('body')[0];

View File

@ -32,11 +32,6 @@
</div>
<div class="col-auto d-flex align-items-center">
<!-- <ng-container *ngIf="formGroup.enabled && !lockStatus && canSave">
<button [disabled]="saving" *ngIf="!isFinalized" mat-raised-button (click)="formSubmit()" class="save-btn">
{{'PLAN-EDITOR.ACTIONS.SAVE' | translate}}
</button>
</ng-container> -->
<button [disabled]="saving" *ngIf="isNew" mat-raised-button type="button" (click)="formSubmit()" class="save-btn">
{{'PLAN-EDITOR.ACTIONS.SAVE' | translate}}
</button>

View File

@ -9,8 +9,7 @@
</div>
</div>
</div>
<!-- <app-login *ngIf="hasEmail" [mergeUsers]="true" redirect="false"></app-login> -->
<!-- <div *ngIf="!hasEmail"> -->
<div mat-dialog-content class="mb-3">
<div class="row mt-2 mb-4">
<div class="col-12">

View File

@ -24,7 +24,6 @@
<div *ngIf="!agreePrivacyPolicyNames" class="required-policy">{{'GENERAL.CONFIRMATION-DIALOG.ACTIONS.REQUIRED' | translate}}</div>
</div>
<div class="row" style="justify-content: space-between;">
<!-- <div class="col"></div> -->
<div class="col-auto"><button mat-raised-button type="button" class="cancel-btn" (click)="cancel()">{{ data.cancelButton }}</button></div>
<div *ngIf="data.isDeleteConfirmation" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" class="delete-btn">{{ data.confirmButton }}</button></div>
<div *ngIf="!data.isDeleteConfirmation && !data.privacyPolicyNames" class="col-auto"><button mat-raised-button type="button" (click)="confirm()" class="submit-btn">{{ data.confirmButton }}</button></div>

View File

@ -54,7 +54,6 @@ export class NotificationTemplateListingFiltersComponent extends BaseComponent i
const { isActive, kinds, channels, notificationTypes } = this.internalFilters ?? {}
this.filterChange.emit({
...this.filter,
// like,
isActive: isActive ? [IsActive.Active] : [IsActive.Inactive],
kinds,
channels,