@php $clientId = session('clientId'); $clientName = session('clientName'); $clientImageUrl = session('clientImageUrl'); $userId = session('userId'); $userName = session('userName'); $userImageUrl = session('userImageUrl'); $userPermissions = auth('users')->user()->permissions; @endphp @extends('ahphc.app_home.layout') {{-- MENU --}} {{-- CLIENT --}} {{-- IMAGE --}} @section('HTML-menuClientImage') @if ($clientImageUrl == '') @else
@endif @endsection {{-- NAME --}} @section('menuClientName', $clientName) {{-- @endsection --}} {{-- @endsection RARO: SIN ÉSTO LOS TEST MARCAN UN RISK. ESTA NOVEDAD SE MUESTRA DESDE QUE LOS TEST CORREN EN MEMORIA CON SQLITE, SIN ÉSTO ÉSTO NO FUNCIONA... PERO TODA LA APP LA TIENE!! --}} {{-- INFO --}} @if ($userPermissions->ahp_client['access'] == true) @if ($userPermissions->ahp_client['edit'] == true) @section('menuClient_url', route('client.edit', ['id' => $clientId])) @else @section('menuClient_url', route('client.show', ['id' => $clientId])) @endif @else @section('menuClient_disabled', 'disabled') @endif {{-- USERS --}} @if ($userPermissions->ahp_users['access'] == true) @if ($userPermissions->ahp_users['create'] == true) @section('menuClientUsers_url', route('users.create')) @else @section('menuClientUsers_url', route('users.index')) @endif @else @section('menuClientUsers_disabled', 'disabled') @endif {{-- USER --}} {{-- IMAGE --}} @section('HTML-menuUserImage') @if ($userImageUrl == '') @else @endif @endsection {{-- NAME --}} @section('menuUserName', $userName) {{-- @endsection --}} {{-- @endsection RARO: SIN ÉSTO LOS TEST MARCAN UN RISK. ESTA NOVEDAD SE MUESTRA DESDE QUE LOS TEST CORREN EN MEMORIA CON SQLITE, SIN ÉSTO ÉSTO NO FUNCIONA... PERO TODA LA APP LA TIENE!! --}} {{-- PROFILE --}} @if ($userPermissions->ahp_profile['access'] == true) @if ($userPermissions->ahp_profile['edit'] == true) @section('menuUserProfile_url', route('profile.edit', ['id' => $userId])) @else @section('menuUserProfile_url', route('profile.show', ['id' => $userId])) @endif @else @section('menuUserProfile_disabled', 'disabled') @endif {{-- PREFERENCES --}} @section('menuUserPreferences_url', route('preferences.edit', ['user_id' => $userId])) @section('menuUserPreferences_disabled', '') {{-- LOGOUT --}} @section('menuUserLogout_disabled', '') {{-- CONFIG --}} {{-- MODELS --}} @if ($userPermissions->ahp_schema_pats['access'] == true || $userPermissions->ahphc_schemas['access'] == true) @section('menuSchemas_disabled', '') @else @section('menuSchemas_disabled', 'disabled') @endif {{-- PATIENT --}} @if ($userPermissions->ahp_schema_pats['access'] == true) @section('menuSchemaPats_url', route('schema_pats.show')) @else @section('menuSchemaPats_disabled', 'disabled') @endif {{-- DOCUMENTS --}} @if ($userPermissions->ahphc_schemas['access'] == true) @if ($userPermissions->ahphc_schemas['create'] == true) @section('menuSchemasDocs_url', route('schema_docs.create')) @else @section('menuSchemasDocs_url', route('schema_docs.index')) @endif @else @section('menuSchemasDocs_disabled', 'disabled') @endif {{-- PRESCRIPTIONS --}} @if ($userPermissions->ahphc_schemas['access'] == true) @section('menuSchemasPres_url', '') {{-- route('xxxxxx.index')) --}} @else @section('menuSchemasPres_disabled', 'disabled') @endif {{-- TEMPLATES --}} @if ($userPermissions->ahphc_templates['access'] == true) @section('menuTemplates_disabled', '') @else @section('menuTemplates_disabled', 'disabled') @endif {{-- DOCUMENTS --}} @if ($userPermissions->ahphc_templates['access'] == true) @section('menuTemplatesDocs_url', '') {{-- route('xxxxxx.index')) --}} @else @section('menuTemplatesDocs_disabled', 'disabled') @endif {{-- PRESCRIPTIONS --}} @if ($userPermissions->ahphc_templates['access'] == true) @section('menuTemplatesPres_url', '') {{-- route('xxxxxx.index')) --}} @else @section('menuTemplatesPres_disabled', 'disabled') @endif {{-- ENVS --}} @if ($userPermissions->ahphc_envs['access'] == true) @section('menuEnvs_url', route('envs.index')) @else @section('menuEnvs_disabled', 'disabled') @endif {{-- TAGS --}} @section('menuTags_url', route('tags.index')) @section('menuTags_disabled', '') {{-- CIE10 --}} {{-- --}} {{-- PENDINGS --}} {{-- --}} {{-- OPTIONS --}} @if ($userPermissions->ahp_config['access'] == true) @if ($userPermissions->ahp_config['edit'] == true) @section('menuConfig_url', route('config.edit')) @else @section('menuConfig_url', route('config.show')) @endif @else @section('menuConfig_disabled', 'disabled') @endif {{-- REPORTS --}} @if ($userPermissions->ahphc_reports['access'] == true) @section('menuReports_url', '') {{-- route('xxxxxx.index')) --}} @else @section('menuReports_disabled', 'disabled') @endif {{-- DATABASE --}} @if ($userPermissions->ahp_admin_bd['access'] == true) @section('menuAdminData_url', '') {{-- route('xxxxxx.index')) --}} @else @section('menuAdminData_disabled', 'disabled') @endif {{-- HELP --}} @section('menuHelp_url', route('help')) @section('menuHelp_disabled', '') {{-- RECOVERY --}} @section('menuRecovery_url', route('recovery.index')) @section('menuRecovery_disabled', '') {{-- ******************************************************************************** --}} {{-- ACTIONS --}} @if ($userPermissions->ahp_patients['access'] == true) @section('searchPatientFrm_disabled', '') @if ($userPermissions->ahp_patients['create'] == true) @section('newPatient_url', route('patients.create')) @section('newPatient_disabled', '') @else @section('newPatient_url', '') @section('newPatient_disabled', 'disabled') @endif @else @section('newPatient_disabled', 'disabled') @section('searchPatientFrm_disabled', 'disabled') @endif {{-- PANEL --}} @if ($userPermissions->ahp_patients['access'] == true) @section('patientMenuSection_disabled', '') @else @section('patientMenuSection_disabled', 'disabled') @endif {{-- SECTIONS --}} @if ($userPermissions->ahp_patients['access'] == true) @if ($userPermissions->ahp_patients['create'] == true) @section('patientSection_url', route('patients.create')) @else @section('patientSection_url', route('patients.index')) @endif @endif