diff --git a/app/Controllers/Jobcard.php b/app/Controllers/Jobcard.php index 7c032d7..96d9a04 100755 --- a/app/Controllers/Jobcard.php +++ b/app/Controllers/Jobcard.php @@ -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 "
";
@@ -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 "";
- // print_r($data);die;
+
+
+
return view('job_card_form',$data);
}
diff --git a/app/Views/job_card_form.php b/app/Views/job_card_form.php
index b4e19d8..04953f4 100755
--- a/app/Views/job_card_form.php
+++ b/app/Views/job_card_form.php
@@ -6,6 +6,33 @@
cursor: not-allowed;
}
+
@@ -399,7 +426,7 @@ $(document).ready(async function() {
// 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() {
$('#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() {
'';
$(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() {
' ' +
'';
$('#productItemTable tbody').append(newRow);
- // initializeSelect2();
+ initializeSelect2();
}else{
toastr.warning("First Select Vehicle!");
}
@@ -1766,7 +1793,7 @@ $(document).ready(function() {
'';
$('#productItemTable tbody').append(newRow);
- // initializeSelect2();
+ initializeSelect2();
}else{
toastr.warning("First Select Vehicle!");
}
@@ -1852,7 +1879,7 @@ $(document).ready(function() {
' ' +
'';
$('#productItemTable tbody').append(newRow);
- // initializeSelect2();
+ initializeSelect2();
}else{
toastr.warning("First Select Vehicle!");
}
@@ -2225,19 +2252,4 @@ $closestTR.remove();
-
\ No newline at end of file
+
\ No newline at end of file