fix: add link to CORE for profile employee tab

This commit is contained in:
Lance Edgar 2024-07-04 18:29:35 -05:00
parent af7deee26b
commit 4a3f4cf829

View file

@ -80,6 +80,18 @@ class PersonViewSupplement(ViewSupplement):
return context return context
def get_context_for_employee(self, employee, context):
if employee.corepos_number:
app = self.get_rattail_app()
corepos = app.get_corepos_handler()
url = corepos.get_office_employee_url(employee.corepos_number)
if url:
context['external_links'].append({'label': "View in CORE Office",
'url': url})
return context
def get_member_xref_buttons(self, person): def get_member_xref_buttons(self, person):
buttons = OrderedDict() buttons = OrderedDict()
app = self.get_rattail_app() app = self.get_rattail_app()