Skip to content

Commit f07602b

Browse files
Ohsudevblasar
andauthored
Modified Aninmal Detailed section to all of Pathology Module input forms so that the Animal Detailed section has functionilty of opening a pop-window with all the monkey's flag details. (#1726)
Co-authored-by: blasar <[email protected]>
1 parent a1de14b commit f07602b

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

onprc_ehr/resources/web/onprc_ehr/panel/AnimalDetailsPanel.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,27 @@ Ext4.define('ONPRC_EHR.panel.AnimalDetailsPanel', {
130130
items: [{
131131
fieldLabel: 'Status',
132132
name: 'calculated_status'
133-
},{
133+
}, {
134134
fieldLabel: 'Flags',
135-
name: 'flags'
135+
name: 'flags',
136+
itemId: 'flags',
137+
listeners: {
138+
change: function (field, newValue, oldValue) {
139+
let anchor = field.getEl('onprcFlagsLink');
140+
if (this?.up('panel')?.up('panel')) {
141+
let anmId = this.up('panel').up('panel').subjectId;
142+
if (anchor) {
143+
Ext4.get(anchor).on('click', function (e) {
144+
e.preventDefault();
145+
if (anmId) {
146+
EHR.Utils.showFlagPopup(anmId, this);
147+
}
148+
});
149+
}
150+
}
151+
}
152+
}
153+
136154
},{
137155
fieldLabel: 'Weight',
138156
name: 'weights'

0 commit comments

Comments
 (0)