From b1489c56e25ef5284cd3dc44f983f7be969f2980 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 17 Jun 2023 02:22:18 -0500 Subject: [PATCH] Add basic Shopper tab for profile view --- .../templates/people/view_profile_buefy.mako | 85 ++++++++++++++++--- tailbone/views/people.py | 35 +++++++- 2 files changed, 106 insertions(+), 14 deletions(-) diff --git a/tailbone/templates/people/view_profile_buefy.mako b/tailbone/templates/people/view_profile_buefy.mako index eaaf9422..adb2e00e 100644 --- a/tailbone/templates/people/view_profile_buefy.mako +++ b/tailbone/templates/people/view_profile_buefy.mako @@ -670,7 +670,7 @@
-

{{ person.display_name }} is associated with {{ customers.length }} customer account(s)

+

{{ person.display_name }} has {{ customers.length }} customer account(s)


@@ -701,17 +701,6 @@ {{ customer.name }} - - - {{ customer.account_holder.display_name }} - - - {{ customer.account_holder.display_name }} - - - - % if expose_customer_shoppers:
    @@ -784,6 +773,72 @@ % endif +<%def name="render_shopper_tab()"> + + +
    + +
    +

    {{ person.display_name }} is shopper for {{ shoppers.length }} customer account(s)

    +
    + +
    + + +
    + + + {{ shopper.customer_key }} - {{ shopper.customer_name }} +
    + +
    +
    +
    + + + {{ shopper.customer_key }} + + + + {{ shopper.customer_name }} + + + + + {{ shopper.account_holder_name }} + + + {{ shopper.account_holder_name }} + + + +
    +##
    +## ${self.render_shopper_panel_buttons(shopper)} +##
    +
    +
    +
    +
    + +
    +

    {{ person.display_name }} is not a shopper.

    +
    + +
    + + <%def name="render_employee_tab_template()">