@extends('layouts.head_office_app') @section('title', 'Forms') @section('sidebar') @include('layouts.company.sidebar') @endsection @section('content')
@if (request()->query('success'))
{{ request()->query('success') }}
@endif @if (request()->query('error'))
{{ request()->query('error') }}
@endif
My Forms @if ($profile->is_manage_forms == true) @endif
@if (!$beSpokeForms)

No Forms Available.

@else
@foreach ($beSpokeForms as $beSpokeForm) @if ($beSpokeForm->is_deleted || $beSpokeForm->is_archived || $beSpokeForm->soft_deleted) @else @endif @endforeach
Name Category Status Info Purpose Only form managers can see this. It helps them understand the form's purpose and add comments Hidden
{{ $beSpokeForm->name }} @isset($beSpokeForm) @livewire('category-manager', ['form_id' => $beSpokeForm->id]) @else @livewire('category-manager', ['form_id' => null]) @endisset @if ($beSpokeForm->is_active && !$beSpokeForm->is_deleted)

Live

@elseif($beSpokeForm->is_deleted) @else

Inactive

@endif
@if ($beSpokeForm->is_external_link)
@if($beSpokeForm->generate_qr_code) @endif @endif @if ($beSpokeForm->expiry_state != 'never_expire')
Expires in {{ \Carbon\Carbon::parse($beSpokeForm->expiry_time)->diffForHumans() }}
@endif @if (!$beSpokeForm->is_external_link) @php try { $assignedLocations = method_exists($beSpokeForm, 'group_assigned_locations') ? $beSpokeForm->group_assigned_locations() : []; $sitesCount = is_array($assignedLocations) ? count($assignedLocations) : (is_countable($assignedLocations) ? count($assignedLocations) : 0); } catch (\Throwable $e) { $sitesCount = 0; $assignedLocations = []; } @endphp
Sites {{ $sitesCount }}
@if (count($beSpokeForm->groups()))
groups()) > 1) style="height: 50px; overflow-y: auto;" @endif class="custom-scroll d-flex flex-column justify-content-start align-items-start"> @foreach ($beSpokeForm->groups() as $group) @php $origin = []; $currentGroup = $group; while ($currentGroup && $currentGroup->parent) { $origin[] = $currentGroup->parent->group; $currentGroup = $currentGroup->parent; } $origin = array_reverse($origin); $origin[] = $group->group; $originMessage = count($origin) > 1 ? implode(' → ', $origin) : $group->group; @endphp

{{ $group->group }}

@endforeach
@endif

@endif
@csrf

Please select a group/tier

@include('head_office.my_organisation.tree-list', ['groups' => $allGroups])
@if(isset($beSpokeForm->created_by->user))
@if (isset($beSpokeForm->created_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->created_by->user->name))) }}
@endif
Created by
{{$beSpokeForm->created_by->user->name}} on {{$beSpokeForm->created_at->format('d/m/Y')}} at {{$beSpokeForm->created_at->format('h:i A')}}
@if (isset($beSpokeForm->modified_by))
@if (isset($beSpokeForm->modified_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->modified_by->user->name))) }}
@endif
Last modified by {{-- {{$beSpokeForm->modified_by->user->name}} --}}
{{$beSpokeForm->modified_by->user->name}} on {{$beSpokeForm->updated_at->format('d/m/Y')}} at {{$beSpokeForm->updated_at->format('h:i A')}}
@endif @endif
@if ($profile->is_manage_forms)
@if ($beSpokeForm->submitable_to_nhs_lfpse == false) @if (!$beSpokeForm->is_deleted) @if ($beSpokeForm->getRecordCount() === 0) @else @endif @else @endif @endif {{-- --}} @if ($beSpokeForm->is_external_link) @endif @if (!$beSpokeForm->is_deleted) @if ($beSpokeForm->is_active) @else @endif @endif @if (!$beSpokeForm->is_deleted) @if (!$beSpokeForm->is_archived) @else @endif @endif
@endif
@if ($profile->is_manage_forms == true)
@if (!count($beSpokeForms->where('is_archived', 1)))

No Archived forms available

