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

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

  app.preloader.show();

  let user_data_var = JSON.parse(localStorage.getItem('t05_user'));

  if (user_data_var != null) {    

    let data_fcode = JSON.parse(localStorage.getItem('t05_fcode'));

    if(data_fcode!= null) {

      //console.log(data_transaction);

    } else {

      fcode();

    }



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

    if(data_action!= null) {

      //console.log(data_action);

    } else {

      action();

    }

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

    if(data_bank!= null) {

      //console.log(data_bank);

    } else {

      bank();

    }

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

    if(data_company!= null) {

      //console.log(data_company);

    } else {

      company();

    }

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

    if(data_inventory!= null) {

      //console.log(data_inventory);

    } else {

      inventory();

    }

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

    if(data_journal!= null) {

      //console.log(data_journal);

    } else {

      journal();

    }

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

    if(data_person!= null) {

      //console.log(data_person);

    } else {

      person();

    }

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

    if(data_product!= null) {

      //console.log(data_product);

      

    } else {

      product();

    }

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

    if(data_sales!= null) {

      //console.log(data_sales);

    } else {

      sales();

    }



  } else {

    app.views.main.router.navigate('/signin/');

  }

  let num=2800;

  setTimeout(() => {

    app.preloader.hide();

    //view_product_tab();

  }, num)  

});