diff --git a/.gitignore b/.gitignore index f7d2f266..327112bf 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# Ignore Composer files +vendor +composer.lock + + # Ignore PHPStorm files /.idea/* *.sublime-* @@ -111,9 +116,7 @@ php_errors.log /app/Views/*.tmp -# Ignore Composer files -vendor -composer.lock + # Ignore environment-specific settings .env diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9e2a7c9c..8a1d236e 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -31,6 +31,7 @@ $routes->get('reports', 'Report::index'); // User Routes $routes->get('addNew', 'User::addNew'); +$routes->post('fetchEmployeeDetails', 'User::fetchEmployeeDetails'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'addNewUser', 'User::addNewUser'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'userListing', 'User::userListing'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'userListing/(:num)', 'User::userListing/$1'); @@ -72,6 +73,8 @@ $routes->get('exportcost', 'CostCenter::exportcost'); // Asset Detail Routes $routes->get('assetListing', 'Assetdetails::assetListing'); $routes->get('addasset', 'Assetdetails::addasset'); +$routes->get('assetdetails/editOldasset', 'Assetdetails::editOldasset'); +// $routes->post('addNewasset', 'Assetdetails::addNewasset'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset', 'Assetdetails::editasset'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset/(:num)', 'Assetdetails::editasset/$1'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editasset', 'Assetdetails::editasset'); @@ -259,6 +262,13 @@ $routes->get('download-files/(:segment)', 'Inwardgateregister::downloadFilesAsZi $routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile'); + +// Non IGR / Expense +$routes->get('ListIGR', 'Expense::index'); +$routes->post('addExpense', 'Expense::addExpense'); +$routes->get('getExpenseDetails', 'Expense::getExpenseDetails'); + + // Application OGR Page $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'AddOgr', 'Inwardgateregister::addoutwardgateregister'); $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'ViewOgr', 'Inwardgateregister::ViewOgr'); diff --git a/app/Controllers/Assetdetails.php b/app/Controllers/Assetdetails.php index aff0adda..b09799f2 100644 --- a/app/Controllers/Assetdetails.php +++ b/app/Controllers/Assetdetails.php @@ -66,7 +66,7 @@ class Assetdetails extends BaseController $data['AssetStatus'] = $this->assetdetails_model->getConfigValue('C015'); $data['po'] = $this->assetdetails_model->getPO(); - //print_r($data);die(); + // print_r($data);die(); $this->global['pageTitle'] = 'Add Asset'; $this->loadViews("addasset", $this->global, $data, NULL); @@ -186,47 +186,48 @@ class Assetdetails extends BaseController function addNewasset() { - $this->validator->setRules([ - 'AssetName' => 'trim|required', - 'Department' => 'trim|callback_Department_validate', - 'Location' => 'trim|required', - 'User' => 'trim|required', - 'SupplierName' => 'trim|callback_Supplier_validate', - 'DateOfCommission' => 'trim|required', - 'Assetvalue' => 'trim|required', - 'AssetStatus' => 'trim|callback_Asset_validate' - ]); + // $this->validator->setRules([ + // 'AssetName' => 'trim|required', + // 'Department' => 'trim|callback_Department_validate', + // 'Location' => 'trim|required', + // 'User' => 'trim|required', + // 'SupplierName' => 'trim|callback_Supplier_validate', + // 'DateOfCommission' => 'trim|required', + // 'Assetvalue' => 'trim|required', + // 'AssetStatus' => 'trim|callback_Asset_validate' + // ]); - $this->validator->setMessage([ - 'AssetName' => [ - 'required' => 'Please enter Asset Name.' - ], - 'Department' => [ - 'Department_validate' => 'Please select a valid Department.' - ], - 'Location' => [ - 'required' => 'Please enter Location.' - ], - 'User' => [ - 'required' => 'Please enter User.' - ], - 'SupplierName' => [ - 'Supplier_validate' => 'Please select a valid Supplier.' - ], - 'DateOfCommission' => [ - 'required' => 'Please enter Date of Commission.' - ], - 'Assetvalue' => [ - 'required' => 'Please enter Asset Value.' - ], - 'AssetStatus' => [ - 'Asset_validate' => 'Please select a valid Asset Status.' - ] - ]); + // $this->validator->setMessage([ + // 'AssetName' => [ + // 'required' => 'Please enter Asset Name.' + // ], + // 'Department' => [ + // 'Department_validate' => 'Please select a valid Department.' + // ], + // 'Location' => [ + // 'required' => 'Please enter Location.' + // ], + // 'User' => [ + // 'required' => 'Please enter User.' + // ], + // 'SupplierName' => [ + // 'Supplier_validate' => 'Please select a valid Supplier.' + // ], + // 'DateOfCommission' => [ + // 'required' => 'Please enter Date of Commission.' + // ], + // 'Assetvalue' => [ + // 'required' => 'Please enter Asset Value.' + // ], + // 'AssetStatus' => [ + // 'Asset_validate' => 'Please select a valid Asset Status.' + // ] + // ]); - if (!$this->validator->run()) { - $this->addasset(); + // if (!$this->validator->run()) { + if (false) { + // $this->addasset(); } else { $assetName = $this->request->getPost('AssetName'); $AssetName = (!empty($assetName)) ? strtoupper((string)$assetName) : ""; @@ -273,11 +274,11 @@ class Assetdetails extends BaseController if ($result > 0) { // $this->session->set_flashdata('success', 'New Asset created successfully'); echo ""; - redirect('assetListing', 'refresh'); } else { + // $this->session->set_flashdata('failed', 'Asset Created Failed!'); echo ""; - redirect('assetListing', 'refresh'); } + return redirect()->route('assetListing'); } } /** @@ -325,49 +326,50 @@ class Assetdetails extends BaseController $Asset_Code = $this->request->getPost('AssetCode'); - $this->validator->setRules([ - 'AssetName' => 'trim|required', - 'Description' => 'trim|required', - 'Department' => 'trim|callback_Department_validate', - 'Location' => 'trim|required', - 'User' => 'trim|required', - 'SupplierName' => 'trim|callback_Supplier_validate', - 'DateOfCommission' => 'trim|required', - 'Assetvalue' => 'trim|required', - 'AssetStatus' => 'trim|callback_Asset_validate' - ]); + // $this->validator->setRules([ + // 'AssetName' => 'trim|required', + // 'Description' => 'trim|required', + // 'Department' => 'trim|callback_Department_validate', + // 'Location' => 'trim|required', + // 'User' => 'trim|required', + // 'SupplierName' => 'trim|callback_Supplier_validate', + // 'DateOfCommission' => 'trim|required', + // 'Assetvalue' => 'trim|required', + // 'AssetStatus' => 'trim|callback_Asset_validate' + // ]); - $this->validator->setMessage([ - 'AssetName' => [ - 'required' => 'Please enter Asset Name.' - ], - 'Description' => [ - 'required' => 'Please enter Description.' - ], - 'Department' => [ - 'Department_validate' => 'Please select a valid Department.' - ], - 'Location' => [ - 'required' => 'Please enter Location.' - ], - 'User' => [ - 'required' => 'Please enter User.' - ], - 'SupplierName' => [ - 'Supplier_validate' => 'Please select a valid Supplier.' - ], - 'DateOfCommission' => [ - 'required' => 'Please enter Date of Commission.' - ], - 'Assetvalue' => [ - 'required' => 'Please enter Asset Value.' - ], - 'AssetStatus' => [ - 'Asset_validate' => 'Please select a valid Asset Status.' - ] - ]); + // $this->validator->setMessage([ + // 'AssetName' => [ + // 'required' => 'Please enter Asset Name.' + // ], + // 'Description' => [ + // 'required' => 'Please enter Description.' + // ], + // 'Department' => [ + // 'Department_validate' => 'Please select a valid Department.' + // ], + // 'Location' => [ + // 'required' => 'Please enter Location.' + // ], + // 'User' => [ + // 'required' => 'Please enter User.' + // ], + // 'SupplierName' => [ + // 'Supplier_validate' => 'Please select a valid Supplier.' + // ], + // 'DateOfCommission' => [ + // 'required' => 'Please enter Date of Commission.' + // ], + // 'Assetvalue' => [ + // 'required' => 'Please enter Asset Value.' + // ], + // 'AssetStatus' => [ + // 'Asset_validate' => 'Please select a valid Asset Status.' + // ] + // ]); - if ($this->validator->run() == FALSE) { + // if ($this->validator->run() == FALSE) { + if (FALSE) { $this->editOldasset($Asset_Code); } else { @@ -419,11 +421,10 @@ class Assetdetails extends BaseController if ($result == true) { echo ""; - redirect('assetListing', 'refresh'); } else { echo ""; - redirect('assetListing', 'refresh'); } + return redirect()->route('assetListing'); } } diff --git a/app/Controllers/Expense.php b/app/Controllers/Expense.php new file mode 100644 index 00000000..efc417dc --- /dev/null +++ b/app/Controllers/Expense.php @@ -0,0 +1,105 @@ +expense_model = new Expense_model(); + $this->supplier_model = new Supplier_model(); + + $this->session = session(); + helper('form'); //$this->load->library('form_validation'); + + $this->isLoggedIn(); + } + public function index() + { + $data['expense_list'] = $this->expense_model->getAllExpense(); + $data['supplier_list'] = json_encode($this->supplier_model->supplierlisting()); + $this->global['pageTitle'] = 'Non IGR / Expense List'; + // echo "
";
+        // print_r($data);die;
+        $this->loadViews("expense_list", $this->global, $data, NULL);
+    }
+
+    function addExpense()
+    {
+        $data = array(
+            'transporter_file' => $this->request->getPost('transporterfile'),
+            'supplier_id' => $this->request->getPost('supplierid'),
+            'remarks' => $this->request->getPost('remarks'),
+            'cost' => $this->request->getPost('cost'),
+            'gst' => $this->request->getPost('gst'),
+            'total' => $this->request->getPost('total'),
+            'status' => $this->request->getPost('status'),
+            'payment_method' => $this->request->getPost('payment_method')
+        );
+
+        $insert_id = $this->expense_model->insertExpense($data);
+
+        if ($insert_id) {
+            // Return success response or redirect
+            // $this->session->set_flashdata('success', 'Expense added successfully.');
+            // redirect('your_controller/your_method'); // Replace with your redirect path
+            return json_encode('true');
+        } else {
+            // Return error response
+            // $this->session->set_flashdata('error', 'Failed to add expense.');
+            // redirect('your_controller/your_method'); // Replace with your redirect path
+            return json_encode('false');
+        }
+    }
+
+    public function getExpenseDetails() {
+        $id = $this->request->getPost('id');
+        
+        if ($id) {
+            $expense = $this->expense_model->getExpenseById($id);
+            echo json_encode($expense);
+        } else {
+            echo json_encode(['error' => 'Invalid ID']);
+        }
+    }
+
+    public function updateExpense() {
+        // $id = $this->input->post('id');
+        // $data = [
+        //     'transporterfile' => $this->input->post('transporterfile'),
+        //     'supplierid'      => $this->input->post('supplierid'),
+        //     'remarks'         => $this->input->post('remarks'),
+        //     'cost'            => $this->input->post('cost'),
+        //     'gst'             => $this->input->post('gst'),
+        //     'total'           => $this->input->post('total'),
+        //     'status'          => $this->input->post('status'),
+        //     'payment_method'  => $this->input->post('payment_method')
+        // ];
+
+        // if ($id) {
+        //     $result = $this->Expense_model->updateExpense($id, $data);
+        //     if ($result) {
+        //         echo json_encode(['success' => 'Expense updated successfully']);
+        //     } else {
+        //         echo json_encode(['error' => 'Failed to update expense']);
+        //     }
+        // } else {
+        //     echo json_encode(['error' => 'Invalid ID']);
+        // }
+    }
+}
diff --git a/app/Controllers/User.php b/app/Controllers/User.php
index 6eb84fa6..c3f79358 100644
--- a/app/Controllers/User.php
+++ b/app/Controllers/User.php
@@ -917,14 +917,10 @@ class User extends BaseController
         // else
         // {            		
         $data['EmpList'] = $this->user_model->getAllEmployees();
