|
@@ -1,5 +1,5 @@
|
|
|
import { Component } from "@angular/core";
|
|
|
-import { NavController, NavParams } from "ionic-angular";
|
|
|
+import { NavController, NavParams, ActionSheetController } from "ionic-angular";
|
|
|
|
|
|
import { BaseListView } from "../../base/base-list-view";
|
|
|
import { Partner } from "../../odoo/models/res.partner";
|
|
@@ -12,7 +12,8 @@ export class CustomersPage extends BaseListView<Partner> {
|
|
|
|
|
|
constructor(
|
|
|
public navCtrl: NavController,
|
|
|
- public navParams: NavParams
|
|
|
+ public navParams: NavParams,
|
|
|
+ public actionSheetCtrl: ActionSheetController
|
|
|
) {
|
|
|
super(Partner, ["customer", "=", true]);
|
|
|
}
|
|
@@ -21,7 +22,58 @@ export class CustomersPage extends BaseListView<Partner> {
|
|
|
console.log('ionViewDidLoad CustomersPage');
|
|
|
}
|
|
|
|
|
|
- test(): void {
|
|
|
- console.log("hbasbjas");
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param item
|
|
|
+ */
|
|
|
+ openOptions(item: Partner): void {
|
|
|
+ this.setSelectedItem(item);
|
|
|
+
|
|
|
+ console.log(this.getSelectedIndex());
|
|
|
+ console.log(this.getSelectedItem());
|
|
|
+
|
|
|
+
|
|
|
+ this.actionSheetCtrl.create({
|
|
|
+ title: "Opciones",
|
|
|
+ buttons: [
|
|
|
+ {
|
|
|
+ text: "Abrir",
|
|
|
+ icon: "open",
|
|
|
+ handler: () => {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "Ir a ubicación",
|
|
|
+ icon: "navigate",
|
|
|
+ handler: () => {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "Llamar",
|
|
|
+ icon: "call",
|
|
|
+ handler: () => {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "Eliminar",
|
|
|
+ icon: "close",
|
|
|
+ role: "destructive",
|
|
|
+ handler: () => {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "Cancel",
|
|
|
+ role: "cancel",
|
|
|
+ handler: () => {
|
|
|
+ console.log("Canceled");
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }).present();
|
|
|
}
|
|
|
}
|