$this->file = $file;
$this->data = [
'status' => $status,
- 'data' => array_merge(['file' => $file], $data)
+ 'data' => array_merge(['file_id' => $file->id], $data)
];
}
return ['data' => $batch->id];
}
+ public function file(Request $request, PdfFile $file)
+ {
+ return response()->json($file);
+ }
$this->middleware('guest');
}
+
+ /**
+ * @return string
+ */
+ public function redirectTo()
+ {
+ return route('home', ['register' => 'success']);
+ }
+
+
/**
* Get a validator for an incoming registration request.
*
->notify(new \App\Notifications\ContactRequest($contactRequest));
\Session::flash('message', "Votre demande a bien été prise en compte, nous reviendrons vers vous dans les plus brefs délais. Merci de l'intérêt que vous portez à Prescription Santé - Le Quotidien !");
- return redirect()->route('home');
+ return redirect()->route('home', ['contact' => 'success']);
}
},
methods: {
processStatusUpdate: function processStatusUpdate(e) {
+ var _this = this;
+
e = e.data;
if (e.status === 'done') {
this.progressMode = 'determinate';
- this.$root.publishState.file = e.data.file;
this.links = e.data.links;
- this.status = 'done';
- this.$emit('can-continue', {
- value: true
+ axios.get('/publish/file/' + e.data.file_id).then(function (data) {
+ _this.$root.publishState.file = data.data;
+ _this.status = 'done';
+
+ _this.$emit('can-continue', {
+ value: true
+ });
});
}
},
}
},
mounted: function mounted() {
- var _this = this;
+ var _this2 = this;
axios.get('/publish/collections').then(function (d) {
- _this.collections = d.data.data;
- _this.file_ref = _this.getNextRef(1);
+ _this2.collections = d.data.data;
+ _this2.file_ref = _this2.getNextRef(1);
});
axios.get('/publish/tags').then(function (d) {
var tags = d.data.data;
options: tags,
plugins: ['remove_button'],
onChange: function onChange(v) {
- return _this.tags = v;
+ return _this2.tags = v;
}
});
});
},
methods: {
processStatusUpdate: function processStatusUpdate(e) {
+ var _this = this;
+
e = e.data;
if (e.status === 'done') {
this.progressMode = 'determinate';
- this.$root.publishState.file = e.data.file;
this.links = e.data.links;
- this.status = 'done';
- this.$emit('can-continue', {
- value: true
+ axios.get('/publish/file/' + e.data.file_id).then(function (data) {
+ _this.$root.publishState.file = data.data;
+ _this.status = 'done';
+
+ _this.$emit('can-continue', {
+ value: true
+ });
});
}
},
}
},
mounted: function mounted() {
- var _this = this;
+ var _this2 = this;
axios.get('/publish/collections').then(function (d) {
- _this.collections = d.data.data;
- _this.file_ref = _this.getNextRef(1);
+ _this2.collections = d.data.data;
+ _this2.file_ref = _this2.getNextRef(1);
});
axios.get('/publish/tags').then(function (d) {
var tags = d.data.data;
options: tags,
plugins: ['remove_button'],
onChange: function onChange(v) {
- return _this.tags = v;
+ return _this2.tags = v;
}
});
});
if(e.status === 'done'){
this.progressMode = 'determinate';
- this.$root.publishState.file = e.data.file;
this.links = e.data.links;
- this.status = 'done';
- this.$emit('can-continue', {value: true});
+ axios.get('/publish/file/'+e.data.file_id).then(data => {
+
+ this.$root.publishState.file = data.data;
+ this.status = 'done';
+ this.$emit('can-continue', {value: true});
+ })
+
}
Route::prefix('publish')->group(function() {
Route::get('', 'PublishController@letter')->name('publish.letter');
Route::post('', 'PublishController@publish');
-
+ Route::get('file/{file}', 'PublishController@file');
Route::post('upload-file', 'PublishController@uploadFile');
Route::post('preview', 'PublishController@previewEmail');
Route::get('collections', 'PublishController@collections');