(setEvent, selection, contentId = null)
| 1768 | } |
| 1769 | } |
| 1770 | async function _showForm(setEvent, selection, contentId = null) { |
| 1771 | _isNewDataset = false; |
| 1772 | triggerSelectionChangeEvent = true; |
| 1773 | _formEvent = setEvent; |
| 1774 | if (selection) { |
| 1775 | _tableSelectionPosNo = selection.jpos_posno; |
| 1776 | _tableSelectionJobNo = selection.jpos_jobid; |
| 1777 | |
| 1778 | const para = { |
| 1779 | theJobID: selection.jpos_jobid, |
| 1780 | thePosNo: selection.jpos_posno, |
| 1781 | theHeaderType: selection.jpos_headertype, |
| 1782 | theSubPosNo: selection.jpos_subposno |
| 1783 | }; |
| 1784 | |
| 1785 | const data = await servicesData.getPosData(para); |
| 1786 | if (data !== null) { |
| 1787 | |
| 1788 | if ( |
| 1789 | _.includes( |
| 1790 | [ |
| 1791 | POSITIONTYPES.EXTERNAL, |
| 1792 | POSITIONTYPES.MEDIA, |
| 1793 | POSITIONTYPES.SERVICE, |
| 1794 | POSITIONTYPES.HOURS, |
| 1795 | POSITIONTYPES.INTCOSTS, |
| 1796 | POSITIONTYPES.TEXT, |
| 1797 | POSITIONTYPES.ACONTOSPECIAL, |
| 1798 | POSITIONTYPES.ACONTO, |
| 1799 | POSITIONTYPES.SUBTOTAL |
| 1800 | ], |
| 1801 | data.basic.idPosType |
| 1802 | ) |
| 1803 | ) { |
| 1804 | |
| 1805 | _formData = data; |
| 1806 | |
| 1807 | await _createFormWidget( |
| 1808 | data.basic.idPosType, |
| 1809 | getPKfromModule(), |
| 1810 | contentId |
| 1811 | ); |
| 1812 | |
| 1813 | _setCalculationButton(data.basic.idPosType); |
| 1814 | |
| 1815 | _setEnhanceButton(data.basic.idPosType); |
| 1816 | |
| 1817 | if ( |
| 1818 | preferences.isPreferenceTrue( |
| 1819 | _staticData, |
| 1820 | preferences.PREFERENCE.HASPROJECTTASKS |
| 1821 | ) |
| 1822 | ) { |
| 1823 | reOpenTaskButton(data.basic.idPosType, setEvent); |
| 1824 | } |
| 1825 | |
| 1826 | _setDefaultLayoutButton(data.basic.idPosType, setEvent); |
| 1827 |
no test coverage detected