implement JS password scoring, td_stock approve logicc

This commit is contained in:
Thanakorn S
2026-04-30 15:14:42 +07:00
parent db5c47b6ca
commit ac4fd9a5ad
3147 changed files with 1298 additions and 343 deletions
+28 -2
View File
@@ -1,3 +1,27 @@
/** =========================
* UTILITIES
* ========================= */
/**
* Returns a debounced version of fn that delays invoking until
* after `wait` ms have elapsed since the last call.
*/
function debounce(fn, wait) {
wait = wait || 300;
var timer;
return function (event) {
var ctx = this;
var args = arguments;
// Persist the jQuery event so it's accessible after the timeout
if (event && event.persist) event.persist();
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(ctx, args);
}, wait);
};
}
/** =========================
* DEFAULT ON LOAD FUNCTION
* ========================= */
@@ -355,9 +379,11 @@ function prepare_form_data(check_required, raw_data) {
q[key] = value;
});
// Collect form inputs
$(".form-control, .form-select").each(function () {
// Collect form inputs (exclude search inputs — UI-only filters, not API data)
$(".form-control:not([type=search]), .form-select").each(function () {
if (!$(this).attr("id")) return true;
var el = $(this).get(0);
if (!el || !el.nodeName) return true;
q[$(this).attr("id")] = $(this).val();
});