dbmsv3 init...1
This commit is contained in:
parent
82e18e7516
commit
194e5216fa
31
app/Cells/SearchCell.php
Normal file
31
app/Cells/SearchCell.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Cells;
|
||||||
|
|
||||||
|
use App\Cells\CommonCell;
|
||||||
|
use App\Services\Customer\ClientService;
|
||||||
|
|
||||||
|
class SearchCell extends CommonCell
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(new ClientService());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function client(array $params): string
|
||||||
|
{
|
||||||
|
$options = ["" => "고객명 선택"];
|
||||||
|
foreach ($this->getService()->getEntities() as $entity) {
|
||||||
|
$options[$entity->getPK()] = $entity->getTitle();
|
||||||
|
}
|
||||||
|
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||||
|
return view('cells/search/' . $template, [
|
||||||
|
'searchCellDatas' => [
|
||||||
|
'service' => $this->getService(),
|
||||||
|
'options' => $options,
|
||||||
|
'selected' => null,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -33,6 +33,20 @@
|
|||||||
<th rowspan="2">
|
<th rowspan="2">
|
||||||
<div><a href="/admin/customer/service?site=&location=&clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>"><?= $viewDatas['entity']->getTitle() ?></a></div>
|
<div><a href="/admin/customer/service?site=&location=&clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>"><?= $viewDatas['entity']->getTitle() ?></a></div>
|
||||||
<div><a href=" /admin/customer/payment?clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>">[청구서발행]</a></div>
|
<div><a href=" /admin/customer/payment?clientinfo_uid=<?= $viewDatas['entity']->getPK() ?>">[청구서발행]</a></div>
|
||||||
|
<div class="mt-3">
|
||||||
|
<?=
|
||||||
|
form_label(
|
||||||
|
'서비스추가',
|
||||||
|
'create_service',
|
||||||
|
[
|
||||||
|
"data-src" => '/admin/customer/service/create?clientinfo_uid=' . $viewDatas['entity']->getPK(),
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#modal_action_form",
|
||||||
|
"class" => "btn btn-sm btn-primary form-label-sm",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th>도코</th>
|
<th>도코</th>
|
||||||
<th>치바</th>
|
<th>치바</th>
|
||||||
|
|||||||
4
app/Views/cells/search/client.php
Normal file
4
app/Views/cells/search/client.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?= form_dropdown('client', $searchCellDatas['options'], $searchCellDatas['selected'], [
|
||||||
|
'class' => 'form-select w-auto d-inline-block select-field',
|
||||||
|
'onchange' => "if(this.value) window.location.href='/admin/customer/client/detail/' + this.value;"
|
||||||
|
]) ?>
|
||||||
@ -2,13 +2,13 @@
|
|||||||
<nav class="navbar navbar-expand-lg">
|
<nav class="navbar navbar-expand-lg">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<nav class="nav"><a class="navbar-brand" href="/admin">DBMS 관리</a></nav>
|
<nav class="nav"><a class="navbar-brand" href="/admin">DBMS 관리</a></nav>
|
||||||
<?= form_open("/admin/search", ['method' => 'GET']) ?>
|
|
||||||
<ul class="nav justify-content-center">
|
<ul class="nav justify-content-center">
|
||||||
|
<li class="nav-item"><?= view_cell("\App\Cells\SearchCell::client", []) ?></li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<input type="text" name="keyword" value="<?= old('keyword') ?>" placeholder="고객명/IP/서버명/기타 검색" id="search_keyword" class="form-control" />
|
<?= form_open("/admin/search", ['method' => 'GET', 'class' => 'd-flex gap-2']) ?>
|
||||||
</li>
|
<input type="text" name="keyword" placeholder="고객명/IP/서버명/기타 검색" id="search_keyword" class="form-control" />
|
||||||
<li class="nav-item">
|
|
||||||
<button type="submit" class="btn btn-default border border-dark"><?= ICONS['SEARCH'] ?></button>
|
<button type="submit" class="btn btn-default border border-dark"><?= ICONS['SEARCH'] ?></button>
|
||||||
|
<?= form_close(); ?>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||||
📋:클립보드COPY , 📌:실서비스서버 , ✔️:대체서버->실서비스서버 교체 , 🔄:대체서버등록 , <?= ICONS['MONTH'] ?>:월비용 , <?= ICONS['ONETIME'] ?>:일회성<BR>
|
📋:클립보드COPY , 📌:실서비스서버 , ✔️:대체서버->실서비스서버 교체 , 🔄:대체서버등록 , <?= ICONS['MONTH'] ?>:월비용 , <?= ICONS['ONETIME'] ?>:일회성<BR>
|
||||||
@ -16,7 +16,6 @@
|
|||||||
<?= ICONS['SERVER_ITEM_CPU'] ?>:CPU , <?= ICONS['SERVER_ITEM_RAM'] ?>:RAM , <?= ICONS['SERVER_ITEM_DISK'] ?>:DISK
|
<?= ICONS['SERVER_ITEM_CPU'] ?>:CPU , <?= ICONS['SERVER_ITEM_RAM'] ?>:RAM , <?= ICONS['SERVER_ITEM_DISK'] ?>:DISK
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<?= form_close(); ?>
|
|
||||||
<ul class="nav justify-content-end">
|
<ul class="nav justify-content-end">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<?php if ($viewDatas['isLoggedIn']): ?>
|
<?php if ($viewDatas['isLoggedIn']): ?>
|
||||||
@ -49,6 +48,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<script>
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const params = new URLSearchParams(location.search);
|
||||||
|
const customer_keyword = params.get('customer_keyword');
|
||||||
|
if (keyword)
|
||||||
|
document.querySelector('input[name="customer_keyword"]').value = customer_keyword;
|
||||||
|
});
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const params = new URLSearchParams(location.search);
|
const params = new URLSearchParams(location.search);
|
||||||
const keyword = params.get('keyword');
|
const keyword = params.get('keyword');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user