Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
4213d7be16
@ -484,4 +484,9 @@ $routes->post('updateGasStockDetails', 'StockController::updateGasStockDetails')
|
||||
|
||||
//trp sand use stock details
|
||||
$routes->match(['GET', 'POST'], 'trpSandUseStockDetails', 'StockController::trpSandUseStockDetails');
|
||||
$routes->post('updateTrpSandUseStockDetails', 'StockController::updateTrpSandUseStockDetails');
|
||||
$routes->post('updateTrpSandUseStockDetails', 'StockController::updateTrpSandUseStockDetails');
|
||||
|
||||
//trp production stock details
|
||||
$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
||||
$routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductionDetails');
|
||||
|
||||
|
||||
@ -1265,6 +1265,24 @@ class StockController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function trpProductionDetails(){}
|
||||
|
||||
public function updateTrpProductionDetails(){}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------gwm----------------------------------------------
|
||||
|
||||
|
||||
|
||||
@ -454,13 +454,13 @@ class Supplier extends BaseController
|
||||
$addarr = [ 'name' => $name, 'created_by' => $userId, ];
|
||||
|
||||
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{
|
||||
$editarr = ['name' => $name,'updated_by' => $userId];
|
||||
|
||||
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 "];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -199,10 +199,12 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="button" class="btn btn-danger" data-target="#productionBatchCardDetailModalId"
|
||||
|
||||
<!-- <button type="button" class="btn btn-danger" data-target="#productionBatchCardDetailModalId"
|
||||
data-toggle="modal">
|
||||
Add Production Batch Card
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<button type="button" class="btn btn-success" data-target="#coatingMachineDetailModal"
|
||||
data-toggle="modal">
|
||||
Add Shift Record
|
||||
@ -232,7 +234,7 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class=form-row>
|
||||
<div class="form-group col-md-2 mt-2 ">
|
||||
<div class="form-group col-md-3 mt-2 ">
|
||||
|
||||
<input type="text"
|
||||
value="<?= $month; ?>" name="month"
|
||||
@ -242,10 +244,25 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<div class="form-group col-md-3">
|
||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="dropdown float-right mt-2">
|
||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-dots-vertical m-0 text-muted h3"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a style="cursor:pointer"
|
||||
class="dropdown-item" data-toggle="modal" data-target="#filterModalId">
|
||||
Filter
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -841,6 +858,7 @@
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -848,6 +866,80 @@
|
||||
|
||||
|
||||
|
||||
<!-- filter modal -->
|
||||
<div class="modal fade" id="filterModalId" tabindex="-1" role="dialog" aria-labelledby="filterModalLabelId" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="filterModalLabelId">Filter Options</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$currentDateInDmY = date('d-m-Y');
|
||||
?>
|
||||
|
||||
<?php
|
||||
$startDate = DateTime::createFromFormat('M-Y', $month);
|
||||
|
||||
if ($startDate) {
|
||||
$startDate->modify('first day of this month');
|
||||
$daysInMonth = $startDate->format('t');
|
||||
$dateArray = [];
|
||||
|
||||
for ($i = 0; $i < $daysInMonth; $i++) {
|
||||
$dateArray[] = $startDate->format('d-m-Y');
|
||||
$startDate->modify('+1 day');
|
||||
}
|
||||
} else {
|
||||
echo "Invalid date format.";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<!-- From Date Filter -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="fromDateFilter">Select From Date</label>
|
||||
|
||||
<select id="fromDateFilter" name="fromDateFilter" class="form-control">
|
||||
<?php if (!empty($dateArray)) : ?>
|
||||
<?php foreach ($dateArray as $index => $date) : ?>
|
||||
<option value="<?= $date ?>" ><?= $date ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- To Date Filter -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="toDateFilter">Select Date</label>
|
||||
|
||||
<select id="toDateFilter" name="toDateFilter" class="form-control">
|
||||
|
||||
<?php if (!empty($dateArray)) : ?>
|
||||
<?php foreach ($dateArray as $date) : ?>
|
||||
<option value="<?= $date ?>" <?= ($date == $currentDateInDmY) || ($date == $dateArray[9]) ?"selected" :" " ?> ><?= $date ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right" onclick="customFilterDate()">Filter</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -887,6 +979,8 @@
|
||||
$('#machineOffTimeHrId ').select2();
|
||||
$('#editMachineOnTimeHrId ').select2();
|
||||
$('#editMachineOffTimeHrId ').select2();
|
||||
$('#fromDateFilter ').select2();
|
||||
$('#toDateFilter ').select2();
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -1184,4 +1278,47 @@
|
||||
autoclose: true,
|
||||
orientation: 'bottom'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function customFilterDate(){
|
||||
|
||||
let fromDate = $('#fromDateFilter').val(); //01-12-2024
|
||||
let toDate = $('#toDateFilter').val(); //05-12-2024
|
||||
|
||||
$('#coatingMachineDetailTableId').find('tbody tr').each(function() {
|
||||
const rowCells = $(this).find('td');
|
||||
let tableDate = rowCells.eq(0).text();
|
||||
let result = checkDateRange(fromDate,toDate,tableDate);
|
||||
if (result) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#filterModalId').modal('hide');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkDateRange(fromDate, toDate, tableDate) {
|
||||
// Convert the dates to a comparable format (YYYY-MM-DD)
|
||||
let from = convertToDate(fromDate);
|
||||
let to = convertToDate(toDate);
|
||||
let table = convertToDate(tableDate);
|
||||
|
||||
// Return true if the table date is within the range
|
||||
return table >= from && table <= to;
|
||||
}
|
||||
|
||||
|
||||
function convertToDate(dateString) {
|
||||
// Convert from DD-MM-YYYY to YYYY-MM-DD for comparison
|
||||
let parts = dateString.split('-');
|
||||
return new Date(parts[2], parts[1] - 1, parts[0]); // Year, Month (0-based), Day
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -46,13 +46,15 @@
|
||||
<form role="form" id="addconfig" action="<?php echo base_url() ?>configurationctrl/saveconfig" method="post">
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<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
|
||||
$data = array('name' => 'configurationname', 'value' => set_value('configurationname'), 'id' => 'configurationname', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="Comments">Comments</label>
|
||||
<font color="Red">*</font>
|
||||
<?php
|
||||
$data = array('name' => 'Comments', 'value' => set_value('Comments'), 'id' => 'Comments', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
||||
echo form_input($data);
|
||||
@ -390,11 +392,19 @@
|
||||
<script>
|
||||
$('#addConFigBtnId').click(function (){
|
||||
|
||||
|
||||
|
||||
if($('#configurationname').val().trim() == ''){
|
||||
alert('Please enter Configuration Name..!!');
|
||||
return;
|
||||
}
|
||||
|
||||
if($('#Comments').val().trim() == ''){
|
||||
alert('Please enter comments..!!');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
|
||||
|
||||
@ -437,8 +437,9 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<!-- modal section -->
|
||||
|
||||
|
||||
<!-- filter modal -->
|
||||
<div class="modal fade" id="filterModalId" tabindex="-1" role="dialog" aria-labelledby="filterModalLabelId" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="filterModalLabelId">Filter Options</h4>
|
||||
@ -1003,4 +1004,13 @@ function convertToDate(dateString) {
|
||||
return new Date(parts[2], parts[1] - 1, parts[0]); // Year, Month (0-based), Day
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#fromDateFilter ').select2();
|
||||
$('#toDateFilter ').select2();
|
||||
|
||||
});
|
||||
</script>
|
||||
@ -495,6 +495,20 @@ if (!empty($master)) {
|
||||
<script>
|
||||
$('#updateConfigBtnId').click(function() {
|
||||
|
||||
|
||||
|
||||
if($('#ConfigName').val().trim() == ''){
|
||||
alert('Please enter Configuration Name..!!');
|
||||
return;
|
||||
}
|
||||
|
||||
if($('#Remarks').val().trim() == ''){
|
||||
alert('Please enter comments..!!');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
|
||||
@ -204,14 +204,28 @@
|
||||
<form action="<?= base_url('gasStockDetails'); ?>" method="post">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||
class="form-control mt-2" data-provide="datepicker"
|
||||
data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<div class="form-group col-md-3">
|
||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="dropdown float-right">
|
||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-dots-vertical m-0 text-muted h3"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a style="cursor:pointer"
|
||||
class="dropdown-item" data-toggle="modal" data-target="#filterModalId">Filter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -412,6 +426,81 @@
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
|
||||
<!-- filter modal -->
|
||||
<div class="modal fade" id="filterModalId" tabindex="-1" role="dialog" aria-labelledby="filterModalLabelId" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="filterModalLabelId">Filter Options</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
$currentDateInDmY = date('d-m-Y');
|
||||
?>
|
||||
|
||||
<?php
|
||||
$startDate = DateTime::createFromFormat('M-Y', $month);
|
||||
|
||||
if ($startDate) {
|
||||
$startDate->modify('first day of this month');
|
||||
$daysInMonth = $startDate->format('t');
|
||||
$dateArray = [];
|
||||
|
||||
for ($i = 0; $i < $daysInMonth; $i++) {
|
||||
$dateArray[] = $startDate->format('d-m-Y');
|
||||
$startDate->modify('+1 day');
|
||||
}
|
||||
} else {
|
||||
echo "Invalid date format.";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- From Date Filter -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="fromDateFilter">Select From Date</label>
|
||||
<select id="fromDateFilter" name="fromDateFilter" class="form-control">
|
||||
<?php if (!empty($dateArray)) : ?>
|
||||
<?php foreach ($dateArray as $index => $date) : ?>
|
||||
<option value="<?= $date ?>" ><?= $date ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- To Date Filter -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="toDateFilter">Select Date</label>
|
||||
<select id="toDateFilter" name="toDateFilter" class="form-control">
|
||||
<?php if (!empty($dateArray)) : ?>
|
||||
<?php foreach ($dateArray as $date) : ?>
|
||||
<option value="<?= $date ?>" <?= ($date == $currentDateInDmY) || ($date == $dateArray[9]) ?"selected" :" " ?> ><?= $date ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right" onclick="customFilterDate()">Filter</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
<!-- filter modal end -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -617,3 +706,76 @@
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function customFilterDate(){
|
||||
|
||||
let fromDate = $('#fromDateFilter').val(); //01-12-2024
|
||||
let toDate = $('#toDateFilter').val(); //05-12-2024
|
||||
|
||||
$('#gasStockDetailsTableId').find('tbody tr').each(function() {
|
||||
const rowCells = $(this).find('td');
|
||||
let tableDate = rowCells.eq(0).text();
|
||||
let result = checkDateRange(fromDate,toDate,tableDate);
|
||||
if (result) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#filterModalId').modal('hide');
|
||||
|
||||
}
|
||||
|
||||
|
||||
function checkDateRange(fromDate, toDate, tableDate) {
|
||||
// Convert the dates to a comparable format (YYYY-MM-DD)
|
||||
let from = convertToDate(fromDate);
|
||||
let to = convertToDate(toDate);
|
||||
let table = convertToDate(tableDate);
|
||||
|
||||
// Return true if the table date is within the range
|
||||
return table >= from && table <= to;
|
||||
}
|
||||
|
||||
function convertToDate(dateString) {
|
||||
// Convert from DD-MM-YYYY to YYYY-MM-DD for comparison
|
||||
let parts = dateString.split('-');
|
||||
return new Date(parts[2], parts[1] - 1, parts[0]); // Year, Month (0-based), Day
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#fromDateFilter ').select2();
|
||||
$('#toDateFilter ').select2();
|
||||
initialFilterDate();
|
||||
|
||||
});
|
||||
|
||||
function initialFilterDate(){
|
||||
|
||||
let fromDate = $('#fromDateFilter').val(); //01-12-2024
|
||||
let toDate = $('#toDateFilter').val(); //05-12-2024
|
||||
|
||||
console.log("from Date and to date ..!!")
|
||||
console.log(fromDate,toDate);
|
||||
|
||||
$('#gasStockDetailsTableId').find('tbody tr').each(function() {
|
||||
const rowCells = $(this).find('td');
|
||||
let tableDate = rowCells.eq(0).text();
|
||||
let result = checkDateRange(fromDate,toDate,tableDate);
|
||||
if (result) {
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
@ -867,7 +867,9 @@
|
||||
|
||||
<a href="<?php echo base_url(); ?>bagStockDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Bag Stock Details</a>
|
||||
|
||||
<a href="<?php echo base_url(); ?>trpSandUseStockDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Trp Sand Use Stock Details</a>
|
||||
<a href="<?php echo base_url(); ?>trpSandUseStockDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>TRP Sand Use Stock Details</a>
|
||||
|
||||
<a href="<?php echo base_url(); ?>trpProductionDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>TRP Production Details</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user