Skip to content

Commit

Permalink
Resolve conversations and implement changes from talking with paco
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelMoeri committed Nov 1, 2024
1 parent 4265931 commit e180ee0
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section class="d-flex flex-column gap-2 col-12">
<h4 for="actionlist" class="text-black">Action Plan (optional)</h4>
<label class="text-black" for="actionlist">Action Plan (optional)</label>
<div
cdkDropList
*ngIf="control?.getValue()"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="input-style gap-2 col-12">
<div class="d-flex flex-wrap gap-between">
<div class="d-flex flex-column gap-2" id="new-value">
<h4 class="text-black" for="value">Neuer Wert</h4>
<label class="text-black" for="value">Neuer Wert</label>
<form [formGroup]="dialogForm" class="d-flex align-items-center">
<input
class="value-field"
Expand All @@ -15,8 +15,8 @@ <h4 class="text-black" for="value">Neuer Wert</h4>
</div>

<div *ngIf="checkIn.value" class="d-flex flex-column gap-2" id="old-value" [attr.data-testId]="'old-checkin-value'">
<h4 class="text-black">Letzter Wert</h4>
<p class="value-field disabled-field d-flex justify-content-start text-black">
<label class="text-black" for="last-value">Letzter Wert</label>
<p class="value-field disabled-field d-flex justify-content-start text-black" id="last-value">
{{ checkIn.value }} {{ generateUnitLabel() }}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form [formGroup]="dialogForm">
<div class="input-style gap-2 col-12">
<h4 class="text-black">Erreichte Zone wählen:</h4>
<label class="text-black">Erreichte Zone wählen:</label>
<mat-radio-group formControlName="value" class="d-flex flex-column gap-2">
<mat-radio-button [attr.data-testId]="'fail-radio'" value="{{ Zone.FAIL }}" class="ordinal-zone">
<div class="radio-text-container d-flex align-items-center p-3 text-black">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ <h4 class="text-black mb-1">Action Plan:</h4>
</div>

<div class="input-style gap-2 col-12">
<h4 class="text-black">Kommentar/ Veränderung seit letztem Check-in (optional):</h4>
<label class="text-black" for="change-info">Kommentar/ Veränderung seit letztem Check-in (optional):</label>
<textarea
[attr.data-testId]="'changeInfo'"
[ngClass]="formInputCheck(dialogForm, 'changeInfo')"
class="big-dialog-form-field"
formControlName="changeInfo"
id="change-info"
></textarea>
<mat-error *ngIf="hasFormFieldErrors(dialogForm, 'changeInfo')">
<span>{{ getErrorMessage("MAX_VALUE", "Kommentar / Veränderung", 4096) }}</span>
Expand All @@ -52,26 +53,27 @@ <h4 class="text-black">Kommentar/ Veränderung seit letztem Check-in (optional):
></app-check-in-form-ordinal>

<div class="input-style gap-2 col-12">
<h4 class="text-black">Massnahmen (optional):</h4>
<label class="text-black" for="initiatives">Massnahmen (optional):</label>
<textarea
[attr.data-testId]="'initiatives'"
[ngClass]="formInputCheck(dialogForm, 'initiatives')"
class="w-100 big-dialog-form-field"
formControlName="initiatives"
id="initiatives"
></textarea>
<mat-error *ngIf="hasFormFieldErrors(dialogForm, 'initiatives')">
<span>{{ getErrorMessage("MAX_VALUE", "Massnahmen", 4096) }}</span>
</mat-error>
</div>

