Browse Source

removed results attachment

= 6 months ago
parent
commit
528869dca1
2 changed files with 10 additions and 10 deletions
  1. 4 4
      app/Http/Controllers/AdminController.php
  2. 6 6
      app/Http/Services/EmailService.php

+ 4 - 4
app/Http/Controllers/AdminController.php

@@ -564,7 +564,7 @@ class AdminController extends Controller
         $order->save();
         $order->save();
     }
     }
     return $this->pass();
     return $this->pass();
-    
+
   }
   }
 
 
   public function emailAttachment(Request $request){
   public function emailAttachment(Request $request){
@@ -574,14 +574,14 @@ class AdminController extends Controller
   }
   }
 
 
   public function emailReport(Request $request, StoreOrder $order){
   public function emailReport(Request $request, StoreOrder $order){
-    $results_attachment = $order->getDetailJsonValue('results_attachment');
+    //$results_attachment = $order->getDetailJsonValue('results_attachment');
 
 
     $emailParams = [
     $emailParams = [
         'toEmail' => $order->user->getEmail(),
         'toEmail' => $order->user->getEmail(),
         'toName' => $order->user->displayName(),
         'toName' => $order->user->displayName(),
         'subject' => 'Your Test Results Are Ready',
         'subject' => 'Your Test Results Are Ready',
-        'message' => $request->get('message'),
-        'attachmentPath' => $results_attachment['path']
+        'message' => $request->get('message')
+        //'attachmentPath' => $results_attachment['path']
     ];
     ];
     if(!$emailParams['message']){
     if(!$emailParams['message']){
         $emailParams['message'] = '<p>Your test results are now available in your secure account.</p><p>To view your results, please click the button below to log in:</p>';
         $emailParams['message'] = '<p>Your test results are now available in your secure account.</p><p>To view your results, please click the button below to log in:</p>';

+ 6 - 6
app/Http/Services/EmailService.php

@@ -54,7 +54,7 @@ class EmailService
             ->post($url, $data)
             ->post($url, $data)
             ->body();
             ->body();
         }
         }
-        
+
 
 
         return json_decode($response, true);
         return json_decode($response, true);
     }
     }
@@ -242,7 +242,7 @@ class EmailService
         $html = (string) view('emails.templates.attachment', compact('params', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
         $html = (string) view('emails.templates.attachment', compact('params', 'appUrl', 'emailFromName', 'appInternalName', 'stringMappingConfig'));
         $plainText = (string) '';
         $plainText = (string) '';
 
 
-        $attachment = $this->getAttachmentFromStoragePath($params['attachmentPath'], 'attachment1');
+       // $attachment = $this->getAttachmentFromStoragePath($params['attachmentPath'], 'attachment1');
 
 
 
 
         $emailParams = [
         $emailParams = [
@@ -253,11 +253,11 @@ class EmailService
             'contentHtml' => $html,
             'contentHtml' => $html,
             'contentText' => $plainText,
             'contentText' => $plainText,
             'entityType' => null,
             'entityType' => null,
-            'entityUid' => null,
-            'attachment1' => $attachment
+            'entityUid' => null
+           // 'attachment1' => $attachment
         ];
         ];
 
 
-        $response = $this->callJava('/api/email/send', $emailParams, null, $attachment);
+        $response = $this->callJava('/api/email/send', $emailParams, null);
     }
     }
 
 
     protected function getAttachmentFromStoragePath($path, $fileName){
     protected function getAttachmentFromStoragePath($path, $fileName){
@@ -269,7 +269,7 @@ class EmailService
                 'mime' => Storage::disk('custom')->mimeType($path),
                 'mime' => Storage::disk('custom')->mimeType($path),
             ];
             ];
         }
         }
-    
+
         return null;
         return null;
     }
     }
 }
 }