diff --git a/public_html/assets/api/install.php b/public_html/assets/api/install.php index 805f54a..41cb5cb 100644 --- a/public_html/assets/api/install.php +++ b/public_html/assets/api/install.php @@ -436,6 +436,7 @@ trait InstallAPI { $scheduled = intval($_POST['scheduled'] ?? 0); $cycle = intval($_POST['scheduled_cycle'] ?? 0); + $lock_date = intval($_POST['lock_date'] ?? 0); // Two-person OFF = NULL if (!$person_cnt) { @@ -453,6 +454,7 @@ trait InstallAPI { SET iw_request_at = ".($request_at ? "'{$request_at}'" : "NOW()").", iw_requested_due_date = ".($due_date ? "'{$due_date}'" : "NULL").", + iw_lock_date = '{$lock_date}', iw_request_by = ".($request_by ? "'{$request_by}'" : "NULL").", iw_request_note = ".($request_note ? "'".addslashes($request_note)."'" : "NULL").", iw_cs_note = ".($cs_note ? "'".addslashes($cs_note)."'" : "NULL").", @@ -529,6 +531,7 @@ trait InstallAPI { ifnull(mem.m_initial,'') as di_customer_driver_initial, di.di_install_date, di.di_install_time, + di.di_lock_date, di.di_wait_uid, di.di_customer_uid, di.di_accountno, @@ -603,6 +606,7 @@ trait InstallAPI { di_order_seq, di_driver_uid, di_install_date, + di_lock_date, di_wait_uid, di_customer_uid, di_customer_name, @@ -618,12 +622,14 @@ trait InstallAPI { di_oil_pickup, di_request_note, di_work_note, + di_cs_note, di_created_by ) SELECT '{$di_order_seq}', '{$di_driver_uid}', '{$di_install_date}', + iw.iw_lock_date, iw.iw_uid, iw.iw_customer_uid, iw.iw_customer_name, @@ -639,6 +645,7 @@ trait InstallAPI { iw.iw_need_oil_pickup, iw.iw_request_note, iw.iw_work_note, + iw.iw_cs_note, '{$created_by}' FROM tbl_install_waitlist iw LEFT JOIN tbl_customer c diff --git a/public_html/assets/css/main.css b/public_html/assets/css/main.css index bdbbfda..b00cd72 100644 --- a/public_html/assets/css/main.css +++ b/public_html/assets/css/main.css @@ -1833,6 +1833,10 @@ table.table-search-report .tb-list th { border-color: #ffc107; box-shadow: 0 0 0 2px rgba(255,193,7,.25); } +.wait-card.assigned { + opacity: 0.5; + pointer-events: none; +} .container-chips { cursor: pointer; display: flex; @@ -2308,6 +2312,7 @@ tr.status-X { border: 1px solid #ccc; border-radius: 10px; overflow: hidden; + width: 100%; } /* label = button */ @@ -2322,13 +2327,16 @@ tr.status-X { } .radio-segment span { - display: block; + display: flex; width: 100%; text-align: center; + align-items: center; + justify-content: center; padding: 8px 0; background: #e7e7e7; color: #333; font-weight: 500; + height: 100%; } .radio-segment input[type="radio"]:checked + span { @@ -2345,6 +2353,17 @@ tr.status-X { border-radius: 0 5px 5px 0; } +/* check box */ +.radio-segment input[type="checkbox"] { + position: absolute; + opacity: 0; + pointer-events: none; +} +.radio-segment input[type="checkbox"]:checked + span { + background: #ffca1a; + color: #333; +} + /* mobile */ @media (max-width: 768px) { .radio-segment { diff --git a/public_html/doc/customer_detail.php b/public_html/doc/customer_detail.php index b97e8c2..23dfa8a 100644 --- a/public_html/doc/customer_detail.php +++ b/public_html/doc/customer_detail.php @@ -407,7 +407,7 @@ addLog ("add", "CUSTOMER DETAIL", "VIEW", $lguserid, $query, $c_uid); $(document).ready(function(){ $(function () { - $('#c_contractdate, #c_form_eu, #c_form_corsia, #c_fpickup, #c_removaldate, #d_visitdate, #c_inactivedate, #c_switchformdate').datepicker({ + $('#c_contractdate, #c_form_eu, #c_form_corsia, #c_fpickup, #c_removaldate, #c_installdate, #c_exchangedate, #d_visitdate, #c_inactivedate, #c_switchformdate').datepicker({ dateFormat: 'yy-mm-dd', buttonImage: "/images/cal_red.png", buttonImageOnly: true, @@ -696,9 +696,7 @@ $(document).ready(function() { $('#fpna').val($(this).is(':checked')); }); - - //set initial state. $('#sfna').val($(this).is(':checked')); $('#sfna').change(function() { @@ -711,7 +709,49 @@ $(document).ready(function() { } $('#sfna').val($(this).is(':checked')); - }); + }); + + $('#inna').val($(this).is(':checked')); + + $('#inna').change(function() { + if($(this).is(":checked")) { + $(this).attr("checked", 1); + document.getElementById('c_installdate').value = ""; + } + else { + document.getElementById('c_installdate').value = ""; + } + + $('#inna').val($(this).is(':checked')); + }); + + $('#rena').val($(this).is(':checked')); + + $('#rena').change(function() { + if($(this).is(":checked")) { + $(this).attr("checked", 1); + document.getElementById('c_removaldate').value = ""; + } + else { + document.getElementById('c_removaldate').value = ""; + } + + $('#rena').val($(this).is(':checked')); + }); + + $('#exna').val($(this).is(':checked')); + + $('#exna').change(function() { + if($(this).is(":checked")) { + $(this).attr("checked", 1); + document.getElementById('c_exchangedate').value = ""; + } + else { + document.getElementById('c_exchangedate').value = ""; + } + + $('#exna').val($(this).is(':checked')); + }); }); @@ -1461,6 +1501,11 @@ $(document).ready(function() + +