Fix: Product Permutations save on production.
This commit is contained in:
@@ -123,6 +123,9 @@ export default class DOM {
|
||||
else if (element.tagName === 'BUTTON' && element.classList.contains(flagActive)) {
|
||||
returnVal = element.classList.contains(flagDelete);
|
||||
}
|
||||
else if (element.tagName === 'TD') {
|
||||
returnVal = DOM.getElementAttributeValueCurrent(element);
|
||||
}
|
||||
else {
|
||||
returnVal = element.textContent;
|
||||
}
|
||||
|
||||
@@ -362,9 +362,9 @@ export default class TableBasePage extends BasePage {
|
||||
let wasDirtyElement = element.classList.contains(flagDirty);
|
||||
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
|
||||
if (_verbose) { console.log({isDirtyElement, wasDirtyElement, wasDirtyParentRows}); }
|
||||
let td = DOM.getCellFromElement(element);
|
||||
DOM.setElementAttributeValueCurrent(td, DOM.getElementAttributeValueCurrent(element));
|
||||
if (isDirtyElement != wasDirtyElement) {
|
||||
let td = DOM.getCellFromElement(element);
|
||||
DOM.setElementAttributeValueCurrent(td, DOM.getElementAttributeValueCurrent(element));
|
||||
DOM.handleDirtyElement(td, isDirtyElement);
|
||||
this.updateAndToggleShowButtonsSaveCancel();
|
||||
this.cascadeChangedIsDirtyNestedElementCellTable(element, isDirtyElement, wasDirtyParentRows);
|
||||
@@ -849,11 +849,11 @@ export default class TableBasePage extends BasePage {
|
||||
);
|
||||
}
|
||||
handleChangeDdlProductVariationOrVariationType(event, element) {
|
||||
this.updateProductPermutationVariations(element);
|
||||
this.handleChangeNestedElementCellTable(event, element);
|
||||
this.updateProductPermutationVariations(element);
|
||||
}
|
||||
hookupDdlsProductPermutationVariation() {
|
||||
this.hookupTableCellDdls(idTableMain + ' td.' + flagProductVariations + ' td.' + flagProductVariation, (event, ddlVariation) => { this.handleChangeDdlProductVariationOrVariationType(event, ddlVariation); });
|
||||
this.hookupTableCellDdls(idTableMain + ' td.' + flagProductVariations + ' td.' + flagProductVariation + ' select', (event, ddlVariation) => { this.handleChangeDdlProductVariationOrVariationType(event, ddlVariation); });
|
||||
}
|
||||
hookupButtonsProductPermutationVariationAddDelete() {
|
||||
let selectorButton = idTableMain + ' td.' + flagProductVariations + ' tr.' + flagProductVariation + ' button';
|
||||
@@ -884,7 +884,7 @@ export default class TableBasePage extends BasePage {
|
||||
let variationsCell = element.closest('td.' + flagProductVariations);
|
||||
let variationPairsString = this.getProductPermutationVariationsText(variationsCell);
|
||||
DOM.setElementAttributeValueCurrent(variationsCell, variationPairsString);
|
||||
DOM.isElementDirty(variationsCell);
|
||||
this.handleChangeNestedElementCellTable(null, variationsCell);
|
||||
}
|
||||
getProductPermutationVariationsText(variationsTd) {
|
||||
let rows = variationsTd.querySelectorAll(':scope tbody tr');
|
||||
|
||||
@@ -213,6 +213,7 @@ export default class PageStoreProductPermutations extends TableBasePage {
|
||||
this.hookupFieldsProductPermutationVariation();
|
||||
this.hookupDescriptionTextareas();
|
||||
this.hookupCostFields();
|
||||
this.hookupProfitFields();
|
||||
this.hookupLatencyManufactureInputs();
|
||||
this.hookupQuantityFields();
|
||||
this.hookupSubscriptionFields();
|
||||
@@ -256,7 +257,8 @@ export default class PageStoreProductPermutations extends TableBasePage {
|
||||
this.hookupTableCellDdlPreviews(idTableMain + ' td.' + flagCurrency, Utils.getListFromDict(currencies));
|
||||
}
|
||||
*/
|
||||
hookupProfitInputs(){
|
||||
hookupProfitInputs() {
|
||||
debugger;
|
||||
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagProfitLocalMin + ' input');
|
||||
}
|
||||
hookupLatencyManufactureInputs(){
|
||||
|
||||
Reference in New Issue
Block a user