﻿CREATE PROCEDURE [employer_account].[GetEmployerAccountMembers]
	@hashedAccountId VARCHAR(MAX)	
AS
	SELECT 
		tm.*, s.ReceiveNotifications AS CanReceiveNotifications
	FROM 
		[employer_account].[GetTeamMembers] tm
	INNER JOIN
		[employer_account].[UserAccountSettings] s
	ON
		tm.Id = s.UserId
	AND
		tm.AccountId = s.AccountId
    WHERE 
		tm.HashedId = @hashedAccountId
GO
﻿CREATE PROCEDURE [employer_account].[GetEmployerAccountMembers]
	@hashedAccountId VARCHAR(MAX)	
AS
	SELECT 
		tm.*, s.ReceiveNotifications AS CanReceiveNotifications
	FROM 
		[employer_account].[GetTeamMembers] tm
	LEFT JOIN
		[employer_account].[UserAccountSettings] s
	ON
		tm.Id = s.UserId
	AND
		tm.AccountId = s.AccountId
    WHERE 
		tm.HashedId = @hashedAccountId
GO
Change join to show invited users
Change join to show invited users
