瀏覽代碼

Apply autohide layout only for visit notes

Vijayakrishnan 3 年之前
父節點
當前提交
1f1c33fc0f
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      resources/views/layouts/patient.blade.php

+ 7 - 4
resources/views/layouts/patient.blade.php

@@ -2,10 +2,13 @@
 <?php
 /** @var \App\Models\Client $patient */
 ?>
-<?php $routeName = request()->route()->getName(); ?>
+<?php
+$routeName = request()->route()->getName();
+$isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note && !!$note->visitTemplate);
+?>
 @section('content')
 	<div class="container-fluid h-100">
-		<div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }} {{$routeName === 'patients.view.notes.view.dashboard' ? 'autohide-leftnav' : ''}}">
+		<div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }} {{$isVisitNote ? 'autohide-leftnav' : ''}}">
 			@if(!request()->input('popupmode'))
 			<nav id="sidebarMenu" class="d-block bg-light sidebar collapse px-0">
 				<div class="sidebar-sticky pt-3">
@@ -263,7 +266,7 @@
 				</div>
 			</nav>
 			@endif
-			<main role="main" class="w-100 {{$routeName === 'patients.view.notes.view.dashboard' ? 'p-0' : ''}}">
+			<main role="main" class="w-100 {{$isVisitNote ? 'p-0' : ''}}">
 				@if($pro->is_enrolled_as_mcp && !$patient->mcp)
 					<div class="alert alert-info bg-white mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
 						<div class="font-size-16">
@@ -305,7 +308,7 @@
 						</div>
 					</div>
 				@endif
-				<div class="card {{$routeName === 'patients.view.notes.view.dashboard' ? 'card m-0 border-0 rounded-0' : 'mt-3'}}" id="patient-header">
+				<div class="card {{$isVisitNote ? 'card m-0 border-0 rounded-0' : 'mt-3'}}" id="patient-header">
 					<div class="card-header py-1 hide-inside-ticket-popup">
 						<?php
 						$thumbnail = $patient->profile_picture_base64;