@extends($layout) @section('content') @php use Leantime\Domain\Comments\Repositories\Comments; use Leantime\Domain\Goalcanvas\Services\Goalcanvas; $elementName = 'goal'; /** * showCanvasTop.inc template - Top part of the main canvas page * * Required variables: * - goal Name of current canvas */ $canvasTitle = ''; //get canvas title foreach ($allCanvas as $canvasRow) { if ($canvasRow["id"] == $currentCanvas) { $canvasTitle = $canvasRow["title"]; $canvasId = $canvasRow["id"]; break; } } @endphp

Progress: {{ round($goalStats['avgPercentComplete']) }}%

{{ sprintf(__("text.percent_complete"), round($goalStats['avgPercentComplete'])) }}

On Track

{{ $goalStats['goalsOnTrack'] }}

At Risk

{{ $goalStats['goalsAtRisk'] }}

Miss

{{ $goalStats['goalsMiss'] }}
@if (count($allCanvas) > 0) @foreach ($allCanvas as $canvasRow)
@php $canvasSvc = app()->make(Goalcanvas::class); $canvasItems = $canvasSvc->getCanvasItemsById($canvasRow["id"]); @endphp
@if (!is_countable($canvasItems) || count($canvasItems) == 0)
No goals on this board yet. Open the board to start adding goals
@endif @foreach ($canvasItems as $row) @php $filterStatus = $filter['status'] ?? 'all'; $filterRelates = $filter['relates'] ?? 'all'; @endphp @if ($row['box'] === $elementName && ($filterStatus == 'all' || $filterStatus == $row['status']) && ($filterRelates == 'all' || $filterRelates == $row['relates'])) @php $comments = app()->make(Comments::class); $nbcomments = $comments->countComments(moduleId: $row['id']); @endphp
@if ($login::userIsAtLeast($roles::$editor)) @endif @if ($login::userIsAtLeast($roles::$editor))     @endif

Goal: {{ $row["title"] }}


Metric: {{$row["description"] }}

@php $percentDone = $row["goalProgress"]; $metricTypeFront = ''; $metricTypeBack = ''; if ($row["metricType"] == "percent") { $metricTypeBack = '%'; } elseif ($row["metricType"] == "currency") { $metricTypeFront = __("language.currency"); } @endphp
{{ sprintf(__("text.percent_complete"), $percentDone) }}
{{ sprintf(__("text.percent_complete"), $percentDone) }}
Start:
{{ $metricTypeFront . $row["startValue"] . $metricTypeBack }}
{{ __('label.current') }}:
{{ $metricTypeFront . $row["currentValue"] . $metricTypeBack }}
{{ __('label.goal') }}:
{{ $metricTypeFront . $row["endValue"] . $metricTypeBack }}
@if (!empty($statusLabels)) @endif @if (!empty($relatesLabels)) @endif
{{ $nbcomments }}
@if ($row['milestoneHeadline'] != '')
{{ __("label.loading_milestone") }}
@endif
@endif @endforeach

@endforeach @endif
{{-- * showCanvasBottom.blade.php template - Bottom part of the main canvas page * * Required variables: * - goal Name of current canvas --}} @if (count($allCanvas) > 0) {{-- --}} @else

{!! file_get_contents(ROOT . "/dist/images/svg/undraw_design_data_khdb.svg") !!}

{{ __("headlines.goal.analysis") }}


{!! __("text.goal.helper_content") !!} @if ($login::userIsAtLeast($roles::$editor))

{{ __("links.icon.create_new_board") }} @endif
@endif @if (!empty($disclaimer) && count($allCanvas) > 0) {{ $disclaimer }} @endif {!! $tpl->viewFactory->make($tpl->getTemplatePath('canvas', 'modals'), $__data)->render() !!}
@endsection