Exemplo n.º 1
0
 def __init__(self):
     controller = MainController()
     Menu.create('Manage', ActionCollection(
         ('Companies', controller.company_action),
         ('Clients', controller.client_action),
         ('Staff', controller.staff_action),
         ('Statuses', controller.status_action),
         ('Projects', controller.project_action),
         ('Jobs', controller.job_action),
         ('Invoices', controller.invoice_action),
         exit_action=Action('q', 'Quit', False)
     ))
Exemplo n.º 2
0
 def show_item_menu(self, id):
     Menu.create(self.table_name + ' Menu', ActionCollection())
Exemplo n.º 3
0
 def show_item_menu(self, id):
     Menu.create(
         self.table_name + ' Menu',
         ActionCollection(('Update Status', lambda: self.update_status(id)),
                          ('Log Time', lambda: self.log_time(id))))
Exemplo n.º 4
0
 def menu(self):
     Menu.create('Manage ' + self.table_name, self.menu_actions)
Exemplo n.º 5
0
 def show_item_menu(self, id):
     Menu.create(
         self.table_name + 'Menu',
         ActionCollection(
             ('Show Assigned Jobs',
              lambda: JobCrud().show_jobs_by_assigned_to(id)), ))