Skip to content

Commit 87bdfb1

Browse files
fix: TTA-147 fixing column format 'time in' in the reports page
1 parent e08c025 commit 87bdfb1

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/app/modules/reports/components/time-entries-table/time-entries-table.component.spec.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,6 @@ describe('Reports Page', () => {
155155
});
156156
});
157157

158-
it('The data should be displayed as a multiple of hour when column is equal to 4', () => {
159-
const column = 4;
160-
expect(component.bodyExportOptions(durationTime, row, column, node)).toMatch(decimalValidator);
161-
});
162-
163-
it('The data should not be displayed as a multiple of hour when column is different of 4', () => {
164-
const column = 5;
165-
expect(component.bodyExportOptions(durationTime, row, column, node)).toBe(durationTime.toString());
166-
});
167-
168158
it('The link Ticket must not contain the ticket URL enclosed with < > when export a file csv, excel or PDF', () => {
169159
const entry = '<a _ngcontent-vlm-c151="" class="is-url">https://TT-392-uri</a>';
170160
const column = 0;
@@ -247,7 +237,7 @@ describe('Reports Page', () => {
247237
'19',
248238
249239
'07/01/2022',
250-
'9.00',
240+
'09:00',
251241
'09:00',
252242
'18:00',
253243
'Project_Name',

src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
144144
}
145145

146146
bodyExportOptions(data, row, column, node) {
147-
const dataFormated = data.toString().replace(/<((.|\n){0,200}?)>/gi, '');
148-
const durationColumnIndex = 4;
149-
return column === durationColumnIndex ? moment.duration(dataFormated).asHours().toFixed(2) : dataFormated;
147+
return data.toString().replace(/<((.|\n){0,200}?)>/gi, '') || '';
150148
}
151149

152150

0 commit comments

Comments
 (0)