Fix hemorrhoid chx always reset on save in v8-all
normal flag was set whenever perut_18 existed in details array, not when it was actually checked — causing perut_15/perut_16 chx to always be forced false on save. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5306,9 +5306,6 @@ module.exports = {
|
|||||||
if (entry.name === "Hemorroid") {
|
if (entry.name === "Hemorroid") {
|
||||||
let normal = 'Y'
|
let normal = 'Y'
|
||||||
let count_x = _.filter(entry.details, function (o) {
|
let count_x = _.filter(entry.details, function (o) {
|
||||||
if(o.id_code == 'perut_18' || o.id_code == 'perut_17'){
|
|
||||||
normal = 'N'
|
|
||||||
}
|
|
||||||
return o.chx;
|
return o.chx;
|
||||||
}).length;
|
}).length;
|
||||||
if (count_x === 0) {
|
if (count_x === 0) {
|
||||||
@@ -5318,6 +5315,12 @@ module.exports = {
|
|||||||
error_msg_fisik.push(x_msg);
|
error_msg_fisik.push(x_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry.details.forEach((detail) => {
|
||||||
|
if(detail.chx && (detail.id_code == 'perut_18' || detail.id_code == 'perut_17')){
|
||||||
|
normal = 'N'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
entry.details.forEach((detail) => {
|
entry.details.forEach((detail) => {
|
||||||
if(normal == 'N'){
|
if(normal == 'N'){
|
||||||
if(detail.id_code == 'perut_15' || detail.id_code == 'perut_16'){
|
if(detail.id_code == 'perut_15' || detail.id_code == 'perut_16'){
|
||||||
@@ -5332,7 +5335,7 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry.name === "Pengukuran" || entry.name === "Measurement") {
|
if (entry.name === "Pengukuran" || entry.name === "Measurement") {
|
||||||
|
|||||||
Reference in New Issue
Block a user