Skip to content

FOUR-14077: Update the URL of Launchpad #6181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ProcessMaker/Http/Middleware/GenerateMenus.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function handle(Request $request, Closure $next)
$menu->group(['prefix' => 'processes'], function ($request_items) {
$request_items->add(
__('Processes'),
['route' => 'processes.catalogue.index', 'id' => 'processes-catalogue']
)->active('processes-catalogue/*');
['route' => 'process.browser.index', 'id' => 'process-browser']
)->active('process-browser/*');
});
$menu->group(['prefix' => 'requests'], function ($request_items) {
$request_items->add(
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/shared/EllipsisMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default {
},
isProcessesCatalogueInUrl() {
const currentUrl = window.location.href;
const isInUrl = currentUrl.includes("processes-catalogue");
const isInUrl = currentUrl.includes("process-browser");
return isInUrl;
}
},
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/shared/ellipsisMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
value: "open-launchpad",
content: "Open Launchpad",
link: true,
href: "/processes-catalogue/{{id}}",
href: "/process-browser/{{id}}",
permission: ["edit-processes", "create-projects", "view-projects"],
icon: "fas fa-file-export",
conditional: "if(status == 'ACTIVE', true, false)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

if (undefined !== this.redirectTo && null !== this.redirectTo) {
if (this.redirectTo === 'process-launchpad') {
window.location = `/processes-catalogue/${this.processId}`;
window.location = `/process-browser/${this.processId}`;
}
} else {
window.location = "/modeler/" + this.processId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default {
this.handleExistingAssets(response.data);
} else {
// redirect to the new process launchpad
window.location = `/processes-catalogue/${response.data.processId}`;
window.location = `/process-browser/${response.data.processId}`;
}
}).catch((error) => {
ProcessMaker.alert(error.message, "danger");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<li class="breadcrumb-item">
<a
href="/processes-catalogue"
href="/process-browser"
:aria-label="$t('Home')"
>
{{ $t('Processes') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default {
* Select Default Option
*/
selectDefault() {
if (window.location.pathname === "/processes-catalogue") {
if (window.location.pathname === "/process-browser") {
this.selectProcessItem(this.data[0]);
}
},
Expand Down
11 changes: 10 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@
Route::get('designer/scripts/categories', [ScriptController::class, 'index'])->name('script-categories.index')->middleware('can:view-script-categories');
Route::get('designer', [DesignerController::class, 'index'])->name('designer.index');

Route::get('processes-catalogue/{process?}', [ProcessesCatalogueController::class, 'index'])->name('processes.catalogue.index')->middleware('can:view-process-catalog');
Route::get('process-browser/{process?}', [ProcessesCatalogueController::class, 'index'])
->name('process.browser.index')
->middleware('can:view-process-catalog');
//------------------------------------------------------------------------------------------
// Below route is for backward compatibility with old format routes. PLEASE DO NOT REMOVE
//------------------------------------------------------------------------------------------
Route::get('processes-catalogue/{process?}', function ($process = null) {
return redirect()->route('process.browser.index', [$process]);
})->name('processes.catalogue.index');
//------------------------------------------------------------------------------------------

Route::get('processes', [ProcessController::class, 'index'])->name('processes.index');
Route::get('processes/{process}/edit', [ProcessController::class, 'edit'])->name('processes.edit')->middleware('can:edit-processes');
Expand Down