-        
-
         $data['roles'] = $this->user_model->getUserRoles();
-
         // $data['Department'] = $this->costcenter_model->getDepartment();
 
         $this->global['pageTitle'] = 'Add New User';
-
         $this->loadViews("addUser", $this->global, $data, NULL);
         // }
     }
@@ -1637,4 +1633,19 @@ class User extends BaseController
     }
     // END zoho API 
 
-} 
\ No newline at end of file
+    function fetchEmployeeDetails() {
+        $EmpID = $this->request->getPost('EmpID');
+    
+        if (!$EmpID) {
+            return $this->response->setJSON(['success' => false, 'message' => 'Employee ID not provided']);
+        }
+    
+        $userInfo = $this->user_model->findEmp($EmpID);
+    
+        if ($userInfo) {
+            return $this->response->setJSON(['success' => true, 'userInfo' => $userInfo]);
+        } else {
+            return $this->response->setJSON(['success' => false, 'message' => 'Employee not found']);
+        }
+    }
+}     
\ No newline at end of file
diff --git a/app/Models/Expense_model.php b/app/Models/Expense_model.php
new file mode 100644
index 00000000..c3727ee1
--- /dev/null
+++ b/app/Models/Expense_model.php
@@ -0,0 +1,38 @@
+join('t_supplierdetailsn', 't_expense.supplier_id = t_supplierdetailsn.SupplierID')
+                    ->where('t_expense.isactive', 1)
+                    ->orderBy('t_expense.created_on', 'DESC')
+                    ->findAll();
+    }
+
+    // Insert new expense
+    public function insertExpense($data) {
+        return $this->insert($data) ? $this->insertID() : false;
+    }
+
+    // Get expense by ID
+    public function getExpenseById($id) {
+        return $this->where($this->primaryKey, $id)->first(); // Use primary key
+    }
+
+    // Update expense by ID
+    public function updateExpense($id, $data) {
+        return $this->update($id, $data); // Use primary key
+    }
+}
+?>
diff --git a/app/Models/User_model.php b/app/Models/User_model.php
index d51487b4..17bf2148 100644
--- a/app/Models/User_model.php
+++ b/app/Models/User_model.php
@@ -304,4 +304,18 @@ GROUP BY financial_year ";
             return $r;
         }
     }
+
+
+
+
+    function findEmp($EmpId)
+    {
+        $builder = $this->db->table('tbl_users')
+            ->select('tbl_users.*, t_employee_details.*')
+            ->join('t_employee_details', 'tbl_users.EmpID = t_employee_details.EmpID' ,'left')
+            ->where('tbl_users.EmpID', $EmpId);
+        $query = $builder->get();
+
+        return $query->getResult();
+    }
 }
