Skip to content

Commit 5ab32aa

Browse files
author
Edgar Guaman
committed
code-smell: TT-337 Fixing code smells
1 parent 5e4a39d commit 5ab32aa

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/app/modules/activities-management/components/activity-list/activity-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ export class ActivityListComponent implements OnInit {
6969

7070
updateActivity(activityId: string): void {
7171
this.store.dispatch(new SetActivityToEdit(activityId));
72-
this.changeValueShowActivityForm.emit(this.showActivityForm = true);
72+
this.showActivityForm = true;
73+
this.changeValueShowActivityForm.emit(this.showActivityForm);
7374
}
7475

7576
unarchiveActivity(): void {

src/app/modules/activities-management/components/create-activity/create-activity.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<h4>Activities</h4>
2-
<hr/>
31
<div>
4-
52
<form [formGroup]="activityForm" (ngSubmit)="onSubmit(activityForm.value)">
63
<div class="form-group">
74
<label>Name:</label>

src/app/modules/activities-management/components/create-activity/create-activity.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FormBuilder, Validators, FormGroup } from '@angular/forms';
2-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2+
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
33
import { Store, select } from '@ngrx/store';
44
import { Activity } from '../../../shared/models';
55
import { ActivityState } from './../../store/activity-management.reducers';

src/app/modules/activities-management/pages/activities-management.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class ActivitiesManagementComponent {
1818

1919
activateActivityForm() {
2020
this.store.dispatch(new SetActivityToEdit(null));
21-
this.showActivityForm === false ? this.showActivityForm = true : this.showActivityForm = false;
21+
!this.showActivityForm ? this.showActivityForm = true : this.showActivityForm = false;
2222
}
2323

2424
closeFormActivity(event) {

0 commit comments

Comments
 (0)