add/assign catalogs to an api when adding it

This commit is contained in:
2025-03-30 23:46:13 -07:00
parent b627550dd9
commit 1ebebede87
3 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const addProductCatalogButton = document.getElementById('add-product-catalog-button');
const productCatalogsPrefixInput = document.getElementById('catalog_prefix');
if (addProductCatalogButton && productCatalogsPrefixInput) {
addProductCatalogButton.addEventListener('click', addProductCatalogButtonClicked);
}
function addProductCatalogButtonClicked(e)
{
e.preventDefault();
console.debug('productCatalogsPrefixInput.value');
console.debug(productCatalogsPrefixInput.value);
productCatalogsPrefixInput.value = parseInt(productCatalogsPrefixInput.value) + 1;
productCatalogsPrefixInput.dispatchEvent(new Event('change'));
console.debug('productCatalogsPrefixInput.value');
console.debug(productCatalogsPrefixInput.value);
}