\ No newline at end of file
diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php
index 78900c1f..16590348 100644
--- a/app/Views/addSupplier.php
+++ b/app/Views/addSupplier.php
@@ -46,7 +46,7 @@
                 
                 
-   Back + Back
@@ -161,7 +161,7 @@
- +
diff --git a/app/Views/addUser.php b/app/Views/addUser.php index a2191582..2ba400bc 100644 --- a/app/Views/addUser.php +++ b/app/Views/addUser.php @@ -12,8 +12,8 @@ -
- +
+
@@ -21,263 +21,257 @@
-
-
- -
-
-
- - EmpID; - // if ($_POST['EmpList'] == $EmpID) { - // echo ""; - // } else{ - echo ""; - // } + // if ($_POST['EmpList'] == $EmpID) { + // echo ""; + // } else{ + echo ""; + // } } } ?> - +
-
- +
+
-
- +
+
- - + +
-
-
-
- - -
-
- - +
+
+
+ +
-
+
+ + +
+
- + if (!empty($roles)) { + foreach ($roles as $rl) { + ?> - - +
- + if (!empty($departments)) { + foreach ($departments as $dt) { + ?> - - +
-
+
+
+ +
- -
-
- - + +
-
- - +
+ +
- -
- -
-
-
- - -
-
- + +
+ +
+
+
+ + +
+
+ +
+
+ getFlashdata('listErrors'); + if ($listErrors) { + ?> +
+
+
+ + getFlashdata('listErrors'); ?> +
- getFlashdata('listErrors'); - if($listErrors) - { - ?> -
-
-
- - getFlashdata('listErrors'); ?> -
-
-
- - -
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - + +
-
- - - - - + getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ + + + + + + + + - + + + - $('#addPop').click(function () - { - if ($('#distriList option:selected').val() != null) - { - - if($('#distriList option:selected').val()==0 ) - { - alert('please select Department'); - } - - else - { - - var tempSelect = $('#distriList option:selected').val(); - var tempText = $('#distriList option:selected').text(); - - var o = new Option(tempText,tempSelect); - var hidval = tempSelect; - var orgVal = $('#txtSelectedDepartment').val(); - var Selectedval = '' - - if(orgVal != '') - { - Selectedval = orgVal + ':' + hidval; - } - else - { - Selectedval = hidval - } - $('#txtSelectedDepartment').val(Selectedval); - - $(o).html(tempText); - $("#selectDistriList").append(o); - - - $('#distriList option:selected').remove(); - $("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); - $("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); - - tempSelect = ''; - tempText = ''; - Selectedval = ''; - } - } - - else - { - alert("Before add please select any position."); - } - }); - - - - - - \ No newline at end of file diff --git a/app/Views/addasset.php b/app/Views/addasset.php index 1b95b3c2..8228925b 100644 --- a/app/Views/addasset.php +++ b/app/Views/addasset.php @@ -1,95 +1,93 @@
-
- -
- -
-
-
-

Add Asset Details

-
-
-
-   Back -
-
- -
-
-
-
-
-
-
+
+ +
+ +
+
+
+

Add Asset Details

+
+
+
+ Back +
+
+ +
+
+
+
+
+
+
-
- -
-
+
+ +
+
- +
- +
- +
- +
-
-
-
- - + + PONO; + + // if ($_POST['PONO'] == $PONO) + // { + // echo ""; + // } + // else + // { + echo ""; + // } + } } - } - ?> - + ?> +
-
- +
+
- +
- +
- +
@@ -99,355 +97,337 @@
- - + +
- +
- +
- +
- -
+ +
- + ConfigValue; - // if ($_POST['AssetStatus'] == $AssetValue) - // { - // echo ""; - // } - // else - // { - echo ""; - // } + // if ($_POST['AssetStatus'] == $AssetValue) + // { + // echo ""; + // } + // else + // { + echo ""; + // } } } - + ?> - +
- +
- > + >
-
-
-
+
+
+
-
-
- -
-
- getFlashdata('listErrors'); - if($listErrors) - { - ?> -
-
-
- - getFlashdata('listErrors'); ?> -
+
+
+
- - -
getFlashdata('error'); - if($error) - { + $listErrors = session()->getFlashdata('listErrors'); + if ($listErrors) { ?> +
+
+
+ + getFlashdata('listErrors'); ?> +
+
+
+ + +
+ getFlashdata('error'); + if ($error) { + ?>
- getFlashdata('error'); ?> + getFlashdata('error'); ?>
- - - getFlashdata('success'); - if($success) - { - ?> + + + getFlashdata('success'); + if ($success) { + ?>
getFlashdata('success'); ?>
- - -
-
-
-
- -
-
+ + +
+
+
+
+ +
+
\ No newline at end of file diff --git a/app/Views/addconfig.php b/app/Views/addconfig.php index 131b3c2e..603ab023 100644 --- a/app/Views/addconfig.php +++ b/app/Views/addconfig.php @@ -1,81 +1,82 @@ -
-
- -
- -
-
-
-

Add Config Details

-
-
-
-   Back -
-
- getFlashdata('error'); - if ($error) { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if ($success) { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
-
-
-
-
-
- - 'configurationname', 'value' => set_value('configurationname'), 'id' => 'configurationname', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); - echo form_input($data); ?> -
-
-
-
- - 'Comments', 'value' => set_value('Comments'), 'id' => 'Comments', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); - echo form_input($data); - ?> -
-
- -
-
- - - - - - - - +
+ +
+
+
+

Add Config Details

+
+
+
+ Back +
+
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ + +
+
+
+
+ +
+
+ + 'configurationname', 'value' => set_value('configurationname'), 'id' => 'configurationname', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); + echo form_input($data); ?> +
+
+
+
+ + 'Comments', 'value' => set_value('Comments'), 'id' => 'Comments', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); + echo form_input($data); + ?> +
+
+ +
+
+
S.NOConfiguration ValueAction
+ + + + + + + + - + -
S.NOConfiguration ValueAction
- -
+ +
-
- - -
-
-
- -
-
-
+
+
+ + +
+ +
+ +
+
+ getFlashdata('error'); - if ($error) { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if ($success) { - ?> -
- - getFlashdata('success'); ?> -
- - - t - + helper('form'); + $error = session()->getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ + + t + + + - + \ No newline at end of file diff --git a/app/Views/adddepartment.php b/app/Views/adddepartment.php index f0a5a425..a4c78054 100644 --- a/app/Views/adddepartment.php +++ b/app/Views/adddepartment.php @@ -20,7 +20,7 @@
-   Back + Back
diff --git a/app/Views/companyview.php b/app/Views/companyview.php index 46a90455..3765317a 100644 --- a/app/Views/companyview.php +++ b/app/Views/companyview.php @@ -469,7 +469,7 @@ function ValidateUA() {
-   Back + Back
diff --git a/app/Views/configlisting.php b/app/Views/configlisting.php index 2315dbda..89e51d14 100644 --- a/app/Views/configlisting.php +++ b/app/Views/configlisting.php @@ -39,22 +39,22 @@
-
- -
- -
-
-
-
-

Configuration Details

-
-
- -
- + +
+ +
+
+
+
+

Configuration Details

+
+
+ +
+ getFlashdata('error'); if ($error) { @@ -74,73 +74,73 @@
-
-
-
-
- - - +
+
+
+ + + + - - + + - - -
- -
- - - - - - - - - - - - - - CreatedDate)) == "30-11--0001") { - $cdate = '00-00-0000'; - } else { - $cdate = date('d-m-Y', strtotime($record->CreatedDate)); - } ?> - - - - - + + +
+ +
+
Create DateConfiguration IDConfiguration NameDescriptionAction
Config_ID ?>ConfigName ?>Comments ?>
+ + + + + + + + + + + + + CreatedDate)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedDate)); + } ?> + + + + + - + - + - - - -
Create DateConfiguration IDConfiguration NameDescriptionAction
Config_ID ?>ConfigName ?>Comments ?>     - -     + +
-
-
-
-
-
-
-
+ + + + +
+
+
+
+
+ + @@ -171,78 +171,83 @@ var dateSplit = date.split('-'); return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1; }; - + // Initialize the DataTable var table = $('#config_list_table').DataTable({ - dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination - buttons: [ - 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons - ], - pageLength: 10, // Default rows per page - lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options - responsive: true, // Responsive table - order: [[0, 'desc']], // Default ordering (column index 0, descending) - language: { - paginate: { - next: '', // Next button icon - previous: '' // Previous button icon - } + dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination + buttons: [ + 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons + ], + pageLength: 10, // Default rows per page + lengthMenu: [ + [10, 20, 30, 50, -1], + [10, 20, 30, 50, "All"] + ], // Rows per page options + responsive: true, // Responsive table + order: [ + [0, 'desc'] + ], // Default ordering (column index 0, descending) + language: { + paginate: { + next: '', // Next button icon + previous: '' // Previous button icon } + } }); // Date range filter function $.fn.dataTable.ext.search.push( - function(settings, data, dataIndex) { - var fromDate = $('#fromDate').val(); - var toDate = $('#toDate').val(); - - if (!fromDate || !toDate) { - return true; // If no dates selected, don't filter - } - - var dateStr = data[0]; // Assuming the date is in the first column - var dateParts = dateStr.split("-"); - var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object - - var startDate = new Date(fromDate); - var endDate = new Date(toDate); - - // Adjust startDate to include the day before the selected fromDate - startDate.setDate(startDate.getDate() - 1); - - // Ensure endDate includes the entire end date by setting time to the end of the day - endDate.setHours(23, 59, 59, 999); + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); - // Return true if the date is within the range - return date >= startDate && date <= endDate; + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // Adjust startDate to include the day before the selected fromDate + startDate.setDate(startDate.getDate() - 1); + + // Ensure endDate includes the entire end date by setting time to the end of the day + endDate.setHours(23, 59, 59, 999); + + // Return true if the date is within the range + return date >= startDate && date <= endDate; + } ); // Handle form submission for the date range filter $("#DateRangeFilter").submit(function(e) { - e.preventDefault(); - table.draw(); // Redraw the table to apply the filter + e.preventDefault(); + table.draw(); // Redraw the table to apply the filter }); // Reset button functionality $("#resetButton").click(function() { - $("#fromDate").val(''); - $("#toDate").val(''); - table.draw(); // Redraw the table to clear the filter + $("#fromDate").val(''); + $("#toDate").val(''); + table.draw(); // Redraw the table to clear the filter }); // Automatically focus and open the To Date picker when From Date is selected document.getElementById('fromDate').addEventListener('change', function() { - var fromDate = this.value; - var toDateInput = document.getElementById('toDate'); - - // Set the min attribute of the To Date input to the selected From Date - toDateInput.min = fromDate; + var fromDate = this.value; + var toDateInput = document.getElementById('toDate'); - // Optionally reset the To Date input if the current value is before the new min date - if (toDateInput.value < fromDate) { - toDateInput.value = fromDate; - } + // Set the min attribute of the To Date input to the selected From Date + toDateInput.min = fromDate; + + // Optionally reset the To Date input if the current value is before the new min date + if (toDateInput.value < fromDate) { + toDateInput.value = fromDate; + } }); -}); + }); \ No newline at end of file diff --git a/app/Views/editOld.php b/app/Views/editOld.php index 10089914..e64069f5 100644 --- a/app/Views/editOld.php +++ b/app/Views/editOld.php @@ -38,244 +38,115 @@ if(!empty($EmpList)) ?> -
- -
-

-
Edit User Details
-

- -

- -
- -
-
- -
- - - -
-
- - - -
-
-
-
-
- - +
+
+ +
+ +
+
+
+

Edit User Details

+
+
+
+   Back +
+
+ +
+
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
-
-
- - -
- +
+ + + +
-
-
- - -
- -
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
- - -
-
- -
-
- - -
-
-
-
- - -
-
- -
- -
- - - -
-
-
-
- -
+ 'Select Department', - "1"=>'System Administrator'); - // print_r($Departmentlist); - - if(!empty($Departmentlist)) - { - foreach ($Departmentlist as $SID): - - - $options[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName; - - endforeach; - } - echo form_multiselect('distriList', $options,set_value('distriList', array()),'id="distriList"' ,'class="form-control required"','required="true"'); - - ?> + $listErrors = session()->getFlashdata('listErrors'); + if ($listErrors) { + ?> +
+ + getFlashdata('listErrors'); ?> +
+ + getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+
-
- -
-
-
-
+
+
+
+
+ +
+
- -
- -
-   - - AssDep == '1') - { - $option[$SID->AssDep] = "01-System Administrator"; - } - - else - { - $option[$SID->AssDep] = $SID->AssDep.' '.' - '.' '.$SID->DepartmentName; - } - endforeach; - } - - - - - - echo form_multiselect('selectDistriList[]', $option,set_value('selectDistriList[]', array()),'id="selectDistriList"','size="10"'); - - ?> -
-
- -
- -
- - - - - - - - -
- - -
- - - -
-
-
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); ?>
-
-
- -
-
diff --git a/app/Views/editOldasset.php b/app/Views/editOldasset.php index 016a229c..a1c25d40 100644 --- a/app/Views/editOldasset.php +++ b/app/Views/editOldasset.php @@ -11,81 +11,72 @@ $DateOfPurchase = ''; $DateOfCommison = ''; $AssetValue = ''; $AssetStatus = ''; -$IsActive =''; +$IsActive = ''; $Remarks = ''; -$DepartmentName =''; -$Department =''; +$DepartmentName = ''; +$Department = ''; $SupplierCode = ''; $MaterialCode = ''; $PONO = ''; -$POLineItem=''; -$Quantity=''; +$POLineItem = ''; +$Quantity = ''; $UOM = ''; -$MaterialName=''; -$DeliveryDate=''; +$MaterialName = ''; +$DeliveryDate = ''; $DDate = ''; -if(!empty($assetList)) -{ - foreach ($assetList as $Asset) - { - //print_r($Asset);die(); - $AssetCode = $Asset->AssetCode; - $AssetName = $Asset->AssetName; - $Description = $Asset->Description; +if (!empty($assetList)) { + foreach ($assetList as $Asset) { + //print_r($Asset);die(); + $AssetCode = $Asset->AssetCode; + $AssetName = $Asset->AssetName; + $Description = $Asset->Description; $Department = $Asset->DEPCode; $DepartmentName = $Asset->DepartmentName; - $Location = $Asset->Location; - $User = $Asset->UserName; - $SupplierName = $Asset->SupplierName; + $Location = $Asset->Location; + $User = $Asset->UserName; + $SupplierName = $Asset->SupplierName; $SupplierCode = $Asset->SupplierCode; - $DateOfPurchase = $Asset->DateOfPurchase;//print_r($Asset->DateOfPurchase); - if($DateOfPurchase != '' && $DateOfPurchase != '0000-00-00 00:00:00' ) { - $PODate = new DateTime($DateOfPurchase); - $DateOfPurchase = $PODate->format('d-m-Y'); - } - else { - $DateOfPurchase = ''; - } - $DateOfCommison = $Asset->DateOfCommison; - if($DateOfCommison != '' && $DateOfCommison != '0000-00-00 00:00:00' ) { - $DateOfCommission= new DateTime($Asset->DateOfCommison, new DateTimeZone('Asia/Kolkata')); - $DateOfCommison = $DateOfCommission->format('d-m-Y'); - } - else { - $DateOfCommison = ''; - } + $DateOfPurchase = $Asset->DateOfPurchase; //print_r($Asset->DateOfPurchase); + if ($DateOfPurchase != '' && $DateOfPurchase != '0000-00-00 00:00:00') { + $PODate = new DateTime($DateOfPurchase); + $DateOfPurchase = $PODate->format('d-m-Y'); + } else { + $DateOfPurchase = ''; + } + $DateOfCommison = $Asset->DateOfCommison; + if ($DateOfCommison != '' && $DateOfCommison != '0000-00-00 00:00:00') { + $DateOfCommission = new DateTime($Asset->DateOfCommison, new DateTimeZone('Asia/Kolkata')); + $DateOfCommison = $DateOfCommission->format('d-m-Y'); + } else { + $DateOfCommison = ''; + } + - $AssetValue = $Asset->AssetValue; - $AssetStatus = $Asset->AssetStatus; - $MaterialCode = $Asset->MaterialCode; - $PONO = $Asset->PONO; - $POLineItem = $Asset->POLineItem; - $Quantity = $Asset->Quantity; - $MaterialName = $Asset->MaterialName; - $UOM = $Asset->UOM; - $DDt = $Asset->DeliveryDate; - if($DDt != '' && $DDt != '0000-00-00 00:00:00'){ - $DDate = new DateTime($DDt, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $DDate->format('d-m-Y'); - } - else - { - $DeliveryDate = ''; - } + $AssetStatus = $Asset->AssetStatus; + $MaterialCode = $Asset->MaterialCode; + $PONO = $Asset->PONO; + $POLineItem = $Asset->POLineItem; + $Quantity = $Asset->Quantity; + $MaterialName = $Asset->MaterialName; + $UOM = $Asset->UOM; + $DDt = $Asset->DeliveryDate; + if ($DDt != '' && $DDt != '0000-00-00 00:00:00') { + $DDate = new DateTime($DDt, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $DDate->format('d-m-Y'); + } else { + $DeliveryDate = ''; + } - $Remarks = $Asset->Remarks; + $Remarks = $Asset->Remarks; $chk = $Asset->IsActive; - - if($chk == 1) - { - $IsActive = 'checked'; - } - else - { - $IsActive = ''; - } - + + if ($chk == 1) { + $IsActive = 'checked'; + } else { + $IsActive = ''; + } + // if($DateOfPurchase != '') // { // $dtpurchase = new DateTime($DateOfPurchase); @@ -96,479 +87,322 @@ if(!empty($assetList)) // $dtCommission = new DateTime($DateOfCommission); // $DOCommission = $dtCommission ->format('Y-m-d'); // } - } + } } ?> - -
- -
-

-
Edit Asset Details-
-

-
- -
-
- Back -
-
-
- -
- - -
- - - -
- -
-
- -
-
-
- - Asset Name* - - - - +
+
+
+
+
+
+

Edit Asset Details -

+
+
+
+ Back +
+
+
+
+
+
+ +
+
+ +
-
-
-
- - Asset Description* - - +
+ +
- -
-
-
- - Asset User* - - +
+ + +
+
+ +
-
-
-
- - Asset Location* - - -
- -
- -
-
-
-
- - Purchase Order Number* - - + + PONO; + if (trim($PONO1) != trim($PONO)) { + echo ""; } } - ?> - -
-
-
-
-
- - select Material Code - - - -
-
-
-
- - Material Code - -
-
-
-
-
-
- - UOM - -
-
-
-
- - Quantity - -
-
- - -
- - -
-
- - Description - - -
- -
-
-
-
- - -
- - - Asset Department - - -
- -
-
- -
- - Purchase Date - -
-
-
- -
- - Supplier Name - - -
-
-
-
-
- Delivery Date - -
-
-
-
- Date Of Commission - - -
-
-
- -
-
- -
-
- Asset Value - - -
- -
-
-
- Asset Status - -
-
-
-
- Remarks - - -
-
-
-
-
- > IsActive -
-
-
- - +
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+
+ > + +
+
+
+
+
+ + Cancel +
+
+
- -
- -
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); ?>
+
-
-
- +
+ - \ No newline at end of file diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php index cd94a13e..2d67a260 100644 --- a/app/Views/editRawmaterial.php +++ b/app/Views/editRawmaterial.php @@ -100,233 +100,187 @@ if ($total <= $reorder) { } -
- -
-

-
- -

-
-
-

-
Edit Material - Details
-

- -

- -
- - - - -
- -
- - - -
-
-
-
- -
-
- - -
-
-
-
- - * - - -
-
- - -
-
- - * - -
-
- -
- -
- - * - -
- -
-
-
- - * - - -
-
-
+
+
+ +
+ +
+
+
+

Edit Material - Details

+
+
+ +
+ -
-
-
- - -
-
- -
-
- - -
+
+
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
-
- +
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ - } else { - ?> -
-
- - + +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
+ > +
+
+
- - - -
- - 'Date','value' => set_value('Date',$date), 'class' => 'form-control','readonly'=>'true', 'onkeypress'=>'return false;'); - - $data = array('name' => 'Date', 'id' => 'Date', 'value' => set_value('Date', $date), 'class' => 'form-control', 'onkeypress' => 'return false;'); - - echo form_input($data); - ?> -
- -
- - 'Date', 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
- -
-
- - -
- -
-
-
-
- - -
+ + +
+
+
+
+
+
+
-
-
- - -
-
- - - - - -
-
- - -
-
- -
-
-
- > -
-
-
-
- -
- - -
- - - -
-
- -
-
-
\ No newline at end of file diff --git a/app/Views/editasset.php b/app/Views/editasset.php index bc2facae..e2f0bef5 100644 --- a/app/Views/editasset.php +++ b/app/Views/editasset.php @@ -101,293 +101,185 @@ if(!empty($assetList)) ?> -
- -
-

-
Details
-

- -

-
-
- Back -
-
-
- -
- - -
- - - -
- -
-
- -
-
-
- - Asset Name* - - - - -
-
-
-
- - Asset Description* - - -
- -
-
-
- - Asset User* - - -
- -
-
-
- - Asset Location* - - -
- -
- -
-
-
-
- - Purchase Order Number* - - -
-
-
-
-
- - select Material Code - - - -
-
-
-
- - Material Code - -
-
-
-
-
-
- - UOM - -
-
-
-
- - Quantity - -
-
- - -
- - -
-
- - Description - - -
- -
-
-
-
- - -
- - - Asset Department - - -
- -
-
- -
- - Purchase Date - -
-
-
- -
- - Supplier Name - - -
-
-
-
-
- Delivery Date - -
-
-
-
- Date Of Commission - - -
-
-
- -
-
- -
-
- Asset Value - - -
- -
-
-
- Asset Status - -
-
-
-
- Remarks - - -
-
-
-
-
- > IsActive -
-
-
- - - +
+
+ +
+ +
+
+
+

Details

+
- -
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); ?>
+
-
-
-
- -
+ +
+
+
+
+
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ Cancel + +
+
+
+
+
+
+
+
+ + + + - + else + return false; + } - + + \ No newline at end of file + + }); + + + function validate() { + if ($("option:selected", $("#ApprovedBy")).val() == '-1') { + alert('Please Select Approver Names'); + return false; + } else { + return true; + } + + } + \ No newline at end of file diff --git a/app/Views/editdepartment.php b/app/Views/editdepartment.php index 58001612..bc4b347c 100644 --- a/app/Views/editdepartment.php +++ b/app/Views/editdepartment.php @@ -82,6 +82,9 @@ if(!empty($department)) color:#00c0ef ! important; } */ + legend { + margin-left: 0% !important; + } .pad{ padding-bottom:1%; } @@ -90,117 +93,96 @@ if(!empty($department)) color:red; background-color:#fff; } -
- -
-

