2018-11-29 01:40:18 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
"""
|
|
|
|
Web Menus
|
|
|
|
"""
|
|
|
|
|
2020-09-16 16:15:53 -05:00
|
|
|
from tailbone_corepos.menus import make_corepos_menu
|
|
|
|
|
2018-11-29 01:40:18 -06:00
|
|
|
|
|
|
|
def simple_menus(request):
|
|
|
|
url = request.route_url
|
|
|
|
|
2020-09-16 16:15:53 -05:00
|
|
|
corepos_menu = make_corepos_menu(request)
|
|
|
|
|
2018-11-29 01:40:18 -06:00
|
|
|
menus = [
|
2020-08-20 17:56:55 -05:00
|
|
|
{
|
|
|
|
'title': "People",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Members",
|
|
|
|
'url': url('members'),
|
|
|
|
'perm': 'members.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Customers",
|
|
|
|
'url': url('customers'),
|
|
|
|
'perm': 'customers.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Employees",
|
|
|
|
'url': url('employees'),
|
|
|
|
'perm': 'employees.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "All People",
|
|
|
|
'url': url('people'),
|
|
|
|
'perm': 'people.list',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Products",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Products",
|
|
|
|
'url': url('products'),
|
|
|
|
'perm': 'products.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Departments",
|
|
|
|
'url': url('departments'),
|
|
|
|
'perm': 'departments.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Subdepartments",
|
|
|
|
'url': url('subdepartments'),
|
|
|
|
'perm': 'subdepartments.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Brands",
|
|
|
|
'url': url('brands'),
|
|
|
|
'perm': 'brands.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Families",
|
|
|
|
'url': url('families'),
|
|
|
|
'perm': 'families.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Report Codes",
|
|
|
|
'url': url('reportcodes'),
|
|
|
|
'perm': 'reportcodes.list',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2020-08-20 17:56:55 -05:00
|
|
|
'title': "Vendors",
|
2018-11-29 01:40:18 -06:00
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
2020-08-20 17:56:55 -05:00
|
|
|
'title': "Vendors",
|
|
|
|
'url': url('vendors'),
|
|
|
|
'perm': 'vendors.list',
|
2018-11-29 01:40:18 -06:00
|
|
|
},
|
2020-08-20 17:56:55 -05:00
|
|
|
{'type': 'sep'},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
2020-08-20 17:56:55 -05:00
|
|
|
'title': "Ordering",
|
|
|
|
'url': url('ordering'),
|
|
|
|
'perm': 'ordering.list',
|
2018-11-29 01:40:18 -06:00
|
|
|
},
|
|
|
|
{
|
2020-08-20 17:56:55 -05:00
|
|
|
'title': "Receiving",
|
|
|
|
'url': url('receiving'),
|
|
|
|
'perm': 'receiving.list',
|
2018-11-29 01:40:18 -06:00
|
|
|
},
|
2020-08-20 17:56:55 -05:00
|
|
|
{'type': 'sep'},
|
2020-03-18 11:31:55 -05:00
|
|
|
{
|
2020-08-20 17:56:55 -05:00
|
|
|
'title': "Purchases",
|
|
|
|
'url': url('purchases'),
|
|
|
|
'perm': 'purchases.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Credits",
|
|
|
|
'url': url('purchases.credits'),
|
|
|
|
'perm': 'purchases.credits.list',
|
2020-03-18 11:31:55 -05:00
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
],
|
|
|
|
},
|
2020-09-16 16:15:53 -05:00
|
|
|
corepos_menu,
|
2020-08-19 22:21:00 -05:00
|
|
|
{
|
|
|
|
'title': "Shopfoo",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Products",
|
|
|
|
'url': url('shopfoo.products'),
|
|
|
|
'perm': 'shopfoo.products.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Product Exports",
|
|
|
|
'url': url('shopfoo.product_exports'),
|
|
|
|
'perm': 'shopfoo.product_exports.list',
|
|
|
|
},
|
2021-01-20 21:54:52 -06:00
|
|
|
{'type': 'sep'},
|
|
|
|
{
|
|
|
|
'title': "WooCommerce Products",
|
|
|
|
'url': url('woocommerce.products'),
|
|
|
|
'perm': 'woocommerce.products.list',
|
|
|
|
},
|
2020-08-19 22:21:00 -05:00
|
|
|
],
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Batches",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Handheld",
|
|
|
|
'url': url('batch.handheld'),
|
|
|
|
'perm': 'batch.handheld.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Inventory",
|
|
|
|
'url': url('batch.inventory'),
|
|
|
|
'perm': 'batch.inventory.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Import / Export",
|
|
|
|
'url': url('batch.importer'),
|
|
|
|
'perm': 'batch.importer.list',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "TempMon",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
2020-03-22 16:39:42 -05:00
|
|
|
{
|
|
|
|
'title': "Appliances",
|
|
|
|
'url': url('tempmon.appliances'),
|
|
|
|
'perm': 'tempmon.appliances.list',
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Clients",
|
|
|
|
'url': url('tempmon.clients'),
|
|
|
|
'perm': 'tempmon.clients.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Probes",
|
|
|
|
'url': url('tempmon.probes'),
|
|
|
|
'perm': 'tempmon.probes.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Readings",
|
|
|
|
'url': url('tempmon.readings'),
|
|
|
|
'perm': 'tempmon.readings.list',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-09-06 14:47:44 -05:00
|
|
|
{
|
|
|
|
'title': "Other",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Documentation",
|
|
|
|
'url': 'https://rattailproject.org/moin/RattailDemo',
|
|
|
|
'target': '_blank',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Source Code",
|
|
|
|
'url': 'https://kallithea.rattailproject.org/rattail-project/rattail-demo',
|
|
|
|
'target': '_blank',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "RattailProject.org",
|
|
|
|
'url': 'https://rattailproject.org',
|
|
|
|
'target': '_blank',
|
|
|
|
},
|
|
|
|
{'type': 'sep'},
|
|
|
|
{
|
|
|
|
'title': "Generate New Project",
|
|
|
|
'url': url('generate_project'),
|
|
|
|
'perm': 'common.generate_project',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Admin",
|
|
|
|
'type': 'menu',
|
|
|
|
'items': [
|
|
|
|
{
|
|
|
|
'title': "Stores",
|
|
|
|
'url': url('stores'),
|
|
|
|
'perm': 'stores.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Users",
|
|
|
|
'url': url('users'),
|
|
|
|
'perm': 'users.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "User Events",
|
|
|
|
'url': url('userevents'),
|
|
|
|
'perm': 'userevents.list',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': "Roles",
|
|
|
|
'url': url('roles'),
|
|
|
|
'perm': 'roles.list',
|
|
|
|
},
|
2019-04-02 21:47:10 -05:00
|
|
|
{'type': 'sep'},
|
|
|
|
{
|
|
|
|
'title': "App Settings",
|
|
|
|
'url': url('appsettings'),
|
|
|
|
'perm': 'settings.list',
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Email Settings",
|
|
|
|
'url': url('emailprofiles'),
|
|
|
|
'perm': 'emailprofiles.list',
|
|
|
|
},
|
2019-04-02 21:47:10 -05:00
|
|
|
{
|
|
|
|
'title': "Email Attempts",
|
|
|
|
'url': url('email_attempts'),
|
|
|
|
'perm': 'email_attempts.list',
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Raw Settings",
|
|
|
|
'url': url('settings'),
|
|
|
|
'perm': 'settings.list',
|
|
|
|
},
|
2019-04-02 21:47:10 -05:00
|
|
|
{'type': 'sep'},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "DataSync Changes",
|
|
|
|
'url': url('datasyncchanges'),
|
|
|
|
'perm': 'datasync.list',
|
|
|
|
},
|
2019-04-02 21:47:10 -05:00
|
|
|
{
|
|
|
|
'title': "Tables",
|
|
|
|
'url': url('tables'),
|
|
|
|
'perm': 'tables.list',
|
|
|
|
},
|
2018-11-29 01:40:18 -06:00
|
|
|
{
|
|
|
|
'title': "Rattail Demo Upgrades",
|
|
|
|
'url': url('upgrades'),
|
|
|
|
'perm': 'upgrades.list',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
return menus
|