Skip to content
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

Summer Improvements #6916

Merged
merged 123 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
8e95e90
Change style for status, case title and links on tasks listing
gustavobascope May 20, 2024
a3e8f9e
Saving progress working fine
CarliPinell May 22, 2024
a795af0
Ready for PR1
CarliPinell May 22, 2024
83e35f9
Ready for PR 2
CarliPinell May 22, 2024
4be573a
Ready for PR 3
CarliPinell May 22, 2024
83b0267
Merge branch 'next' of github.com:ProcessMaker/processmaker into feat…
CarliPinell May 22, 2024
8b0140c
adjust the size of the priority column
gustavobascope May 22, 2024
f0b91f5
Refactor quickfill from full screen
nolanpro May 22, 2024
923a64a
removing get draft API
CarliPinell May 23, 2024
3f417eb
changed task list hoover options style
May 23, 2024
1c71b45
Solving nested fields issue in Preview page with quick fill
CarliPinell May 23, 2024
fe893f7
Merge branch 'next' of github.com:ProcessMaker/processmaker into feat…
CarliPinell May 23, 2024
c44fde7
Solving issues with inbox rules quick fill nested
CarliPinell May 23, 2024
b6e2648
removing unused code
CarliPinell May 23, 2024
a1d9506
Format launchpad process list for mobile
nolanpro May 23, 2024
32948b4
Added new tooltips for task hover options
May 24, 2024
ba590a8
Merge branch 'next' of github.com:ProcessMaker/processmaker into feat…
gustavobascope May 24, 2024
6e1f20d
Do not reload iframe when setting data
nolanpro May 24, 2024
0e13fc4
changed the filter and sort styles
gustavobascope May 24, 2024
77e85fb
change filter icons style when filter is applied
gustavobascope May 27, 2024
3ccc149
change filter icons style on cases list
gustavobascope May 27, 2024
e96eb22
Added a reset size functionality to tables
gustavobascope May 28, 2024
45d3b65
First progress on responsive images
CarliPinell May 23, 2024
9609dd8
Saving progress 1
CarliPinell May 27, 2024
a129d21
ready for PR
CarliPinell May 28, 2024
1d44821
Fix saving inbox rules quick fill data
nolanpro May 28, 2024
77df7d0
Ready for Pull Request
CarliPinell May 28, 2024
477f6bb
Solving SonrQube Observations
CarliPinell May 28, 2024
77e602d
Solving more SonarQube observations
CarliPinell May 28, 2024
2b9a5d6
Fix browser back behaviour for new tasks
gustavobascope May 28, 2024
06cc244
hide the draft tag when the task is completed
gustavobascope May 28, 2024
aeb79b6
Add recent cases and active case count
nolanpro May 28, 2024
2d15247
Fix column filter styles
gustavobascope May 29, 2024
bfe3321
Do not cache task and request results
nolanpro May 29, 2024
3d5ee56
new pagination style and functionality
gustavobascope May 29, 2024
7452d95
Added new icons for pagination
gustavobascope May 29, 2024
66ea685
added public path for the icons
gustavobascope May 29, 2024
da4ddb5
Saving Progress
CarliPinell May 29, 2024
e96a71c
Update slide out menus
nolanpro May 29, 2024
cbc32f6
Fixed hover task menu on saved search
gustavobascope May 31, 2024
20b0116
Merge branch 'feature/FOUR-15725' of github.com:ProcessMaker/processm…
gustavobascope May 31, 2024
f32f94e
Fix sonar qube
nolanpro May 31, 2024
4efdbf4
WIP
nolanpro May 31, 2024
883f9ca
Ready for PR 1
CarliPinell May 31, 2024
0bc7033
fix new option column style
gustavobascope May 31, 2024
649ec15
Merge branch 'feature/FOUR-16112' of github.com:ProcessMaker/processm…
CarliPinell May 31, 2024
b674833
Solving sonarqube observations
CarliPinell May 31, 2024
9c538ac
Merge pull request #6899 from ProcessMaker/feature/FOUR-16111
nolanpro Jun 3, 2024
74d81d9
Merge branch 'launchpad-updates' into feature/FOUR-16140
nolanpro Jun 3, 2024
8926e6b
Merge pull request #6898 from ProcessMaker/feature/FOUR-16140
nolanpro Jun 3, 2024
9e15ac9
Start on refactoring launchpad for mobile routing
nolanpro Jun 3, 2024
06c004d
Bring back blade template props
nolanpro Jun 3, 2024
9bb3dc4
changed the ellipsis menu style in Tables
gustavobascope Jun 4, 2024
02c085d
More refactoring
nolanpro Jun 4, 2024
1fef0c7
Move wizard templates to process listing
nolanpro Jun 4, 2024
c5bb402
Start on custom navbar
nolanpro Jun 4, 2024
28cb7d5
add new ellipsis style in launchpad
gustavobascope Jun 5, 2024
4d25304
Fix launchpad custom screen view
nolanpro Jun 5, 2024
ed43714
Refactor start button
nolanpro Jun 5, 2024
63dc822
Merge pull request #6879 from ProcessMaker/feature/FOUR-15725
nolanpro Jun 6, 2024
679ceae
Merge pull request #6869 from ProcessMaker/feature/FOUR-15738
nolanpro Jun 6, 2024
312150e
Merge pull request #6903 from ProcessMaker/launchpad-updates
nolanpro Jun 6, 2024
702772c
Merge pull request #6912 from ProcessMaker/feature/FOUR-15727
nolanpro Jun 6, 2024
aa43058
Merge branch 'next2-improvements' into feature/FOUR-15726
gustavobascope Jun 6, 2024
1c5205b
Merge pull request #6894 from ProcessMaker/feature/FOUR-15726
nolanpro Jun 6, 2024
acbe097
Revert composer
nolanpro Jun 6, 2024
75f373d
Start on process info
nolanpro Jun 6, 2024
893877a
FOUR-14053 All Templates section (UI change)
gproly Jun 6, 2024
095ce06
FOUR-14053 All Templates section (UI change)
gproly Jun 6, 2024
8fb39ae
FOUR-14053 All Templates section (UI change)
gproly Jun 6, 2024
9523611
FOUR-14053 All Templates section (UI change)
gproly Jun 6, 2024
ba207bc
FOUR-14053 All Templates section (UI change)
gproly Jun 6, 2024
d53c928
Signature bug fixed
CarliPinell Jun 7, 2024
3db2066
fixing
CarliPinell Jun 7, 2024
63acaeb
Changed the pagination component for scripts list
gustavobascope Jun 7, 2024
8fffb44
fix filter table header variable
gustavobascope Jun 7, 2024
392472a
Add mini pie charts
nolanpro Jun 7, 2024
714d388
Fixing quickfill signature issue
CarliPinell Jun 7, 2024
d57f473
Adding comments
CarliPinell Jun 7, 2024
34b40b5
solving SonarQube
CarliPinell Jun 7, 2024
68fb751
Merge pull request #6924 from ProcessMaker/observation/FOUR-16542
nolanpro Jun 7, 2024
b0dbb56
Merge pull request #6926 from ProcessMaker/observation/FOUR-16543
nolanpro Jun 7, 2024
78d2bda
FOUR-14053 All Templates section (UI change)
gproly Jun 8, 2024
f3c0ce7
Changed the scripts table style and pagination
gustavobascope Jun 10, 2024
99fbf46
Fix info position while scrolling
nolanpro Jun 10, 2024
3deb407
Changed the style and pagination in the screens list table
gustavobascope Jun 10, 2024
7b1b2b5
Fix sonarqube
nolanpro Jun 10, 2024
b75f991
Merge branch 'feature/FOUR-16141' into feature/FOUR-14053
nolanpro Jun 10, 2024
d38afb1
Remove comment for sonar qube
nolanpro Jun 10, 2024
032e84d
Sonarqube
nolanpro Jun 10, 2024
d6e4fc9
Fix Observations
nolanpro Jun 10, 2024
d41b4e5
Merge pull request #6932 from ProcessMaker/feature/FOUR-16141
nolanpro Jun 10, 2024
2372fcc
Merge pull request #6920 from ProcessMaker/feature/FOUR-14053
nolanpro Jun 10, 2024
8dd4f8d
Merge branch 'next' into next2-improvements
nolanpro Jun 10, 2024
45f083f
Fix counts when no requests exist
nolanpro Jun 11, 2024
9f065a2
Solving signature component issue
CarliPinell Jun 11, 2024
d4887fa
Merge branch 'next2-improvements' of github.com:ProcessMaker/processm…
CarliPinell Jun 11, 2024
5a6a423
Merge pull request #6925 from ProcessMaker/bugfix/FOUR-16559
nolanpro Jun 11, 2024
0cd8ab8
Merge branch 'next' into next2-improvements
nolanpro Jun 11, 2024
e9c3fb0
changed the pagination style on assets tables
gustavobascope Jun 11, 2024
0e21c4a
Merge branch 'next2-improvements' of github.com:ProcessMaker/processm…
gustavobascope Jun 11, 2024
25f411d
php-cs-fixer observations
gustavobascope Jun 11, 2024
0e81e78
Additional refactoring to support mobile launchpad
nolanpro Jun 12, 2024
1b2afd6
Quick style update
nolanpro Jun 12, 2024
a06500a
Merge pull request #6941 from ProcessMaker/feature/FOUR-15730
nolanpro Jun 12, 2024
67bb5cc
Refactor bookmarks for mobile
nolanpro Jun 14, 2024
fabd4e6
Update bookmarks component
nolanpro Jun 14, 2024
dd0a39a
Sonar qube fixes
nolanpro Jun 14, 2024
bbb915f
FOUR-14245 Update Task Table in Launchpad
gproly Jun 14, 2024
0e35114
FOUR-14245 Update Task Table in Launchpad
gproly Jun 14, 2024
7ba7282
Merge pull request #6956 from ProcessMaker/feature/FOUR-16326
nolanpro Jun 14, 2024
d211804
FOUR-14245 Update Task Table in Launchpad
gproly Jun 14, 2024
9f476c8
FOUR-14245 Update Task Table in Launchpad
gproly Jun 17, 2024
0b3a860
Sonarqube fix
nolanpro Jun 17, 2024
80c89b1
remove the duplicate sorting icon on requests list
gustavobascope Jun 17, 2024
81bc5ba
Merge pull request #6962 from ProcessMaker/observation/FOUR-16529
nolanpro Jun 17, 2024
bea6f78
fix column sorting style when exists a order_column
gustavobascope Jun 17, 2024
34d5f18
FOUR-14245 Update Task Table in Launchpad
gproly Jun 18, 2024
8f679d4
FOUR-14245 Update Task Table in Launchpad
gproly Jun 18, 2024
5a68105
Merge pull request #6963 from ProcessMaker/observation/FOUR-16528
nolanpro Jun 18, 2024
4285811
Sonar qube fix
nolanpro Jun 18, 2024
7e6520c
FOUR-14245 Container behavior was updated in the process catalog.
gproly Jun 18, 2024
a34c7bb
Merge pull request #6957 from ProcessMaker/feature/FOUR-14245
nolanpro Jun 18, 2024
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/Helpers/MobileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ public static function isMobile($userAgent)

