Skip to content

Commit

Permalink
fix dashboard widget
Browse files Browse the repository at this point in the history
  • Loading branch information
muhtasimhafiz committed Nov 29, 2024
1 parent c20697f commit a2f815c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 49 deletions.
55 changes: 27 additions & 28 deletions app/Domain/Tickets/Templates/includes/ticketFilter.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,31 @@


<?php if ($currentRoute !== 'tickets.roadmap' && $currentRoute != "tickets.showProjectCalendar") {?>
<x-global::actions.dropdown contentRole="ghost">
<x-slot:labelText>
{{ __('popover.group_by') }}
<span class="fa-solid fa-diagram-project"></span>
@if ($searchCriteria['groupBy'] !== 'all' && $searchCriteria['groupBy'] !== '')
<span class="badge badge-primary">1</span>
@endif
</button>
</x-slot:labelText>

<x-slot:menu>
@foreach ($groupBy as $input)
<x-global::actions.dropdown.item>
<span>
<input type="radio" name="groupBy" @if ($searchCriteria['groupBy'] == $input['field']) checked='checked' @endif
value="{{ $input['field'] }}" id="{{ $input['id'] }}"
onclick="leantime.ticketsController.initTicketSearchUrlBuilder('{{ $currentUrlPath }}')" />
<label for="{{ $input['id'] }}">{{ __('label.' . $input['label']) }}</label>
</span>
</x-global::actions.dropdown.item>
@endforeach
</x-slot:menu>
</x-global::actions.dropdown>
<x-global::actions.dropdown contentRole="ghost">
<x-slot:labelText>
{{ __('popover.group_by') }}
<span class="fa-solid fa-diagram-project"></span>
@if ($searchCriteria['groupBy'] !== 'all' && $searchCriteria['groupBy'] !== '')
<span class="badge badge-primary">1</span>
@endif
</x-slot:labelText>

<x-slot:menu>
@foreach ($groupBy as $input)
<x-global::actions.dropdown.item>
<span>
<input type="radio" name="groupBy" @if ($searchCriteria['groupBy'] == $input['field']) checked='checked' @endif
value="{{ $input['field'] }}" id="{{ $input['id'] }}"
onclick="leantime.ticketsController.initTicketSearchUrlBuilder('{{ $currentUrlPath }}')" />
<label for="{{ $input['id'] }}">{{ __('label.' . $input['label']) }}</label>
</span>
</x-global::actions.dropdown.item>
@endforeach
</x-slot:menu>
</x-global::actions.dropdown>
<?php } ?>
{{-- @if ($currentRoute !== 'tickets.roadmap' && $currentRoute != "tickets.showProjectCalendar")

{{-- @if ($currentRoute !== 'tickets.roadmap' && $currentRoute != 'tickets.showProjectCalendar')
Expand Down Expand Up @@ -178,14 +177,14 @@
</x-global::actions.dropdown>
@endif --}}
@if(isset($taskToggle) && $taskToggle === true)

@if (isset($taskToggle) && $taskToggle === true)
<div class="" style="float:right; margin-left:5px;">
<x-global::forms.checkbox labelText="Show Tasks" labelPosition="right" name="showTasks" value="true"
:checked="($tpl->get('showTasks') === 'true')" id="taskTypeToggle" class="toggle" onchange="jQuery('#ticketSearch').submit();" />
</div>
@endif


<div class="clearall"></div>

Expand Down
41 changes: 20 additions & 21 deletions app/Domain/Widgets/Templates/partials/myToDos.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ class="btn btn-primary"
onclick="jQuery('#ticket_new').toggle('fast', function() { jQuery(this).find('input[name=headline]').focus(); });">
<i class="fa fa-plus"></i> Add To-Do
</a>
<div class="btn-group left">
<button class="btn btn-link dropdown-toggle f-right" type="button" data-toggle="dropdown">{!! __("links.group_by") !!}: {{ __('groupByLabel.'.$groupBy) }}</button>
<ul class="dropdown-menu">
<li><span class="radio">
<div class="flex align-center justify-end">
<x-global::actions.dropdown contentRole="ghost">
<x-slot name="labelText">
{!! __("links.group_by") !!}: {{ __('groupByLabel.'.$groupBy) }}
</x-slot>
<x-slot name="menu">
<li><span>
<input type="radio" name="groupBy"
@if($groupBy == "time") checked='checked' @endif
value="time" id="groupByDate"
Expand All @@ -39,7 +42,7 @@ class="btn btn-primary"
/>
<label for="groupByDate">{!! __("label.dates") !!}</label></span></li>
<li>
<span class="radio">
<span>
<input type="radio"
name="groupBy"
@if($groupBy == "project") checked='checked' @endif
Expand All @@ -55,7 +58,7 @@ class="btn btn-primary"
</span>
</li>
<li>
<span class="radio">
<span>
<input type="radio"
name="groupBy"
@if($groupBy == "priority") checked='checked' @endif
Expand All @@ -70,18 +73,14 @@ class="btn btn-primary"
<label for="groupByPriority">{!! __("label.priority") !!}</label>
</span>
</li>

</ul>
</div>
<div class="btn-group left ">
<button class="btn btn-link dropdown-toggle f-right" type="button" data-toggle="dropdown">
{!! __("links.filter") !!}
@if($projectFilter != '')
<span class='badge badge-primary'>1</span>
@endif
</button>
<ul class="dropdown-menu">
<li
</x-slot>
</x-global::actions.dropdown>
<x-global::actions.dropdown contentRole="ghost">
<x-slot name="labelText">
{!! __("links.filter") !!}
</x-slot>
<x-slot name="menu">
<li
@if($projectFilter == '')
class='active'
@endif
Expand Down Expand Up @@ -113,8 +112,8 @@ class='active'
>{{ $project['name'] }}</a></li>
@endforeach
@endif

</ul>
</x-slot>
</x-global::actions.dropdown>
</div>

@dispatchEvent("afterTodoWidgetGroupByDropdown")
Expand Down Expand Up @@ -219,7 +218,7 @@ class="w-full"
@foreach ($ticketGroup['tickets'] as $row)

<li class="ui-state-default" id="ticket_{{ $row['id'] }}" >
<div class="ticketBox fixed priority-border-{{ $row['priority'] }}" data-val="{{ $row['id'] }}">
<div class="ticketBox priority-border-{{ $row['priority'] }}" data-val="{{ $row['id'] }}">
<div class="row">
<div class="col-md-8 titleContainer">
<small>{{ $row['projectName'] }}</small><br />
Expand Down

0 comments on commit a2f815c

Please sign in to comment.