static addItemToWarehouse(warehouse, item) {
        const {name, description, price, quantity} = item;
        const newWhsItem = new WhsItem(name, description, price, quantity);

        let whsItemsContainer = warehouse.querySelector(".whs-items-container");
        let whsItemCard = document.createElement('div');
        whsItemCard.setAttribute("class", "whs-item-card");

        whsItemCard.innerHTML += `
        <h4>${item.name}</h4>
        <br>
        <strong>Description: </strong> ${item.description} <br />
        <strong>Price: </strong> ${item.price} <br />
        <strong>Quantity: </strong> ${item.quantity} <br /><br />
        `


        const deleteBtn = document.createElement("button");
        deleteBtn.innerText = "Delete Item";
        deleteBtn.setAttribute("class", "whs-item-delete-btn");
        deleteBtn.addEventListener("click", (e) => {
        e.preventDefault();
        API.deleteWhsItem(parseInt(e.target.parentElement.id))
        });

        let linkBreak = document.createElement("br");
        whsItemCard.appendChild(deleteBtn);
        whsItemsContainer.appendChild(whsItemCard);

        warehouse.getElementsByTagName("form")[0].reset();
        warehouse.getElementsByTagName("form")[0].style.display="none";
    }
// takes an item and warehouse and adds the item to that warehouse
takes an item and warehouse and adds the item to that warehouse
takes an item and warehouse and adds the item to that warehouse
static addItemToWarehouse(warehouse, item) {
        const {name, description, price, quantity} = item;
        const newWhsItem = new WhsItem(name, description, price, quantity);
        let whsItemsContainer = warehouse.querySelector(".whs-items-container");
        let whsItemCard = document.createElement('div');
        whsItemCard.setAttribute("class", "whs-item-card");
        whsItemCard.innerHTML += `
        <h4>${item.name}</h4>
        <br>
        <strong>Description: </strong> ${item.description} <br />
        <strong>Price: </strong> ${item.price} <br />
        <strong>Quantity: </strong> ${item.quantity} <br /><br />
        `
        const deleteBtn = document.createElement("button");
        deleteBtn.innerText = "Delete Item";
        deleteBtn.setAttribute("class", "whs-item-delete-btn");
        deleteBtn.addEventListener("click", (e) => {
        e.preventDefault();
        API.deleteWhsItem(parseInt(e.target.parentElement.id))
        });
        let linkBreak = document.createElement("br");
        whsItemCard.appendChild(deleteBtn);
        whsItemsContainer.appendChild(whsItemCard);
        warehouse.getElementsByTagName("form")[0].reset();
        warehouse.getElementsByTagName("form")[0].style.display="none";
    }
static addItemToWarehouse ( warehouse , item ) { const { name , description , price , quantity } = item ; const newWhsItem = new WhsItem ( name , description , price , quantity ) ; let whsItemsContainer = warehouse . querySelector ( ".whs-items-container" ) ; let whsItemCard = document . createElement ( 'div' ) ; whsItemCard . setAttribute ( "class" , "whs-item-card" ) ; whsItemCard . innerHTML += ` ${ item . name } ${ item . description } ${ item . price } ${ item . quantity } ` const deleteBtn = document . createElement ( "button" ) ; deleteBtn . innerText = "Delete Item" ; deleteBtn . setAttribute ( "class" , "whs-item-delete-btn" ) ; deleteBtn . addEventListener ( "click" , ( e ) => { e . preventDefault ( ) ; API . deleteWhsItem ( parseInt ( e . target . parentElement . id ) ) } ) ; let linkBreak = document . createElement ( "br" ) ; whsItemCard . appendChild ( deleteBtn ) ; whsItemsContainer . appendChild ( whsItemCard ) ; warehouse . getElementsByTagName ( "form" ) [ 0 ] . reset ( ) ; warehouse . getElementsByTagName ( "form" ) [ 0 ] . style . display = "none" ; }
takes an item and warehouse and adds the item to that warehouse
takes an item and warehouse and adds the item to that warehouse