Merge branch 'dillon/34.1-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-04-29 14:30:32 +08:00
4 changed files with 25 additions and 13 deletions
@@ -75,7 +75,18 @@ class BulkDownloadCustomerInvoicesLogic
}
$zip->close();
return response()->download($zip_file);
$filePathForS3 = 'bulk_whiteform/'.$zipFileName;
Storage::disk('s3')->put($filePathForS3, file_get_contents($zip_file));
Log::info('BulkDownloadCustomerInvoicesLogic finished processing files count: '.count($invoicebookings));
$temporaryUrl = Storage::disk('s3')->temporaryUrl(
$filePathForS3,
Carbon::now()->addMinutes(10)
);
return response(['src' => $temporaryUrl ]);
} else {
return response()->json([
'status' => 'Error',
@@ -75,7 +75,7 @@ class BulkDownloadSupplierWhiteFormsLogic
$temporaryUrl = Storage::disk('s3')->temporaryUrl(
$filePathForS3,
Carbon::now()->addMinutes(60)
Carbon::now()->addMinutes(10)
);
return response(['src' => $temporaryUrl ]);
@@ -94,9 +94,8 @@ export default {
this.returnData = null;
if(window.LARAVEL_VAPOR_ENABLED){
console.log('window.LARAVEL_VAPOR_ENABLED');
let src = response.src;
if (src) {
window.location.href = src;
if (response.src) {
window.location.href = response.src;
}
}
}
@@ -88,15 +88,17 @@
},
successHandler(response) {
this.isLoading = false;
if(window.LARAVEL_VAPOR_ENABLED){
let src = response.payload.src;
window.location.href = src;
console.log('debug response: ' + JSON.stringify(response));
if (response.message) {
this.returnData = response;
}
else{
if (response.message) {
this.returnData = response;
} else {
this.returnData = null;
else {
this.returnData = null;
if(window.LARAVEL_VAPOR_ENABLED){
console.log('window.LARAVEL_VAPOR_ENABLED');
if (response.src) {
window.location.href = response.src;
}
}
}
},