master module 2 vadivel J 31-12-2024

This commit is contained in:
vadivelJ96 2024-12-31 11:47:26 +05:30
parent b9ac3c7df8
commit e31025bb37
3 changed files with 27 additions and 3 deletions

View File

@ -454,13 +454,13 @@ class Supplier extends BaseController
$addarr = [ 'name' => $name, 'created_by' => $userId, ]; $addarr = [ 'name' => $name, 'created_by' => $userId, ];
if ($this->supplier_model->saveTransporter($addarr) > 0) { if ($this->supplier_model->saveTransporter($addarr) > 0) {
$data = ['status' => true, 'message' => 'Successfully created transporter details']; $data = ['status' => true, 'message' => "Successfully created $name transporter details"];
} }
}else{ }else{
$editarr = ['name' => $name,'updated_by' => $userId]; $editarr = ['name' => $name,'updated_by' => $userId];
if ($this->supplier_model->updateTransporter($editarr, $id) > 0) { if ($this->supplier_model->updateTransporter($editarr, $id) > 0) {
$data = ['status' => true,'message' => 'Successfully updated transporter details']; $data = ['status' => true,'message' => "Successfully updated transporter details as $name "];
} }
} }

View File

@ -46,13 +46,15 @@
<form role="form" id="addconfig" action="<?php echo base_url() ?>configurationctrl/saveconfig" method="post"> <form role="form" id="addconfig" action="<?php echo base_url() ?>configurationctrl/saveconfig" method="post">
<div class="form-row" style="margin-top:10px"> <div class="form-row" style="margin-top:10px">
<div class=" col-md-3"> <div class=" col-md-3">
<label class="col-form-label" for="ConfigurationName">Configuration Name</label><span class="text-danger">*</span> <label class="col-form-label" for="ConfigurationName">Configuration Name</label>
<font color="Red">*</font>
<?php <?php
$data = array('name' => 'configurationname', 'value' => set_value('configurationname'), 'id' => 'configurationname', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); $data = array('name' => 'configurationname', 'value' => set_value('configurationname'), 'id' => 'configurationname', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
echo form_input($data); ?> echo form_input($data); ?>
</div> </div>
<div class=" col-md-3"> <div class=" col-md-3">
<label class="col-form-label" for="Comments">Comments</label> <label class="col-form-label" for="Comments">Comments</label>
<font color="Red">*</font>
<?php <?php
$data = array('name' => 'Comments', 'value' => set_value('Comments'), 'id' => 'Comments', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20'); $data = array('name' => 'Comments', 'value' => set_value('Comments'), 'id' => 'Comments', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
echo form_input($data); echo form_input($data);
@ -390,11 +392,19 @@
<script> <script>
$('#addConFigBtnId').click(function (){ $('#addConFigBtnId').click(function (){
if($('#configurationname').val().trim() == ''){ if($('#configurationname').val().trim() == ''){
alert('Please enter Configuration Name..!!'); alert('Please enter Configuration Name..!!');
return; return;
} }
if($('#Comments').val().trim() == ''){
alert('Please enter comments..!!');
return;
}
$('#loader').show(); $('#loader').show();
$.ajax({ $.ajax({

View File

@ -495,6 +495,20 @@ if (!empty($master)) {
<script> <script>
$('#updateConfigBtnId').click(function() { $('#updateConfigBtnId').click(function() {
if($('#ConfigName').val().trim() == ''){
alert('Please enter Configuration Name..!!');
return;
}
if($('#Remarks').val().trim() == ''){
alert('Please enter comments..!!');
return;
}
$('#loader').show(); $('#loader').show();
$.ajax({ $.ajax({
data: { data: {