Browse Source

Client appointment emails integration

Samson Mutunga 1 year ago
parent
commit
6d3316c9db

+ 49 - 0
app/Http/Controllers/Api/ApiAppointmentController.php

@@ -0,0 +1,49 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use Illuminate\Http\Request;
+use App\Http\Controllers\Api\ApiBaseController;
+use App\Http\Services\EmailService;
+use App\Models\Appointment;
+
+
+class ApiAppointmentController extends ApiBaseController
+{
+    public $emailService;
+
+    public function __construct(Request $request, EmailService $emailService)
+    {
+        parent::__construct($request);
+        $this->emailService = $emailService;
+    }
+
+    public function create(Request $request){
+        $data = $this->getFormData($request);
+        $response = $this->callJavaApi('/appointment/create', $data);
+        if(!@$response['success']){
+            return $this->fail($response['message']);
+        }
+
+        $appointment = Appointment::where('uid', $response['data'])->first();
+        if($appointment){
+            $this->emailService->notifyClientOnNewAppointment($appointment);
+            $this->emailService->notifyProOnNewAppointment($appointment);
+        }
+        return $this->pass($response['data']);
+    }
+    
+    public function requestConfirmation(Request $request){
+        $data = $this->getFormData($request);
+        $response = $this->callJavaApi('/appointment/sendConfirmationRequestViaEmailAndSms', $data);
+        if(!@$response['success']){
+            return $this->fail($response['message']);
+        }
+        $appointment = Appointment::where('uid', $data['uid'])->first();
+        if($appointment){
+            $this->emailService->notifyClientToConfirmAppointment($appointment);
+        }
+        return $this->pass();
+    }
+    
+}

+ 22 - 0
app/Http/Controllers/Api/ApiBaseController.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use Illuminate\Http\Request;
+
+
+class ApiBaseController extends ApiBaseLoggedInController
+{
+
+    public function __construct(Request $request)
+    {
+        parent::__construct($request);
+    }
+
+    public function getFormData(Request $request){
+        $data = $request->all();
+        unset($data['_token']);
+
+        return $data;
+    }
+}

+ 33 - 0
app/Http/Controllers/Api/ApiBaseLoggedInController.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use Illuminate\Http\Request;
+use App\Http\Controllers\Controller;
+use App\Models\AppSession;
+use Response;
+
+class ApiBaseLoggedInController extends Controller
+{
+    protected $performer;
+
+    public function __construct(Request $request)
+    {
+        $this->middleware(function($request, $next){
+            $sessionKey = $request->cookie('sessionKey');
+            $appSession = AppSession::where('session_key', $sessionKey)->where('is_active', true)->first();
+            $authenticated = $sessionKey && $appSession && $appSession->pro;
+        
+            if (!$authenticated) {
+                return Response::json(['success' => false, 'message' => 'Not allowed!']);
+            }
+
+            $this->performer = $appSession;
+
+            return $next($request);
+        });
+
+
+        
+    }
+}

+ 13 - 1
app/Http/Controllers/EmailController.php

@@ -11,6 +11,7 @@ use App\Models\AppSession;
 use App\Models\Invoice;
 use App\Models\Invoice;
 use App\Models\FinancialTransaction;
 use App\Models\FinancialTransaction;
 use App\Models\CompanyClient;
 use App\Models\CompanyClient;
+use App\Models\Appointment;
 use Illuminate\Support\Facades\Cookie;
 use Illuminate\Support\Facades\Cookie;
 
 
 
 
@@ -55,7 +56,18 @@ class EmailController extends Controller
                 $toEmailAddress = $this->pro ? $this->pro->email_address : 'john@doe.com';             
                 $toEmailAddress = $this->pro ? $this->pro->email_address : 'john@doe.com';             
                 $toName = $this->pro ? $this->pro->displayName() : 'John Doe';
                 $toName = $this->pro ? $this->pro->displayName() : 'John Doe';
                 $message = 'Client information has been updated';
                 $message = 'Client information has been updated';
