From 4df8439fd617f4fe74928c75585e5159ae6848ab Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 1 Feb 2021 11:55:41 -0600 Subject: [PATCH] Add nesting for CORE-POS top menu too many items in this menu already! --- tailbone_corepos/menus.py | 203 +++++++++++++++++++++----------------- 1 file changed, 115 insertions(+), 88 deletions(-) diff --git a/tailbone_corepos/menus.py b/tailbone_corepos/menus.py index 7659113..b52e228 100644 --- a/tailbone_corepos/menus.py +++ b/tailbone_corepos/menus.py @@ -35,104 +35,131 @@ def make_corepos_menu(request): 'type': 'menu', 'items': [ { - 'title': "Customers (Legacy)", - 'url': url('corepos.customers'), - 'perm': 'corepos.customers.list', + 'title': "People", + 'type': 'menu', + 'items': [ + { + 'title': "Customers (Legacy)", + 'url': url('corepos.customers'), + 'perm': 'corepos.customers.list', + }, + { + 'title': "Members (Legacy)", + 'url': url('corepos.members'), + 'perm': 'corepos.members.list', + }, + { + 'title': "Member Types", + 'url': url('corepos.member_types'), + 'perm': 'corepos.member_types.list', + }, + { + 'title': "Employees", + 'url': url('corepos.employees'), + 'perm': 'corepos.employees.list', + }, + ], }, - { - 'title': "Members (Legacy)", - 'url': url('corepos.members'), - 'perm': 'corepos.members.list', - }, - { - 'title': "Member Types", - 'url': url('corepos.member_types'), - 'perm': 'corepos.member_types.list', - }, - { - 'title': "Employees", - 'url': url('corepos.employees'), - 'perm': 'corepos.employees.list', - }, - {'type': 'sep'}, { 'title': "Products", - 'url': url('corepos.products'), - 'perm': 'corepos.products.list', - }, - { - 'title': "Product Flags", - 'url': url('corepos.product_flags'), - 'perm': 'corepos.product_flags.list', - }, - { - 'title': "Scale Items", - 'url': url('corepos.scale_items'), - 'perm': 'corepos.scale_items.list', - }, - { - 'title': "Super Departments", - 'url': url('corepos.super_departments'), - 'perm': 'corepos.super_departments.list', - }, - { - 'title': "Departments", - 'url': url('corepos.departments'), - 'perm': 'corepos.departments.list', - }, - { - 'title': "Subdepartments", - 'url': url('corepos.subdepartments'), - 'perm': 'corepos.subdepartments.list', + 'type': 'menu', + 'items': [ + { + 'title': "Products", + 'url': url('corepos.products'), + 'perm': 'corepos.products.list', + }, + { + 'title': "Product Flags", + 'url': url('corepos.product_flags'), + 'perm': 'corepos.product_flags.list', + }, + { + 'title': "Scale Items", + 'url': url('corepos.scale_items'), + 'perm': 'corepos.scale_items.list', + }, + {'type': 'sep'}, + { + 'title': "Super Departments", + 'url': url('corepos.super_departments'), + 'perm': 'corepos.super_departments.list', + }, + { + 'title': "Departments", + 'url': url('corepos.departments'), + 'perm': 'corepos.departments.list', + }, + { + 'title': "Subdepartments", + 'url': url('corepos.subdepartments'), + 'perm': 'corepos.subdepartments.list', + }, + {'type': 'sep'}, + { + 'title': "Batches", + 'url': url('corepos.batches'), + 'perm': 'corepos.batches.list', + }, + { + 'title': "Batch Types", + 'url': url('corepos.batch_types'), + 'perm': 'corepos.batch_types.list', + }, + ], }, { 'title': "Vendors", - 'url': url('corepos.vendors'), - 'perm': 'corepos.vendors.list', + 'type': 'menu', + 'items': [ + { + 'title': "Vendors", + 'url': url('corepos.vendors'), + 'perm': 'corepos.vendors.list', + }, + { + 'title': "Origins", + 'url': url('corepos.origins'), + 'perm': 'corepos.origins.list', + }, + ], }, { - 'title': "Origins", - 'url': url('corepos.origins'), - 'perm': 'corepos.origins.list', - }, - {'type': 'sep'}, - { - 'title': "Tax Rates", - 'url': url('corepos.taxrates'), - 'perm': 'corepos.taxrates.list', + 'title': "Transactions", + 'type': 'menu', + 'items': [ + { + 'title': "Tax Rates", + 'url': url('corepos.taxrates'), + 'perm': 'corepos.taxrates.list', + }, + { + 'title': "House Coupons", + 'url': url('corepos.house_coupons'), + 'perm': 'corepos.house_coupons.list', + }, + { + 'title': "Transaction Details", + 'url': url('corepos.transaction_details'), + 'perm': 'corepos.transaction_details.list', + }, + ], }, { - 'title': "House Coupons", - 'url': url('corepos.house_coupons'), - 'perm': 'corepos.house_coupons.list', - }, - {'type': 'sep'}, - { - 'title': "Batches", - 'url': url('corepos.batches'), - 'perm': 'corepos.batches.list', - }, - { - 'title': "Batch Types", - 'url': url('corepos.batch_types'), - 'perm': 'corepos.batch_types.list', - }, - {'type': 'sep'}, - { - 'title': "Parameters", - 'url': url('corepos.parameters'), - 'perm': 'corepos.parameters.list', - }, - { - 'title': "Stores", - 'url': url('corepos.stores'), - 'perm': 'corepos.stores.list', - }, - {'type': 'sep'}, - { - 'title': "Transaction Details", - 'url': url('corepos.transaction_details'), - 'perm': 'corepos.transaction_details.list', + 'title': "Misc.", + 'type': 'menu', + 'items': [ + { + 'title': "Stores", + 'url': url('corepos.stores'), + 'perm': 'corepos.stores.list', + }, + { + 'title': "Parameters", + 'url': url('corepos.parameters'), + 'perm': 'corepos.parameters.list', + }, + ], }, ], }