MCPcopy
hub / github.com/webpack/webpack / onDeleteAndMoveNCH

Function onDeleteAndMoveNCH

test/configCases/inner-graph/issue-11678/module.js:2606–2643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2604 }
2605}
2606async function onDeleteAndMoveNCH() {
2607 const pk = getPKFromSelection();
2608 if (pk === null) {
2609 return;
2610 }
2611 const ok = await confirmDialog(TC.confirmationDeleteAndMoveNCH);
2612 if (ok) {
2613 const data = {
2614 jobID: pk.jobId,
2615 headerType: pk.headerType,
2616 listPosNos: pk.listPosNos,
2617 subPosNo: pk.subPosNo
2618 };
2619 let setNchData = {};
2620 const infoForDelete = await servicesData.getInfoForDeleteCiPosList(data);
2621 if (infoForDelete.doShowNCHInfo) {
2622 const { nchAccount, nchCostCentre } = infoForDelete;
2623 setNchData = await showNchInfoDialog(
2624 { nchAccount, nchCostCentre },
2625 _staticData
2626 );
2627 }
2628 if (setNchData !== null) {
2629 const setDeleteData = {
2630 ...data,
2631 ...setNchData,
2632 lockTimestamp: _formData.settings.lockTimestamp,
2633 showWarnings: true
2634 };
2635 const result = await servicesData.setDeleteCiPosList(setDeleteData);
2636 if (result) {
2637
2638 _tableSelectionPosNo = null;
2639 await _updateTableContent();
2640 }
2641 }
2642 }
2643}
2644function _buttonDeleteCiPositions() {
2645 return new UiSelectButton(
2646 TC.buttonDelete,

Callers

nothing calls this directly

Calls 2

getPKFromSelectionFunction · 0.85
_updateTableContentFunction · 0.85

Tested by

no test coverage detected