|
@@ -685,15 +685,19 @@ use App\Models\Handout;
|
|
|
title="{{ $hasBills ? 'Cannot cancel note since it has un-cancelled bills in it' : '' }}">
|
|
|
<a class="text-danger" href="" show start>Cancel</a>
|
|
|
<form url="/api/note/cancel" right>
|
|
|
- <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
- <p class="small mb-2">Are you sure you want to cancel this note?</p>
|
|
|
- <div class="mb-2">
|
|
|
- <textarea name="memo" id="" cols="30" rows="5" placeholder="Memo" class="memo-textarea form-control form-control-sm"></textarea>
|
|
|
- </div>
|
|
|
- <div class="d-flex align-items-center">
|
|
|
- <button class="btn btn-sm btn-danger mr-2" submit>Yes</button>
|
|
|
- <button class="btn btn-sm btn-default mr-2 border" cancel>No</button>
|
|
|
- </div>
|
|
|
+ @if($patient->has_cm_setup_been_performed && $patient->cm_setup_note_id === $note->id)
|
|
|
+ A care-plan was created during this note. Please undo that before cancelling the note.
|
|
|
+ @else
|
|
|
+ <input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
+ <p class="small mb-2">Are you sure you want to cancel this note?</p>
|
|
|
+ <div class="mb-2">
|
|
|
+ <textarea name="memo" id="" cols="30" rows="5" placeholder="Memo" class="memo-textarea form-control form-control-sm"></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Yes</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>No</button>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
</form>
|
|
|
</div>
|
|
|
@else
|