$(document).on('page:init', '.page[data-name="company"]', async function (e) {

  console.log('app company ready')

  var view = app.views.current

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

  let dt = js.data;

  console.log(dt)

  var strHtml = `

<div class="container mt-20">

  <div class="searchbar-backdrop"></div>

  <div class="list list-strong-ios list-outline-ios list-dividers-ios simple-list searchbar-not-found">

    <ul>

      <li>Nothing found</li>

    </ul>

  </div>

  <div class="search-list_company searchbar-found list detailed-list list-dividers full-width">

    <ul>`;

    //list detailed-list list-dividers full-width

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

    strHtml +=`

         <li>

          <a href="/company_edit/`+i+`" class="item-link item-content">

            <div class="item-media"><img src="`+dt[i].image+`" class="event-thumbnail" alt=""></div>

            <div class="item-inner">

              <div class="item-title">

                <div class="item-name">`+dt[i].name+`</div>

                <div class="item-footer">`+dt[i].address+`, `+dt[i].city+`</div>

              </div>

              <div class="item-after"><span class="badge bg-color-primary">`+dt[i].initial+`</span></div>

            </div>

          </a>

        </li>`;

  }

   strHtml += `

    </ul>

  </div>

</div>

   `;  

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

})