Skip to content

Epic/FOUR-11531: Process LaunchPad - Initial changes #5626

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 81 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
51c3a31
FOUR-12111:Process Browser - List Available Process
fagubla Nov 27, 2023
48b565d
feature/FOUR-12607
luNunezProcessmaker Nov 28, 2023
ff688a1
feature/FOUR-12607
luNunezProcessmaker Nov 28, 2023
ea5861b
select item
fagubla Nov 28, 2023
3e76d55
FOUR-12581:Process Launchpad: Create the initial mockup
fagubla Nov 28, 2023
e50a795
Merge pull request #5705 from ProcessMaker/feature/FOUR-12581_B
pmPaulis Nov 28, 2023
abe013a
Merge remote-tracking branch 'origin/feature/FOUR-11531' into feature…
fagubla Nov 28, 2023
921120d
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 28, 2023
3c30161
Merge pull request #5704 from ProcessMaker/feature/FOUR-12607
pmPaulis Nov 28, 2023
2cfc20c
Solve conflicts
fagubla Nov 28, 2023
e018796
Merge pull request #5707 from ProcessMaker/feature/FOUR-12111
pmPaulis Nov 28, 2023
25f6b2f
feature/FOUR-11536
luNunezProcessmaker Nov 29, 2023
4101421
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 29, 2023
4adf90b
feature/FOUR-11536
luNunezProcessmaker Nov 29, 2023
8dd16b0
feature/FOUR-11534
luNunezProcessmaker Nov 29, 2023
ca020b8
feature/FOUR-11536
luNunezProcessmaker Nov 29, 2023
3e84a03
feature/FOUR-11536
luNunezProcessmaker Nov 29, 2023
232aea7
feature/FOUR-11536
luNunezProcessmaker Nov 29, 2023
4bc83be
FOUR-Process Browser - List the cards
fagubla Nov 29, 2023
18f5eb8
Solve conflicts with Connectors Team
fagubla Nov 29, 2023
9bda86b
Merge remote-tracking branch 'origin/feature/FOUR-11531' into feature…
fagubla Nov 29, 2023
d935ff5
feature/FOUR-11534
luNunezProcessmaker Nov 29, 2023
18dead6
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 29, 2023
2298459
add wizard templates component
fagubla Nov 30, 2023
91a5bba
Merge pull request #5714 from ProcessMaker/feature/FOUR-11536
pmPaulis Nov 30, 2023
90ec8d1
Merge remote-tracking branch 'origin/feature/FOUR-11531' into feature…
fagubla Nov 30, 2023
6981406
Merge branch 'feature/FOUR-11536' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 29, 2023
406f3b4
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 30, 2023
ec8ab2a
feature/FOUR-11537
luNunezProcessmaker Nov 30, 2023
43418d5
feature/FOUR-11534
luNunezProcessmaker Nov 30, 2023
47f7854
Merge branch 'feature/FOUR-11534' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 30, 2023
b34f7ed
Saving changes
CarliPinell Nov 30, 2023
f1d97db
feature/FOUR-11534
luNunezProcessmaker Nov 30, 2023
6577ec6
Merge branch 'feature/FOUR-11534' of https://github.com/ProcessMaker/…
luNunezProcessmaker Nov 30, 2023
f336839
Merge branch 'feature/FOUR-11531' into feature/FOUR-11993
CarliPinell Nov 30, 2023
95334c9
feature/FOUR-11537
luNunezProcessmaker Nov 30, 2023
8f4e6b2
feature/FOUR-11537
luNunezProcessmaker Nov 30, 2023
af9a4c7
Merge pull request #5725 from ProcessMaker/feature/FOUR-11534
pmPaulis Nov 30, 2023
19d09b0
feature/FOUR-11537
luNunezProcessmaker Nov 30, 2023
309cb30
Merge remote-tracking branch 'origin/feature/FOUR-11531' into feature…
fagubla Nov 30, 2023
011c736
card load functional
fagubla Nov 30, 2023
86e44a2
Observations solved previous merge
CarliPinell Nov 30, 2023
37f7def
feature/FOUR-12636
luNunezProcessmaker Nov 30, 2023
72b1096
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
CarliPinell Nov 30, 2023
8cf9523
Merge pull request #5733 from ProcessMaker/feature/FOUR-12112
pmPaulis Nov 30, 2023
377f27c
Adjustments in Carousel image container
CarliPinell Dec 1, 2023
638ce82
FOUR-12652
pmPaulis Nov 30, 2023
941f07e
feature/FOUR-12636
luNunezProcessmaker Dec 1, 2023
bd31f9b
Merge pull request #5736 from ProcessMaker/feature/FOUR-12636
pmPaulis Dec 1, 2023
1116f30
Merge pull request #5738 from ProcessMaker/feature/FOUR-12652-P
pmPaulis Dec 1, 2023
573ed7b
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
CarliPinell Dec 1, 2023
dc90b79
FOUR-12621
pmPaulis Dec 1, 2023
e76e111
Observations solved
CarliPinell Dec 1, 2023
f46c7e4
feature/FOUR-12645
luNunezProcessmaker Dec 1, 2023
50c9004
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Dec 1, 2023
f481a9b
Solving warning interval
CarliPinell Dec 1, 2023
c5278a0
feature/FOUR-12645
luNunezProcessmaker Dec 1, 2023
f32261d
Sonarqube observations
pmPaulis Dec 1, 2023
a94e420
feature/FOUR-12645
luNunezProcessmaker Dec 1, 2023
10fba19
Merge remote-tracking branch 'origin/feature/FOUR-11531' into feature…
pmPaulis Dec 1, 2023
be99347
Merge pull request #5732 from ProcessMaker/feature/FOUR-11537
pmPaulis Dec 1, 2023
0a6c4ee
Merge pull request #5730 from ProcessMaker/feature/FOUR-11993
pmPaulis Dec 1, 2023
44fe762
PR observation
pmPaulis Dec 1, 2023
f8173cb
feature/FOUR-12677
luNunezProcessmaker Dec 4, 2023
36bedd6
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Dec 4, 2023
9789557
feature/FOUR-12645
luNunezProcessmaker Dec 4, 2023
0dde111
Merge pull request #5744 from ProcessMaker/feature/FOUR-12621
pmPaulis Dec 4, 2023
7b2c90d
feature/FOUR-12677
luNunezProcessmaker Dec 4, 2023
0aebc6b
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Dec 4, 2023
b98eef0
Merge pull request #5745 from ProcessMaker/feature/FOUR-12645
pmPaulis Dec 4, 2023
72eb4b6
Merge pull request #5748 from ProcessMaker/feature/FOUR-12677
pmPaulis Dec 4, 2023
ff871ff
feature/FOUR-12691
luNunezProcessmaker Dec 4, 2023
1ced6ea
Merge branch 'feature/FOUR-11531' of https://github.com/ProcessMaker/…
luNunezProcessmaker Dec 4, 2023
004b06b
feature/FOUR-12691
luNunezProcessmaker Dec 4, 2023
72b72c5
feature/FOUR-12691
luNunezProcessmaker Dec 4, 2023
f344d5b
feature/FOUR-12691
luNunezProcessmaker Dec 4, 2023
beb8caa
FOUR-12714
pmPaulis Dec 4, 2023
1d55871
feature/FOUR-12708
luNunezProcessmaker Dec 4, 2023
035a980
Merge pull request #5750 from ProcessMaker/feature/FOUR-12691
pmPaulis Dec 4, 2023
2ac8dd5
Merge pull request #5754 from ProcessMaker/bugfix/FOUR-12714
pmPaulis Dec 4, 2023
23f596c
Merge pull request #5755 from ProcessMaker/feature/FOUR-12708
pmPaulis Dec 4, 2023
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
5 changes: 5 additions & 0 deletions ProcessMaker/Http/Controllers/Api/ProcessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ public function index(Request $request)
if (!empty($filter)) {
$processes->filter($filter);
}
// Filter by category
$category = $request->input('category', null);
if (!empty($category)) {
$processes->processCategory($category);
}

