Add reporting views/menu; link to mobile app
also give mobile About page some proper content
This commit is contained in:
		
							parent
							
								
									4c8eafcca7
								
							
						
					
					
						commit
						cfd2d3692d
					
				
					 6 changed files with 92 additions and 3 deletions
				
			
		| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
        <router-link to="/about">{{ appsettings.appTitle}} {{ appsettings.version }}</router-link>
 | 
					        <router-link to="/about">{{ appsettings.appTitle}} {{ appsettings.version }}</router-link>
 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <br />
 | 
					          <br />
 | 
				
			||||||
          <a href="/">View Desktop Site</a>
 | 
					          <a href="/">View Desktop App</a>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
    </byjove-app>
 | 
					    </byjove-app>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,44 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="about">
 | 
					  <div class="about">
 | 
				
			||||||
    <h1>This is an about page</h1>
 | 
					    <h1>About {{ appsettings.appTitle }}</h1>
 | 
				
			||||||
 | 
					    <h2>{{ appsettings.appTitle }} {{ appsettings.version }}</h2>
 | 
				
			||||||
 | 
					    <p>{{ appsettings.systemTitle }} {{ libVersions.system }}</p>
 | 
				
			||||||
 | 
					    <p>rattail {{ libVersions.rattail }}</p>
 | 
				
			||||||
 | 
					    <p>Tailbone {{ libVersions.Tailbone }}</p>
 | 
				
			||||||
 | 
					    <br />
 | 
				
			||||||
 | 
					    <p>Please see <a href="https://rattailproject.org/" target="_blank">rattailproject.org</a> for more info.</p>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import appsettings from '@/appsettings'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: 'About',
 | 
				
			||||||
 | 
					    data() {
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					            appsettings: appsettings,
 | 
				
			||||||
 | 
					            libVersions: {},
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mounted: function() {
 | 
				
			||||||
 | 
					        this.$http.get('/api/about').then(response => {
 | 
				
			||||||
 | 
					            this.libVersions = response.data.packages
 | 
				
			||||||
 | 
					            this.libVersions.system = response.data.project_version
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					h1 {
 | 
				
			||||||
 | 
					    font-size: 1.5rem;
 | 
				
			||||||
 | 
					    font-weight: bold;
 | 
				
			||||||
 | 
					    margin-bottom: 0.5rem;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					h2 {
 | 
				
			||||||
 | 
					    font-size: 1.2rem;
 | 
				
			||||||
 | 
					    font-weight: bold;
 | 
				
			||||||
 | 
					    margin-bottom: 0.5rem;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,9 +26,11 @@ Theo app settings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# bring in some common settings from rattail
 | 
					# bring in some common settings from rattail
 | 
				
			||||||
from rattail.settings import (
 | 
					from rattail.settings import (
 | 
				
			||||||
 | 
					    Setting,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # (General)
 | 
					    # (General)
 | 
				
			||||||
    rattail_app_title,
 | 
					    rattail_app_title,
 | 
				
			||||||
 | 
					    rattail_single_store,
 | 
				
			||||||
    tailbone_background_color,
 | 
					    tailbone_background_color,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # # DataSync
 | 
					    # # DataSync
 | 
				
			||||||
| 
						 | 
					@ -50,6 +52,24 @@ from rattail.settings import (
 | 
				
			||||||
    rattail_batch_purchase_mobile_quick_receive,
 | 
					    rattail_batch_purchase_mobile_quick_receive,
 | 
				
			||||||
    rattail_batch_purchase_mobile_quick_receive_all,
 | 
					    rattail_batch_purchase_mobile_quick_receive_all,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Reporting
 | 
				
			||||||
 | 
					    tailbone_reporting_choosing_uses_form,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Vendors
 | 
					    # Vendors
 | 
				
			||||||
    rattail_vendor_use_autocomplete,
 | 
					    rattail_vendor_use_autocomplete,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##############################
 | 
				
			||||||
 | 
					# (General)
 | 
				
			||||||
 | 
					##############################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class theo_link_to_mobile(Setting):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    If set, displays a link to Theo Mobile app, within main (desktop) app page
 | 
				
			||||||
 | 
					    footer.
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    group = "(General)"
 | 
				
			||||||
 | 
					    namespace = 'theo'
 | 
				
			||||||
 | 
					    name = 'link_to_mobile'
 | 
				
			||||||
 | 
					    data_type = bool
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -178,6 +178,27 @@ def simple_menus(request):
 | 
				
			||||||
        from tailbone_locsms.menus import make_locsms_menu
 | 
					        from tailbone_locsms.menus import make_locsms_menu
 | 
				
			||||||
        locsms_menu = make_locsms_menu(request)
 | 
					        locsms_menu = make_locsms_menu(request)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ##############################
 | 
				
			||||||
 | 
					    # Reporting
 | 
				
			||||||
 | 
					    ##############################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    reporting_menu = {
 | 
				
			||||||
 | 
					        'title': "Reporting",
 | 
				
			||||||
 | 
					        'type': 'menu',
 | 
				
			||||||
 | 
					        'items': [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                'title': "New Report",
 | 
				
			||||||
 | 
					                'url': url('generate_report'),
 | 
				
			||||||
 | 
					                'perm': 'report_output.generate',
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                'title': "Generated Reports",
 | 
				
			||||||
 | 
					                'url': url('report_output'),
 | 
				
			||||||
 | 
					                'perm': 'report_output.list',
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    admin_menu = {
 | 
					    admin_menu = {
 | 
				
			||||||
        'title': "Admin",
 | 
					        'title': "Admin",
 | 
				
			||||||
        'type': 'menu',
 | 
					        'type': 'menu',
 | 
				
			||||||
| 
						 | 
					@ -256,6 +277,9 @@ def simple_menus(request):
 | 
				
			||||||
    if include_locsms:
 | 
					    if include_locsms:
 | 
				
			||||||
        menus.append(locsms_menu)
 | 
					        menus.append(locsms_menu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    menus.append(admin_menu)
 | 
					    menus.extend([
 | 
				
			||||||
 | 
					        reporting_menu,
 | 
				
			||||||
 | 
					        admin_menu,
 | 
				
			||||||
 | 
					    ])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return menus
 | 
					    return menus
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,4 +14,9 @@
 | 
				
			||||||
  <p class="has-text-centered">
 | 
					  <p class="has-text-centered">
 | 
				
			||||||
    ${h.link_to("Theo {}{}".format(theo.__version__, '' if request.rattail_config.production() else '+dev'), url('about'))}
 | 
					    ${h.link_to("Theo {}{}".format(theo.__version__, '' if request.rattail_config.production() else '+dev'), url('about'))}
 | 
				
			||||||
  </p>
 | 
					  </p>
 | 
				
			||||||
 | 
					  % if request.rattail_config.getbool('theo', 'link_to_mobile', default=False):
 | 
				
			||||||
 | 
					      <p class="has-text-centered">
 | 
				
			||||||
 | 
					        ${h.link_to("View Mobile App", '/m/')}
 | 
				
			||||||
 | 
					      </p>
 | 
				
			||||||
 | 
					  % endif
 | 
				
			||||||
</%def>
 | 
					</%def>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,7 @@ def includeme(config):
 | 
				
			||||||
    config.include('tailbone.views.email')
 | 
					    config.include('tailbone.views.email')
 | 
				
			||||||
    config.include('tailbone.views.messages')
 | 
					    config.include('tailbone.views.messages')
 | 
				
			||||||
    config.include('tailbone.views.reportcodes')
 | 
					    config.include('tailbone.views.reportcodes')
 | 
				
			||||||
 | 
					    config.include('tailbone.views.reports')
 | 
				
			||||||
    config.include('tailbone.views.roles')
 | 
					    config.include('tailbone.views.roles')
 | 
				
			||||||
    config.include('tailbone.views.settings')
 | 
					    config.include('tailbone.views.settings')
 | 
				
			||||||
    config.include('tailbone.views.users')
 | 
					    config.include('tailbone.views.users')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue