// Delete useraddress

$(document).on('click', '.user_address_delete', async function (e) {

  console.log('app user_address_delete ready')

  const aid = $(e.target).attr('data-id');

  const user = JSON.parse(localStorage.getItem('f04_user'));

  const token=user.sess_token;

  const uuid=user.uuid;

  let req = {

    uuid,token,aid

  }

  //console.log(req)  

  // confirm dialog

  app.dialog.confirm('Are you sure you want to delete this address?', 'Delete Address', async function () {

      app.preloader.show()

      if (aid && uuid) {

        user_address_delete(req,'adrs_'+aid);

      } 

  })

})