open-insight/LSL2/OIEVENT/CREATE/REACT_HRS..json
2024-03-25 15:12:53 -07:00

11 lines
1.7 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function msg, send_event, admin_user, center_window, xlate, memberof, set_property\r\ndeclare function send_message, post_event\r\ndeclare subroutine end_dialog\r\n\r\n$insert msg_equates\r\n$insert react_hrs_equ\r\n$insert logical\r\n\r\nequ EditTableInsDel$ to 4\r\nequ Protected$ to 8\r\nequ ReadOnly$ to 2048\r\n\r\nif index( CreateParam, 'CENTER', 1 ) then\r\n void = center_window( @window )\r\nend else\r\n Void = set_property( @window, 'VISIBLE', 1 )\r\nend\r\n\r\nif memberof (@user4, 'MAINTENANCE') then \r\n\topen 'CONFIG' to ConfigTable else\r\n\t Void = msg( '', 'Unable to open CONFIG table' )\r\n\t end_dialog( @window, '' )\r\n\t return 0\r\n\tend\r\n lock ConfigTable, 'REACT_HRS' else\r\n Void = msg( '', 'REACT_HRS is in use somewhere else...' )\r\n end_dialog( @window, '' )\r\n return 0\r\n end\r\n\tread ReactHrsInfo from ConfigTable, 'REACT_HRS' then\r\n\t if ReactHrsInfo <> '' then\r\n\t *ReactInfo = ''\r\n\t *ReactInfo<1> = ReactHrsInfo<ReactHrsReactor$>\r\n\t *ReactInfo<2> = ReactHrsInfo<ReactHrsHours$>\r\n\t *ReactInfo<3> = ReactHrsInfo<ReactHrsTCHours$>\r\n\t *.react_info->array = ReactInfo\r\n\t .react_info->array = ReactHrsInfo\r\n\t end\r\n\tend\r\nend else\r\n Message = 'You do not have the proper security to enter reactor hours...' \r\n Message<micon$> = 'H'\r\n Void = msg( '', Message )\r\n Void = send_event( @window, 'CLOSE' )\r\nend\r\n\r\n.react_info->selpos = 2:@fm:1\r\nRETURN 0"
}
}
}