MCPcopy
hub / github.com/webpack/webpack / _showForm

Function _showForm

test/configCases/inner-graph/issue-11678/module.js:1770–1856  ·  view source on GitHub ↗
(setEvent, selection, contentId = null)

Source from the content-addressed store, hash-verified

1768 }
1769}
1770async 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

Callers 7

getDataAndShowTableFunction · 0.85
onClickTableFunction · 0.85
_resetDetailsFunction · 0.85
_saveCompletedFunction · 0.85
onEditFunction · 0.85
onCancelInDialogFunction · 0.85
renderFormInDialogFunction · 0.85

Calls 13

_createFormWidgetFunction · 0.85
getPKfromModuleFunction · 0.85
_setCalculationButtonFunction · 0.85
_setEnhanceButtonFunction · 0.85
reOpenTaskButtonFunction · 0.85
_setDefaultLayoutButtonFunction · 0.85
_setCostsButtonFunction · 0.85
_showTheFormFunction · 0.85
setTableOverlayPanelFunction · 0.85
_showFormButtonsFunction · 0.85
setIdToUrlFunction · 0.85

Tested by

no test coverage detected