From 0833b3e460588318b4136a82f4cba5763bdc8763 Mon Sep 17 00:00:00 2001 From: Hyojin Ahn Date: Thu, 7 May 2026 08:09:46 -0400 Subject: [PATCH] =?UTF-8?q?v1.2.13=20-=20[INSTALL=20WAIT=20LIST]=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.=20-=20[INSTALL=20ORDER]=20Install=20/=20Pickup=20?= =?UTF-8?q?=EC=B9=B8=20=EB=B6=84=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public_html/assets/api/install.php | 4 + public_html/assets/css/main.css | 55 +++++++++++ public_html/doc/install_order.php | 63 +++++++------ public_html/doc/install_wait_list.php | 81 ++++++++++++++-- public_html/js/install_wait_modal.js | 55 ++++++++++- public_html/lib/add_install_wait_modal.php | 102 ++++++++++++--------- 6 files changed, 278 insertions(+), 82 deletions(-) diff --git a/public_html/assets/api/install.php b/public_html/assets/api/install.php index 587c841..636364b 100644 --- a/public_html/assets/api/install.php +++ b/public_html/assets/api/install.php @@ -446,6 +446,7 @@ trait InstallAPI { $person_cnt = $_POST['person_cnt'] ?? null; // null or 2 $person_reason= $_POST['person_reason'] ?? null; + $category = intval($_POST['category'] ?? 0); $scheduled = intval($_POST['scheduled'] ?? 0); $cycle = intval($_POST['scheduled_cycle'] ?? 0); @@ -480,6 +481,7 @@ trait InstallAPI { iw_scheduled = '{$scheduled}', iw_scheduled_cycle = '{$cycle}', iw_need_oil_pickup = '{$need_oil}', + iw_category = '{$category}', iw_status = 'WAITING' WHERE iw_uid = '{$iw_uid}' @@ -1586,6 +1588,7 @@ trait InstallAPI { iw_work_type, iw_status, iw_priority, + iw_category, iw_created_by, iw_scheduled, iw_scheduled_cycle, @@ -1611,6 +1614,7 @@ trait InstallAPI { '".mysqli_real_escape_string($GLOBALS['conn'], $wait['iw_work_type'])."', 'WAITING', '{$wait['iw_priority']}', + '{$wait['iw_category']}', '{$wait['iw_created_by']}', 1, '{$cycleDays}', diff --git a/public_html/assets/css/main.css b/public_html/assets/css/main.css index 62df5f0..a90411a 100644 --- a/public_html/assets/css/main.css +++ b/public_html/assets/css/main.css @@ -2363,6 +2363,61 @@ tr.status-X { background: #ffca1a; color: #333; } +.iw-cat-box { + display:flex; + gap:10px; +} +.cat-filter-box { + display:inline-flex; + align-items:center; + padding:6px 10px; + border-radius:10px; + border:1px solid #dcdcdc; + background:#f8f9fa; + gap:6px; +} +.cat-filter-dot-wrap input { + display:none; +} +.cat-filter-dot { + width:24px; + height:24px; + border-radius:50%; + display:inline-block; + background:var(--cat-color); + border:2px solid #999; + cursor:pointer; + opacity:.6; + transition:0.15s; +} +.cat-filter-dot-wrap input:checked + .cat-filter-dot { + opacity:1; + border-color:#333; + transform:scale(1.1); +} +.cat-filter-dot[style*="transparent"] { + background: transparent; + border:2px dashed #aaa; +} +.category-filter { + display:flex; + gap:8px; +} +.iw-cat-btn { + cursor:pointer; + opacity:0.4; + transition:0.15s; + border-color:#333; +} +.iw-cat-btn.active { + opacity:1; + transform:scale(1.25); + border-color:#000000; +} +.iw-cat-btn[data-value="0"] { + background:transparent !important; + border:1px dashed #000000 !important; +} /* mobile */ @media (max-width: 768px) { diff --git a/public_html/doc/install_order.php b/public_html/doc/install_order.php index 9192bcc..964f65c 100644 --- a/public_html/doc/install_order.php +++ b/public_html/doc/install_order.php @@ -121,7 +121,7 @@ if (isset($_GET['ajax']) && $_GET['ajax'] === 'work_images') { 'i_sourceuid' => $img['i_sourceuid'], 'i_note' => $img['i_note'], 'i_createddate' => $img['i_createddate'], - 'images' => $images // ⭐ 핵심 + 'images' => $images ] ]); exit; @@ -1418,7 +1418,8 @@ function renderList(){ - + + @@ -1440,6 +1441,7 @@ function renderList(){ const req = (row.di_request_note || '').trim(); const work = (row.di_work_note || '').trim(); const cs = (row.di_cs_note || '').trim(); + const split = renderContainersSplit(row.containers); html += ` @@ -1455,7 +1457,26 @@ function renderList(){ ${escapeHtml(row.di_customer_name || '')} - ${renderContainers(row.containers)} + + ${split.install ? ` +
+
+ +
+ ${split.install} +
+ ` : ''} + + + ${split.pickup ? ` +
+
+ +
+ ${split.pickup} +
+ ` : ''} +
${escapeHtml(row.di_address)}, @@ -1592,13 +1613,15 @@ function renderWorkType(type){ return `${type || '-'}`; } -function renderContainers(containers){ - - if(!containers || containers.length === 0) return ''; +function renderContainersSplit(containers){ let installChips = ''; let pickupChips = ''; + if(!containers || containers.length === 0){ + return { install:'', pickup:'' }; + } + containers.forEach(c => { let chipClass = 'chip chip-company'; @@ -1627,30 +1650,10 @@ function renderContainers(containers){ } }); - let html = `
`; - - if(installChips){ - html += ` -
- -
- ${installChips} - `; - } - - if(pickupChips){ - html += ` - ${installChips ? '' : ''} -
- -
- ${pickupChips} - `; - } - - html += `
`; - - return html; + return { + install: installChips, + pickup: pickupChips + }; } function toggleReorderMode(driverUid, btn){ diff --git a/public_html/doc/install_wait_list.php b/public_html/doc/install_wait_list.php index 34bcf27..06310f8 100644 --- a/public_html/doc/install_wait_list.php +++ b/public_html/doc/install_wait_list.php @@ -8,6 +8,20 @@ if (!empty($kw_customer)) $where[] = "(iw_customer_name LIKE '%{$kw_cu if (!empty($kw_work)) $where[] = "(iw_work_type = '{$kw_work}')"; if (!empty($_GET['kw_two_person'])) $where[] = "(iw_required_person_cnt IS NOT NULL AND iw_required_person_cnt > 0)"; +$kw_categories = $_GET['kw_category'] ?? []; +if (!is_array($kw_categories)) $kw_categories = [$kw_categories]; +$kw_categories = array_filter(array_map('intval', $kw_categories), function($v){ + return $v >= 0 && $v <= 5; +}); +if ($kw_categories) { + $hasZero = in_array(0, $kw_categories); + $cats = array_filter($kw_categories, fn($v) => $v > 0); + $cond = []; + if ($cats) $cond[] = "iw_category IN (" . implode(',', $cats) . ")"; + if ($hasZero) $cond[] = "(iw_category = 0 OR iw_category IS NULL)"; + $where[] = '(' . implode(' OR ', $cond) . ')'; +} + $statusList = []; if (!empty($_GET['kw_waiting'])) $statusList[] = "'WAITING'"; if (!empty($_GET['kw_draft'])) $statusList[] = "'DRAFT'"; @@ -216,6 +230,17 @@ function formatPhone($phone) { return $phone; } + +function getWaitCategoryColor($cat) { + switch ((int)$cat) { + case 1: return '#ff4d4f'; // red + case 2: return '#1677ff'; // blue + case 3: return '#52c41a'; // green + case 4: return '#fa9614'; // orange + case 5: return '#9254de'; // purple + default: return 'transparent'; + } +} ?> @@ -436,12 +461,16 @@ function formatPhone($phone) { btnNeedOilPickup.classList.add('iw-toggle-on'); } + InstallWait.category = parseInt(data.iw_category || 0, 10); + // job label 갱신 document.getElementById('iwStep3Title').innerText = `Step 3 of 3 - ${data.iw_work_type} Detail`; // action box 다시 그림 setStep3Title(); renderStep3ActionBoxes(); + renderCategorySelector(); + bindCategoryEvents(); loadCurrentContainersIfNeeded(() => { currentReady = true; }); @@ -538,7 +567,7 @@ function formatPhone($phone) {
-
+
+ +
+
+
+ + + +
+
+
+
@@ -568,9 +615,9 @@ function formatPhone($phone) {
-
+
@@ -648,7 +695,9 @@ function formatPhone($phone) { data-pickup-d="" data-pickup-b="" data-install-d="" - data-install-b=""> + data-install-b="" + data-category="" + >
@@ -701,6 +750,16 @@ function formatPhone($phone) {
+ + + + @@ -1122,6 +1181,10 @@ function formatPhone($phone) { loadDailyInstallPoints(); }); + $(document).on('change', 'input[name="kw_category[]"]', function () { + searchWaitlist(); + }); + function resetTrialSelectionUI() { // trial 데이터 초기화 iwTrialRows = {}; @@ -1260,7 +1323,7 @@ function formatPhone($phone) { tr.dataset.orderSeq = r.di_order_seq; } tr.innerHTML = ` - + ${r.is_trial ? '' : `