return false;
}

public static function detectMobile()
{
return isset($_SERVER['HTTP_USER_AGENT']) && self::isMobile($_SERVER['HTTP_USER_AGENT']);
}
}
21 changes: 12 additions & 9 deletions ProcessMaker/Http/Controllers/Api/ProcessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ProcessController extends Controller
{
const CAROUSEL_TYPES = [
'IMAGE' => 'image',
'EMBED' => 'embed'
'EMBED' => 'embed',
];

/**
Expand Down Expand Up @@ -128,6 +128,7 @@ public function index(Request $request)
'id' => $item['id'],
'events'=> $item['start_events']];
});

return new ApiCollection($modifiedCollection);
}

Expand Down Expand Up @@ -402,7 +403,7 @@ public function store(Request $request)
* @param Process $process
* @return ResponseFactory|Response
*
* @throws \Throwable
* @throws Throwable
*
* @OA\Put(
* path="/processes/{processId}",
Expand Down Expand Up @@ -520,7 +521,7 @@ public function update(Request $request, Process $process)
public function updateBpmn(Request $request, Process $process)
{
$request->validate(Process::rules($process));

// bpmn validation
if ($schemaErrors = $this->validateBpmn($request)) {
$warnings = [];
Expand Down Expand Up @@ -557,7 +558,8 @@ public function updateBpmn(Request $request, Process $process)
], 200);
}

private function updateSubprocessElement($parentProcess, $request, $process) {
private function updateSubprocessElement($parentProcess, $request, $process)
{
$definitions = $parentProcess->getDefinitions();
$elements = $definitions->getElementsByTagName('callActivity');
foreach ($elements as $element) {
Expand All @@ -584,7 +586,7 @@ private function updateSubprocessElement($parentProcess, $request, $process) {
* @param Process $process
* @return ResponseFactory|Response
*
* @throws \Throwable
* @throws Throwable
*
* @OA\Put(
* path="/processes/{processId}/draft",
Expand Down Expand Up @@ -948,7 +950,7 @@ public function startProcesses(Request $request)
* @param Process $process
* @return ResponseFactory|Response
*
* @throws \Throwable
* @throws Throwable
*
* @OA\Put(
* path="/processes/{processId}/restore",
Expand Down Expand Up @@ -1294,7 +1296,7 @@ public function import_ready($code)
*
* @return resource
*
* @throws \Throwable
* @throws Throwable
*
* @OA\Post(
* path="/processes/{process_id}/import/assignments",
Expand Down Expand Up @@ -1440,7 +1442,7 @@ public function importAssignments(Process $process, Request $request)
* @param Process $process
* @param Request $request
*
* @return \ProcessMaker\Http\Resources\ProcessRequests
* @return ProcessRequests
*
* @OA\Post(
* path="/process_events/{process_id}",
Expand Down Expand Up @@ -1778,7 +1780,7 @@ public function deleteMediaImages(Request $request, Process $process)
* @param string $uuid
* @param string $collectionName
* @return bool
*/
*/
private function deleteImage(Process $process, $uuid, $collectionName)
{
// Retrieve the media image by UUID and collection name
Expand All @@ -1788,6 +1790,7 @@ private function deleteImage(Process $process, $uuid, $collectionName)
// If the media image exists, delete it and return true
if ($mediaImagen) {
$mediaImagen->delete();

return true;
} else {
// Otherwise, return false
Expand Down
40 changes: 34 additions & 6 deletions ProcessMaker/Http/Controllers/Api/ProcessLaunchpadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use ProcessMaker\Models\Media;
use ProcessMaker\Models\Process;
use ProcessMaker\Models\ProcessLaunchpad;
use ProcessMaker\Models\ProcessRequest;

class ProcessLaunchpadController extends Controller
{
Expand All @@ -24,7 +25,9 @@ public function getProcesses(Request $request)
$processes = Process::nonSystem()->active();
// Filter by category
$category = $request->input('category', null);
if (!empty($category)) {
if ($category === 'recent') {
$processes->orderByRecentRequests();
} elseif (!empty($category)) {
$processes->processCategory($category);
}
// Filter pmql
Expand Down Expand Up @@ -54,9 +57,30 @@ public function getProcesses(Request $request)
$process->launchpad = ProcessLaunchpad::getLaunchpad($launchpad, $process->id);
}

$process = $processes->map(function ($process) {
$process->counts = $this->getCounts($process->id);
});

return new ProcessCollection($processes);
}

protected function getCounts($processId)
{
$result = ProcessRequest::where('process_id', $processId)
->selectRaw('status, count(*) as count')
->groupBy('status')
->get();

$completed = $result->where('status', 'COMPLETED')->first()?->count ?? 0;
$in_progress = $result->where('status', 'ACTIVE')->first()?->count ?? 0;

return [
'completed' => $completed,
'in_progress' => $in_progress,
'total' => $completed + $in_progress,
];
}

/**
* Get the size of the page.
* per_page=# (integer, the page requested) (Default: 10).
Expand All @@ -83,7 +107,12 @@ public function index(Request $request, Process $process)
}])
->where('id', $process->id)
->get()
->toArray();
->map(function ($process) use ($request) {
$process->counts = $this->getCounts($process->id);
$process->bookmark_id = Bookmark::getBookmarked(true, $process->id, $request->user()->id);

return $process;
});

return new ApiResource($processes);
}
Expand Down Expand Up @@ -120,9 +149,9 @@ public function destroy(ProcessLaunchpad $launch)
return response([], 204);
}

/**
* Store the elements related to the carousel [IMAGE, EMBED URL]
*/
/**
* Store the elements related to the carousel [IMAGE, EMBED URL]
*/
public function saveContentCarousel(Request $request, Process $process)
{
$contentCarousel = $request->input('imagesCarousel');
Expand All @@ -144,7 +173,6 @@ public function saveContentCarousel(Request $request, Process $process)
// Nothing
break;
}

}
}
}
Expand Down
14 changes: 13 additions & 1 deletion ProcessMaker/Http/Controllers/Api/TaskDraftController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@