@else
{{-- --}} @foreach ($beSpokeForms->where('is_archived', 1) as $beSpokeForm) {{-- --}} @endforeach @endif
Name CategoryTypeStatus Assigned purpose Info
{{ $beSpokeForm->name }} {{ $beSpokeForm->category?->name }} @if ($beSpokeForm->is_active && !$beSpokeForm->is_deleted)

Live

@elseif($beSpokeForm->is_deleted) @else

Inactive

@endif
@if (count($beSpokeForm->groups()))
groups()) > 1)style="height: 50px;overflow-y: auto;" @endif class="custom-scroll d-flex flex-column "> @foreach ($beSpokeForm->groups() as $key => $assignment)

{{ $assignment->group }}

@endforeach
@endif

@csrf

Please select a group/tier

@include('head_office.my_organisation.tree-list',['groups' => $allGroups])

{{$beSpokeForm->purpose}}

@if (isset($beSpokeForm->created_by->user))
@if (isset($beSpokeForm->created_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->created_by->user->name))) }}
@endif
Created by

{{$beSpokeForm->created_by->user->name}}

on

{{$beSpokeForm->created_at->format('d/m/Y')}}

at

{{$beSpokeForm->created_at->format('h:i A')}}

@if (isset($beSpokeForm->modified_by))
@if (isset($beSpokeForm->modified_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->modified_by->user->name))) }}
@endif
Last modified by

{{$beSpokeForm->modified_by->user->name}}

on

{{$beSpokeForm->updated_at->format('d/m/Y')}}

at

{{$beSpokeForm->updated_at->format('h:i A')}}

@endif
@endif
@if (!$beSpokeForm->getRecordCount() && !$beSpokeForm->is_deleted) @else @endif @if ($beSpokeForm->is_external_link) @endif @if (!$beSpokeForm->is_deleted) @if ($beSpokeForm->is_active) @else @endif @endif @if (!$beSpokeForm->is_deleted) @if (!$beSpokeForm->is_archived) @else @endif @endif
@if (count($beSpokeForms->where('is_deleted', 1)) > 0) {{-- --}} @foreach ($beSpokeForms->where('is_deleted', 1) as $beSpokeForm) @endforeach
Name CategoryTypeStatus Assigned Purpose Info
{{ $beSpokeForm->name }} {{ $beSpokeForm->category?->name }} @if ($beSpokeForm->is_active && !$beSpokeForm->is_deleted)

Live

@elseif($beSpokeForm->is_deleted)

Deleted

@else

Inactive

@endif
@if (count($beSpokeForm->groups()))
groups()) > 1)style="height: 50px;overflow-y: auto;" @endif class="custom-scroll d-flex flex-column "> @foreach ($beSpokeForm->groups() as $key => $assignment)

{{ $assignment->group }}

@endforeach
@endif

@csrf

Please select a group/tier

@include('head_office.my_organisation.tree-list',['groups' => $allGroups])

{{$beSpokeForm->purpose}}

@if (isset($beSpokeForm->created_by->user))
@if (isset($beSpokeForm->created_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->created_by->user->name))) }}
@endif
Created by

{{$beSpokeForm->created_by->user->name}}

on

{{$beSpokeForm->created_at->format('d/m/Y')}}

at {{$beSpokeForm->created_at->format('h:i A')}}
@if (isset($beSpokeForm->modified_by))
@if (isset($beSpokeForm->modified_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $beSpokeForm->modified_by->user->name))) }}
@endif
Last modified by

{{$beSpokeForm->modified_by->user->name}}

on

{{$beSpokeForm->updated_at->format('d/m/Y')}}

at

{{$beSpokeForm->updated_at->format('h:i A')}}

@endif
@endif
@if (!$beSpokeForm->getRecordCount() && !$beSpokeForm->is_deleted) @else @endif @if ($beSpokeForm->is_external_link) @endif @if (!$beSpokeForm->is_deleted) @if ($beSpokeForm->is_active) @else @endif @endif @if (!$beSpokeForm->is_deleted) @if (!$beSpokeForm->is_archived) @else @endif @endif
@else

No deleted forms

@endif
@endif
@endif
@endsection
0

Items Selected

@csrf
@section('styles') @endsection @section('scripts') {{-- --}} @include('location.be_spoke_forms.script') @if(Session::has('success')) @elseif(Session::has('error')) @endif @endsection