diff --git a/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.html b/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.html index 5b3b46c13..af6e663e7 100644 --- a/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.html +++ b/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.html @@ -146,21 +146,29 @@ canAssign: canAssign$ | async, canClaim: canClaim$ | async, canHaveAssignee: canHaveAssignee$ | async, - document: document$ | async + document: document$ | async, + caseStatus: caseStatus$ | async } as obs" > -
- +
+ @if (obs.caseStatus) { + {{ obs.caseStatus.title }} + } + +
+ +
+
-
- {{ caseStatus.title }} -
diff --git a/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.scss b/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.scss index ea86e913a..22d9cfd76 100644 --- a/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.scss +++ b/projects/valtimo/dossier/src/lib/components/dossier-detail/dossier-detail.component.scss @@ -65,9 +65,11 @@ width: 100%; justify-content: space-between; align-items: flex-end; + padding-bottom: 4px; &.--compact { - align-items: center; + padding-bottom: 0; + align-items: flex-start; } ::ng-deep .version-selection { @@ -79,11 +81,17 @@ } } -.dossier-assign-user { - padding-bottom: 4px; - margin-left: -16px; +.dossier-status-assign { + display: flex; + gap: 16px; + align-items: flex-end; + + .cds--tag { + margin: 0; + height: var(--cds-layout-size-height-md); + } &.--compact { - margin-left: 0; + align-items: center; } } diff --git a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.html b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.html index 9a19ac8c4..771e358b8 100644 --- a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.html +++ b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.html @@ -24,44 +24,53 @@ @if (obs.formDefinition) { -
- - - {{ 'Download' | translate }} - +
+ @if (obs.formDefinition.readOnly) { + {{ 'formManagement.readOnly' | translate }} + } - - {{ 'Upload' | translate }} - +
+ + + {{ 'Download' | translate }} + - - {{ 'interface.delete' | translate }} - + + {{ 'Upload' | translate }} + - - {{ 'formManagement.duplicate' | translate }} - - + + {{ 'interface.delete' | translate }} + - + + +
diff --git a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.scss b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.scss index 787d46752..80faa63e6 100644 --- a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.scss +++ b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.scss @@ -20,6 +20,25 @@ align-items: center; justify-content: flex-end; gap: 16px; + margin-left: auto; + } + + &__header-container { + width: 100%; + display: flex; + justify-content: space-between; + align-items: flex-end; + padding-bottom: 4px; + + .cds--tag { + margin: 0; + height: var(--cds-layout-size-height-md); + } + + &.--compact { + align-items: flex-start; + padding-bottom: 0; + } } &__output .cds--tab-content { diff --git a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts index c0225ebf8..fc7650ce2 100644 --- a/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts +++ b/projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts @@ -29,7 +29,6 @@ import { BehaviorSubject, distinctUntilChanged, filter, - first, Subscription, switchMap, take, @@ -60,6 +59,9 @@ export class FormManagementEditComponent public activeTab = EDIT_TABS.BUILDER; private readonly _formDefinition$ = new BehaviorSubject(null); + private get _formDefinition(): FormDefinition { + return this._formDefinition$.getValue(); + } public readonly formDefinition$ = this._formDefinition$.pipe( filter((definition: FormDefinition | null) => !!definition), distinctUntilChanged( @@ -117,7 +119,7 @@ export class FormManagementEditComponent } this._changeActive = true; this.modifiedFormDefinition = event.form; - this._formDefinition$.next(event.form); + this._formDefinition$.next({...this._formDefinition, formDefinition: event.form}); this.jsonFormDefinition$.next({...definition, value: JSON.stringify(event.form)}); this._changeActive = false; } diff --git a/projects/valtimo/form-management/src/lib/form-management.module.ts b/projects/valtimo/form-management/src/lib/form-management.module.ts index 42a9ba365..be566d224 100644 --- a/projects/valtimo/form-management/src/lib/form-management.module.ts +++ b/projects/valtimo/form-management/src/lib/form-management.module.ts @@ -18,23 +18,22 @@ import {NgModule} from '@angular/core'; import {FormManagementComponent} from './form-management.component'; import {FormManagementRoutingModule} from './form-management-routing.module'; import { + ButtonModule, + CarbonListModule, + ConfirmationModalModule, DropzoneModule, + EditorModule, FormIoModule, - ListModule, - ModalModule as vcModalModule, - ValtimoCdsModalDirectiveModule, - WidgetModule, - ButtonModule, FormModule, InputModule as vInputModule, - VModalModule, - TitleModule, - CarbonListModule, - PageTitleModule, + ListModule, + ModalModule as vcModalModule, RenderInPageHeaderDirectiveModule, - EditorModule, SpinnerModule, - ConfirmationModalModule, + TitleModule, + ValtimoCdsModalDirectiveModule, + VModalModule, + WidgetModule, } from '@valtimo/components'; import {CommonModule} from '@angular/common'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; @@ -52,6 +51,7 @@ import { ModalModule, PlaceholderModule, TabsModule, + TagModule, } from 'carbon-components-angular'; @NgModule({ @@ -94,6 +94,7 @@ import { SpinnerModule, IconModule, ConfirmationModalModule, + TagModule, ], exports: [FormManagementComponent], })