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="= $pickup_d ?>"
data-pickup-b="= $pickup_b ?>"
data-install-d="= $install_d ?>"
- data-install-b="= $install_b ?>">
+ data-install-b="= $install_b ?>"
+ data-category="= (int)($row['iw_category'] ?? 0) ?>"
+ >
@@ -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 ? '' : `
|
- ${r.di_order_seq} |
-
+ | ${r.di_order_seq} |
+
${r.di_accountno || ''}
-
+
${r.di_customer_name || ''}
|
${r.di_customer_driver_initial} |
- ${r.di_address || ''} ${r.di_city || ''} |
+ ${r.di_address || ''} ${r.di_city || ''} |
${(r.di_work_type || '').substring(0, 2)} |
${renderContainerSummary(r.pickup_d_cnt, r.pickup_b_cnt)} |
${renderContainerSummary(r.install_d_cnt, r.install_b_cnt)} |
diff --git a/public_html/js/install_wait_modal.js b/public_html/js/install_wait_modal.js
index fd12dbb..8593c71 100644
--- a/public_html/js/install_wait_modal.js
+++ b/public_html/js/install_wait_modal.js
@@ -2,11 +2,21 @@ window.InstallWait = window.InstallWait || {
step: 1,
customer: null,
job: null,
+ category: 0,
pickup: [],
schedule: { date:'', note:'' },
photos: []
};
+const IW_CATEGORY_COLORS = {
+ 0: 'transparent', // 없음
+ 1: '#ff4d4f',
+ 2: '#1677ff',
+ 3: '#52c41a',
+ 4: '#fa9614',
+ 5: '#9254de'
+};
+
/* 슬라이드 이동 (100vw 기준) */
function goInstallWaitStep(step) {
const wrapper = document.querySelector('.install-wait-steps-wrapper');
@@ -292,7 +302,8 @@ function initInstallWaitStep3() {
person_reason: twoOn ? document.getElementById('iwTwoPersonReason').value : null,
scheduled: recOn ? 1 : 0,
scheduled_cycle: recOn ? document.getElementById('iwRecurringDays').value: 0,
- need_oil: oilOn ? 1 : 0
+ need_oil: oilOn ? 1 : 0,
+ category: InstallWait.category || 0
};
btnStep3Complete.disabled = true;
@@ -344,10 +355,12 @@ function initInstallWaitStep3() {
};
InstallWait.pickup = InstallWait.pickup || [];
+ InstallWait.category = 0;
setStep3Title();
renderStep3ActionBoxes();
loadCurrentContainersIfNeeded();
+ renderCategorySelector();
bindStep3Toggles();
fillRequestBySelect('Customer');
initInstallWaitDatePickers();
@@ -431,6 +444,30 @@ function renderActionBox(action) {
`;
}
+function renderCategorySelector() {
+ const wrap = document.getElementById('iwCategorySelectorWrap');
+
+ if (!wrap) return;
+
+ wrap.innerHTML = `
+
+ ${[0,1,2,3,4,5].map(i => `
+
+ `).join('')}
+
+ `;
+}
+
function countTaskChips(action) {
// action: 'PICKUP' | 'INSTALL'
const wrap = document.querySelector(`.container-chips[data-action="${action}"]`);
@@ -937,6 +974,22 @@ function bindStep3Toggles() {
btnOil.onclick = () => {
btnOil.classList.toggle('iw-toggle-on');
};
+
+ bindCategoryEvents();
+}
+
+function bindCategoryEvents() {
+ document.querySelectorAll('.iw-cat-btn').forEach(btn => {
+ btn.onclick = function() {
+
+ document.querySelectorAll('.iw-cat-btn')
+ .forEach(b => b.classList.remove('active'));
+
+ this.classList.add('active');
+
+ InstallWait.category = parseInt(this.dataset.value, 10);
+ };
+ });
}
function getContainerIconByType(type) {
diff --git a/public_html/lib/add_install_wait_modal.php b/public_html/lib/add_install_wait_modal.php
index d80e5be..f82ddb7 100644
--- a/public_html/lib/add_install_wait_modal.php
+++ b/public_html/lib/add_install_wait_modal.php
@@ -187,59 +187,77 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|