Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function listeningWidget(timeout, arrId, condition=[0], step=300) {
- condition[0] += step; //condition[0] условие выхода по времени
- if (s_widgets.getFieldValue('3333333333', 'action')) { // нажатие SAVE на виджете
- const record = new SimpleRecord('safe_simple_defect');
- const arrIDOfKanbanItem = s_widget.getFieldValue(arrId); // id группы записей на канбан доске, sys_id + state
- record.get(arrIDOfKanbanItem[0], () => {if(!arrId.includes(record.state)) {condition[0] = timeout+step;}});
- } else if(s_widgets.getFieldValue('3333333333', 'cancelAction')) { return; }
- if(condition[0] > timeout) { s_widget_custom.updateData(); return; }
- setTimeout(listeningWidget, step, timeout, arrId, condition);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement