|
@@ -1,10 +1,20 @@
|
|
|
import { Component, ViewChild } from '@angular/core';
|
|
|
-import { Nav, Platform, MenuController } from 'ionic-angular';
|
|
|
+import { Nav, Platform } from 'ionic-angular';
|
|
|
import { StatusBar } from 'ionic-native';
|
|
|
|
|
|
import { LoginPage } from '../pages/login/login';
|
|
|
-import { Page1 } from '../pages/page1/page1';
|
|
|
-import { Page2 } from '../pages/page2/page2';
|
|
|
+
|
|
|
+import { CustomerListPage } from '../pages/customer-list/customer-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 { SettingsPage } from '../pages/settings/settings';
|
|
|
+import { AboutPage } from '../pages/about/about'
|
|
|
|
|
|
@Component({
|
|
|
templateUrl: 'app.html'
|
|
@@ -13,10 +23,28 @@ export class MyApp {
|
|
|
@ViewChild(Nav) nav: Nav;
|
|
|
|
|
|
rootPage: any = LoginPage;
|
|
|
+ entries: Array<{ title: string, pages: Array<{ icon: string, title: string, component: any }> }>;
|
|
|
|
|
|
- constructor(public platform: Platform, private menu: MenuController) {
|
|
|
+ constructor(public platform: Platform) {
|
|
|
this.initializeApp();
|
|
|
- menu.enable(false);
|
|
|
+
|
|
|
+ this.entries = [
|
|
|
+ { title: 'Ventas', pages: [
|
|
|
+ { icon: "people", title: 'Clientes', component: CustomerListPage },
|
|
|
+ { icon: "cube", title: 'Productos', component: ProductListPage },
|
|
|
+ { icon: "bulb", title: 'Iniciativas', component: LeadListPage },
|
|
|
+ { icon: "ribbon", title: 'Oportunidades', component: OpportunityListPage },
|
|
|
+ { icon: "call", title: 'Llamadas', component: CallListPage }
|
|
|
+ ]},
|
|
|
+ { title: 'Proyectos', pages: [
|
|
|
+ { icon: "briefcase", title: 'Proyectos', component: ProjectListPage },
|
|
|
+ { icon: "calendar", title: 'Tareas', component: TaskListPage }
|
|
|
+ ]},
|
|
|
+ { title: 'Herramientas', pages: [
|
|
|
+ { icon: "settings", title: 'Preferencias', component: SettingsPage },
|
|
|
+ { icon: "information-circle", title: 'Acerca', component: AboutPage }
|
|
|
+ ]}
|
|
|
+ ];
|
|
|
}
|
|
|
|
|
|
initializeApp() {
|
|
@@ -24,4 +52,9 @@ export class MyApp {
|
|
|
StatusBar.styleDefault();
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ // Open the page
|
|
|
+ openPage(page): void {
|
|
|
+ this.nav.setRoot(page.component);
|
|
|
+ }
|
|
|
}
|