GWM:jc select2
This commit is contained in:
parent
c83e8bc82c
commit
b188b6dd84
@ -34,6 +34,7 @@ class Jobcard extends BaseController
|
||||
public $JobcardModel;
|
||||
public $JobcardOSModel;
|
||||
public $BranchModel;
|
||||
public $UsersModel;
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@ -44,6 +45,7 @@ class Jobcard extends BaseController
|
||||
$this->JobcardModel = new JobcardModel();
|
||||
$this->JobcardOSModel = new JobcardOSModel();
|
||||
$this->BranchModel = new BranchModel();
|
||||
$this->UsersModel = new UsersModel();
|
||||
|
||||
}
|
||||
|
||||
@ -53,7 +55,7 @@ class Jobcard extends BaseController
|
||||
$JobcardModel = new JobcardModel();
|
||||
$data['id'] = $this->session->get('logged_user');
|
||||
$data['role'] = $this->session->get('logged_user_role');
|
||||
$jobs=$JobcardModel->getJobCardsWithProductsAndService($this->session->get('logged_user_branch_id'), $data);
|
||||
$jobs= $JobcardModel->getJobCardsWithProductsAndService($this->session->get('logged_user_branch_id'), $data);
|
||||
$data['jobs']=$jobs;
|
||||
$data['logged_user_role'] = $this->session->get('logged_user_role');
|
||||
// echo "<pre>";
|
||||
@ -595,14 +597,15 @@ class Jobcard extends BaseController
|
||||
{
|
||||
$RoleModel = new RoleModel();
|
||||
$data['workers'] = $RoleModel->get_workers($this->session->get('logged_user_branch_id'));
|
||||
// echo json_encode($data['workers']);die;
|
||||
|
||||
}
|
||||
}
|
||||
$data['job_card_id'] = $job_card_id;
|
||||
$bikeMakeModel = new BikeMakeModel();
|
||||
$data['makeData'] =$bikeMakeModel->findAll();
|
||||
// echo "<pre>";
|
||||
// print_r($data);die;
|
||||
|
||||
|
||||
|
||||
return view('job_card_form',$data);
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,33 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected]{
|
||||
color:#ffffff;
|
||||
background: #526dee!important;
|
||||
}
|
||||
.select2-container .select2-selection--single{
|
||||
height: 36px;
|
||||
border:1px solid #ced4da;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered{
|
||||
line-height: 36px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow{
|
||||
top:4px;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--multiple{
|
||||
height: 36px;
|
||||
border:1px solid #ced4da;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered{
|
||||
line-height: 36px;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__arrow{
|
||||
top:4px;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
@ -399,7 +426,7 @@ $(document).ready(async function() {
|
||||
<?php } ?>
|
||||
// console.log(value);
|
||||
tr = $('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
/** APPEND CHILD PRODUCT */
|
||||
await edit_sub_service_data(value.sub_service);
|
||||
await edit_product_data(value.product);
|
||||
@ -450,7 +477,7 @@ $(document).ready(async function() {
|
||||
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
/** APPEND CHILD PRODUCT */
|
||||
await edit_product_data(value.product);
|
||||
editlabourcost(value,'complaint_lb')
|
||||
@ -500,7 +527,7 @@ $(document).ready(async function() {
|
||||
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
/** APPEND CHILD PRODUCT */
|
||||
await edit_product_data(value.product);
|
||||
editlabourcost(value,'os_lb')
|
||||
@ -538,7 +565,7 @@ $(document).ready(async function() {
|
||||
<?php } ?>
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
/** APPEND CHILD PRODUCT */
|
||||
await edit_product_data(value.product);
|
||||
editlabourcost(value,'custom_complaint_lb')
|
||||
@ -568,7 +595,7 @@ $(document).ready(async function() {
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// $(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}
|
||||
|
||||
function edit_product_data(products) {
|
||||
@ -615,7 +642,7 @@ $(document).ready(async function() {
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// $(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}
|
||||
|
||||
}
|
||||
@ -664,7 +691,7 @@ $(document).ready(async function() {
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// $(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1380,7 +1407,7 @@ $(document).ready(function() {
|
||||
'</tr>';
|
||||
|
||||
$(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}
|
||||
|
||||
const service_child_products = async (data,tr) => {
|
||||
@ -1416,7 +1443,7 @@ $(document).ready(function() {
|
||||
|
||||
// $('#productItemTable tbody').append(newRow);
|
||||
$(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
|
||||
});
|
||||
}
|
||||
@ -1455,7 +1482,7 @@ $(document).ready(function() {
|
||||
|
||||
// $('#productItemTable tbody').append(newRow);
|
||||
$(newRow).insertAfter(tr);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
|
||||
});
|
||||
}
|
||||
@ -1610,7 +1637,7 @@ $(document).ready(function() {
|
||||
|
||||
// $('#productItemTable tbody').append(newRow);
|
||||
$(newRow).insertAfter($(this).closest('tr'));
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
});
|
||||
|
||||
$('#addService').click(function() {
|
||||
@ -1652,7 +1679,7 @@ $(document).ready(function() {
|
||||
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}else{
|
||||
toastr.warning("First Select Vehicle!");
|
||||
}
|
||||
@ -1711,7 +1738,7 @@ $(document).ready(function() {
|
||||
'<td hidden><input type="hidden" name="id"></td>' +
|
||||
'</tr>';
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}else{
|
||||
toastr.warning("First Select Vehicle!");
|
||||
}
|
||||
@ -1766,7 +1793,7 @@ $(document).ready(function() {
|
||||
'</tr>';
|
||||
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}else{
|
||||
toastr.warning("First Select Vehicle!");
|
||||
}
|
||||
@ -1852,7 +1879,7 @@ $(document).ready(function() {
|
||||
'<td hidden><input type="hidden" name="id"></td>' +
|
||||
'</tr>';
|
||||
$('#productItemTable tbody').append(newRow);
|
||||
// initializeSelect2();
|
||||
initializeSelect2();
|
||||
}else{
|
||||
toastr.warning("First Select Vehicle!");
|
||||
}
|
||||
@ -2225,19 +2252,4 @@ $closestTR.remove();
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected]{
|
||||
color:#ffffff;
|
||||
background: #526dee!important;
|
||||
}
|
||||
.select2-container .select2-selection--single{
|
||||
height: 36px;
|
||||
border:1px solid #ced4da;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered{
|
||||
line-height: 36px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow{
|
||||
top:4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user