Skip to content

Commit

Permalink
resolving the feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
muhtasimhafiz committed Aug 11, 2024
1 parent 9422468 commit a4e0b11
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 280 deletions.
6 changes: 0 additions & 6 deletions app/Domain/Goalcanvas/Controllers/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,6 @@ public function run()
}
}

// request
// $filter['status'] = request('filter_status', session('filter_status', 'all'));
// session(['filter_status' => $filter['status']]);
// $filter['relates'] = request('filter_relates', session('filter_relates', 'all'));
// session(['filter_relates' => $filter['relates']]);

$filter['status'] = $_GET['filter_status'] ?? (session("filter_status") ?? 'all');
session(["filter_status" => $filter['status']]);
$filter['relates'] = $_GET['filter_relates'] ?? (session("filter_relates") ?? 'all');
Expand Down
14 changes: 14 additions & 0 deletions app/Domain/Goalcanvas/Controllers/DelCanvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@
* Controller / Delete Canvas
*/


namespace Leantime\Domain\Goalcanvas\Controllers {

// use AWS\CRT\HTTP\Response;
use Symfony\Component\HttpFoundation\Response;


/**
*
*/
class DelCanvas extends \Leantime\Domain\Canvas\Controllers\DelCanvas
{
protected const CANVAS_NAME = 'goal';

public function get($params):Response
{
$id = filter_var($params['id'] ?? '', FILTER_SANITIZE_NUMBER_INT);
$this->tpl->assign('id', $id);

return $this->tpl->displayPartial('goalcanvas.delCanvas');

}
}
}
9 changes: 9 additions & 0 deletions app/Domain/Goalcanvas/Controllers/DelCanvasItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
*/

namespace Leantime\Domain\Goalcanvas\Controllers {
use Symfony\Component\HttpFoundation\Response;

/**
*
*/
class DelCanvasItem extends \Leantime\Domain\Canvas\Controllers\DelCanvasItem
{
protected const CANVAS_NAME = 'goal';
public function get($params):Response
{
$id = filter_var($params['id'] ?? '', FILTER_SANITIZE_NUMBER_INT);
$this->tpl->assign('id', $id);

return $this->tpl->displayPartial('goalcanvas.delCanvasItem');

}

}

Expand Down
3 changes: 3 additions & 0 deletions app/Domain/Goalcanvas/Controllers/EditCanvasItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,16 @@ public function get($params): Response
$comments = [];
}

$this->tpl->assign('id', $canvasItem['id']??"");
$this->tpl->assign('canvasId', $canvasItem['canvasId']);
$this->tpl->assign('comments', $comments);



$allProjectMilestones = $this->ticketService->getAllMilestones(["sprint" => '', "type" => "milestone", "currentProject" => session("currentProject")]);
$this->tpl->assign('milestones', $allProjectMilestones);


$this->tpl->assign('currentCanvas', $canvasItem['canvasId']);
$this->tpl->assign('canvasItem', $canvasItem);
$this->tpl->assign('canvasIcon', $this->canvasRepo->getIcon());
Expand Down
42 changes: 20 additions & 22 deletions app/Domain/Goalcanvas/Templates/bigRockDialog.blade.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<h4 class="widgettitle title-light">
<i class="fa-solid fa-mountain"></i>
{{ empty($bigRock["title"]) ? __('label.create_new_goalboard') : __('label.goalboard') }} {{ $bigRock["title"] }}</h4>
{{ empty($bigRock['title']) ? __('label.create_new_goalboard') : __('label.goalboard') }} {{ $bigRock['title'] }}
</h4>

{!! $tpl->displayNotification(); !!}

<form class="formModal" method="post" action="{{ BASE_URL }}/goalcanvas/bigRock/{{ !empty($bigRock['id']) ? $bigRock['id'] : '' }}">
<form class="formModal" method="post"
action="{{ BASE_URL }}/goalcanvas/bigRock/{{ !empty($bigRock['id']) ? $bigRock['id'] : '' }}">

