dbms_init...1
This commit is contained in:
parent
fcc7744656
commit
6f4701a5a4
@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
|
||||
use App\Entities\Customer\ServiceEntity;
|
||||
use App\Entities\Customer\ServiceItemEntity;
|
||||
use App\Helpers\Customer\ServiceItemHelper;
|
||||
use App\Services\Customer\ServiceItemService;
|
||||
|
||||
@ -77,7 +74,7 @@ class ServiceItemController extends CustomerController
|
||||
if (!$item_type) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 item_type이 지정되지 않았습니다.");
|
||||
}
|
||||
$options = $this->getServiceService()->getFilterOptionsByItemType($item_type);
|
||||
$options = $this->getFilterFieldOption($item_type);
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
|
||||
@ -564,10 +564,13 @@ abstract class CommonController extends BaseController
|
||||
//Filter 조건절 처리
|
||||
protected function setFilterConditionForList(): void
|
||||
{
|
||||
if (!array_key_exists('filter_datas', $this->_control)) {
|
||||
$this->_control['filter_values'] = [];
|
||||
}
|
||||
foreach ($this->getFilterFields() as $field) {
|
||||
$this->$field = $this->request->getVar($field);
|
||||
if ($this->$field !== null && $this->$field !== '') {
|
||||
$this->getService()->getModel()->where("{$this->getService()->getModel()->getTable()}.{$field}", $this->$field);
|
||||
$this->_control['filter_values'][$field] = $this->request->getVar($field);
|
||||
if ($this->_control['filter_values'][$field] !== null && $this->_control['filter_values'][$field] !== '') {
|
||||
$this->getService()->getModel()->where("{$this->getService()->getModel()->getTable()}.{$field}", $this->_control['filter_values'][$field]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,8 @@ class ServiceItemHelper extends CustomerHelper
|
||||
private function getFieldFormByItemType(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
$form = "";
|
||||
$item_type = $viewDatas['item_type'];
|
||||
// dd($viewDatas);
|
||||
$item_type = $viewDatas['control']['filter_values']['item_type'];
|
||||
//Field는 item_uid이지만 , item_tpe에 따라 filter_options가 달라진다.
|
||||
switch ($item_type) {
|
||||
case "IP":
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||
<div id="container" class="content action_form">
|
||||
<link href=" /css/<?= $viewDatas['layout'] ?>/form.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div class=" row">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<table class="table table-bordered">
|
||||
<?php foreach ($viewDatas['control']['view_fields'] as $field): ?>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<nav class="condition nav">
|
||||
조건:
|
||||
<?php foreach ($viewDatas['control']['filter_fields'] as $field): ?>
|
||||
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?? old($field), $viewDatas, ['id' => $field, 'index_content_top_filter' => 'true']) ?>
|
||||
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas['control']['filter_values'][$field] ?? old($field), $viewDatas, ['id' => $field, 'index_content_top_filter' => 'true']) ?>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
<nav class="search nav justify-content-center">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user