Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/612 action plan on keyresult detail #659

Merged
merged 7 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/checkIn.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe('OKR Check-in e2e tests', () => {
cy.contains('STRETCH');
});

it.only(`Should display confirm dialog when creating checkin on draft objective`, () => {
it(`Should display confirm dialog when creating checkin on draft objective`, () => {
cy.getByTestId('add-objective').first().click();
cy.fillOutObjective('draft objective title', 'safe-draft', '3');
cy.visit('/?quarter=3');
Expand Down
19 changes: 10 additions & 9 deletions frontend/src/app/keyresult-detail/keyresult-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@

<div *ngIf="keyResult.actionList?.length != 0" class="mt-3 mb-4">
<h2 class="sub-title-keyresult-detail fw-bold">Action Plan</h2>
<div *ngFor="let action of keyResult.actionList" class="ms-2">
<img
src="{{
action.isChecked ? '../assets/icons/checked_checkbox.svg' : '../assets/icons/empty_checkbox.svg'
}}"
alt="checkbox"
class="action-checkbox me-1"
/>
{{ action.action }}
<div *ngFor="let action of keyResult.actionList">
<div *ngIf="action.isChecked">
<div class="action-list-checked-item break-word ms-4">
<img src="../assets/icons/checkmark.svg" alt="checkbox" class="action-checkbox me-1" />
<span [ngStyle]="{ 'text-decoration': 'line-through' }"> {{ action.action }}</span>
</div>
</div>
<div *ngIf="!action.isChecked">
<div class="action-list-item break-word ms-4"><span class="me-2">-</span> {{ action.action }}</div>
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@
margin-bottom: 0.065rem !important;
}
}

.action-list-item {
text-indent: -1.1rem;
}

.action-list-checked-item {
text-indent: -1.3rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

<div class="me-3">
<p class="sub-title-objective fw-bold mb-1">Beschrieb</p>
<p data-test-id="description" class="linebreak">{{ objective.description }}</p>
<div class="linebreak" *ngIf="objective.description === ''"><p>-</p></div>
<div *ngIf="objective.description !== ''" data-test-id="description" class="linebreak">
<p>{{ objective.description }}</p>
</div>

<div
class="d-flex align-items-center flex-row justify-content-start mt-4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
<div *ngIf="getActions()?.length != 0" class="input-style gap-1">
<label class="text-black mb-1">Action Plan:</label>
<span *ngFor="let action of getActions(); let i = index" class="d-flex flex-row">
<mat-checkbox (change)="changeIsChecked($event, i)" [checked]="action.isChecked"></mat-checkbox>
<span class="action-list-item w-100">
<mat-checkbox #checkbox (change)="changeIsChecked($event, i)" [checked]="action.isChecked"></mat-checkbox>
<span
class="action-list-item w-100 break-word"
[ngStyle]="{ 'text-decoration': checkbox.checked ? 'line-through' : 'none' }"
>
{{ action.action }}
</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

.action-list-item {
background-color: $show-element;
height: 40px;
height: auto;
min-height: 40px;
padding: 10px;
margin: auto;
color: black;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/assets/icons/checked_checkbox.svg

This file was deleted.

10 changes: 10 additions & 0 deletions frontend/src/assets/icons/checkmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions frontend/src/assets/icons/close.svg

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/src/assets/icons/close_icon.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/src/assets/icons/empty_checkbox.svg

This file was deleted.

15 changes: 0 additions & 15 deletions frontend/src/assets/icons/objective-indicator.svg

This file was deleted.

5 changes: 0 additions & 5 deletions frontend/src/assets/images/progress_bar.svg

This file was deleted.

4 changes: 4 additions & 0 deletions frontend/src/style/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,7 @@ mat-form-field.quarter-filter .mat-mdc-text-field-wrapper {
.h-0 {
height: 0;
}

.break-word {
word-break: break-all;
}
Loading