Skip to content

Commit

Permalink
run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Jan 7, 2025
1 parent 6ffddd9 commit b8ef140
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .run/OkrApplication-Dev.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="OkrApplication-Dev" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="dev" />
<option name="ALTERNATIVE_JRE_PATH" value="$USER_HOME$/.sdkman/candidates/java/current" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-21" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<module name="backend" />
<option name="SPRING_BOOT_MAIN_CLASS" value="ch.puzzle.okr.OkrApplication" />
Expand Down
8 changes: 5 additions & 3 deletions frontend/cypress/e2e/objective-crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ describe('crud operations', () => {
.should('not.exist');
});

it(`should delete existing objective`, () => {
op.getObjectiveByState('ongoing').findByTestId('three-dot-menu').click();
op.selectFromThreeDotMenu('Objective löschen');
it('should delete existing objective', () => {
overviewPage.getObjectiveByState('ongoing')
.findByTestId('three-dot-menu')
.click();
overviewPage.selectFromThreeDotMenu('Objective löschen');
ConfirmDialog.do()
.checkTitle('Objective löschen')
.checkDescription('Möchtest du dieses Objective wirklich löschen? Zugehörige Key Results werden dadurch ebenfalls gelöscht!')
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/app/components/objective/ObjectiveMenuActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ export class ObjectiveMenuActions {

deleteObjectiveAction(objective: ObjectiveMin): ObjectiveMenuEntry {
const action: ObjectiveMenuAction = () => this.dialogService.openConfirmDialog('CONFIRMATION.DELETE.OBJECTIVE');
const afterAction: ObjectiveMenuAfterAction = (objective, dialogResult) =>
this.afterActions.deleteObjective(objective);
return { displayName: 'Objective löschen', action: action, afterAction: afterAction };
const afterAction: ObjectiveMenuAfterAction = (objective, dialogResult) => this.afterActions.deleteObjective(objective);
return { displayName: 'Objective löschen',
action: action,
afterAction: afterAction };
}

completeObjectiveAction(objective: ObjectiveMin): ObjectiveMenuEntry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ export class ObjectiveMenuAfterActions {
}

deleteObjective(objective: ObjectiveMin) {
this.objectiveService.deleteObjective(objective.id).subscribe(() => {
this.refreshDataService.markDataRefresh();
});
this.objectiveService.deleteObjective(objective.id)
.subscribe(() => {
this.refreshDataService.markDataRefresh();
});
}

objectiveBackToDraft(objectiveMin: ObjectiveMin) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/services/objective-menu-actions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export class ObjectiveMenuActionsService {
}

private getDefaultActions(objective: ObjectiveMin): ObjectiveMenuEntry[] {
return [this.actions.duplicateObjectiveAction(objective), this.actions.deleteObjectiveAction(objective)];
return [this.actions.duplicateObjectiveAction(objective),
this.actions.deleteObjectiveAction(objective)];
}

private getDraftMenuActions(objective: ObjectiveMin): ObjectiveMenuEntry[] {
Expand Down

0 comments on commit b8ef140

Please sign in to comment.