From e737d134ad76d247570ed06e7bd21c4d4225c318 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Wed, 8 May 2024 13:37:47 +0300 Subject: [PATCH 1/2] RED-9097: fixed workflow file attributes not updating. --- src/lib/listing/workflow/workflow.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/listing/workflow/workflow.component.ts b/src/lib/listing/workflow/workflow.component.ts index c3f1d5e..43345de 100644 --- a/src/lib/listing/workflow/workflow.component.ts +++ b/src/lib/listing/workflow/workflow.component.ts @@ -236,7 +236,11 @@ export class WorkflowComponent extends Co private _shouldUpdate(entity: T): boolean { const existingEntity = this.all[entity.id]?.entity; - return existingEntity && this.config.itemVersionFn(entity) !== this.config.itemVersionFn(existingEntity); + return ( + existingEntity && + (this.config.itemVersionFn(entity) !== this.config.itemVersionFn(existingEntity) || + JSON.stringify(entity) !== JSON.stringify(existingEntity)) + ); } private _shouldAdd(entity: T): boolean { From 6f288516e3efa36ec9f1f9eb02d0374c988d3432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Thu, 16 May 2024 23:31:52 +0300 Subject: [PATCH 2/2] Minor UI fixes, base dialog improvements --- src/assets/styles/common-base-screen.scss | 8 ++------ src/assets/styles/common-components.scss | 1 + src/lib/dialog/base-dialog.component.ts | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/assets/styles/common-base-screen.scss b/src/assets/styles/common-base-screen.scss index a90ebbc..764101c 100644 --- a/src/assets/styles/common-base-screen.scss +++ b/src/assets/styles/common-base-screen.scss @@ -56,15 +56,11 @@ .dev-mode { background-color: var(--iqser-primary); color: var(--iqser-white); - font-size: 22px; - line-height: 16px; - text-align: center; position: fixed; - top: 0; - z-index: 100; right: 0; height: var(--iqser-top-bar-height); - word-break: break-all; + writing-mode: vertical-rl; + text-orientation: upright; display: flex; justify-content: center; align-items: center; diff --git a/src/assets/styles/common-components.scss b/src/assets/styles/common-components.scss index b3907a6..0fb5ea4 100644 --- a/src/assets/styles/common-components.scss +++ b/src/assets/styles/common-components.scss @@ -18,6 +18,7 @@ &.large { height: 32px; width: 32px; + min-width: 32px; font-size: var(--iqser-font-size); } diff --git a/src/lib/dialog/base-dialog.component.ts b/src/lib/dialog/base-dialog.component.ts index 5fd2b88..4a43972 100644 --- a/src/lib/dialog/base-dialog.component.ts +++ b/src/lib/dialog/base-dialog.component.ts @@ -15,21 +15,21 @@ const TEXT_INPUT = 'text'; export interface SaveOptions { closeAfterSave?: boolean; - addMembers?: boolean; + nextAction?: boolean; } @Directive() export abstract class BaseDialogComponent implements AfterViewInit, OnDestroy { - readonly #confirmationDialogService = inject(ConfirmationDialogService); - readonly #dialog = inject(MatDialog); - readonly #hasErrors = signal(true); + readonly iconButtonTypes = IconButtonTypes; + form?: UntypedFormGroup; + initialFormValue!: Record; + protected readonly _hasErrors = signal(true); protected readonly _formBuilder = inject(UntypedFormBuilder); protected readonly _loadingService = inject(LoadingService); protected readonly _toaster = inject(Toaster); protected readonly _subscriptions = new Subscription(); - readonly iconButtonTypes = IconButtonTypes; - form?: UntypedFormGroup; - initialFormValue!: Record; + readonly #confirmationDialogService = inject(ConfirmationDialogService); + readonly #dialog = inject(MatDialog); protected constructor( protected readonly _dialogRef: MatDialogRef, @@ -45,17 +45,18 @@ export abstract class BaseDialogComponent implements AfterViewInit, OnDestroy { } get disabled(): boolean { - return !this.valid || !this.changed || this.#hasErrors(); + return !this.valid || !this.changed || this._hasErrors(); } ngAfterViewInit() { this._subscriptions.add(this._dialogRef.backdropClick().subscribe(() => this.close())); const valueChanges = this.form?.valueChanges ?? of(null); const events = [fromEvent(window, 'keyup'), fromEvent(window, 'input'), valueChanges]; + this._hasErrors.set(!!document.getElementsByClassName('ng-invalid')[0]); const events$ = merge(...events).pipe( debounceTime(10), tap(() => { - this.#hasErrors.set(!!document.getElementsByClassName('ng-invalid')[0]); + this._hasErrors.set(!!document.getElementsByClassName('ng-invalid')[0]); }), ); this._subscriptions.add(events$.subscribe());