Skip to content

Commit

Permalink
FLAG-67: fixed flag rendering on platform lower versions (openmrs#82)
Browse files Browse the repository at this point in the history
FLAG-67: fixed flag rendering on platform lower versions

FLAG-67: change code styles
  • Loading branch information
ManojLL committed Jul 22, 2024
1 parent fbbf0e2 commit 0db1b5a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions omod/src/main/webapp/fragments/patientflagsDashboard.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@
patientId: ${patientId}
}, function (response) {
if (!response) {
${ ui.message("coreapps.none ") }
${ ui.message("coreapps.none ") };
} else {
jq("#flags").html(response.patientflags);
try {
if (typeof response === "string") {
jq("#flags").html(response.replace("{patientflags=", "").replace("}", ""));
} else {
jq("#flags").html(response.patientflags);
}
} catch (error) {
console.error("Error processing flags response: ", error);
jq("#flags").html("Error processing response");
}
}
});
</script>
Expand Down

0 comments on commit 0db1b5a

Please sign in to comment.