Closed lachko closed 1 month ago
This is the effect Undefined-45 which you can never access becuase it is not list in forms.
Another effect is that the location is not shown in the listing and thefore forms for that location cannot be accessed ![Uploading Screenshot 2023-10-05 at 13.44.54.png…]()
You can use this list to test:
district , ward_id , ward , school_id , schoolname Distrcit1 , hJ-NuD-GqT ,1, eTe8-NK5D -, Free Roman School Distrcit1 , hJ-NuD-GqT ,1, neSw-vMS7 , Free Roman School Distrcit1 , hJ-NuD-GqT ,1, d48U-'129nAR , Free Roman School Distrcit1 , hJ-NuD-GqT ,1, qwy8sAFNCE , Free Pentecostal School Distrcit1 , hJ-NuD-GqT ,1, nk5FWdbtJt , Catholic School
@lachko ready for review. Released in v3.30.1
In the code here: https://github.com/Tangerine-Community/Tangerine/blob/8cf99749364ce63f1654a728465c2e218a53e46a/client/src/app/case-management/_services/case-management.service.ts#L34 we are asking for a specifc position in the string but if the string is '12-03-0010-45-5-9-2023' the date part of it is not extracted correclty. The same happens here: https://github.com/Tangerine-Community/Tangerine/blob/8cf99749364ce63f1654a728465c2e218a53e46a/client/src/app/case-management/_services/case-management.service.ts#L62
We should be using a differnet method to locate the date which is the last part of this string becuase split on a "-" will always be incorrect when the Location id contains a "-" For example something like: const regex = /(\d{1,2}-\d{1,2}-\d{4})$/; // Regular expression to match the date pattern
const match = visitKey.match(regex); // Attempt to find a match const extractedPart = match[1];