<div class="d-flex flex-column justify-content-start gap-2 col-12">
<h4 class="text-black confidence-label">
<label class="text-black confidence-label">
Confidence um Target Zone
<span *ngIf="keyResult.keyResultType === 'metric' && getKeyResultMetric() as kr">
({{ calculateTarget(kr) | unitValueTransformation: kr.unit }})
</span>
zu erreichen:
</h4>
</label>
<app-confidence [checkIn]="checkIn" [edit]="true" class="w-100"></app-confidence>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="d-flex justify-content-between align-items-center p-2 ps-0">
<form [formGroup]="keyResultForm" class="d-flex flex-column flex-wrap container p-0">
<div class="input-style gap-2 col-12">
<h4 class="text-black" for="title">Titel</h4>
<label class="text-black" for="title">Titel</label>
<textarea
[attr.data-testId]="'titleInput'"
class="big-dialog-form-field"
Expand All @@ -23,7 +23,7 @@ <h4 class="text-black" for="title">Titel</h4>
</div>

<div class="input-style gap-2 col-12">
<h4 class="text-black">Owner</h4>
<label class="text-black" for="owner">Owner</label>
<input
(keydown.enter)="$event.preventDefault()"
[ngClass]="invalidOwner() ? 'dialog-form-field-error' : 'dialog-form-field'"
Expand All @@ -44,7 +44,7 @@ <h4 class="text-black">Owner</h4>
</div>

<div class="input-style gap-2 col-12">
<h4 for="description" class="text-black">Beschreibung (optional)</h4>
<label class="text-black" for="description">Beschreibung (optional)</label>
<textarea
[attr.data-testId]="'descriptionInput'"
class="big-dialog-form-field"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h4 *ngIf="keyResult?.objective?.quarter as quarter">{{ quarter.label }}</h4>
<section class="scoring-section">
<app-scoring class="scoring-detail" [keyResult]="keyResult" [isDetail]="true"></app-scoring>
<span class="text-small d-flex align-items-center flex-column mb-2 ms-3 confidence-container">
Confidence
<h4>Confidence</h4>
<app-confidence
[checkIn]="keyResult.lastCheckIn!"
[edit]="false"
Expand All @@ -34,10 +34,10 @@ <h4 *ngIf="keyResult?.objective?.quarter as quarter">{{ quarter.label }}</h4>
<section class="d-flex gap-4 flex-row mt-2">
<ng-container *ngIf="keyResult.keyResultType == 'metric' && castToMetric(keyResult) as keyResultMetric">
<div class="d-flex justify-content-start w-100 metric-label-div">
<h5 class="keyResult-detail-attribute-show rounded-5 p-2 d-flex justify-content-center metric-col">
<p class="keyResult-detail-attribute-show rounded-5 p-2 d-flex justify-content-center metric-col">
Baseline: {{ keyResultMetric.baseline | unitValueTransformation: keyResultMetric.unit.toString() }}
</h5>
<h5
</p>
<p
*ngIf="keyResultMetric.lastCheckIn as lastCheckIn"
class="keyResult-detail-attribute-show rounded-5 p-2 metric-col d-flex justify-content-center gap-1"
[ngClass]="{
Expand All @@ -49,30 +49,30 @@ <h5 class="keyResult-detail-attribute-show rounded-5 p-2 d-flex justify-content-
<span>
{{ +lastCheckIn.value | unitValueTransformation: keyResultMetric.unit.toString() }}
</span>
</h5>
<h5 class="keyResult-detail-attribute-show rounded-5 p-2 metric-col d-flex justify-content-center">
</p>
<p class="keyResult-detail-attribute-show rounded-5 p-2 metric-col d-flex justify-content-center">
Stretch Goal:
{{ keyResultMetric.stretchGoal | unitValueTransformation: keyResultMetric.unit.toString() }}
</h5>
</p>
</div>
</ng-container>

