summaryrefslogtreecommitdiff
path: root/interact.go
diff options
context:
space:
mode:
Diffstat (limited to 'interact.go')
-rw-r--r--interact.go43
1 files changed, 43 insertions, 0 deletions
diff --git a/interact.go b/interact.go
index 8e25c97..55dcabb 100644
--- a/interact.go
+++ b/interact.go
@@ -158,6 +158,30 @@ func interact() {
})
shell.AddCmd(&ishell.Cmd{
+ Name: "editcustomer",
+ Help: "<id> Edit the Customer of the following id",
+ Func: func(c *ishell.Context) {
+ //c.Print("\033[H\033[2J")
+ arg := "none"
+ if len(c.Args) > 0 {
+ arg = strings.Join(c.Args, " ")
+ argi,err := strconv.Atoi(arg)
+ if err == nil{
+ //c.Println(boldGreen("Edit Project",argi))
+ editCustomer(argi)
+ allCustomers()
+ //stdOut()
+ }else{
+ c.Println(boldRed(arg,"is not a valid id!"))
+ }
+ }else{
+ c.Println(boldRed("editcustomer <id> - Please enter an id"))
+ allCustomers()
+ }
+ },
+ })
+
+ shell.AddCmd(&ishell.Cmd{
Name: "start",
Help: "<DateTime> - Start Task at a specific Time 'YYYY-MM-DD HH:MM' Or 'HH:MM'",
Func: func(c *ishell.Context) {
@@ -252,6 +276,25 @@ func interact() {
},
})
+// Gather Tasks For Bills
+ shell.AddCmd(&ishell.Cmd{
+ Name: "bill",
+ Help: "Select Tasks to be billed",
+ Func: func(c *ishell.Context) {
+ ids,str := getUnfinishedList()
+ choices := c.Checklist(str,
+ "What Tasks do you want to bill ?",
+ nil)
+ out := func() (c []int) {
+ for _, v := range choices {
+ c = append(c, ids[v])
+ }
+ return
+ }
+ c.Println("Your choices are",out() )
+ },
+ })
+
shell.Run()
// teardown