corrad-bp/docs/json/form/customScript.js
Md Afiq Iskandar b4eb3265c2 Enhance Process Builder with HTML and Subprocess Node Features
- Introduced new HTML and Subprocess nodes in ProcessBuilderComponents.vue, allowing users to add custom HTML content and execute subprocesses within the process flow.
- Updated ProcessFlowNodes.js to include HtmlNode and SubprocessNode components with appropriate properties and rendering logic.
- Enhanced ProcessFlowCanvas.vue to manage the new node types effectively, ensuring proper integration with existing flow functionalities.
- Improved index.vue to support configuration modals for HTML and Subprocess nodes, enhancing user interaction and customization options.
- Refactored process management logic to accommodate new node types, ensuring seamless integration and consistent user experience across the process builder.
2025-07-10 11:08:16 +08:00

42 lines
1.1 KiB
JavaScript

// Conditional logic for showing 'Nyatakan keperluan lain' field
onFieldChange("keperluan_mendesak", (value) => {
if (Array.isArray(value) && value.includes("lain_lain")) {
showField("keperluan_lain_nyatakan");
} else {
hideField("keperluan_lain_nyatakan");
setField("keperluan_lain_nyatakan", "");
}
});
// Show success message on form load
showInfo(
"Sila lengkapkan semua maklumat yang diperlukan untuk penilaian awal."
);
// Conditional Logic Script
// Conditional logic for field: keperluan_lain_nyatakan
onFieldChange("keperluan_mendesak", function () {
if (
String(getField("keperluan_mendesak") || "")
.toLowerCase()
.includes("lain_lain".toLowerCase())
) {
showField("keperluan_lain_nyatakan");
} else {
hideField("keperluan_lain_nyatakan");
}
});
// Initial evaluation for field: keperluan_lain_nyatakan
(function () {
if (
String(getField("keperluan_mendesak") || "")
.toLowerCase()
.includes("lain_lain".toLowerCase())
) {
showField("keperluan_lain_nyatakan");
} else {
hideField("keperluan_lain_nyatakan");
}
})();