<ng-container *ngIf="keyResult.keyResultType == 'ordinal' && castToOrdinal(keyResult) as keyResultOrdinal">
<div class="d-flex justify-content-between w-100 ordinal-div mb-4">
<div class="ordinal-col h-auto">
<h5 class="ordinal-zone-title">Commit</h5>
<h4 class="ordinal-zone-title">Commit</h4>
<p class="keyResult-detail-attribute-show ordinal-box p-3">
{{ keyResultOrdinal.commitZone }}
</p>
</div>
<div class="ordinal-col h-auto">
<h5 class="ordinal-zone-title">Target</h5>
<h4 class="ordinal-zone-title">Target</h4>
<p class="keyResult-detail-attribute-show ordinal-box p-3">
{{ keyResultOrdinal.targetZone }}
</p>
</div>
<div class="ordinal-col h-auto">
<h5 class="ordinal-zone-title">Stretch</h5>
<h4 class="ordinal-zone-title">Stretch</h4>
<p class="keyResult-detail-attribute-show ordinal-box p-3">
{{ keyResultOrdinal.stretchZone }}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="d-flex flex-row">
<div class="flex-fill input-alignments">
<div class="input-style gap-2">
<h4 class="text-black" for="unit">Einheit</h4>
<label class="text-black" for="unit">Einheit</label>
<select
class="unit-dropdown bg-white menu-option"
[ngClass]="formInputCheck(keyResultForm, 'unit')"
Expand All @@ -52,7 +52,7 @@ <h4 class="text-black" for="unit">Einheit</h4>
</div>

<div class="input-style gap-2">
<h4 class="text-black" for="baseline">Baseline</h4>
<label class="text-black" for="baseline">Baseline</label>
<input
[attr.data-testId]="'baseline'"
class="metric-fields"
Expand All @@ -66,7 +66,7 @@ <h4 class="text-black" for="baseline">Baseline</h4>
</div>

<div class="input-style gap-2">
<h4 class="text-black" for="stretchGoal">Stretch Goal</h4>
<label class="text-black" for="stretchGoal">Stretch Goal</label>
<input
[attr.data-testId]="'stretchGoal'"
class="metric-fields"
Expand All @@ -90,7 +90,7 @@ <h4 class="text-black" for="stretchGoal">Stretch Goal</h4>
<div class="d-flex flex-row">
<div class="flex-fill input-alignments">
<div class="input-style gap-2">
<h4 class="text-black" for="commitZone">Commit Zone</h4>
<label class="text-black" for="commitZone">Commit Zone</label>
<textarea
class="ordinal-input-fields"
[ngClass]="formInputCheck(keyResultForm, 'commitZone')"
Expand All @@ -104,7 +104,7 @@ <h4 class="text-black" for="commitZone">Commit Zone</h4>
</div>

<div class="input-style gap-2">
<h4 class="text-black" for="targetZone">Target Zone</h4>
<label class="text-black" for="targetZone">Target Zone</label>
<textarea
[attr.data-testId]="'targetZone'"
class="ordinal-input-fields"
Expand All @@ -118,7 +118,7 @@ <h4 class="text-black" for="targetZone">Target Zone</h4>
</div>

<div class="input-style gap-2">
<h4 class="text-black" for="stretchZone">Stretch Goal</h4>
<label class="text-black" for="stretchZone">Stretch Goal</label>
<textarea
[attr.data-testId]="'stretchZone'"
class="ordinal-input-fields"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
class="key-result rounded-2 p-3 w-100 focus-outline"
tabindex="0"
>
<h4 class="keyresult-title linebreak mb-2">{{ keyResult.title }}</h4>
<h3 class="keyresult-title linebreak mb-2">{{ keyResult.title }}</h3>
<app-scoring [keyResult]="keyResult" [isDetail]="false" [attr.data-testId]="'scoring-component'"></app-scoring>
<div class="d-flex justify-content-between mt-1">
<div class="d-flex justify-content-center align-items-center flex-wrap keyResult-overview-attribute">
<h5 class="me-1 text-nowrap me-2">Letztes Check-in</h5>
<h4 class="me-1 text-nowrap me-2">Letztes Check-in</h4>
<span class="keyResult-attribute-show" *ngIf="keyResult.lastCheckIn != null">{{
keyResult!.lastCheckIn!.createdOn | date: DATE_FORMAT
}}</span>
<span class="keyResult-attribute-show" *ngIf="keyResult.lastCheckIn == null">Keines</span>
</div>

