feat: enhance plan document handling and validation in forms

- Introduced new functions for loading and managing plan document options, improving user experience in selecting documents based on customer context.
- Implemented grouping of documents by customer in the `FormDocumentsPreview` component, enhancing clarity in document displays.
- Updated validation schemas to ensure proper handling of document associations with selected customers, preventing invalid selections.
- Added unit tests for new functionalities, ensuring reliability and correctness in document management.
- Enhanced language support for user prompts related to document selection, improving overall usability.

These changes significantly improve the handling of plan documents within the application, streamlining user interactions and ensuring data integrity.
This commit is contained in:
shancheas
2026-09-01 09:50:53 +07:00
parent 991bf3fe65
commit 05c8459d12
35 changed files with 552 additions and 237 deletions
@@ -13,6 +13,8 @@
"invalid_phone": "Invalid phone number format",
"invalid_format": "{{field}} format is invalid",
"invalid_password_simple": "Password must be at least {{min}} characters",
"invalid_password_complex": "Password must contain at least 1 uppercase, 1 lowercase, 1 number, and 1 special character"
"invalid_password_complex": "Password must contain at least 1 uppercase, 1 lowercase, 1 number, and 1 special character",
"not_past": "{{field}} cannot be in the past",
"not_in_selection": "{{field}} must belong to the selected customers"
}
}
@@ -13,6 +13,8 @@
"invalid_phone": "Format nomor telepon tidak valid",
"invalid_format": "Format {{field}} tidak valid",
"invalid_password_simple": "Kata sandi minimal {{min}} karakter",
"invalid_password_complex": "Kata sandi harus mengandung minimal 1 huruf besar, 1 huruf kecil, 1 angka, dan 1 karakter spesial"
"invalid_password_complex": "Kata sandi harus mengandung minimal 1 huruf besar, 1 huruf kecil, 1 angka, dan 1 karakter spesial",
"not_past": "{{field}} tidak boleh mundur dari hari ini",
"not_in_selection": "{{field}} harus milik pelanggan yang dipilih"
}
}