Quellcode durchsuchen

acknowledgeAsAppointmentPro logic fix

Vijayakrishnan Krishnan vor 5 Tagen
Ursprung
Commit
514fb065a6

+ 2 - 0
app/Http/Controllers/AppointmentController.php

@@ -312,6 +312,8 @@ class AppointmentController extends Controller
             $appointment = Appointment::where('uid', $uid)->first();
             $data = [
                 'uid' => $uid,
+                'currentLatestConfirmationDecisionEnum' => $appointment->latest_confirmation_decision_enum,
+                'currentLatestConfirmationDecisionMemo' => $appointment->latest_confirmation_decision_memo,
                 'currentStatus' => $appointment->status,
                 'currentStatusMemo' => $appointment->status_memo,
                 'currentRawDate' => $appointment->raw_date,

+ 11 - 1
resources/views/app/mcp/dashboard/notifications.blade.php

@@ -118,6 +118,16 @@ $apptsPending = [
                             <td>
                                 <form url="/api/appointment/acknowledgeDecisionAsAppointmentPro" discardable>
                                     <input type="hidden" name="uid" value="{{$appt->uid}}">
+                                    <input type="hidden" name="currentLatestConfirmationDecisionEnum" value="{{$appt->latest_confirmation_decision_enum}}">
+                                    @if($appt->latest_confirmation_decision_memo)
+                                        <input type="hidden" name="currentLatestConfirmationDecisionMemo" value="{{$appt->latest_confirmation_decision_memo}}">
+                                    @endif
+                                    <input type="hidden" name="currentStatus" value="{{$appt->status}}">
+                                    <input type="hidden" name="currentStatusMemo" value="{{$appt->statusMemo}}">
+                                    <input type="hidden" name="currentRawDate" value="{{$appt->raw_date}}">
+                                    <input type="hidden" name="currentRawStartTime" value="{{$appt->raw_start_time}}">
+                                    <input type="hidden" name="currentRawEndTime" value="{{$appt->raw_end_time}}">
+                                    <input type="hidden" name="currentTimezone" value="{{$appt->timezone}}">
                                     <button submit class="bg-transparent border-0 p-0 text-primary">Ack.</button>
                                 </form>
                             </td>
@@ -180,7 +190,7 @@ $apptsPending = [
 
                     $.post('/acknowledge-as-appointment-pro', {uids: UIDS, action: action}, function(response){
                         if(response.success){
-                            toastr.success();
+                            toastr.success('Completed');
                             location.reload();
                         }else{
                             toastr.error(response.message);