123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- import { Component, ViewChild } from '@angular/core';
- import { Nav, Platform } from 'ionic-angular';
- import { StatusBar } from 'ionic-native';
- import { LoginPage } from '../pages/login/login';
- import { HomePage } from '../pages/home/home';
- import { CustomerListPage } from '../pages/customer-list/customer-list';
- import { BudgetListPage } from '../pages/budget-list/budget-list';
- import { ProductListPage } from '../pages/product-list/product-list';
- import { LeadListPage } from '../pages/lead-list/lead-list';
- import { OpportunityListPage } from '../pages/opportunity-list/opportunity-list';
- import { CallListPage } from '../pages/call-list/call-list';
- import { ProjectListPage } from '../pages/project-list/project-list';
- import { TaskListPage } from '../pages/task-list/task-list';
- import { ToolsPage } from '../pages/tools/tools';
- import { SettingsPage } from '../pages/settings/settings';
- import { AboutPage } from '../pages/about/about';
- @Component({
- templateUrl: 'app.html'
- })
- export class OdooMobileApp {
- @ViewChild(Nav) nav: Nav;
- rootPage: any = LoginPage;
- homePage: any = HomePage;
- entries: Array<{ visible: boolean, title: string, pages: Array<{ visible: boolean, title: string, icon: string, component: any }> }>;
- constructor(public platform: Platform) {
- this.initializeApp();
- this.entries = [
- {
- visible: true,
- title: "Ventas",
- pages: [
- {
- visible: true,
- title: "Clientes",
- icon: "people",
- component: CustomerListPage
- },
- {
- visible: true,
- title: "Presupuestos",
- icon: "basket",
- component: BudgetListPage
- },
- {
- visible: true,
- title: 'Productos',
- icon: "cube",
- component: ProductListPage
- },
- {
- visible: false,
- title: 'Iniciativas',
- icon: "bulb",
- component: LeadListPage
- },
- {
- visible: false,
- title: "Oportunidades",
- icon: "ribbon",
- component: OpportunityListPage
- },
- {
- visible: false,
- title: "Llamadas",
- icon: "call",
- component: CallListPage
- }
- ]
- },
- {
- visible: false,
- title: "Proyectos",
- pages: [
- {
- visible: true,
- title: "Proyectos",
- icon: "briefcase",
- component: ProjectListPage
- },
- {
- visible: true,
- title: "Tareas",
- icon: "calendar",
- component: TaskListPage
- }
- ]
- },
- {
- visible: true,
- title: "Herramientas",
- pages: [
- {
- visible: true,
- title: 'Herramientas',
- icon: "build",
- component: ToolsPage
- },
- {
- visible: false,
- title: "Preferencias",
- icon: "settings",
- component: SettingsPage
- },
- {
- visible: true,
- title: "Acerca",
- icon: "information-circle",
- component: AboutPage
- }
- ]
- }
- ];
- }
- initializeApp() {
- this.platform.ready().then(() => {
- // StatusBar.styleDefault();
- StatusBar.backgroundColorByHexString("#364499");
- });
- }
- // Open the page
- openPage(page): void {
- this.nav.setRoot(page.component);
- }
- }
|