class TaskDraftController extends Controller
{
public function index(Request $request, ProcessRequestToken $task)
{
$search = ['task_id' => $task->id];
$draft = TaskDraft::where($search)->first();

if ($draft) {
$draftData = $draft->data;
return new ApiResource($draftData);
}

return new ApiResource(null);
}

public function update(Request $request, ProcessRequestToken $task)
{
$search = ['task_id' => $task->id];
Expand All @@ -24,7 +37,6 @@ public function update(Request $request, ProcessRequestToken $task)
}
$draft->data = $data;
$draft->saveOrFail();

return new ApiResource($draft);
}

Expand Down
8 changes: 4 additions & 4 deletions ProcessMaker/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ public function loggedOut(Request $request)
* Handle a login request to the application.
* Overrides the original login action.
*
* @param \Illuminate\Http\Request $request
* @param \ProcessMaker\Models\User $user
* @param Request $request
* @param User $user
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function login(Request $request, User $user)
{
Expand Down Expand Up @@ -340,7 +340,7 @@ public function login(Request $request, User $user)
/**
* Throws locked error message
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
protected function throwLockedLoginResponse()
{
Expand Down
2 changes: 1 addition & 1 deletion ProcessMaker/Http/Controllers/ProcessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function edit(Process $process)
'canEditData',
'addons',
'assignedProjects',
'isDraft'
'isDraft',
]));
}

Expand Down
14 changes: 11 additions & 3 deletions ProcessMaker/Http/Controllers/ProcessesCatalogueController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use ProcessMaker\Events\ScreenBuilderStarting;
use ProcessMaker\Helpers\MobileHelper;
use ProcessMaker\Http\Controllers\Controller;
use ProcessMaker\Managers\ScreenBuilderManager;
use ProcessMaker\Models\Process;
use ProcessMaker\Models\Bookmark;
use ProcessMaker\Models\ProcessLaunchpad;
use ProcessMaker\Models\Process;
use ProcessMaker\Models\ProcessCategory;
use ProcessMaker\Models\ProcessLaunchpad;
use ProcessMaker\Traits\HasControllerAddons;

/**
Expand All @@ -22,7 +23,7 @@
class ProcessesCatalogueController extends Controller
{
use HasControllerAddons;

public function index(Request $request, Process $process = null)
{
$manager = app(ScreenBuilderManager::class);
Expand All @@ -33,6 +34,13 @@ public function index(Request $request, Process $process = null)
$process->launchpad = ProcessLaunchpad::getLaunchpad(true, $process->id);
$process->bookmark_id = Bookmark::getBookmarked(true, $process->id, $currentUser['id']);
}

if (MobileHelper::detectMobile()) {
$title = __('Process Browser');

return view('processes-catalogue.mobile', compact('title', 'process', 'currentUser', 'manager'));
}

return view('processes-catalogue.index', compact('process', 'currentUser', 'manager'));
}
}
4 changes: 4 additions & 0 deletions ProcessMaker/Http/Controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,12 @@ public function edit(ProcessRequestToken $task, string $preview = '')

public function quickFillEdit(ProcessRequestToken $task)
{
$screenVersion = $task->getScreenVersion();
$screenFields = $screenVersion ? $screenVersion->screenFilteredFields() : [];

return view('tasks.editQuickFill', [
'task' => $task,
'screenFields' => $screenFields,
]);
}
}
Loading
Loading