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

  console.log('app home ready, get data')

  let data_action = JSON.parse(localStorage.getItem('f05_action'));

  if(data_action!= null) {

    //console.log(data_action);

  } else {

    action();

  }

  let data_bank = JSON.parse(localStorage.getItem('f05_bank'));

  if(data_bank!= null) {

    //console.log(data_bank);

  } else {

    bank();

  }

  let data_company = JSON.parse(localStorage.getItem('f05_company'));

  if(data_company!= null) {

    //console.log(data_company);

  } else {

    company();

  }

  let data_inventory = JSON.parse(localStorage.getItem('f05_inventory'));

  if(data_inventory!= null) {

    //console.log(data_inventory);

  } else {

    inventory();

  }

  let data_journal = JSON.parse(localStorage.getItem('f05_journal'));

  if(data_journal!= null) {

    //console.log(data_journal);

  } else {

    journal();

  }

  let data_person = JSON.parse(localStorage.getItem('f05_person'));

  if(data_person!= null) {

    //console.log(data_person);

  } else {

    person();

  }

  let data_product = JSON.parse(localStorage.getItem('f05_product'));

  if(data_product!= null) {

    //console.log(data_product);

    

  } else {

    product();

  }

  let data_sales = JSON.parse(localStorage.getItem('f05_sales'));

  if(data_sales!= null) {

    //console.log(data_sales);

  } else {

    sales();

  }

  let data_transaction = JSON.parse(localStorage.getItem('f05_transaction'));

  if(data_transaction!= null) {

    //console.log(data_transaction);

  } else {

    transaction();

  }

  let num=2000;

  setTimeout(() => {

    app.preloader.hide();

    view_product_tab();

  }, num)  

});