if (!empty($pmql)) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ public function index(Request $request)
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function open(Process $process, $id)
public function open(Process $process, Request $request)
{
return view('processes-catalogue.open', [
'process' => $process,
'processId' => $id,
]);
$category = $request->input('category') ?? 0;
return view('processes-catalogue.open', compact('process', 'category'));
}
}
12 changes: 6 additions & 6 deletions ProcessMaker/Http/Middleware/GenerateMenus.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ public function handle(Request $request, Closure $next)
)->active('home/*');
});
}
$menu->group(['prefix' => 'requests'], function ($request_items) {
$request_items->add(
__('Requests'),
['route' => 'requests.index', 'id' => 'requests']
)->active('requests/*');
});
$menu->group(['prefix' => 'processes'], function ($request_items) {
$request_items->add(
__('Processes'),
['route' => 'processes.catalogue.index', 'id' => 'processes-catalogue']
)->active('processes-catalogue/*');
});
$menu->group(['prefix' => 'requests'], function ($request_items) {
$request_items->add(
__('Requests'),
['route' => 'requests.index', 'id' => 'requests']
)->active('requests/*');
});
//@TODO change the index to the correct blade
$menu->group(['prefix' => 'tasks'], function ($request_items) {
$request_items->add(
Expand Down
25 changes: 25 additions & 0 deletions ProcessMaker/Models/Bookmark.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace ProcessMaker\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use ProcessMaker\Models\ProcessMakerModel;

class Bookmark extends ProcessMakerModel
{
use HasFactory;

protected $connection = 'processmaker';

protected $table = 'user_process_bookmarks';

/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id',
'process_id',
];
}
8 changes: 8 additions & 0 deletions ProcessMaker/Models/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@ public function scopeArchived($query)
return $query->where('processes.status', 'ARCHIVED');
}

/**
* Scope a query to include a specific category
*/
public function scopeProcessCategory($query, int $id)
{
return $query->where('processes.process_category_id', $id);
}

public function getCollaborations()
{
$this->bpmnDefinitions = app(BpmnDocumentInterface::class, ['process' => $this]);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('processes', function (Blueprint $table) {
$table->json('launchpad_properties')->nullable();
});
Schema::table('process_versions', function (Blueprint $table) {
$table->json('launchpad_properties')->nullable();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('processes', function (Blueprint $table) {
$table->dropColumn(['launchpad_properties']);
});
Schema::table('process_versions', function (Blueprint $table) {
$table->dropColumn(['launchpad_properties']);
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('user_process_bookmarks', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id');
$table->unsignedInteger('process_id');
$table->timestamps();

// Foreign keys
$table->foreign('process_id')->references('id')->on('processes')->onDelete('cascade');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_process_bookmarks');
}
};
9 changes: 9 additions & 0 deletions resources/img/default-process.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/img/launchpad-images/imageDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions resources/img/launchpad-images/noImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 15 additions & 12 deletions resources/js/components/shared/EllipsisMenu.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<b-dropdown
v-if="filterActions.length > 0"
:variant="variant ? variant : 'ellipsis'"
no-caret
no-flip
Expand All @@ -9,7 +10,6 @@
class="ellipsis-dropdown-main"
@show="onShow"
@hide="onHide"
v-if="filterActions.length > 0"
>
<template v-if="customButton" #button-content>
<i
Expand All @@ -20,6 +20,9 @@
{{ customButton.content }} <b v-if="showProgress && data && data.batch"> {{ getTotalProgress(data.batch, data.progress) }}%</b>
</span>
</template>
<template v-else-if="lauchpad" #button-content>
<i class="fas fa-ellipsis-h ellipsis-menu-icon p-0" />
</template>
<template v-else #button-content>
<i class="fas fa-ellipsis-h ellipsis-menu-icon" />
</template>
Expand Down Expand Up @@ -74,21 +77,21 @@
</div>
<div v-for="action in filterActions">
<b-dropdown-divider v-if="action.value == 'divider'"/>
<b-dropdown-item v-else
:key="action.value"
:href="action.link ? itemLink(action, data) : null"
class="ellipsis-dropdown-item mx-auto"
@click="!action.link ? onClick(action, data) : null"
<b-dropdown-item
v-else
:key="action.value"
:href="action.link ? itemLink(action, data) : null"
class="ellipsis-dropdown-item mx-auto"
@click="!action.link ? onClick(action, data) : null"
>
<div class="ellipsis-dropdown-content">
<i
class="pr-1 fa-fw"
:class="action.icon"
class="pr-1 fa-fw"
:class="action.icon"
/>
<span>{{ $t(action.content) }}</span>
</div>
</b-dropdown-item>

</div>
</div>
</b-dropdown>
Expand All @@ -103,7 +106,7 @@ export default {
components: { PmqlInput },
filters: { },
mixins: [],
props: ["actions", "permission", "data", "isDocumenterInstalled", "divider", "customButton", "showProgress", "isPackageInstalled", "searchBar", "variant"],
props: ["actions", "permission", "data", "isDocumenterInstalled", "divider", "lauchpad", "customButton", "showProgress", "isPackageInstalled", "searchBar", "variant"],
data() {
return {
active: false,
Expand Down Expand Up @@ -166,7 +169,7 @@ export default {
return this.actions.filter(action => {
// Check if the action has a 'permission' property and it's a non-empty string
if (!action.permission || typeof action.permission === 'string' && action.permission.trim() === '') {
return true; // No specific permission required or invalid format, so allow the action.
return true; // No specific permission required or invalid format, so allow the action.
}
let requiredPermissions;
// Check if this.permission is of type string
Expand All @@ -175,7 +178,7 @@ export default {
} else {
requiredPermissions = action.permission;
}

// Check if this.permission is of type object
if (typeof this.permission === 'object' && this.permission !== null) {
const keys = Object.keys(this.permission);
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/shared/ellipsisMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default {
icon: "fas fa-file-export",
},
{
value: "edit-designer",
content: "Edit Process",
value: "open-in-modeler",
content: "Open in Modeler",
link: true,
href: "/modeler/{{id}}",
permission: ["edit-processes", "view-additional-asset-actions"],
Expand Down
55 changes: 55 additions & 0 deletions resources/js/processes-catalogue/components/Breadcrumbs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<template>
<nav aria-label="breadcrumb">
<ol class="breadcrumb bg-transparent p-0 mb-3">
<li class="breadcrumb-item">
<a href="/" :aria-label="$t('Home')">
<i class="fas fa-home" />
</a>
</li>

<li class="breadcrumb-item">
<a href="/processes-catalogue" :aria-label="$t('Home')">
{{ $t('Processes') }}
</a>
</li>

<li v-if="category" class="breadcrumb-item">
<a :aria-label="categoryName">
{{ categoryName }}
</a>
</li>

<li v-if="process" class="breadcrumb-item">
{{ process }}
</li>
</ol>
</nav>
</template>

<script>
export default {
router: window.ProcessMaker.Router,
props: ["process", "category"],
data() {
return {
categoryName: "",
};
},
mounted() {
this.getCategory();
},
methods: {
getCategory(value = "") {
if (value) {
this.categoryName = value;
} else if (this.category) {
ProcessMaker.apiClient
.get(`process_categories/${this.category}`)
.then((response) => {
this.categoryName = response.data.name;
});
}
},
},
};
</script>
85 changes: 85 additions & 0 deletions resources/js/processes-catalogue/components/CardProcess.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<template>
<div class="container processList">
<b-card
v-for="process in processList"
:key="process.id"
class="card-process"
@click="openProcessInfo(process.id)"
>
<b-card-text>
<img
class="icon-process"
src="/img/default-process.svg"
:alt="$t('Default Icon')"
>
<span class="title-process">{{ process.name }}</span>
</b-card-text>
</b-card>
</div>
</template>

<script>
export default {
props: ["category"],
data() {
return {
processList: [],
};
},
watch: {
category() {
this.loadCard();
},
},
mounted() {
this.loadCard();
},
methods: {
loadCard() {
/* TODO complete the new API */
ProcessMaker.apiClient
.get("processes")
.then((response) => {
this.processList = response.data.data;
});
},
openProcessInfo(process) {
window.location = `/processes-catalogue/${process}`;
},
},
};
</script>

<style>
.processList {
display: flex;
flex-wrap: wrap;
}
.card-process {
width: 350px;
height: 240px;
margin-top: 1rem;
margin-right: 1rem;
border-radius: 16px;
}
.card-text {
display: flex;
flex-direction: column;
align-items: baseline;
padding-top: 15%;
}
.icon-process {
font-size: 68px;
margin-bottom: 1rem;
}
.title-process {
color: #556271;
font-family: Poppins, sans-serif;
font-size: 20px;
font-style: normal;
font-weight: 700;
line-height: normal;
letter-spacing: -0.4px;
text-transform: uppercase;
}
</style>
Loading