Skip to content

Commit b3a9f8c

Browse files
scastillo-jpjosepato87
authored andcommitted
TT-39 fix: resolve comments
1 parent b1db7a8 commit b3a9f8c

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/app/modules/shared/components/month-picker/month-picker.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
</button>
1212
</div>
1313
</div>
14-
<div class="row">
14+
<div class="row content-months">
1515
<div class="spacing col-xl-1 col-lg-1 col-md-2 col-sm-2 col-xs-4" *ngFor="let month of months; let i = index">
1616
<button class="btn btn-light btn-block"
1717
[ngClass]="{'btn-primary': isSelectedMonth(i)}"
1818
(click)="selectMonth(i)">
1919
<small>{{ month.slice(0, 3) }}</small>
2020
</button>
2121
</div>
22-
</div>
22+
</div>

src/app/modules/shared/components/month-picker/month-picker.component.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
line-height: 1.2em;
66
font-weight: bold;
77
}
8+
.content-months {
9+
margin: 0;
10+
}
811

912
.month {
1013
background: $primary;
@@ -24,4 +27,4 @@
2427
}
2528
.spacing {
2629
padding: 0.1em;
27-
}
30+
}

src/app/modules/shared/components/month-picker/month-picker.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ describe('MonthPickerComponent', () => {
2525
});
2626

2727
it('should emit monthIndex and year', () => {
28-
const month = 2;
29-
const year = 2020;
28+
const month = new Date().getMonth();
29+
const year = new Date().getFullYear();
30+
3031
spyOn(component.dateSelected, 'emit');
3132
expect(component.dateSelected.emit({ monthIndex: month, year: year }));
3233
});

src/app/modules/time-entries/pages/time-entries.component.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { TimeEntriesComponent } from './time-entries.component';
1818
import { ActionsSubject } from '@ngrx/store';
1919
import { EntryActionTypes } from './../../time-clock/store/entry.actions';
2020
import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker';
21-
import { months } from 'moment';
2221

2322
describe('TimeEntriesComponent', () => {
2423
type Merged = TechnologyState & ProjectState & EntryState;

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
4646
ngOnInit(): void {
4747

4848
this.store.dispatch(new entryActions.LoadEntries(this.selectedMonthIndex, this.year));
49-
console.log('year', this.store.dispatch(new entryActions.LoadEntries(this.currentMonth, this.year)));
5049

5150
this.loadActiveEntry();
5251

@@ -86,7 +85,6 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
8685
this.canMarkEntryAsWIP = this.isEntryRunningEqualsToEntryToEdit(this.getEntryRunning(ds.data), this.entry)
8786
|| this.isTheEntryToEditTheLastOne(ds.data);
8887
});
89-
console.log('entryId', this.entryId);
9088
}
9189

9290
private isEntryRunningEqualsToEntryToEdit(entryRunning: Entry, entryToEdit: Entry) {

0 commit comments

Comments
 (0)