diff --git a/module/Application/src/Application/Controller/QualityCheckController.php b/module/Application/src/Application/Controller/QualityCheckController.php index 3ec4dd35c..d5b922f2d 100755 --- a/module/Application/src/Application/Controller/QualityCheckController.php +++ b/module/Application/src/Application/Controller/QualityCheckController.php @@ -32,14 +32,18 @@ public function addAction() if ($request->isPost()) { $params = $request->getPost(); $qcService = $this->getServiceLocator()->get('QualityCheckService'); - $result = $qcService->addQcTestDetails($params); + $qcService->addQcTestDetails($params); return $this->_redirect()->toRoute('quality-check'); } else { $facilityService = $this->getServiceLocator()->get('FacilitiesService'); + $settingService = $this->getServiceLocator()->get('SettingsService'); $facilityResult = $facilityService->getFacilitiesAllDetails(); - + $kitInfo = $settingService->getKitLotDetails(); + $sampleInfo = $settingService->getSamplesDetails(); return new ViewModel(array( 'facilityResult' => $facilityResult, + 'kitInfo' => $kitInfo, + 'sampleInfo' => $sampleInfo )); } } @@ -56,10 +60,15 @@ public function editAction() $qualityCheckId = base64_decode($this->params()->fromRoute('id')); $result = $qcService->getQualityCheckDetailsById($qualityCheckId); $facilityService = $this->getServiceLocator()->get('FacilitiesService'); + $settingService = $this->getServiceLocator()->get('SettingsService'); $facilityResult = $facilityService->getFacilitiesAllDetails(); + $kitInfo = $settingService->getKitLotDetails(); + $sampleInfo = $settingService->getSamplesDetails(); return new ViewModel(array( 'result' => $result, 'facilityResult' => $facilityResult, + 'kitInfo' => $kitInfo, + 'sampleInfo' => $sampleInfo )); } } diff --git a/module/Application/src/Application/Controller/RecencyController.php b/module/Application/src/Application/Controller/RecencyController.php index c08b47e8a..3ec8ff0f5 100755 --- a/module/Application/src/Application/Controller/RecencyController.php +++ b/module/Application/src/Application/Controller/RecencyController.php @@ -53,13 +53,17 @@ public function addAction() $facilityResult = $facilityService->getFacilitiesAllDetails(); $testFacilityTypeResult = $facilityService->getTestingFacilitiesTypeDetails(); $globalConfigService = $this->getServiceLocator()->get('GlobalConfigService'); + $settingService = $this->getServiceLocator()->get('SettingsService'); + $globalConfigResult = $globalConfigService->getGlobalConfigAllDetails(); - $kitInfo = $recencyService->getKitInfo(); + $kitInfo = $settingService->getKitLotDetails(); + $sampleInfo = $settingService->getSamplesDetails(); return new ViewModel(array( 'globalConfigResult' => $globalConfigResult, 'facilityResult' => $facilityResult, 'testFacilityTypeResult' => $testFacilityTypeResult, - 'kitInfo' => $kitInfo + 'kitInfo' => $kitInfo, + 'sampleInfo' => $sampleInfo )); } } @@ -74,19 +78,21 @@ public function editAction() } else { $recencyId = base64_decode($this->params()->fromRoute('id')); $facilityService = $this->getServiceLocator()->get('FacilitiesService'); - + $settingService = $this->getServiceLocator()->get('SettingsService'); + $globalConfigService = $this->getServiceLocator()->get('GlobalConfigService'); + $facilityResult = $facilityService->getFacilitiesAllDetails(); - $result = $recencyService->getRecencyDetailsById($recencyId); - $globalConfigService = $this->getServiceLocator()->get('GlobalConfigService'); $globalConfigResult = $globalConfigService->getGlobalConfigAllDetails(); $testFacilityTypeResult = $facilityService->getTestingFacilitiesTypeDetails(); - $kitInfo = $recencyService->getKitInfo(); + $kitInfo = $settingService->getKitLotDetails(); + $sampleInfo = $settingService->getSamplesDetails(); return new ViewModel(array( 'globalConfigResult' => $globalConfigResult, 'facilityResult' => $facilityResult, 'testFacilityTypeResult' => $testFacilityTypeResult, 'kitInfo' => $kitInfo, + 'sampleInfo' => $sampleInfo, 'result' => $result )); } diff --git a/module/Application/src/Application/Model/SettingsQcSampleTable.php b/module/Application/src/Application/Model/SettingsQcSampleTable.php index 873b3ba52..e8257aa48 100755 --- a/module/Application/src/Application/Model/SettingsQcSampleTable.php +++ b/module/Application/src/Application/Model/SettingsQcSampleTable.php @@ -219,5 +219,8 @@ public function fetchAllSampleListApi() } return $response; } - + + public function fetchSamples(){ + return $this->select(array('qc_sample_status'=>'active'))->toArray(); + } } diff --git a/module/Application/src/Application/Model/SettingsTable.php b/module/Application/src/Application/Model/SettingsTable.php index 666711173..c4089f649 100755 --- a/module/Application/src/Application/Model/SettingsTable.php +++ b/module/Application/src/Application/Model/SettingsTable.php @@ -203,5 +203,7 @@ public function updateSettingsDetails($params) return $params['testId']; } - + public function fetchKitLotDetails(){ + return $this->select(array('status'=>'active'))->toArray(); + } } diff --git a/module/Application/src/Application/Service/SettingsService.php b/module/Application/src/Application/Service/SettingsService.php index 942bfc319..04bc335f1 100755 --- a/module/Application/src/Application/Service/SettingsService.php +++ b/module/Application/src/Application/Service/SettingsService.php @@ -54,6 +54,12 @@ public function getSettingsDetailsById($testId) $settingsDb = $this->sm->get('SettingsTable'); return $settingsDb->fetchSettingsDetailsById($testId); } + + public function getKitLotDetails() + { + $settingsDb = $this->sm->get('SettingsTable'); + return $settingsDb->fetchKitLotDetails(); + } public function updateSettingsDetails($params){ $adapter = $this->sm->get('Zend\Db\Adapter\Adapter')->getDriver()->getConnection(); @@ -89,6 +95,12 @@ public function getSettingsSampleDetailsById($sampleId) $settingsQcSampleDb = $this->sm->get('SettingsQcSampleTable'); return $settingsQcSampleDb->fetchSettingsSampleDetailsById($sampleId); } + + public function getSamplesDetails() + { + $settingsQcSampleDb = $this->sm->get('SettingsQcSampleTable'); + return $settingsQcSampleDb->fetchSamples(); + } public function addSampleSettingsDetails($params) { @@ -137,5 +149,3 @@ public function getAllSampleListApi($params) return $settingsQcSampleDb->fetchAllSampleListApi($params); } } - -?> diff --git a/module/Application/view/application/quality-check/add.phtml b/module/Application/view/application/quality-check/add.phtml index fc69b1e1f..741d465d5 100755 --- a/module/Application/view/application/quality-check/add.phtml +++ b/module/Application/view/application/quality-check/add.phtml @@ -45,7 +45,12 @@ $lineOutComeColor2 = "#000000";
- +
@@ -67,7 +72,12 @@ $lineOutComeColor2 = "#000000";
- +
diff --git a/module/Application/view/application/quality-check/edit.phtml b/module/Application/view/application/quality-check/edit.phtml index 8c7c376da..6e000394f 100755 --- a/module/Application/view/application/quality-check/edit.phtml +++ b/module/Application/view/application/quality-check/edit.phtml @@ -1,4 +1,5 @@ .outcome { - display: none; - } + display: none; + } - .btnHide { @@ -68,9 +69,14 @@ $lineOutComeColor2 = "#000000";
- +
- +
@@ -88,9 +94,14 @@ $lineOutComeColor2 = "#000000";
- +
- +
@@ -150,11 +161,11 @@ $lineOutComeColor2 = "#000000"; -
"> +
diff --git a/module/Application/view/application/recency/add.phtml b/module/Application/view/application/recency/add.phtml index 24fd79927..5264bd061 100755 --- a/module/Application/view/application/recency/add.phtml +++ b/module/Application/view/application/recency/add.phtml @@ -5,12 +5,13 @@ use Zend\Session\Container; $config = new \Zend\Config\Reader\Ini(); $configResult = $config->fromFile(CONFIG_PATH . '/custom.config.ini'); $sessionLogin = new Container('credo'); -$arr = array();$syn = false; +$arr = array(); +$syn = false; //\Zend\Debug\Debug::dump($facilityResult);die; for ($i = 0; $i < sizeof($globalConfigResult); $i++) { $arr[$globalConfigResult[$i]['global_name']] = $globalConfigResult[$i]['global_value']; - if($globalConfigResult[$i]['global_name'] == 'recency_to_vlsm_sync' && $globalConfigResult[$i]['global_value'] == 'yes'){ + if ($globalConfigResult[$i]['global_name'] == 'recency_to_vlsm_sync' && $globalConfigResult[$i]['global_value'] == 'yes') { $syn = true; } } @@ -158,8 +159,7 @@ ul.typeahead.dropdown-menu li:last-child a { border-bottom:0px !important; } */
"> - " id="sampleId" name="sampleId" placeholder="Enter the sample id" title="Please enter the sample id"> + " id="sampleId" name="sampleId" placeholder="Enter the sample id" title="Please enter the sample id"/>
@@ -300,7 +300,8 @@ ul.typeahead.dropdown-menu li:last-child a { border-bottom:0px !important; } */
"> - " id="testKitLotNo" name="testKitLotNo" title="Please select the kit lot no"> ' . $info['kit_lot_no'] . ''; @@ -458,30 +459,30 @@ ul.typeahead.dropdown-menu li:last-child a { border-bottom:0px !important; } */
- -