Skip to content

Commit 82eefd1

Browse files
committed
Return screen without consolidation
1 parent d5809af commit 82eefd1

3 files changed

Lines changed: 1 addition & 31 deletions

File tree

‎ProcessMaker/Http/Resources/Screen.php‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,4 @@
66

77
class Screen extends ApiResource
88
{
9-
/**
10-
* Transform the resource into an array.
11-
*
12-
* @param \Illuminate\Http\Request
13-
* @return array
14-
*/
15-
public function toArray($request)
16-
{
17-
$screen = parent::toArray($request);
18-
$consolidator = new ScreenConsolidator($this);
19-
return array_merge($screen, $consolidator->call());
20-
}
219
}

‎resources/js/processes/screen-builder/screen.vue‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ export default {
326326
custom_css: '',
327327
watchers: [],
328328
},
329-
rendererKey: 0,
330329
self: this,
331330
watchers_config: {
332331
api: {
@@ -386,11 +385,6 @@ export default {
386385
this.previewData = {};
387386
}
388387
},
389-
mode() {
390-
if (this.mode === 'preview') {
391-
this.getPreviewValues();
392-
}
393-
},
394388
customCSS(newCustomCSS) {
395389
this.preview.custom_css = newCustomCSS;
396390
}
@@ -463,16 +457,6 @@ export default {
463457
});
464458
}
465459
},
466-
getPreviewValues() {
467-
ProcessMaker.apiClient.post("/screens/preview", {
468-
config: this.config,
469-
computed: this.computed,
470-
custom_css: this.customCSS,
471-
watchers: this.watchers,
472-
}).then(response => {
473-
this.preview = response.data;
474-
});
475-
},
476460
changeMode(mode) {
477461
if (mode === "editor") {
478462
this.$refs.menuScreen.changeItem("button_design", {
@@ -493,9 +477,8 @@ export default {
493477
this.$refs.menuScreen.sectionRight = false;
494478
}
495479
this.mode = mode;
480+
this.previewData = this.previewInputValid ? JSON.parse(this.previewInput) : {};
496481
if (mode == 'preview') {
497-
this.previewData = this.previewInputValid ? JSON.parse(this.previewInput) : {};
498-
499482
this.rendererKey++;
500483
this.preview.config = cloneDeep(this.config);
501484
this.preview.computed = cloneDeep(this.computed);

‎routes/api.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
Route::delete('screens/{screen}', 'ScreenController@destroy')->name('screens.destroy')->middleware('can:delete-screens');
5757
Route::post('screens/{screen}/export', 'ScreenController@export')->name('screens.export')->middleware('can:export-screens');
5858
Route::post('screens/import', 'ScreenController@import')->name('screens.import')->middleware('can:import-screens');
59-
Route::post('screens/preview', 'ScreenController@preview')->name('screens.preview')->middleware('can:edit-screens');
6059

6160
// Screen Categories
6261
Route::get('screen_categories', 'ScreenCategoryController@index')->name('screen_categories.index')->middleware('can:view-screen-categories');

0 commit comments

Comments
 (0)