-                return view('emails/templates/' . $email, compact('appUrl', 'toEmailAddress', 'toName', 'message', 'stringMappingConfig', 'appInternalName', 'emailFromName'));
+                $appointment = Appointment::first();
+                return view('emails/templates/' . $email, compact(
+                    'appUrl', 
+                    'toEmailAddress', 
+                    'toName', 
+                    'message', 
+                    'stringMappingConfig', 
+                    'appInternalName', 
+                    'emailFromName',
+
+                    'appointment'
+                ));
             } else {
             } else {
                 abort(404);
                 abort(404);
             }
             }

+ 26 - 159
app/Http/Services/EmailService.php

@@ -2,8 +2,7 @@
 
 
 namespace App\Http\Services;
 namespace App\Http\Services;
 
 
-use App\Models\Invoice;
-use App\Models\FinancialTransaction;
+use App\Models\Appointment;
 use Illuminate\Support\Facades\Http;
 use Illuminate\Support\Facades\Http;
 use Illuminate\Support\Facades\View;
 use Illuminate\Support\Facades\View;
 
 
@@ -44,132 +43,34 @@ class EmailService
         return json_decode($response, true);
         return json_decode($response, true);
     }
     }
 
 
-
-    //Emails
-
-    public function notifyClientOnNewInvoice(Invoice $invoice)
-    {
-        $clientEmailAddress = $invoice->customer->client->email_address;
-        if(!$clientEmailAddress) return;
-
-        $appInternalName = $this->appInternalName;
-        $stringMappingConfig = $this->stringMappingConfig;
-        $appUrl = $this->appUrl;
-        $emailFromName = $this->emailFromName;
-        $toEmailAddress = $clientEmailAddress;
-        $html = (string) view('emails.templates.invoice-created-email', compact('toEmailAddress', 'invoice', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
-        $plainText = '';
-
-        $params = [
-            'subject' => 'New Payment Request Added to Your Account',
-            'htmlBody' => $html,
-            'plainTextBody' => $plainText,
-            'toAddress' => $clientEmailAddress,
-            'fromEmail' => $this->fromEmailAddress,
-            'fromName' => $this->emailFromName,
-        ];
-
-        $response = $this->callJava('/email/send', $params);
-        return $response;
-    }
-
-    public function notifyClientOnInvoiceDeactivation(Invoice $invoice)
-    {
-        $clientEmailAddress = $invoice->customer->client->email_address;
-        if(!$clientEmailAddress) return;
-
-        $appInternalName = $this->appInternalName;
-        $stringMappingConfig = $this->stringMappingConfig;
-        $appUrl = $this->appUrl;
-        $emailFromName = $this->emailFromName;
-        $toEmailAddress = $clientEmailAddress;
-        $html = (string) view('emails.templates.invoice-deactivation-email', compact('toEmailAddress', 'invoice', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
-        $plainText = '';
-
-        $params = [
-            'subject' => 'Payment Request Cancellation Notice',
-            'htmlBody' => $html,
-            'plainTextBody' => $plainText,
-            'toAddress' => $clientEmailAddress,
-            'fromEmail' => $this->fromEmailAddress,
-            'fromName' => $this->emailFromName,
-        ];
-
-        $response = $this->callJava('/email/send', $params);
-        return $response;
-    }
-
-    public function notifyClientOnInvoicePayment(Invoice $invoice)
-    {
-        $clientEmailAddress = $invoice->customer->client->email_address;
-        if(!$clientEmailAddress) return;
-
-        $appInternalName = $this->appInternalName;
-        $stringMappingConfig = $this->stringMappingConfig;
-        $appUrl = $this->appUrl;
-        $emailFromName = $this->emailFromName;
-        $toEmailAddress = $clientEmailAddress;
-        $html = (string) view('emails.templates.invoice-payment-email', compact('toEmailAddress', 'invoice', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
-        $plainText = '';
-
-        $params = [
-            'subject' => 'Transaction Notification: Service Payment Confirmation',
-            'htmlBody' => $html,
-            'plainTextBody' => $plainText,
-            'toAddress' => $clientEmailAddress,
-            'fromEmail' => $this->fromEmailAddress,
-            'fromName' => $this->emailFromName,
-        ];
-
-        $response = $this->callJava('/email/send', $params);
-        return $response;
+    public function getValidToEmailAddress($email){
+        if(config('app.env') !== 'production'){
+            return config('app.devEmailAddress');
+        }
+        return $email;
     }
     }
 
 
-    public function notifyClientOnFailedInvoicePayment(Invoice $invoice)
-    {
-        $clientEmailAddress = $invoice->customer->client->email_address;
-        if(!$clientEmailAddress) return;
-
-        $appInternalName = $this->appInternalName;
-        $stringMappingConfig = $this->stringMappingConfig;
-        $appUrl = $this->appUrl;
-        $emailFromName = $this->emailFromName;
-        $toEmailAddress = $clientEmailAddress;
-        $html = (string) view('emails.templates.invoice-failed-payment-email', compact('toEmailAddress', 'invoice', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
-        $plainText = '';
-
-        $params = [
-            'subject' => 'Payment Declined: Action Required',
-            'htmlBody' => $html,
-            'plainTextBody' => $plainText,
-            'toAddress' => $clientEmailAddress,
-            'fromEmail' => $this->fromEmailAddress,
-            'fromName' => $this->emailFromName,
-        ];
-
-        $response = $this->callJava('/email/send', $params);
-        return $response;
-    }
 
 
+    //Emails
 
 
-    public function notifyClientOnRefundTransaction(FinancialTransaction $transaction)
+    public function notifyClientOnNewAppointment(Appointment $appointment)
     {
     {
-        $clientEmailAddress = $transaction->customer->client->email_address;
-        if(!$clientEmailAddress) return;
+        $toEmailAddress = $this->getValidToEmailAddress($appointment->client->email_address);
+        if(!$toEmailAddress) return;
 
 
         $appInternalName = $this->appInternalName;
         $appInternalName = $this->appInternalName;
         $stringMappingConfig = $this->stringMappingConfig;
         $stringMappingConfig = $this->stringMappingConfig;
         $appUrl = $this->appUrl;
         $appUrl = $this->appUrl;
         $emailFromName = $this->emailFromName;
         $emailFromName = $this->emailFromName;
-        $toEmailAddress = $clientEmailAddress;
-        $html = (string) view('emails.templates.transaction-refund-email', compact('toEmailAddress', 'transaction', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
+        $toEmailAddress = $toEmailAddress;
+        $html = (string) view('emails.templates.client-new-appointment', compact('toEmailAddress', 'appointment', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
         $plainText = '';
         $plainText = '';
 
 
         $params = [
         $params = [
-            'subject' => 'Refund Issued for Payment',
+            'subject' => 'An appointment has been scheduled',
             'htmlBody' => $html,
             'htmlBody' => $html,
             'plainTextBody' => $plainText,
             'plainTextBody' => $plainText,
-            'toAddress' => $clientEmailAddress,
+            'toAddress' => $toEmailAddress,
             'fromEmail' => $this->fromEmailAddress,
             'fromEmail' => $this->fromEmailAddress,
             'fromName' => $this->emailFromName,
             'fromName' => $this->emailFromName,
         ];
         ];
@@ -178,23 +79,21 @@ class EmailService
         return $response;
         return $response;
     }
     }
 
 
-    public function notifyEmailOnClientChange($client, $message, $toEmailAddres, $toName)
+    public function notifyProOnNewAppointment(Appointment $appointment)
     {
     {
-        if(config('app.env') !== 'production'){
-            $toEmailAddress = config('app.devEmailAddress');
-        }
-
+        $toEmailAddress = $this->getValidToEmailAddress($appointment->pro->email_address);
         if(!$toEmailAddress) return;
         if(!$toEmailAddress) return;
-        
+
         $appInternalName = $this->appInternalName;
         $appInternalName = $this->appInternalName;
         $stringMappingConfig = $this->stringMappingConfig;
         $stringMappingConfig = $this->stringMappingConfig;
         $appUrl = $this->appUrl;
         $appUrl = $this->appUrl;
         $emailFromName = $this->emailFromName;
         $emailFromName = $this->emailFromName;
-        $html = (string) view('emails.templates.notify-on-company-client-change-email', compact('toEmailAddress', 'message', 'toName', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
+        $toEmailAddress = $toEmailAddress;
+        $html = (string) view('emails.templates.pro-new-appointment', compact('toEmailAddress', 'appointment', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
         $plainText = '';
         $plainText = '';
 
 
         $params = [
         $params = [
-            'subject' => $client->displayName() . ' Information Update',
+            'subject' => 'An appointment has been scheduled',
             'htmlBody' => $html,
             'htmlBody' => $html,
             'plainTextBody' => $plainText,
             'plainTextBody' => $plainText,
             'toAddress' => $toEmailAddress,
             'toAddress' => $toEmailAddress,
@@ -206,23 +105,21 @@ class EmailService
         return $response;
         return $response;
     }
     }
 
 
-    public function notifyOnCompanyClientChange($companyClient, $message, $toEmailAddres, $toName)
+    public function notifyClientToConfirmAppointment(Appointment $appointment)
     {
     {
-        if(config('app.env') !== 'production'){
-            $toEmailAddress = config('app.devEmailAddress');
-        }
-
+        $toEmailAddress = $this->getValidToEmailAddress($appointment->client->email_address);
         if(!$toEmailAddress) return;
         if(!$toEmailAddress) return;
-        
+
         $appInternalName = $this->appInternalName;
         $appInternalName = $this->appInternalName;
         $stringMappingConfig = $this->stringMappingConfig;
         $stringMappingConfig = $this->stringMappingConfig;
         $appUrl = $this->appUrl;
         $appUrl = $this->appUrl;
         $emailFromName = $this->emailFromName;
         $emailFromName = $this->emailFromName;
-        $html = (string) view('emails.templates.notify-on-company-client-change-email', compact('toEmailAddress', 'companyClient', 'message', 'toName', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
+        $toEmailAddress = $toEmailAddress;
+        $html = (string) view('emails.templates.client-confirm-appointment', compact('toEmailAddress', 'appointment', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
         $plainText = '';
         $plainText = '';
 
 
         $params = [
         $params = [
-            'subject' => $companyClient->client->displayName() . ' Information Update | ' . $companyClient->company->name,
+            'subject' => 'Confirm Appointment',
             'htmlBody' => $html,
             'htmlBody' => $html,
             'plainTextBody' => $plainText,
             'plainTextBody' => $plainText,
             'toAddress' => $toEmailAddress,
             'toAddress' => $toEmailAddress,
@@ -234,34 +131,4 @@ class EmailService
         return $response;
         return $response;
     }
     }
 
 
-    public function sendServerError($code)
-    {
-        $toEmailAddress = config('app.devEmailAddress');
-        if(!$toEmailAddress) return;
-
-        $emails = explode(',', $toEmailAddress);
-        
-        $appInternalName = $this->appInternalName;
-        $stringMappingConfig = $this->stringMappingConfig;
-        $appUrl = $this->appUrl;
-        $emailFromName = $this->emailFromName;
-        $html = (string) view('emails.templates.error-email', compact('toEmailAddress', 'code', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
-        $plainText = '';
-
-        foreach($emails as $email){
-            $email = preg_replace('/\s+/', '', $email);
-            $params = [
-                'subject' => 'Server Error - ' . $code,
-                'htmlBody' => $html,
-                'plainTextBody' => $plainText,
-                'toAddress' => $email,
-                'fromEmail' => $this->fromEmailAddress,
-                'fromName' => $this->emailFromName,
-            ];
-
-            $response = $this->callJava('/email/send', $params);
-        }
-        return;
-    }
-
 }
 }

+ 1 - 1
app/Providers/RouteServiceProvider.php

@@ -72,7 +72,7 @@ class RouteServiceProvider extends ServiceProvider
      */
      */
     protected function mapApiRoutes()
     protected function mapApiRoutes()
     {
     {
-        Route::prefix('api')
+        Route::prefix('v1/api')
             ->middleware('api')
             ->middleware('api')
             ->namespace($this->namespace)
             ->namespace($this->namespace)
             ->group(base_path('routes/api.php'));
             ->group(base_path('routes/api.php'));

+ 4 - 0
config/app.php

@@ -92,6 +92,10 @@ return [
     'defaultErxCompanyState' => env('DEFAULT_ERX_COMPANY_STATE'),
     'defaultErxCompanyState' => env('DEFAULT_ERX_COMPANY_STATE'),
     'defaultErxCompanyZip' => env('DEFAULT_ERX_COMPANY_ZIP'),
     'defaultErxCompanyZip' => env('DEFAULT_ERX_COMPANY_ZIP'),
     'internalName' => env('APP_INTERNAL_NAME', 'lh'),
     'internalName' => env('APP_INTERNAL_NAME', 'lh'),
+    'devEmailAddress' => env('DEV_EMAIL_ADDRESS'),
+    'adminNotificationEmails' => env('ADMIN_NOTIFICATION_EMAILS'),
+    'fromEmailAddress' => env('MAIL_FROM_ADDRESS'),
+    'emailFromName' => env('MAIL_FROM_NAME'),
 
 
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------

+ 2 - 1
resources/views/app/patient/appointment-calendar.blade.php

@@ -180,7 +180,8 @@
             </div>
             </div>
         </div>
         </div>
         <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="client-add-appointment">
         <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="client-add-appointment">
-            <form method="POST" action="/api/appointment/create" id="newApptForm">
+            <form method="POST" action="{{ route('api.appointment.create') }}" id="newApptForm">
+                @csrf
                 <h3 class="stag-popup-title">
                 <h3 class="stag-popup-title">
                     <span>Book New Appointment</span>
                     <span>Book New Appointment</span>
                     <a href="#" class="ml-auto text-secondary"
                     <a href="#" class="ml-auto text-secondary"

+ 2 - 1
resources/views/app/patient/notes.blade.php

@@ -126,7 +126,8 @@
                 <span class="mx-2 text-secondary">|</span>
                 <span class="mx-2 text-secondary">|</span>
                 <div moe id="new-appt-moe">
                 <div moe id="new-appt-moe">
                     <a start show class="py-0 mb-3 text-info font-weight-bold"></a>
                     <a start show class="py-0 mb-3 text-info font-weight-bold"></a>
-                    <form url="/api/appointment/create" redir="/patients/view/{{$patient->uid}}/notes?apptUid=[data]">
+                    <form url="{{ route('api.appointment.create') }}" redir="/patients/view/{{$patient->uid}}/notes?apptUid=[data]">
+                        @csrf
                         <p class="mb-2 font-weight-bold">Create Appointment</p>
                         <p class="mb-2 font-weight-bold">Create Appointment</p>
                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
                         <div class="mb-2">
                         <div class="mb-2">

+ 2 - 1
resources/views/app/patient/partials/appointment-request-confirmation.blade.php

@@ -1,6 +1,7 @@
 <div moe relative class="">
 <div moe relative class="">
     <a href="#" start show class="text-sm font-weight-normal">{{ $label }}</a>
     <a href="#" start show class="text-sm font-weight-normal">{{ $label }}</a>
-    <form url="/api/appointment/sendConfirmationRequestViaEmailAndSms" right>
+    <form url="{{ route('api.appointment.request-confirmation') }}" right>
+        @csrf
         <input type="hidden" name="uid" value="{{ $appointment->uid }}">
         <input type="hidden" name="uid" value="{{ $appointment->uid }}">
         <div class="mb-2">
         <div class="mb-2">
             <label for="" class="text-sm text-secondary mb-1">Cell Number</label>
             <label for="" class="text-sm text-secondary mb-1">Cell Number</label>

+ 2 - 1
resources/views/app/practice-management/calendar.blade.php

@@ -142,7 +142,8 @@
             </div>
             </div>
         </div>
         </div>
         <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="client-add-appointment">
         <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="client-add-appointment">
-            <form method="POST" action="/api/appointment/create" id="newApptForm">
+            <form method="POST" action="{{ route('api.appointment.create') }}" id="newApptForm">
+                @csrf
                 <h3 class="stag-popup-title">
                 <h3 class="stag-popup-title">
                     <span>Book New Appointment</span>
                     <span>Book New Appointment</span>
                     <a href="#" class="ml-auto text-secondary"
                     <a href="#" class="ml-auto text-secondary"

+ 18 - 0
resources/views/emails/templates/client-confirm-appointment.blade.php

@@ -0,0 +1,18 @@
+@extends('emails.layout')
+<?php
+$appInternalName = config('app.internalName');
+$appConfig = config('constants.' . $appInternalName);
+?>
+@section('salutation')
+    Hi, {{ $appointment->client->displayName() }}!
+@endsection
+
+@section('content')
+    <p class="f-fallback" style="color: #000; font-size: 16px; padding: 0 15px; line-height: 30px; margin: .4em 0 0.1875em;">
+  Please visit the link below to confirm your appointment or call us.
+</p>
+@include("emails.call-to-action-button", [
+  'link' => route("appointment_confirmation", $appointment->uid),
+  'label' => 'Confirm Appointment'
+])
+@endsection

+ 14 - 0
resources/views/emails/templates/client-new-appointment.blade.php

@@ -0,0 +1,14 @@
+@extends('emails.layout')
+<?php
+$appInternalName = config('app.internalName');
+$appConfig = config('constants.' . $appInternalName);
+?>
+@section('salutation')
+    Hi, {{ $appointment->client->displayName() }}!
+@endsection
+
+@section('content')
+    <p class="f-fallback" style="color: #000; font-size: 16px; padding: 0 15px; line-height: 30px; margin: .4em 0 0.1875em;">
+  You have a scheduled appointment on {{ friendly_date($appointment->raw_date) }} from {{ $appointment->raw_start_time }} with {{ $appointment->pro->displayName() }}.
+</p>
+@endsection

+ 14 - 0
resources/views/emails/templates/pro-new-appointment.blade.php

@@ -0,0 +1,14 @@
+@extends('emails.layout')
+<?php
+$appInternalName = config('app.internalName');
+$appConfig = config('constants.' . $appInternalName);
+?>
+@section('salutation')
+    Hi, {{ $appointment->pro->displayName() }}!
+@endsection
+
+@section('content')
+    <p class="f-fallback" style="color: #000; font-size: 16px; padding: 0 15px; line-height: 30px; margin: .4em 0 0.1875em;">
+  You have a scheduled appointment on {{ friendly_date($appointment->raw_date) }} from {{ $appointment->raw_start_time }} with {{ $appointment->client->displayName() }}.
+</p>
+@endsection

+ 10 - 0
routes/api.php

@@ -2,6 +2,7 @@
 
 
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Route;
 use Illuminate\Support\Facades\Route;
+use App\Http\Controllers\Api\ApiAppointmentController;
 
 
 /*
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
@@ -17,3 +18,12 @@ use Illuminate\Support\Facades\Route;
 /*Route::middleware('auth:api')->get('/user', function (Request $request) {
 /*Route::middleware('auth:api')->get('/user', function (Request $request) {
     return $request->user();
     return $request->user();
 });*/
 });*/
+
+Route::name('api.')->group(function () {
+    //Appointment
+    Route::name('appointment.')->prefix('appointment')->group(function () {
+       Route::post('create', [ApiAppointmentController::class, 'create'])->name('create');
+       Route::post('request-confirmation', [ApiAppointmentController::class, 'requestConfirmation'])->name('request-confirmation');
+    });
+    
+});