mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 01:43:59 +00:00
Laravel Vapor - sync code for download files in bulk from S3
This commit is contained in:
@@ -92,26 +92,35 @@ export default {
|
||||
'INVOICE + PO + DO',
|
||||
'INVOICE + PO + DO + SDO'
|
||||
],
|
||||
selectedDocumentStatus: false
|
||||
selectedDocumentStatus: false,
|
||||
isValidationEnabled: true
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
startDate: {
|
||||
required
|
||||
required: function() {
|
||||
return this.isValidationEnabled ? required : null;
|
||||
}
|
||||
},
|
||||
endDate: {
|
||||
required
|
||||
required: function() {
|
||||
return this.isValidationEnabled ? required : null;
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required
|
||||
required: function() {
|
||||
return this.isValidationEnabled ? required : null;
|
||||
}
|
||||
},
|
||||
supplier: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitSearch(){
|
||||
if(!this.validate()){ return; }
|
||||
if(window.LARAVEL_VAPOR_ENABLED){
|
||||
this.isValidationEnabled = !this.isValidationEnabled;
|
||||
let type = this.parameters.type;
|
||||
let startDate = this.parameters.startDate;
|
||||
let endDate = this.parameters.endDate;
|
||||
@@ -120,7 +129,6 @@ export default {
|
||||
this.submit(this.route('documents.download')+'?type='+type+'&startDate='+startDate+'&endDate='+endDate+'&supplier='+supplier, 'get', this.section, false, false);
|
||||
}
|
||||
else{
|
||||
if(!this.validate()){ return; }
|
||||
window.open(route('documents.download')+'?type='+this.parameters.type+'&startDate='+this.parameters.startDate+'&endDate='+this.parameters.endDate+'&supplier='+this.parameters.supplier, '_blank');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user