|
@@ -152,6 +152,29 @@
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9">
|
|
<div class="col-md-9">
|
|
|
|
|
|
|
|
+ <!-- new associations -->
|
|
|
|
+ @if(count($newMCPAssociations))
|
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
|
+ @foreach($newMCPAssociations as $assoc)
|
|
|
|
+ <div class="mb-1">You have been assigned as the MCP for {{$assoc->patient->displayName()}}.
|
|
|
|
+ <a href="#" class="ack-client-pro-change" data-uid="{{$assoc->uid}}">Acknowledge</a>
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @if(count($newNAAssociations))
|
|
|
|
+ <div class="mb-3 border rounded px-3 py-2 ack-container">
|
|
|
|
+ <p class="pt-1 mb-2"><b>New Patients</b></p>
|
|
|
|
+ @foreach($newNAAssociations as $assoc)
|
|
|
|
+ <div class="mb-1">You have been assigned as the Care Coordinator for {{$assoc->patient->displayName()}}.
|
|
|
|
+ <a href="#" class="ack-client-pro-change" data-uid="{{$assoc->uid}}">Acknowledge</a>
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+
|
|
<ul class="nav nav-tabs">
|
|
<ul class="nav nav-tabs">
|
|
<li class="nav-item">
|
|
<li class="nav-item">
|
|
<a native data-tab="appointments" class="nav-link"
|
|
<a native data-tab="appointments" class="nav-link"
|
|
@@ -599,6 +622,31 @@
|
|
});
|
|
});
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ $(document)
|
|
|
|
+ .off('click', '.ack-client-pro-change')
|
|
|
|
+ .on('click', '.ack-client-pro-change', function() {
|
|
|
|
+ let trigger = $(this).text('…');
|
|
|
|
+ $.post('/api/clientProPage/accept', {
|
|
|
|
+ uid: $(this).attr('data-uid')
|
|
|
|
+ }, _data => {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ trigger.hide();
|
|
|
|
+ let doneElem = $('<i class="text-success fa fa-check"></i>');
|
|
|
|
+ doneElem.insertAfter(trigger);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ let ackContainer = trigger.closest('.ack-container');
|
|
|
|
+ trigger.closest('div').slideUp('fast', function() {
|
|
|
|
+ $(this).remove();
|
|
|
|
+ if(!ackContainer.find('>div').length) {
|
|
|
|
+ ackContainer.remove();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }, 500);
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
addMCInitializer('pro-dashboard', init, '#pro-dashboard-container');
|
|
addMCInitializer('pro-dashboard', init, '#pro-dashboard-container');
|
|
})();
|
|
})();
|