<br />
<label>{{ __('label.goal_description') }}</label>
<input type="text" name="title" id="wikiTitle" value="{{ $bigRock['title']}}" style="width:100%;"/><br />
<input type="text" name="title" id="wikiTitle" value="{{ $bigRock['title'] }}" style="width:100%;" /><br />

<br />
<div class="row">
<div class="col-md-6">
<input type="submit" value="{{ __('buttons.save') }}" id="saveBtn"/>
<input type="submit" value="{{ __('buttons.save') }}" id="saveBtn" />
</div>
<div class="col-md-6 align-right padding-top-sm">

Expand All @@ -23,27 +23,25 @@
</form>

<script>
jQuery(document).ready(function(){
jQuery(document).ready(function() {
<?php if (isset($_GET['closeModal'])): ?>
@if (isset($_GET['closeModal']))
jQuery.nmTop().close();
<?php endif ?>
if(jQuery("#wikiTitle").val().length >= 2) {
jQuery("#saveBtn").removeAttr("disabled");
}else{
jQuery("#saveBtn").attr("disabled", "disabled");
}
jQuery("#wikiTitle").keypress(function(){
if(jQuery("#wikiTitle").val().length >= 2) {
@endif
if (jQuery("#wikiTitle").val().length >= 2) {
jQuery("#saveBtn").removeAttr("disabled");
} else {
jQuery("#saveBtn").attr("disabled", "disabled");
}
jQuery("#wikiTitle").keypress(function() {
if (jQuery("#wikiTitle").val().length >= 2) {
jQuery("#saveBtn").removeAttr("disabled");
}else{
} else {
jQuery("#saveBtn").attr("disabled", "disabled");
}
})
});
</script>

18 changes: 8 additions & 10 deletions app/Domain/Goalcanvas/Templates/canvasComment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
window.onload = function() {
if (!window.jQuery) {
//It's not a modal
location.href = "<?= BASE_URL ?>/<?= $canvasName ?>canvas/showCanvas?showModal=<?php echo $canvasItem['id']; ?>";
location.href = "<?= BASE_URL ?>/<?= $canvasName ?>canvas/showCanvas?showModal=<?= $canvasItem['id']; ?>";
}
}
</script>
Expand All @@ -36,18 +36,16 @@
</h4>
<hr style="margin-top: 5px; margin-bottom: 15px;">

{!! $tpl->displayNotification() !!}

<h5 style="padding-left: 40px"><strong>{{ $tpl->e($canvasItem['description']) }}</strong></h5>
<h5 style="padding-left: 40px"><strong>{{ $canvasItem['description'] }}</strong></h5>

@if ($id !== '')
<br />
<input type="hidden" name="comment" value="1" />
<h4 class="widgettitle title-light">
<span class="fa fa-comments"></span>{{ $tpl->__('subtitles.discussion') }}
<span class="fa fa-comments"></span>{{ __('subtitles.discussion') }}
</h4>
@php
$tpl->assign("formUrl", "/{{ $canvasName }}canvas/editCanvasComment/" . $id . "");
$tpl->assign("formUrl", "/goalcanvas/editCanvasComment/" . $id . "");
$tpl->displaySubmodule('comments-generalComment');
@endphp
@endif
Expand All @@ -59,14 +57,14 @@
leantime.editorController.initSimpleEditor();
<?php if (!$login::userIsAtLeast($roles::$editor)) { ?>
@if(!$login::userIsAtLeast($roles::$editor))
leantime.authController.makeInputReadonly(".nyroModalCont");
<?php } ?>
@endif;
<?php if ($login::userHasRole([$roles::$commenter])) { ?>
@if($login::userHasRole([$roles::$commenter]))
leantime.commentsController.enableCommenterForms();
<?php } ?>
@endif;
})
</script>
Expand Down
Loading

0 comments on commit a4e0b11

Please sign in to comment.