<div class="d-flex align-items-center flex-wrap justify-content-end keyResult-overview-attribute">
<h5>Confidence</h5>
<h4>Confidence</h4>
<app-confidence
[edit]="false"
[isDetail]="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { ScoringComponent } from '../../shared/custom/scoring/scoring.component';
import { ConfidenceComponent } from '../confidence/confidence.component';
import { ReactiveFormsModule } from '@angular/forms';
// @ts-ignore
import * as de from '../../../assets/i18n/de.json';
import { TranslateTestingModule } from 'ngx-translate-testing';
import { ObjectiveMin } from '../../shared/types/model/ObjectiveMin';
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/app/shared/custom/scoring/scoring.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div class="scoring-container d-flex flex-row">
<div class="flex-fill">
<span class="okr-score-label">
<h5 class="text-center text-small">Fail</h5>
<h4 class="text-center text-small">Fail</h4>
</span>
<span class="okr-score-label okr-score-commit">
<h5 class="text-center text-small">Commit</h5>
<h4 class="text-center text-small">Commit</h4>
</span>
<span class="okr-score-label">
<h5 class="text-center text-small">Target</h5>
<h4 class="text-center text-small">Target</h4>
</span>
<div
[ngStyle]="{ display: stretched ? 'none' : 'flex' }"
Expand Down Expand Up @@ -40,7 +40,7 @@ <h5 class="text-center text-small">Target</h5>
</div>

<div class="okr-stretch d-flex flex-column align-items-center mb-1">
<h5 class="text-center text-small">Stretch</h5>
<h4 class="text-center text-small">Stretch</h4>
<img
[src]="'assets/icons/star-' + iconPath + '-icon.svg'"
[attr.data-testId]="'stretch'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4 class="fs-6 text-black">Objective</h4>

<form [formGroup]="completeForm">
<div class="input-style gap-2 col-12">
<h4 class="text-black">Bewertung</h4>
<label class="text-black">Bewertung</label>
<div class="d-flex gap-3">
<button
class="successful w-50 valuation-card card-hover-successful"
Expand Down Expand Up @@ -43,7 +43,7 @@ <h4 class="text-black">Bewertung</h4>
</div>

<div class="input-style gap-2 col-12">
<h4 for="comment" class="text-black">Kommentar (optional)</h4>
<label class="text-black" for="comment">Kommentar (optional)</label>
<textarea
class="big-dialog-form-field"
formControlName="comment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="d-flex justify-content-between align-items-center pt-2 ps-0">
<form [formGroup]="objectiveForm" class="d-flex flex-column flex-wrap container p-0">
<div class="input-style gap-2 col-12">
<h4 class="text-black" for="title">Titel</h4>
<label class="text-black" for="title">Titel</label>
<textarea
[attr.data-testId]="'title'"
class="big-dialog-form-field"
Expand All @@ -37,7 +37,7 @@ <h4 class="text-black" for="title">Titel</h4>
</mat-error>
</div>
<div class="input-style gap-2 col-12">
<h4 class="text-black" for="title">Beschreibung (optional)</h4>
<label class="text-black" for="title">Beschreibung (optional)</label>
<textarea
[attr.data-testId]="'description'"
formControlName="description"
Expand All @@ -51,7 +51,7 @@ <h4 class="text-black" for="title">Beschreibung (optional)</h4>

<div class="d-flex row mb-1">
<div class="d-flex flex-column gap-2 col-6">
<h4 class="text-black" for="quarter">Quartal</h4>
<label class="text-black" for="quarter">Quartal</label>
<select
class="custom-select bg-white w-100"
formControlName="quarter"
Expand Down

0 comments on commit e180ee0

Please sign in to comment.