Merge pull request #18 from SDSRV-IDP/fix/fe-bugs
Fix download filename
This commit is contained in:
commit
b11b08476e
@ -133,7 +133,7 @@ const columns: TableColumnsType<DataType> = [
|
||||
key: 'snImeiAAR',
|
||||
width: '130px',
|
||||
render: (_, record) => {
|
||||
const isAbnormal = record.snImeiAAR * 100 < 98;
|
||||
const isAbnormal = record.snImeiAAR * 100 < 95;
|
||||
return (
|
||||
<span style={{ color: isAbnormal ? 'red' : '' }}>
|
||||
{(record.snImeiAAR * 100)?.toFixed(2)}
|
||||
|
@ -94,8 +94,10 @@ export async function downloadReport(report_id: string) {
|
||||
let filename = "report.xlsx";
|
||||
try {
|
||||
let basename = response.headers['content-disposition'].split('filename=')[1].split('.')[0];
|
||||
let extension = response.headers['content-disposition'].split('.')[1].split(';')[0];
|
||||
filename = `${basename}.${extension}`
|
||||
if (basename[0] == '_') {
|
||||
basename = basename.substring(1);
|
||||
}
|
||||
filename = `${basename}.xlsx`
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
@ -123,8 +125,10 @@ export async function downloadDashboardReport(duration='30d', subsidiary='ALL')
|
||||
let filename = "report.xlsx";
|
||||
try {
|
||||
let basename = response.headers['content-disposition'].split('filename=')[1].split('.')[0];
|
||||
let extension = response.headers['content-disposition'].split('.')[1].split(';')[0];
|
||||
filename = `${basename}.${extension}`
|
||||
if (basename[0] == '_') {
|
||||
basename = basename.substring(1);
|
||||
}
|
||||
filename = `${basename}.xlsx`
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user