fix: link to CORE when viewing profile member tab
This commit is contained in:
parent
4bb35b50f4
commit
af7deee26b
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
# Copyright © 2010-2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -68,6 +68,18 @@ class PersonViewSupplement(ViewSupplement):
|
|||
|
||||
return context
|
||||
|
||||
def get_context_for_member(self, member, context):
|
||||
|
||||
if member.corepos_card_number:
|
||||
app = self.get_rattail_app()
|
||||
corepos = app.get_corepos_handler()
|
||||
url = corepos.get_office_member_url(member.corepos_card_number)
|
||||
if url:
|
||||
context['external_links'].append({'label': "View in CORE Office",
|
||||
'url': url})
|
||||
|
||||
return context
|
||||
|
||||
def get_member_xref_buttons(self, person):
|
||||
buttons = OrderedDict()
|
||||
app = self.get_rattail_app()
|
||||
|
|
Loading…
Reference in a new issue