Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
TT-39 fix: resolve comments
  • Loading branch information
scastillo-jp authored and Guido Quezada committed Dec 28, 2020
commit 5582e153ea546fe3e14c70e8a88870c3dc69987c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</button>
</div>
</div>
<div class="row">
<div class="row content-months">
<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">
<button class="btn btn-light btn-block"
[ngClass]="{'btn-primary': isSelectedMonth(i)}"
(click)="selectMonth(i)">
<small>{{ month.slice(0, 3) }}</small>
</button>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
line-height: 1.2em;
font-weight: bold;
}
.content-months {
margin: 0;
}

.month {
background: $primary;
Expand All @@ -24,4 +27,4 @@
}
.spacing {
padding: 0.1em;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ describe('MonthPickerComponent', () => {
});

it('should emit monthIndex and year', () => {
const month = 2;
const year = 2020;
const month = new Date().getMonth();
const year = new Date().getFullYear();

spyOn(component.dateSelected, 'emit');
expect(component.dateSelected.emit({ monthIndex: month, year: year }));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { TimeEntriesComponent } from './time-entries.component';
import { ActionsSubject } from '@ngrx/store';
import { EntryActionTypes } from './../../time-clock/store/entry.actions';
import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker';
import { months } from 'moment';

describe('TimeEntriesComponent', () => {
type Merged = TechnologyState & ProjectState & EntryState;
Expand Down
2 changes: 0 additions & 2 deletions src/app/modules/time-entries/pages/time-entries.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
ngOnInit(): void {

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

this.loadActiveEntry();

Expand Down Expand Up @@ -86,7 +85,6 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
this.canMarkEntryAsWIP = this.isEntryRunningEqualsToEntryToEdit(this.getEntryRunning(ds.data), this.entry)
|| this.isTheEntryToEditTheLastOne(ds.data);
});
console.log('entryId', this.entryId);
}

private isEntryRunningEqualsToEntryToEdit(entryRunning: Entry, entryToEdit: Entry) {
Expand Down