function view_product_tab() {

  var view = app.views.current

  let js = JSON.parse(localStorage.getItem('f03_product'));

  if(js) {

  //console.log(js)

  let dt = js.data.by_brand;

  //console.log(dt)

  var strHtml = ``;

  for(let i=0;i<dt.length;i++) {

    strHtml += `<div class="section-title">`+dt[i].brand+`</div>`;

    strHtml += ``;

    for(let f=0;f<dt[i].items.length;f++) {

    strHtml +=`

<p class="mt-2 mb-2">`+dt[i].items[f].name+` (`+dt[i].items[f].item_code+`)</p>

<div class="movie-header mb-8">

  <img src="`+dt[i].items[f].url_img_medium+`" alt="" class="movie-cover">

  <div class="movie-infos">

    <div class="movie-block">

      <i class="icon f7-icons">clock_fill</i>

      <div class="movie-block-name">`+dt[i].items[f].hpp+`</div>

      <div class="movie-block-text">`+dt[i].items[f].qty+`</div>

    </div>

    <a href="/product_trx/`+dt[i].items[f].id+`" class="btn btn-xxs btn-primary">Transaction</a>

    <a href="/product_sell/`+dt[i].items[f].id+`/4" class="btn btn-xxs btn-warning mt-6">Sell on Cash</a>

    <a href="/product_sell/`+dt[i].items[f].id+`/7" class="btn btn-xxs btn-warning mt-6">Sell on Credit</a>

    <a href="/product_retur/`+dt[i].items[f].id+`/1" class="btn btn-xxs btn-success mt-6">Retur From</a>

  </div>

</div>

<p class="grid grid-cols-4 grid-gap grid-buttons-demo mt-2 mb-30">

  <a href="/product_edit/`+dt[i].items[f].id+`" class="btn btn-xxs btn-primary">Edit</a>

  <a href="/image_upload/product/`+dt[i].items[f].id+`" data-image="`+dt[i].items[f].url_img_medium+`" class="btn btn-xxs btn-info image_upload">Image</a>

  <a href="/product_buy/`+dt[i].items[f].id+`" class="btn btn-xxs btn-warning">Add Stock</a>

  <a href="/product_retur/`+dt[i].items[f].id+`/2" class="btn btn-xxs btn-success">Retur To</a>

</p>

`;

    }

    strHtml +=``;

  }

   strHtml += ``;  

  //console.log(strHtml)

  $$("#product_tab_content").html(strHtml); 

  }

}