diff --git a/app/modules/loyalty/static/merchant/js/loyalty-pins.js b/app/modules/loyalty/static/merchant/js/loyalty-pins.js index 5a2b6988..8e6b6a7e 100644 --- a/app/modules/loyalty/static/merchant/js/loyalty-pins.js +++ b/app/modules/loyalty/static/merchant/js/loyalty-pins.js @@ -6,6 +6,7 @@ const merchantPinsLog = window.LogConfig.loggers.merchantPins || window.LogConfi function merchantLoyaltyPins() { return loyaltyPinsList({ apiPrefix: '/merchants/loyalty', + staffApiPrefix: '/merchants/account', showStoreFilter: true, showCrud: true, currentPage: 'pins', diff --git a/app/modules/tenancy/routes/api/merchant.py b/app/modules/tenancy/routes/api/merchant.py index 6efe8726..61e89a91 100644 --- a/app/modules/tenancy/routes/api/merchant.py +++ b/app/modules/tenancy/routes/api/merchant.py @@ -179,6 +179,21 @@ async def merchant_team_overview( return merchant_store_service.get_merchant_team_members(db, merchant.id) +@_account_router.get("/team/members") +async def merchant_team_members_list( + merchant=Depends(get_merchant_for_current_user), + db: Session = Depends(get_db), +): + """Flat ``{members: [...]}`` view of merchant team members. + + Same data as ``GET /team`` but with the wrapper fields stripped, so it + matches the shape store-side autocomplete factories already expect at + ``${prefix}/team/members``. + """ + full = merchant_store_service.get_merchant_team_members(db, merchant.id) + return {"members": full["members"]} + + @_account_router.get("/team/stores/{store_id}/roles") async def merchant_team_store_roles( store_id: int,