diff --git a/app/Controllers/FactoryMachineController.php b/app/Controllers/FactoryMachineController.php index 0e6155e5..ba5025be 100644 --- a/app/Controllers/FactoryMachineController.php +++ b/app/Controllers/FactoryMachineController.php @@ -45,11 +45,9 @@ class FactoryMachineController extends BaseController $data = $this->factoryMachineMaster_model->insert($postData); - - - $this->readFactoryMachineMasterDetails(); + return redirect()->to('/readFactoryMachineMasterDetails'); - //check above data is successfully created. + @@ -83,16 +81,12 @@ class FactoryMachineController extends BaseController public function readFactoryMachineMasterDetails(){ - - - $this->global['pageTitle'] = 'Factory Machine Master Details '; + $this->global['pageTitle'] = 'Factory Machine Master Details'; $data['masterData'] = $this->factoryMachineMaster_model->where('is_active', 1)->findAll(); return $this->loadViews("factoryMachineMasterDetails", $this->global, $data, NULL); - - } public function readFactoryMachineMasterDetailsById(){ @@ -111,7 +105,7 @@ class FactoryMachineController extends BaseController $this->global['pageTitle'] = 'Edit Factory Machine Master Detail '; - $id = $this->request->getPost('id'); + $id = $this->request->getGet('id'); $postData=[ 'machine_name'=> $this->request->getPost('machineName'), @@ -119,9 +113,17 @@ class FactoryMachineController extends BaseController 'energy_type' => $this->request->getPost('energyType'), ]; - $data = $this->factoryMachineMaster_model->update($id,$postData); + $updated = $this->factoryMachineMaster_model->update($id,$postData); - $this->readFactoryMachineMasterDetails(); + + + if ($updated) { + // Set flashdata for success message + return redirect()->to('/readFactoryMachineMasterDetails')->with('success', 'Machine details updated successfully'); + } else { + // Set flashdata for error message + return redirect()->back()->with('error', 'Failed to update machine details'); + } diff --git a/app/Views/factoryMachineMasterDetailsCreate.php b/app/Views/factoryMachineMasterDetailsCreate.php index 4858a6ec..da538921 100644 --- a/app/Views/factoryMachineMasterDetailsCreate.php +++ b/app/Views/factoryMachineMasterDetailsCreate.php @@ -54,7 +54,7 @@ $energyType=$masterData['energy_type']??'';
" method="post" class="form-label-left " > + else{echo "updateFactoryMachineMasterDetails?id=".$masterData['id'];} ?>" method="post" class="form-label-left " >
@@ -86,9 +86,9 @@ $energyType=$masterData['energy_type']??'';
- +   -
diff --git a/deletableFile.php b/deletableFile.php deleted file mode 100755 index 508077e2..00000000 --- a/deletableFile.php +++ /dev/null @@ -1,869 +0,0 @@ - -
- -
- - -
- -
- -
-
- - your image -
- - - -
-
- -
- - - -
- - - - - - - -
- -
- -
- * - -
- -
- - -
- -
- - - name="isactive" value="1"> Is Active -
- - -
- - - - -
- -
- -
- Full Name* - -
- -
- Father / Husband Name* - -
- -
- Contact Number* - -
- -
- - -
- -
- Gender* - -
- -
- Date Of Birth* - -
- -
- Age* - -
- -
- - -
- -
- Personal Email ID - -
- -
- Official Email ID - -
- -
- - Blood group* - -
- -
- -
- -
- Current Address* - -
- - -
- Current address same as permanent - address -
- -
- Permanent Address* - -
- -
- -
- - -
- Marital Status* - -
- -
- Emergency Contact Name - -
- -
- Emergency Contact Number - -
- - -
- - -
-
- - - -
- -
-
-
-
-
-
-
-
- Designation* - - - -
-
- Department* - - -
-
- Date Of Joining* - -
-
- Previous Years of Experience - -
-
- - -
-
-
-
-
-
-
- -
- Qualification* - -
- - - - - -
- Work Location* - - -
- -
-
- Management - Team - -
-
-
- -
- - -
-
- -
- -
- -
-
- -
-
-
-
-
-
- Bank Name - - -
-
- Account Number - -
-
- IFSC Code - -
-
- Bank Address - -
-
-
- - -
- -
-
-
-
-
-
-
- - Total Salary - * - - - -
-
-
-
- Basic Pay - * - - -
-
-
-
- HRA Rate(%) - * - - - -
-
-
-
- HRA Amount - * - - - -
-
- -
-
- -
- -
-
- -
-
-
-
-
- ESI Number - -
-
-
-
- ESI Rate(%) - * - - - -
-
-
-
- UAN - -
-
-
-
- PF Rate(%) - * - - -
-
-
-
-
- -
-
-
-
-
-
- ESI - Applicable - -
-
- -
-
- PF - Applicable - -
-
-
-
-
- - - - -
- -
- -
-
-
-
-
-
-
-
- Aadhar Number * - -
-
- PAN Number - -
-
- Passport Number - -
-
- Passport Expiry Date - -
- -
-
-
-
-
-
-
-
-
- Voter ID - -
-
- Driving License - - -
- -
- Driving License Expiry Date - -
- -
- Nominee reference - -
- - -
-
-
- -
- -
- -
-
-
-
-
-
- - - - 0) { ?> - - - - $value) { ?> - -
-
- - File Name - - - - -
-
- - - -
-
- - -
- -
- - -
-
- File Name - -
-
- File - -
-
- -
-
- - - -
- - -
-
- -
- -
-
\ No newline at end of file