feat: Upload failde Second Modal done.
This commit is contained in:
@@ -167,11 +167,11 @@ export async function leaveConformance(next, addConformanceCreateCheckId, toPath
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Upload failde
|
||||
* Upload failde First
|
||||
* @param { string } failureType
|
||||
* @param { string } failureMsg
|
||||
*/
|
||||
export async function uploadFailed(failureType, failureMsg) {
|
||||
export async function uploadFailedFirst(failureType, failureMsg) {
|
||||
// msg: 'not in UTF-8' | 'insufficient columns' | 'the csv file is empty' | 'the filename does not ends with .csv'
|
||||
// type: 'encoding' | 'insufficient_columns' | 'empty' | 'name_suffix'
|
||||
let value = '';
|
||||
@@ -205,6 +205,34 @@ export async function uploadFailed(failureType, failureMsg) {
|
||||
customClass: customClass
|
||||
})
|
||||
};
|
||||
/**
|
||||
* Upload failde Second
|
||||
* @param { string } failureType
|
||||
* @param { string } failureMsg
|
||||
*/
|
||||
export async function uploadFailedSecond(failureType, failureMsg) {
|
||||
let value = '';
|
||||
switch (failureType) {
|
||||
case 'malformed':
|
||||
value = failureMsg;
|
||||
break;
|
||||
case 'missing':
|
||||
value = failureMsg;
|
||||
break;
|
||||
default:
|
||||
value = failureMsg;
|
||||
break;
|
||||
}
|
||||
await Swal.fire({
|
||||
title: 'UPLOAD FAILED',
|
||||
html: value,
|
||||
timer: 5000, // 停留5秒後自動關閉
|
||||
showConfirmButton: false,
|
||||
icon: 'error',
|
||||
iconColor: '#FF3366',
|
||||
customClass: customClass
|
||||
})
|
||||
};
|
||||
/**
|
||||
* Upload Success
|
||||
* @param { string } value
|
||||
|
||||
Reference in New Issue
Block a user