Skip to content
Prev Previous commit
Next Next commit
Mergin master branch into TT-12 branch
  • Loading branch information
sbateca committed Apr 28, 2022
commit 5b78fccb1e63ad1da147d1a9a82e0c274dfa605e
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="row scroll-table mt-5 ml-0">
<app-search-user [users]="users" (selectedUserId)="user($event)"></app-search-user>
<app-search-user [users]="users" (selectedUserId)="user($event)"></app-search-user>

<table class="table table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions" *ngIf="(reportDataSource$ | async) as dataSource">
<thead class="thead-blue">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { getReportDataSource } from 'src/app/modules/time-clock/store/entry.sele
import { EntryState } from '../../../time-clock/store/entry.reducer';
import { TimeEntriesTableComponent } from './time-entries-table.component';
import { TotalHours } from '../../models/total-hours-report';
import { ActionsSubject } from '@ngrx/store';
import { UserActionTypes } from 'src/app/modules/users/store';

describe('Reports Page', () => {
describe('TimeEntriesTableComponent', () => {
Expand Down Expand Up @@ -155,18 +157,18 @@ describe('Reports Page', () => {
const column = 3;
expect(component.bodyExportOptions(durationTime, row, column, node)).toMatch(decimalValidator);
});

it('The data should not be displayed as a multiple of hour when column is different of 3', () => {
const column = 4;
expect(component.bodyExportOptions(durationTime, row, column, node)).toBe(durationTime.toString());
});

it('The link Ticket must not contain the ticket URL enclosed with < > when export a file csv, excel or PDF', () => {
const entry = '<a _ngcontent-vlm-c151="" class="is-url">https://TT-392-uri</a>';
const column = 0;
expect(component.bodyExportOptions(entry, row, column, node)).toBe('https://TT-392-uri');
});

it('when the rerenderDataTable method is called and dtElement and dtInstance are defined, the destroy and next methods are called ',
() => {
spyOn(component.dtTrigger, 'next');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { DataSource } from 'src/app/modules/shared/models/data-source.model';
import { EntryState } from '../../../time-clock/store/entry.reducer';
import { getReportDataSource } from '../../../time-clock/store/entry.selectors';
import { TotalHours } from '../../models/total-hours-report';
import { User } from 'src/app/modules/users/models/users';
import { LoadUsers, UserActionTypes } from 'src/app/modules/users/store/user.actions';
import { ParseDateTimeOffset } from '../../../shared/formatters/parse-date-time-offset/parse-date-time-offset';

@Component({
Expand Down Expand Up @@ -145,5 +147,10 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
this.resultSum.seconds = totalDurations.seconds();
return this.resultSum;
}

user(userId: string){
this.selectedUserId.emit(userId);
}

}

You are viewing a condensed version of this merge commit. You can view the full changes here.