@extends($layout) @section('content') @php $elementName = 'goal'; @endphp @php $canvasTitle = ''; //get canvas title foreach ($allCanvas as $canvasRow) { if ($canvasRow['id'] == $currentCanvas) { $canvasTitle = $canvasRow['title']; break; } } @endphp
displayNotification(); ?>
@if ($login::userIsAtLeast($roles::$editor) && count($canvasTypes) == 1 && count($allCanvas) > 0) {!! __('links.add_new_canvas_itemgoal') !!} @endif
@if (count($allCanvas) > 0 && !empty($statusLabels)) @php $filterStatus = $filter['status'] ?? 'all'; $filterRelates = $filter['relates'] ?? 'all'; @endphp @if (($filterStatus ?? '') == 'all') @else @endif @endif
@if (count($allCanvas) > 0 && !empty($relatesLabels)) @php $filterStatus = $filter['status'] ?? 'all'; $filterRelates = $filter['relates'] ?? 'all'; @endphp @if ($filterRelates == 'all') @else @endif @endif
@if (count($allCanvas) > 0)
@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(\Leantime\Domain\Comments\Repositories\Comments::class); $nbcomments = $comments->countComments(moduleId: $row['id']); @endphp
@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 }}
@include('goalcanvas::partials.milestoneChips', ['milestones' => $row['milestones'] ?? []])
@endif @endforeach

@if (count($canvasItems) == 0)

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

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


{!! __('text.goal.helper_content') !!}
@endif
@endif @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