Skip to content

Refactor: Improve Leave Application script with medical certificate validation and date checks#633

Merged
MhmdSinanKT merged 1 commit into
developfrom
leave_app_validation
Feb 7, 2025
Merged

Refactor: Improve Leave Application script with medical certificate validation and date checks#633
MhmdSinanKT merged 1 commit into
developfrom
leave_app_validation

Conversation

@anjusha12
Copy link
Copy Markdown
Contributor

Feature description

The issue was that the Medical Certificate field in Leave Application was being shown for all leave applications where is_proof_document(checkbox) was enabled in the Leave Type, regardless of whether the leave duration exceeded the Medical Leave Required value configured in the Leave Type. The check for leave duration was not correctly ensuring that the Medical Certificate field would appear only when the leave duration was greater than the Medical Leave Required value.

Analysis and design (optional)

Analyse and attach the design documentation

Solution description

Refactored validation logic for Medical certificate field.
Ensured proper field visibility based on leave type and leave duration.

Output screenshots (optional)

image
Screencast from 02-07-2025 11:20:10 AM.webm

Areas affected and ensured

Leave Application form validation

Is there any existing behavior change of other features due to this code change?

Mention Yes or No. If Yes, provide the appropriate explanation.

Was this feature tested on the browsers?

  • Mozilla Firefox

@anjusha12 anjusha12 requested a review from MhmdSinanKT February 7, 2025 05:54
@MhmdSinanKT MhmdSinanKT merged commit 6fff998 into develop Feb 7, 2025
@MhmdSinanKT MhmdSinanKT deleted the leave_app_validation branch February 7, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants