Expose new Member.number field

This commit is contained in:
Lance Edgar 2020-03-18 12:29:18 -05:00
parent 970b5871e5
commit 72796d1e04
3 changed files with 9 additions and 2 deletions

View file

@ -38,6 +38,10 @@
<div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; justify-content: space-between; width: 100%;">
<div style="flex-grow: 1;"> <div style="flex-grow: 1;">
<b-field horizontal label="Number">
{{ member.number }}
</b-field>
<b-field horizontal label="ID"> <b-field horizontal label="ID">
{{ member.id }} {{ member.id }}
</b-field> </b-field>

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2019 Lance Edgar # Copyright © 2010-2020 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -50,6 +50,7 @@ class MemberView(MasterView):
} }
grid_columns = [ grid_columns = [
'number',
'id', 'id',
'person', 'person',
'customer', 'customer',
@ -62,6 +63,7 @@ class MemberView(MasterView):
] ]
form_fields = [ form_fields = [
'number',
'id', 'id',
'person', 'person',
'customer', 'customer',
@ -105,7 +107,7 @@ class MemberView(MasterView):
g.set_filter('email', model.MemberEmailAddress.address) g.set_filter('email', model.MemberEmailAddress.address)
g.set_label('email', "Email Address") g.set_label('email', "Email Address")
g.set_sort_defaults('id') g.set_sort_defaults('number')
g.set_link('person') g.set_link('person')
g.set_link('customer') g.set_link('customer')

View file

@ -384,6 +384,7 @@ class PeopleView(MasterView):
def get_context_member(self, member): def get_context_member(self, member):
return { return {
'uuid': member.uuid, 'uuid': member.uuid,
'number': member.number,
'id': member.id, 'id': member.id,
'active': member.active, 'active': member.active,
'joined': six.text_type(member.joined) if member.joined else None, 'joined': six.text_type(member.joined) if member.joined else None,