diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index ef969731..5aa1b072 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -250,7 +250,11 @@ class EmployeeController extends AdminController // echo '
';
         // print_r($result); die;
-        echo view('excel_errors', $result);
+        if($result){
+            echo view('excel_errors', $result);
+        }else{
+            echo view('errors/html/production');
+        }
     
     }
 
@@ -272,13 +276,17 @@ class EmployeeController extends AdminController
         $filePath = '';
         // Path to your file
         if($actionType == 'inception'){
-            $filePath = ROOTPATH . 'public/sample_excel/inception.xls';
-
+            $filePath = ROOTPATH . 'public/sample_excel/sample_inception.xls';
         }else if($actionType == 'correction'){
-            $filePath = ROOTPATH . 'public/sample_excel/inception_1.xls';
-
+            $filePath = ROOTPATH . 'public/sample_excel/sample_correction .xls';
         }else if($actionType == 'si_enhancement'){
-            $filePath = ROOTPATH . 'public/sample_excel/inception_2.xls';
+            $filePath = ROOTPATH . 'public/sample_excel/sample_si_enhancement.xls';
+        }else if($actionType == 'dependent_addtion'){
+            $filePath = ROOTPATH . 'public/sample_excel/sample_dependent_addition.xls';
+        }else if($actionType == 'addition'){
+            $filePath = ROOTPATH . 'public/sample_excel/sample_addition.xls';
+        }else if($actionType == 'deletion'){
+            $filePath = ROOTPATH . 'public/sample_excel/sample_deletion.xls';
         }
         
         // Check if the file exists
@@ -291,7 +299,7 @@ class EmployeeController extends AdminController
             return $this->response->download($filePath, null, $mimeType);
         } else {
             // File not found, show an error message or redirect
-            return redirect()->back()->with('error', 'File not found.');
+            echo view('errors/html/production');
         }
     }
 
diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php
index 9ee925a8..a14a72d6 100644
--- a/app/Controllers/EmployeeServiceController.php
+++ b/app/Controllers/EmployeeServiceController.php
@@ -929,6 +929,7 @@ class EmployeeServiceController extends AdminController
 
  public function getExcelErrorData($file_id){
 
+    try {
          $file = $this->fileModel->find($file_id);
          $error_data = json_decode($file['reason']);
 
@@ -1015,6 +1016,13 @@ class EmployeeServiceController extends AdminController
 
          }
 
+        }catch (\Exception $e) {
+            // Handle any exceptions
+            $errorMessage = $e->getMessage();
+            $this->myLogger->logme('error', $errorMessage);
+            return false; // You can return an error response here
+        }
+
 
 
  }
diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php
index 2e31acd9..31b16548 100644
--- a/app/Views/batch_list.php
+++ b/app/Views/batch_list.php
@@ -12,6 +12,7 @@
                     
                         SNO
                         Batch Code
+                        File Name
                         Client
                         Client Policy
                         Event Type
@@ -31,6 +32,7 @@
                         
                             
                             
+                            
                             
                             
                             
diff --git a/public/sample_excel/inception.xls b/public/sample_excel/inception.xls
deleted file mode 100644
index 850d8d06..00000000
Binary files a/public/sample_excel/inception.xls and /dev/null differ
diff --git a/public/sample_excel/inception_1.xls b/public/sample_excel/inception_1.xls
deleted file mode 100644
index 850d8d06..00000000
Binary files a/public/sample_excel/inception_1.xls and /dev/null differ
diff --git a/public/sample_excel/inception_2.xls b/public/sample_excel/inception_2.xls
deleted file mode 100644
index 850d8d06..00000000
Binary files a/public/sample_excel/inception_2.xls and /dev/null differ
diff --git a/public/sample_excel/inception_3.xls b/public/sample_excel/inception_3.xls
deleted file mode 100644
index 850d8d06..00000000
Binary files a/public/sample_excel/inception_3.xls and /dev/null differ
diff --git a/public/sample_excel/sample_addition.xls b/public/sample_excel/sample_addition.xls
new file mode 100644
index 00000000..934df3cd
Binary files /dev/null and b/public/sample_excel/sample_addition.xls differ
diff --git a/public/sample_excel/sample_correction .xls b/public/sample_excel/sample_correction .xls
new file mode 100644
index 00000000..744769c1
Binary files /dev/null and b/public/sample_excel/sample_correction .xls differ
diff --git a/public/sample_excel/sample_deletion.xls b/public/sample_excel/sample_deletion.xls
new file mode 100644
index 00000000..8146a3df
Binary files /dev/null and b/public/sample_excel/sample_deletion.xls differ
diff --git a/public/sample_excel/sample_dependent_addition.xls b/public/sample_excel/sample_dependent_addition.xls
new file mode 100644
index 00000000..7e0dd112
Binary files /dev/null and b/public/sample_excel/sample_dependent_addition.xls differ
diff --git a/public/sample_excel/sample_inception.xls b/public/sample_excel/sample_inception.xls
new file mode 100644
index 00000000..934df3cd
Binary files /dev/null and b/public/sample_excel/sample_inception.xls differ
diff --git a/public/sample_excel/sample_si_enhancement.xls b/public/sample_excel/sample_si_enhancement.xls
new file mode 100644
index 00000000..3149edc9
Binary files /dev/null and b/public/sample_excel/sample_si_enhancement.xls differ