2020-04-08 11:14:58 +00:00
|
|
|
from core.modules.navigation import navigations, NavSection, NavItem
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
# Dashboard Section
|
|
|
|
|
|
|
|
dashboard_section = NavSection("Dashboard", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
dashboard_item = NavItem("Dashboard", "fa-rocket", "dashboard")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
dashboard_section.add_item(dashboard_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(dashboard_section)
|
|
|
|
|
|
|
|
# Clients Section
|
|
|
|
|
|
|
|
clients_section = NavSection("Clients", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
client_list_item = NavItem("List Clients", "fa-user-tag", "backendni")
|
|
|
|
client_add_item = NavItem("Add Client", "fa-user-edit", "backendni")
|
|
|
|
client_groups_item = NavItem("Client Groups", "fa-users", "backendni")
|
|
|
|
client_leads_item = NavItem("Leads", "fa-blender-phone", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
clients_section.add_item(client_list_item)
|
|
|
|
clients_section.add_item(client_add_item)
|
|
|
|
clients_section.add_item(client_groups_item)
|
|
|
|
clients_section.add_item(client_leads_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(clients_section)
|
|
|
|
|
|
|
|
# Quotes Section
|
|
|
|
|
|
|
|
quotes_section = NavSection("Quotes", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
quote_list_item = NavItem("List Quotes", "fa-file-invoice-dollar", "backendni")
|
|
|
|
quote_create_item = NavItem("Create Quote", "fa-plus-square", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
quotes_section.add_item(quote_list_item)
|
|
|
|
quotes_section.add_item(quote_create_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(quotes_section)
|
|
|
|
|
|
|
|
# Billing Section
|
|
|
|
|
|
|
|
billing_section = NavSection("Billing", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
invoice_list_item = NavItem("List Invoices", "fa-file-invoice-dollar", "backendni")
|
|
|
|
invoice_create_item = NavItem("Create Invoice", "fa-plus-square", "backendni")
|
|
|
|
billable_list_item = NavItem("List Billable Items", "fa-hand-holding-usd", "backendni")
|
|
|
|
billable_create_item = NavItem("Create Billable Item", "fa-plus-square", "backendni")
|
|
|
|
list_transaction_item = NavItem("Transaction List", "fa-funnel-dollar", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
billing_section.add_item(invoice_list_item)
|
|
|
|
billing_section.add_item(invoice_create_item)
|
|
|
|
billing_section.add_item(billable_list_item)
|
|
|
|
billing_section.add_item(billable_create_item)
|
|
|
|
billing_section.add_item(list_transaction_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(billing_section)
|
|
|
|
|
|
|
|
# Support Section
|
|
|
|
|
|
|
|
support_section = NavSection("Support", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
ticket_view_item = NavItem("View Tickets", "fa-life-ring", "backendni")
|
|
|
|
ticket_add_item = NavItem("Add Ticket", "fa-plus-square", "backendni")
|
|
|
|
conversation_add_item = NavItem("Add Conversation", "fa-comments", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
support_section.add_item(ticket_view_item)
|
|
|
|
support_section.add_item(ticket_add_item)
|
|
|
|
support_section.add_item(conversation_add_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(support_section)
|
|
|
|
|
|
|
|
# Reports Section
|
|
|
|
|
|
|
|
reports_section = NavSection("Reports", "")
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
report_period_item = NavItem("Income by period", "fa-chart-bar", "backendni")
|
|
|
|
report_forecast_item = NavItem("Income Forecast", "fa-chart-area", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
|
|
|
|
reports_section.add_item(report_period_item)
|
|
|
|
reports_section.add_item(report_forecast_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(reports_section)
|
|
|
|
|
|
|
|
# Administration Section
|
|
|
|
|
|
|
|
administration_section = NavSection("Administration", "")
|
|
|
|
|
2020-04-18 13:02:41 +00:00
|
|
|
user_administration_item = NavItem("Administrator Users", "fa-users-cog", "admins")
|
2020-04-15 20:19:03 +00:00
|
|
|
brand_administration_item = NavItem("Brands", "fa-code-branch", "backendni")
|
|
|
|
sms_administration_item = NavItem("SMS Gateway", "fa-sms", "backendni")
|
|
|
|
otp_administration_item = NavItem("Two-Factor Authentication", "fa-id-badge", "backendni")
|
|
|
|
backup_administration_item = NavItem("Backups", "fa-shield-alt", "backendni")
|
|
|
|
product_administration_item = NavItem("Products", "fa-cube", "backendni")
|
|
|
|
pgroup_administration_item = NavItem("Product Groups", "fa-cubes", "backendni")
|
|
|
|
payment_administration_item = NavItem("Payment Gateways", "fa-credit-card", "backendni")
|
2020-04-07 19:52:10 +00:00
|
|
|
dbsettings_item = NavItem("Database Settings", "fa-database", "dbsettings")
|
|
|
|
|
|
|
|
administration_section.add_item(user_administration_item)
|
|
|
|
administration_section.add_item(brand_administration_item)
|
|
|
|
administration_section.add_item(sms_administration_item)
|
2020-04-13 18:03:01 +00:00
|
|
|
administration_section.add_item(otp_administration_item)
|
2020-04-07 19:52:10 +00:00
|
|
|
administration_section.add_item(backup_administration_item)
|
|
|
|
administration_section.add_item(product_administration_item)
|
|
|
|
administration_section.add_item(pgroup_administration_item)
|
|
|
|
administration_section.add_item(payment_administration_item)
|
|
|
|
|
|
|
|
if "dbsettings" in settings.INSTALLED_APPS:
|
|
|
|
administration_section.add_item(dbsettings_item)
|
|
|
|
|
|
|
|
navigations["backend_main"].add_section(administration_section)
|