Skip to content

Commit d61b09c

Browse files
committed
add helper format number to reports render
1 parent d4c67f8 commit d61b09c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: src/reports/reports.service.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,12 @@ export class ReportsService {
232232
}
233233
} : undefined,
234234
chrome: settings,
235-
helpers: `function toUpperCase(str) { return str ? str.toUpperCase() : ""; }
235+
helpers: `
236+
function toUpperCase(str) { return str ? str.toUpperCase() : ""; }
236237
function toLowerCase(str) { return str ? str.toLowerCase() : ""; }
237-
function join(arr, substr) { return Array.isArray(arr) ? arr.join(substr) : ""; }`
238+
function join(arr, substr) { return Array.isArray(arr) ? arr.join(substr) : ""; }
239+
function numberFormat(num, digits) { let dig = digits ? Number(digits) : 2; return Number(num).toLocaleString('ru-RU',{ minimumFractionDigits: dig, maximumFractionDigits: dig}) }
240+
`
238241
},
239242
data: await this.prepareData(report, ctx)
240243
}
@@ -259,9 +262,6 @@ export class ReportsService {
259262
default:
260263
contentType = 'application/blob'
261264
}
262-
console.log(dsStart)
263-
console.log(dsPrepared)
264-
console.log(dsRendered)
265265

266266
return {
267267
data: rendered,
@@ -311,8 +311,6 @@ export class ReportsService {
311311
}
312312
}
313313

314-
console.log(data)
315-
316314
return data
317315
}
318316

0 commit comments

Comments
 (0)