485 lines
12 KiB
PHP
485 lines
12 KiB
PHP
<?php include('techsyn_header.php');
|
|
include('log_entry.php');
|
|
?>
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try {
|
|
ace.settings.loadState('main-container')
|
|
} catch (e) {}
|
|
</script>
|
|
<?php include('techsyn_sidebar.php'); ?>
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
<li class="#">Data Setup</li>
|
|
<li class="#">Masters</li>
|
|
<li class="active">Issue Point Master</li>
|
|
</ul>
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content">
|
|
<div class="box box-primary" style="padding: 10px; margin: 2px 0px 50px 5px; width: 100%; ">
|
|
<form id="issuepoint_form" method="post">
|
|
<!-- box-body-->
|
|
<div class="box-body" id="reload_amb">
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="myTable" class="table table-bordered order-list">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>ISSUE POINT TYPE</th>
|
|
<th>ISSUE POINT NAME</th>
|
|
|
|
<th>LOCATION</th>
|
|
<th>CODE</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
|
|
<td style="width:8%">
|
|
<!-- <input type="hidden" name="point_id" id="point_id" /> -->
|
|
|
|
|
|
<input type="text" name="type_name" id="type_name" class="form-control" />
|
|
|
|
</td>
|
|
<td style="width:8%">
|
|
<input type="text" name="issue_point_name" id="issue_point_name" class="form-control" />
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td style="width:8%">
|
|
<input type="text" name="location" id="location" class="form-control" />
|
|
|
|
</td>
|
|
|
|
<td style="width:8%">
|
|
<input type="text" name="code" id="code" class="form-control" />
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="count_items" id="count_items" value="" />
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<!-- End box-body-->
|
|
<!--box-footer-->
|
|
<?php
|
|
//$hasWriteAccess = isAccessible ( $_SESSION ['RoleId'], $menu_key, 'W' );
|
|
?>
|
|
<?php //if ($hasWriteAccess) {
|
|
?>
|
|
<div class="box-footer" style="text-align: center;">
|
|
<button class="btn btn-success new_button" id="new_button" type="reset" onclick="show_save_button();">
|
|
<i class="ace-icon fa fa-plus-square-o bigger-110"></i>
|
|
New
|
|
</button>
|
|
|
|
<button class="btn btn-info save_button" type="button" id="save_button" onclick="validate();">
|
|
<i class="ace-icon fa fa-floppy-o bigger-110"></i>
|
|
Save
|
|
</button>
|
|
|
|
</div>
|
|
<?php //}
|
|
?>
|
|
|
|
<!--End box-footer-->
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try {
|
|
ace.settings.loadState('main-container')
|
|
} catch (e) {}
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
|
|
<div class="page-content" style="margin-top: -47px;">
|
|
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" action="" id="flex_form_issuepoint">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_point_id" id="flex_point_id" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var w = screen.width * .90;
|
|
var h = 0;
|
|
h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .75;
|
|
$("#flex1").flexigrid({
|
|
url: 'issuepoint_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: '',
|
|
name: 'links',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Sr No',
|
|
name: 'count',
|
|
width: w * .07,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
{
|
|
display: 'Issue Point Type',
|
|
name: 'type_name',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Issue Point Name',
|
|
name: 'issue_point_name',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Location',
|
|
name: 'location',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
{
|
|
display: 'Code',
|
|
name: 'code',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
|
|
],
|
|
buttons: [
|
|
|
|
// {name: 'Add', bclass: 'add', onpress : add},
|
|
// {separator: true},
|
|
{
|
|
name: 'PDF',
|
|
bclass: 'print',
|
|
onpress: pdf
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'Excel',
|
|
bclass: 'print_excel',
|
|
onpress: excel
|
|
},
|
|
{
|
|
separator: true
|
|
}
|
|
],
|
|
searchitems: [
|
|
|
|
{
|
|
display: 'Issue Point Type',
|
|
name: 'type_name',
|
|
isdefault: true
|
|
},
|
|
{
|
|
display: 'Location',
|
|
name: 'location'
|
|
},
|
|
{
|
|
display: 'Code',
|
|
name: 'code'
|
|
}
|
|
|
|
],
|
|
sortname: "point_id",
|
|
sortorder: "asc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
function pdf() {
|
|
window.open('issuepoint_pdf.php');
|
|
}
|
|
|
|
function excel() {
|
|
window.location = 'issuepoint_excel.php';
|
|
}
|
|
|
|
function add() {
|
|
// $(".save_button").show();
|
|
$("#point_id").val("");
|
|
$("#name").val("");
|
|
$("#type_name").val("");
|
|
$("#location").val("");
|
|
$("#code").val("");
|
|
}
|
|
|
|
function show_save_button() {
|
|
$("#save_button").show();
|
|
$("#point_id").val("");
|
|
}
|
|
|
|
|
|
function delete_issuepoint(point_id) {
|
|
$("#flex_point_id").val(point_id);
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete the Issue Point Details?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_issuepoint.php',
|
|
type: "POST",
|
|
data: $("#flex_form_issuepoint").serialize(),
|
|
success: function(data) {
|
|
if (data.indexOf("SUCCESS") != -1) {
|
|
BootstrapDialog.alert('Issue Point Details Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
} else {
|
|
BootstrapDialog.alert('Error Deleting Issue Point Details');
|
|
}
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Deleting Issue Point Details');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function save_issuepoint() {
|
|
// var sub_category_id;
|
|
$.ajax({
|
|
url: 'save_issuepoint.php',
|
|
type: 'POST',
|
|
data: $("#issuepoint_form").serialize(),
|
|
success: function(data) {
|
|
// var data= $.parseJSON(data);
|
|
var result = data.status;
|
|
alert(result);
|
|
alert(data);
|
|
|
|
if (data.status == 'ERROR') {
|
|
BootstrapDialog.alert('ISSUE POINT NAME ALREADY EXISTS');
|
|
} else {
|
|
BootstrapDialog.alert('Issue Point Details Saved Successfully');
|
|
}
|
|
$("#flex1").flexReload();
|
|
return;
|
|
|
|
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Issue Point Details');
|
|
return;
|
|
}
|
|
|
|
});
|
|
$('.close').click();
|
|
}
|
|
|
|
|
|
|
|
function open_issuepoint(point_id, action) {
|
|
|
|
if (action == "V") {
|
|
$(".save_button").hide();
|
|
|
|
} else {
|
|
$(".save_button").show();
|
|
}
|
|
$.ajax({
|
|
url: 'select_issuepoint.php?point_id=' + point_id + ' ',
|
|
type: 'POST',
|
|
success: function(data) {
|
|
|
|
var data = $.parseJSON(data);
|
|
|
|
$("#point_id").val(data.point_id);
|
|
$("#name").val(data.name);
|
|
$("#type_name").val(data.type_name);
|
|
$("#location").val(data.location);
|
|
$("#code").val(data.code);
|
|
|
|
// $("#staff_category").val(data.staff_category);
|
|
// $('#modal-add-staffcategory').modal("show");
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Populating Issue Point Details');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
function validate() {
|
|
|
|
|
|
var issue_point_name = $('#issue_point_name').val();
|
|
var location = $('#location').val();
|
|
var code = $('#code').val();
|
|
|
|
if (issue_point_name == '') {
|
|
|
|
BootstrapDialog.alert('Please Enter Issue Point Name.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (location == '') {
|
|
|
|
BootstrapDialog.alert('Please Enter Location.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
if (code == '') {
|
|
|
|
BootstrapDialog.alert('Please Enter Code.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
save_issuepoint();
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
<!-- bootstrap & fontawesome -->
|
|
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|
|
|
<!-- page specific plugin styles -->
|
|
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
|
|
<link rel="stylesheet" href="assets/css/chosen.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datetimepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|
<script type="text/javascript" src="js/typeahead.bundle.js"></script>
|
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|
<script src="assets/js/chosen.jquery.min.js"></script>
|
|
<script src="assets/js/spinbox.min.js"></script>
|
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|
<script src="assets/js/buttons.print.min.js"></script>
|
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|
|
|
|
|
<script src="assets/js/moment.min.js"></script>
|
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|
<script src="assets/js/ace-elements.min.js"></script>
|