-
Edit Department - Details
-

- -

- -
-
- -
- - - -
- - - - -
-
-

-
- - - Department Information -
- Department Code - -
-
- Department Name* - - -
- -
- Head Department - -
-
-
- Is Active
- > +
+
+ +
+ +
+
+
+

Edit Department - Details

+
+
+
+   Back +
+
+ +
+
+
+
+ +
+ + Department Information +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+ > +
+
+
+ + +
+
+
+ +
+
+ getFlashdata('error'); + if ($error) { ?> +
+ + getFlashdata('error'); ?> +
+ getFlashdata('success'); + if ($success) { ?> +
+ + getFlashdata('success'); ?> +
+ +
- -
-
-
- - -
+
+
+
-
-
- -
-
- - - -
-
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); ?>
-
-
-
-
- + +
+ diff --git a/app/Views/expense_list.php b/app/Views/expense_list.php new file mode 100644 index 00000000..2c21c86e --- /dev/null +++ b/app/Views/expense_list.php @@ -0,0 +1,345 @@ + +
+
+ +
+ +
+
+
+
+

Expense List

+
+
+ +
+
+
+
+
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Created DateSupplier NameCostGSTTotalStatuspayment_methodAction
+ +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/app/Views/includes/new_footer.php b/app/Views/includes/new_footer.php index 6d10bcf1..027f1622 100644 --- a/app/Views/includes/new_footer.php +++ b/app/Views/includes/new_footer.php @@ -63,6 +63,7 @@ + '; - break; - case 'style': - $output .= ''; - break; - default: - $output .= $contents; - } - } - - // Don't pre-render on every dump - if (!$this->getForcePreRender()) { - self::$needs_pre_render = false; - } - } - - return $output.'
'; - } - - public function postRender(): string - { - if (self::$disable_utf8) { - return $this->utf8ToHtmlentity(parent::postRender()).'
'; - } - - return parent::postRender().''; - } - - public function ideLink(string $file, int $line): string - { - $path = $this->escape(Kint::shortenPath($file)).':'.$line; - $ideLink = Kint::getIdeLink($file, $line); - - if (!$ideLink) { - return $path; - } - - $class = ''; - - if (\preg_match('/https?:\\/\\//i', $ideLink)) { - $class = 'class="kint-ide-link" '; - } - - return ''.$path.''; - } - - public function escape(string $string, $encoding = false): string - { - if (false === $encoding) { - $encoding = BlobValue::detectEncoding($string); - } - - $original_encoding = $encoding; - - if (false === $encoding || 'ASCII' === $encoding) { - $encoding = 'UTF-8'; - } - - $string = \htmlspecialchars($string, ENT_NOQUOTES, $encoding); - - // this call converts all non-ASCII characters into numeirc htmlentities - if (\function_exists('mb_encode_numericentity') && 'ASCII' !== $original_encoding) { - $string = \mb_encode_numericentity($string, [0x80, 0xFFFF, 0, 0xFFFF], $encoding); - } - - return $string; - } - - protected function utf8ToHtmlentity(string $string): string - { - return \str_replace( - ['┌', '═', '┐', '│', '└', '─', '┘'], - ['┌', '═', '┐', '│', '└', '─', '┘'], - $string - ); - } - - protected static function renderJs(): string - { - return \file_get_contents(KINT_DIR.'/resources/compiled/shared.js').\file_get_contents(KINT_DIR.'/resources/compiled/plain.js'); - } - - protected static function renderCss(): string - { - if (\file_exists(KINT_DIR.'/resources/compiled/'.self::$theme)) { - return \file_get_contents(KINT_DIR.'/resources/compiled/'.self::$theme); - } - - return \file_get_contents(self::$theme); - } -} diff --git a/vendor/kint-php/kint/src/Renderer/RendererInterface.php b/vendor/kint-php/kint/src/Renderer/RendererInterface.php deleted file mode 100644 index 577e9df0..00000000 --- a/vendor/kint-php/kint/src/Renderer/RendererInterface.php +++ /dev/null @@ -1,57 +0,0 @@ -renderer = $r; - } - - /** - * @param string $content The replacement for the getValueShort contents - */ - public function renderLockedHeader(Value $o, string $content): string - { - $header = '
'; - - if (RichRenderer::$access_paths && $o->depth > 0 && $ap = $o->getAccessPath()) { - $header .= ''; - } - - $header .= ''; - - if (null !== ($s = $o->getModifiers())) { - $header .= ''.$s.' '; - } - - if (null !== ($s = $o->getName())) { - $header .= ''.$this->renderer->escape($s).' '; - - if ($s = $o->getOperator()) { - $header .= $this->renderer->escape($s, 'ASCII').' '; - } - } - - if (null !== ($s = $o->getType())) { - if (RichRenderer::$escape_types) { - $s = $this->renderer->escape($s); - } - - if ($o->reference) { - $s = '&'.$s; - } - - $header .= ''.$s.''; - - if ($o instanceof InstanceValue && isset($o->spl_object_id)) { - $header .= '#'.((int) $o->spl_object_id); - } - - $header .= ' '; - } - - if (null !== ($s = $o->getSize())) { - if (RichRenderer::$escape_types) { - $s = $this->renderer->escape($s); - } - $header .= '('.$s.') '; - } - - $header .= $content; - - if (!empty($ap)) { - $header .= '
'.$this->renderer->escape($ap).'
'; - } - - return $header.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/ArrayLimitPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/ArrayLimitPlugin.php deleted file mode 100644 index 15220e5d..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/ArrayLimitPlugin.php +++ /dev/null @@ -1,38 +0,0 @@ -'.$this->renderLockedHeader($o, 'Array Limit').''; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/BinaryPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/BinaryPlugin.php deleted file mode 100644 index 4cbce1ae..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/BinaryPlugin.php +++ /dev/null @@ -1,62 +0,0 @@ -contents)) { - return null; - } - - $out = '
';
-
-        $lines = \str_split($r->contents, self::$line_length);
-
-        foreach ($lines as $index => $line) {
-            $out .= \sprintf('%08X', $index * self::$line_length).":\t";
-
-            $chunks = \str_split(\str_pad(\bin2hex($line), 2 * self::$line_length, ' '), self::$chunk_length);
-
-            $out .= \implode(' ', $chunks);
-            $out .= "\t".\preg_replace('/[^\\x20-\\x7E]/', '.', $line)."\n";
-        }
-
-        $out .= '
'; - - return $out; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/BlacklistPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/BlacklistPlugin.php deleted file mode 100644 index 78064a7a..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/BlacklistPlugin.php +++ /dev/null @@ -1,38 +0,0 @@ -'.$this->renderLockedHeader($o, 'Blacklisted').''; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/CallablePlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/CallablePlugin.php deleted file mode 100644 index 74438052..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/CallablePlugin.php +++ /dev/null @@ -1,130 +0,0 @@ -renderMethod($o); - } - - if ($o instanceof ClosureValue) { - return parent::renderValue($o); - } - - return null; - } - - protected function renderMethod(MethodValue $o): string - { - if (!empty(self::$method_cache[$o->owner_class][$o->name])) { - $children = self::$method_cache[$o->owner_class][$o->name]['children']; - - $header = $this->renderer->renderHeaderWrapper( - $o, - (bool) \strlen($children), - self::$method_cache[$o->owner_class][$o->name]['header'] - ); - - return '
'.$header.$children.'
'; - } - - $children = $this->renderer->renderChildren($o); - - $header = ''; - - if (null !== ($s = $o->getModifiers()) || $o->return_reference) { - $header .= ''.$s; - - if ($o->return_reference) { - if ($s) { - $header .= ' '; - } - $header .= $this->renderer->escape('&'); - } - - $header .= ' '; - } - - if (null !== ($s = $o->getName())) { - $function = $this->renderer->escape($s).'('.$this->renderer->escape($o->getParams()).')'; - - if (null !== ($url = $o->getPhpDocUrl())) { - $function = ''.$function.''; - } - - $header .= ''.$function.''; - } - - if (!empty($o->returntype)) { - $header .= ': '; - - if ($o->return_reference) { - $header .= $this->renderer->escape('&'); - } - - $header .= $this->renderer->escape($o->returntype).''; - } elseif ($o->docstring) { - if (\preg_match('/@return\\s+(.*)\\r?\\n/m', $o->docstring, $matches)) { - if (\trim($matches[1])) { - $header .= ': '.$this->renderer->escape(\trim($matches[1])).''; - } - } - } - - if (null !== ($s = $o->getValueShort())) { - if (RichRenderer::$strlen_max) { - $s = Utils::truncateString($s, RichRenderer::$strlen_max); - } - $header .= ' '.$this->renderer->escape($s); - } - - if (\strlen($o->owner_class) && \strlen($o->name)) { - self::$method_cache[$o->owner_class][$o->name] = [ - 'header' => $header, - 'children' => $children, - ]; - } - - $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); - - return '
'.$header.$children.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/ClosurePlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/ClosurePlugin.php deleted file mode 100644 index a2b5a7e0..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/ClosurePlugin.php +++ /dev/null @@ -1,64 +0,0 @@ -renderer->renderChildren($o); - - $header = ''; - - if (null !== ($s = $o->getModifiers())) { - $header .= ''.$s.' '; - } - - if (null !== ($s = $o->getName())) { - $header .= ''.$this->renderer->escape($s).'('.$this->renderer->escape($o->getParams()).') '; - } - - $header .= 'Closure'; - if (isset($o->spl_object_id)) { - $header .= '#'.((int) $o->spl_object_id); - } - $header .= ' '.$this->renderer->escape(Kint::shortenPath($o->filename)).':'.(int) $o->startline; - - $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); - - return '
'.$header.$children.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/ColorPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/ColorPlugin.php deleted file mode 100644 index f1de5fe3..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/ColorPlugin.php +++ /dev/null @@ -1,102 +0,0 @@ -getRepresentation('color'); - - if (!$r instanceof ColorRepresentation) { - return null; - } - - $children = $this->renderer->renderChildren($o); - - $header = $this->renderer->renderHeader($o); - $header .= '
'; - - $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); - - return '
'.$header.$children.'
'; - } - - public function renderTab(Representation $r): ?string - { - if (!$r instanceof ColorRepresentation) { - return null; - } - - $out = ''; - - if ($color = $r->getColor(ColorRepresentation::COLOR_NAME)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_HEX_3)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_HEX_6)) { - $out .= ''.$color."\n"; - } - - if ($r->hasAlpha()) { - if ($color = $r->getColor(ColorRepresentation::COLOR_HEX_4)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_HEX_8)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_RGBA)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_HSLA)) { - $out .= ''.$color."\n"; - } - } else { - if ($color = $r->getColor(ColorRepresentation::COLOR_RGB)) { - $out .= ''.$color."\n"; - } - if ($color = $r->getColor(ColorRepresentation::COLOR_HSL)) { - $out .= ''.$color."\n"; - } - } - - if (!\strlen($out)) { - return null; - } - - return '
'.$out.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/DepthLimitPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/DepthLimitPlugin.php deleted file mode 100644 index 3b73b6be..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/DepthLimitPlugin.php +++ /dev/null @@ -1,38 +0,0 @@ -'.$this->renderLockedHeader($o, 'Depth Limit').''; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/MethodDefinitionPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/MethodDefinitionPlugin.php deleted file mode 100644 index f5ed37b6..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/MethodDefinitionPlugin.php +++ /dev/null @@ -1,76 +0,0 @@ -contents)) { - $docstring = []; - foreach (\explode("\n", $r->contents) as $line) { - $docstring[] = \trim($line); - } - - $docstring = $this->renderer->escape(\implode("\n", $docstring)); - } - - $addendum = []; - if (isset($r->class) && $r->inherited) { - $addendum[] = 'Inherited from '.$this->renderer->escape($r->class); - } - - if (isset($r->file, $r->line)) { - $addendum[] = 'Defined in '.$this->renderer->escape(Kint::shortenPath($r->file)).':'.((int) $r->line); - } - - if ($addendum) { - $addendum = ''.\implode("\n", $addendum).''; - - if (isset($docstring)) { - $docstring .= "\n\n".$addendum; - } else { - $docstring = $addendum; - } - } - - if (!isset($docstring)) { - return null; - } - - return '
'.$docstring.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/MicrotimePlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/MicrotimePlugin.php deleted file mode 100644 index 086e8144..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/MicrotimePlugin.php +++ /dev/null @@ -1,74 +0,0 @@ -getDateTime())) { - return null; - } - - $out = $dt->format('Y-m-d H:i:s.u'); - if (null !== $r->lap) { - $out .= '
SINCE LAST CALL: '.\round($r->lap, 4).'s.'; - } - if (null !== $r->total) { - $out .= '
SINCE START: '.\round($r->total, 4).'s.'; - } - if (null !== $r->avg) { - $out .= '
AVERAGE DURATION: '.\round($r->avg, 4).'s.'; - } - - $bytes = Utils::getHumanReadableBytes($r->mem); - $out .= '
MEMORY USAGE: '.$r->mem.' bytes ('.\round($bytes['value'], 3).' '.$bytes['unit'].')'; - $bytes = Utils::getHumanReadableBytes($r->mem_real); - $out .= ' (real '.\round($bytes['value'], 3).' '.$bytes['unit'].')'; - - $bytes = Utils::getHumanReadableBytes($r->mem_peak); - $out .= '
PEAK MEMORY USAGE: '.$r->mem_peak.' bytes ('.\round($bytes['value'], 3).' '.$bytes['unit'].')'; - $bytes = Utils::getHumanReadableBytes($r->mem_peak_real); - $out .= ' (real '.\round($bytes['value'], 3).' '.$bytes['unit'].')'; - - return '
'.$out.'
'; - } - - public static function renderJs(): string - { - if (\is_string($out = \file_get_contents(KINT_DIR.'/resources/compiled/microtime.js'))) { - return $out; - } - - return ''; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/PluginInterface.php b/vendor/kint-php/kint/src/Renderer/Rich/PluginInterface.php deleted file mode 100644 index bbdb8ac5..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/PluginInterface.php +++ /dev/null @@ -1,35 +0,0 @@ -'.$this->renderLockedHeader($o, 'Recursion').''; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/SimpleXMLElementPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/SimpleXMLElementPlugin.php deleted file mode 100644 index 87d98707..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/SimpleXMLElementPlugin.php +++ /dev/null @@ -1,56 +0,0 @@ -isStringValue() || !empty($o->getRepresentation('attributes')->contents)) { - return null; - } - - $b = new BlobValue(); - $b->transplant($o); - $b->type = 'string'; - - $children = $this->renderer->renderChildren($b); - $header = $this->renderer->renderHeader($o); - $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); - - return '
'.$header.$children.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/SourcePlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/SourcePlugin.php deleted file mode 100644 index a02f7ec1..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/SourcePlugin.php +++ /dev/null @@ -1,83 +0,0 @@ -source)) { - return null; - } - - $source = $r->source; - - // Trim empty lines from the start and end of the source - foreach ($source as $linenum => $line) { - if (\strlen(\trim($line)) || $linenum === $r->line) { - break; - } - - unset($source[$linenum]); - } - - foreach (\array_reverse($source, true) as $linenum => $line) { - if (\strlen(\trim($line)) || $linenum === $r->line) { - break; - } - - unset($source[$linenum]); - } - - $output = ''; - - foreach ($source as $linenum => $line) { - if ($linenum === $r->line) { - $output .= '
'.$this->renderer->escape($line)."\n".'
'; - } else { - $output .= '
'.$this->renderer->escape($line)."\n".'
'; - } - } - - if ($output) { - \reset($source); - - $data = ''; - if ($r->showfilename) { - $data = ' data-kint-filename="'.$this->renderer->escape($r->filename).'"'; - } - - return '
'.$output.'
'; - } - - return null; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/TabPluginInterface.php b/vendor/kint-php/kint/src/Renderer/Rich/TabPluginInterface.php deleted file mode 100644 index fb310af5..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/TabPluginInterface.php +++ /dev/null @@ -1,35 +0,0 @@ -'; - - $firstrow = \reset($r->contents); - - foreach ($firstrow->value->contents as $field) { - $out .= ''; - } - - $out .= ''; - - foreach ($r->contents as $row) { - $out .= ''; - - foreach ($row->value->contents as $field) { - $out .= 'getType())) { - $type = $this->renderer->escape($s); - - if ($field->reference) { - $ref = '&'; - $type = $ref.$type; - } - - if (null !== ($s = $field->getSize())) { - $size .= ' ('.$this->renderer->escape($s).')'; - } - } - - if ($type) { - $out .= ' title="'.$type.$size.'"'; - } - - $out .= '>'; - - switch ($field->type) { - case 'boolean': - $out .= $field->value->contents ? ''.$ref.'true' : ''.$ref.'false'; - break; - case 'integer': - case 'double': - $out .= (string) $field->value->contents; - break; - case 'null': - $out .= ''.$ref.'null'; - break; - case 'string': - if ($field->encoding) { - $val = $field->value->contents; - if (RichRenderer::$strlen_max && self::$respect_str_length) { - $val = Utils::truncateString($val, RichRenderer::$strlen_max); - } - - $out .= $this->renderer->escape($val); - } else { - $out .= ''.$type.''; - } - break; - case 'array': - $out .= ''.$ref.'array'.$size; - break; - case 'object': - $out .= ''.$ref.$this->renderer->escape($field->classname).''.$size; - break; - case 'resource': - $out .= ''.$ref.'resource'; - break; - default: - $out .= ''.$ref.'unknown'; - break; - } - - if (\in_array('blacklist', $field->hints, true)) { - $out .= ' Blacklisted'; - } elseif (\in_array('recursion', $field->hints, true)) { - $out .= ' Recursion'; - } elseif (\in_array('depth_limit', $field->hints, true)) { - $out .= ' Depth Limit'; - } - - $out .= ''; - } - - $out .= ''; - } - - $out .= '
'; - if (null !== ($s = $field->getName())) { - $out .= $this->renderer->escape($s); - } - $out .= '
'; - if (null !== ($s = $row->getName())) { - $out .= $this->renderer->escape($s); - } - $out .= '
'; - - return $out; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/TimestampPlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/TimestampPlugin.php deleted file mode 100644 index 43abfb60..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/TimestampPlugin.php +++ /dev/null @@ -1,44 +0,0 @@ -contents)) { - return '
'.$dt->setTimeZone(new DateTimeZone('UTC'))->format('Y-m-d H:i:s T').'
'; - } - - return null; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/TraceFramePlugin.php b/vendor/kint-php/kint/src/Renderer/Rich/TraceFramePlugin.php deleted file mode 100644 index 147e2e31..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/TraceFramePlugin.php +++ /dev/null @@ -1,70 +0,0 @@ -trace['file']) && !empty($o->trace['line'])) { - $header = ''.$this->renderer->ideLink($o->trace['file'], (int) $o->trace['line']).' '; - } else { - $header = 'PHP internal call '; - } - - if ($o->trace['class']) { - $header .= $this->renderer->escape($o->trace['class'].$o->trace['type']); - } - - if (\is_string($o->trace['function'])) { - $function = $this->renderer->escape($o->trace['function'].'()'); - } else { - $function = $this->renderer->escape( - $o->trace['function']->getName().'('.$o->trace['function']->getParams().')' - ); - - if (null !== ($url = $o->trace['function']->getPhpDocUrl())) { - $function = ''.$function.''; - } - } - - $header .= ''.$function.''; - - $children = $this->renderer->renderChildren($o); - $header = $this->renderer->renderHeaderWrapper($o, (bool) \strlen($children), $header); - - return '
'.$header.$children.'
'; - } -} diff --git a/vendor/kint-php/kint/src/Renderer/Rich/ValuePluginInterface.php b/vendor/kint-php/kint/src/Renderer/Rich/ValuePluginInterface.php deleted file mode 100644 index 112a7f7d..00000000 --- a/vendor/kint-php/kint/src/Renderer/Rich/ValuePluginInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - Rich\ArrayLimitPlugin::class, - 'blacklist' => Rich\BlacklistPlugin::class, - 'callable' => Rich\CallablePlugin::class, - 'color' => Rich\ColorPlugin::class, - 'depth_limit' => Rich\DepthLimitPlugin::class, - 'recursion' => Rich\RecursionPlugin::class, - 'simplexml_element' => Rich\SimpleXMLElementPlugin::class, - 'trace_frame' => Rich\TraceFramePlugin::class, - ]; - - /** - * RichRenderer tab plugins should implement TabPluginInterface. - * - * @psalm-var PluginMap - */ - public static $tab_plugins = [ - 'binary' => Rich\BinaryPlugin::class, - 'color' => Rich\ColorPlugin::class, - 'method_definition' => Rich\MethodDefinitionPlugin::class, - 'microtime' => Rich\MicrotimePlugin::class, - 'source' => Rich\SourcePlugin::class, - 'table' => Rich\TablePlugin::class, - 'timestamp' => Rich\TimestampPlugin::class, - ]; - - public static $pre_render_sources = [ - 'script' => [ - [self::class, 'renderJs'], - [Rich\MicrotimePlugin::class, 'renderJs'], - ], - 'style' => [ - [self::class, 'renderCss'], - ], - 'raw' => [], - ]; - - /** - * Whether or not to render access paths. - * - * Access paths can become incredibly heavy with very deep and wide - * structures. Given mostly public variables it will typically make - * up one quarter of the output HTML size. - * - * If this is an unacceptably large amount and your browser is groaning - * under the weight of the access paths - your first order of buisiness - * should be to get a new browser. Failing that, use this to turn them off. - * - * @var bool - */ - public static $access_paths = true; - - /** - * The maximum length of a string before it is truncated. - * - * Falsey to disable - * - * @var int - */ - public static $strlen_max = 80; - - /** - * Path to the CSS file to load by default. - * - * @var string - */ - public static $theme = 'original.css'; - - /** - * Assume types and sizes don't need to be escaped. - * - * Turn this off if you use anything but ascii in your class names, - * but it'll cause a slowdown of around 10% - * - * @var bool - */ - public static $escape_types = false; - - /** - * Move all dumps to a folder at the bottom of the body. - * - * @var bool - */ - public static $folder = false; - - /** - * Sort mode for object properties. - * - * @var int - */ - public static $sort = self::SORT_NONE; - - /** - * Timestamp to print in footer in date() format. - * - * @var ?string - */ - public static $timestamp = null; - - public static $needs_pre_render = true; - public static $needs_folder_render = true; - - public static $always_pre_render = false; - - public static $js_nonce = null; - public static $css_nonce = null; - - protected $plugin_objs = []; - protected $expand = false; - protected $force_pre_render = false; - protected $use_folder = false; - - public function __construct() - { - $this->setUseFolder(self::$folder); - $this->setForcePreRender(self::$always_pre_render); - } - - public function setCallInfo(array $info): void - { - parent::setCallInfo($info); - - if (\in_array('!', $this->call_info['modifiers'], true)) { - $this->setExpand(true); - $this->setUseFolder(false); - } - - if (\in_array('@', $this->call_info['modifiers'], true)) { - $this->setForcePreRender(true); - } - } - - public function setStatics(array $statics): void - { - parent::setStatics($statics); - - if (!empty($statics['expanded'])) { - $this->setExpand(true); - } - - if (!empty($statics['return'])) { - $this->setForcePreRender(true); - } - } - - public function setExpand(bool $expand): void - { - $this->expand = $expand; - } - - public function getExpand(): bool - { - return $this->expand; - } - - public function setForcePreRender(bool $force_pre_render): void - { - $this->force_pre_render = $force_pre_render; - } - - public function getForcePreRender(): bool - { - return $this->force_pre_render; - } - - public function setUseFolder(bool $use_folder): void - { - $this->use_folder = $use_folder; - } - - public function getUseFolder(): bool - { - return $this->use_folder; - } - - public function shouldPreRender(): bool - { - return $this->getForcePreRender() || self::$needs_pre_render; - } - - public function shouldFolderRender(): bool - { - return $this->getUseFolder() && ($this->getForcePreRender() || self::$needs_folder_render); - } - - public function render(Value $o): string - { - if (($plugin = $this->getPlugin(self::$value_plugins, $o->hints)) && $plugin instanceof ValuePluginInterface) { - $output = $plugin->renderValue($o); - if (null !== $output && \strlen($output)) { - return $output; - } - } - - $children = $this->renderChildren($o); - $header = $this->renderHeaderWrapper($o, (bool) \strlen($children), $this->renderHeader($o)); - - return '
'.$header.$children.'
'; - } - - public function renderNothing(): string - { - return '
No argument
'; - } - - public function renderHeaderWrapper(Value $o, bool $has_children, string $contents): string - { - $out = 'getExpand()) { - $out .= ' kint-show'; - } - - $out .= '"'; - } - - $out .= '>'; - - if (self::$access_paths && $o->depth > 0 && ($ap = $o->getAccessPath())) { - $out .= ''; - } - - if ($has_children) { - $out .= ''; - - if (0 === $o->depth) { - $out .= ''; - $out .= ''; - } - - $out .= ''; - } - - $out .= $contents; - - if (!empty($ap)) { - $out .= '
'.$this->escape($ap).'
'; - } - - return $out.''; - } - - public function renderHeader(Value $o): string - { - $output = ''; - - if (null !== ($s = $o->getModifiers())) { - $output .= ''.$s.' '; - } - - if (null !== ($s = $o->getName())) { - $output .= ''.$this->escape($s).' '; - - if ($s = $o->getOperator()) { - $output .= $this->escape($s, 'ASCII').' '; - } - } - - if (null !== ($s = $o->getType())) { - if (self::$escape_types) { - $s = $this->escape($s); - } - - if ($o->reference) { - $s = '&'.$s; - } - - $output .= ''.$s.''; - - if ($o instanceof InstanceValue && isset($o->spl_object_id)) { - $output .= '#'.((int) $o->spl_object_id); - } - - $output .= ' '; - } - - if (null !== ($s = $o->getSize())) { - if (self::$escape_types) { - $s = $this->escape($s); - } - $output .= '('.$s.') '; - } - - if (null !== ($s = $o->getValueShort())) { - $s = \preg_replace('/\\s+/', ' ', $s); - - if (self::$strlen_max) { - $s = Utils::truncateString($s, self::$strlen_max); - } - - $output .= $this->escape($s); - } - - return \trim($output); - } - - public function renderChildren(Value $o): string - { - $contents = []; - $tabs = []; - - foreach ($o->getRepresentations() as $rep) { - $result = $this->renderTab($o, $rep); - if (\strlen($result)) { - $contents[] = $result; - $tabs[] = $rep; - } - } - - if (empty($tabs)) { - return ''; - } - - $output = '
'; - - if (1 === \count($tabs) && $tabs[0]->labelIsImplicit()) { - $output .= \reset($contents); - } else { - $output .= ''; - } - - return $output.'
'; - } - - public function preRender(): string - { - $output = ''; - - if ($this->shouldPreRender()) { - foreach (self::$pre_render_sources as $type => $values) { - $contents = ''; - foreach ($values as $v) { - $contents .= \call_user_func($v, $this); - } - - if (!\strlen($contents)) { - continue; - } - - switch ($type) { - case 'script': - $output .= '