|
@@ -3,25 +3,31 @@
|
|
background: none;
|
|
background: none;
|
|
border: 1px solid #856404;
|
|
border: 1px solid #856404;
|
|
padding: 3px 10px;
|
|
padding: 3px 10px;
|
|
- color: #856404;
|
|
|
|
|
|
+ color: #856404 !important;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
+
|
|
.confirm-hrs-btn:hover,
|
|
.confirm-hrs-btn:hover,
|
|
.confirm-hrs-btn:focus {
|
|
.confirm-hrs-btn:focus {
|
|
text-decoration: none;
|
|
text-decoration: none;
|
|
- color: #856404;
|
|
|
|
|
|
+ color: #856404 !important;
|
|
|
|
+ }
|
|
|
|
+ .confirm-hrs-btn.red {
|
|
|
|
+ color: #d14e4e !important;
|
|
|
|
+ border-color: #d14e4e;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-<div id="confirmHoursOfAvailability" class="alert alert-warning mb-0 py-1 px-3 rounded-0">
|
|
|
|
- <div class="d-flex align-items-center justify-content-center" style="font-size: 14px;">
|
|
|
|
- <span><i class="fas fa-exclamation-triangle"></i> Please confirm your <a href="{{ route('practice-management.proAvailability') }}" style="color: #856404;"><u>hours of availability</u></a>.</span>
|
|
|
|
|
|
+<div id="confirmHoursOfAvailability" class="alert alert-warning mb-0 py-2 px-3 mb-2">
|
|
|
|
+ <div class="d-flex align-items-center justify-content-between" style="font-size: 14px;">
|
|
|
|
+ @if(!$pro->are_hours_of_availability_confirmed)
|
|
|
|
+ <span><i class="fas fa-exclamation-triangle"></i> Please confirm your hours of availability.</span>
|
|
|
|
|
|
<div id="confirmHoursOfAvailabilityMoe" moe class="ml-4">
|
|
<div id="confirmHoursOfAvailabilityMoe" moe class="ml-4">
|
|
<a class="confirm-hrs-btn" href="" show start>Confirm</a>
|
|
<a class="confirm-hrs-btn" href="" show start>Confirm</a>
|
|
- <form url="/api/pro/confirmHoursOfAvailability" hook="onConfirmHoursOfAvailaility">
|
|
|
|
|
|
+ <form right url="/api/pro/confirmHoursOfAvailability">
|
|
<input type="hidden" name="uid" value="{{ $pro->uid }}">
|
|
<input type="hidden" name="uid" value="{{ $pro->uid }}">
|
|
<label>Are you sure?</label>
|
|
<label>Are you sure?</label>
|
|
<div class="">
|
|
<div class="">
|
|
@@ -30,29 +36,37 @@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
- <a id="undoConfirmHoursOfAvailability" class="d-none ml-4 confirm-hrs-btn">Undo</a>
|
|
|
|
|
|
+ @else
|
|
|
|
+ <div>
|
|
|
|
+ <span>Hours of Avaliability last confirmed on <b><i class="fas fa-history"></i> {{ friendly_date($pro->hours_of_availability_confirmed_at) }}</b></span>
|
|
|
|
+ </div>
|
|
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div id="confirmHoursOfAvailabilityMoe" moe class="ml-4">
|
|
|
|
+ <a class="confirm-hrs-btn" href="" show start>Reconfirm</a>
|
|
|
|
+ <form right url="/api/pro/confirmHoursOfAvailability">
|
|
|
|
+ <input type="hidden" name="uid" value="{{ $pro->uid }}">
|
|
|
|
+ <label>Are you sure?</label>
|
|
|
|
+ <div class="">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ <div id="confirmHoursOfAvailabilityMoe" moe class="ml-1">
|
|
|
|
+ <a class="confirm-hrs-btn red" href="" show start>Undo</a>
|
|
|
|
+ <form right url="/api/pro/undoConfirmHoursOfAvailability">
|
|
|
|
+ <input type="hidden" name="uid" value="{{ $pro->uid }}">
|
|
|
|
+ <label>Are you sure?</label>
|
|
|
|
+ <div class="">
|
|
|
|
+ <button class="btn btn-primary btn-sm" submit>Yes</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
|
|
-<script>
|
|
|
|
- (function() {
|
|
|
|
- var hasUndoneConfirmation = false;
|
|
|
|
- addMCHook('onConfirmHoursOfAvailaility', function(){
|
|
|
|
- $('#confirmHoursOfAvailabilityMoe').remove();
|
|
|
|
- var confirmSection = $('#confirmHoursOfAvailability');
|
|
|
|
- var undoConfirmBtn = $('#undoConfirmHoursOfAvailability');
|
|
|
|
|
|
|
|
- undoConfirmBtn.removeClass('d-none').click(function(){
|
|
|
|
- hasUndoneConfirmation = true;
|
|
|
|
- $.post('/api/pro/undoConfirmHoursOfAvailability', {uid:"{{ $pro->uid }}"}, function(response){
|
|
|
|
- fastReload();
|
|
|
|
- }, 'json');
|
|
|
|
- });
|
|
|
|
- setTimeout(function(){
|
|
|
|
- if(hasUndoneConfirmation) return;
|
|
|
|
- $('#confirmHoursOfAvailability').remove();
|
|
|
|
- }, 5000);
|
|
|
|
- });
|
|
|
|
- }).call(window);
|
|
|
|
-</script>
|
|
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+</div>
|