Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrected empty title #520

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task<IEnumerable<SharedConsent>> GetShareCodesAsync(Guid organisati
.ThenInclude(f => f.Sections)
.ThenInclude(s => s.Questions)
.FirstOrDefaultAsync();
}
}

public async Task<SharedConsentDetails?> GetShareCodeDetailsAsync(Guid organisationId, string shareCode)
{
Expand All @@ -63,6 +63,7 @@ join o in context.Organisations on s.OrganisationId equals o.Id
QuestionId = fq.Guid,
QuestionType = fq.Type,
fq.SummaryTitle,
fq.Title,
FormAnswer = fa
};

Expand All @@ -79,7 +80,7 @@ join o in context.Organisations on s.OrganisationId equals o.Id
{
QuestionId = a.QuestionId,
QuestionType = a.QuestionType,
Title = a.SummaryTitle,
Title = string.IsNullOrEmpty(a.SummaryTitle) ? a.Title : a.SummaryTitle,
Answer = a.FormAnswer
})
};
Expand All @@ -88,8 +89,8 @@ join o in context.Organisations on s.OrganisationId equals o.Id
public async Task<Boolean?> GetShareCodeVerifyAsync(string formVersionId, string shareCode)
{
// Get FormId and Organisation based on ShareCode and FormVersionId
var query = from s in context.SharedConsents
where
var query = from s in context.SharedConsents
where
s.FormVersionId == formVersionId
&& s.ShareCode == shareCode
select s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public interface IShareCodeRepository : IDisposable
Task<SharedConsent?> GetByShareCode(string sharecode);
Task<SharedConsentDetails?> GetShareCodeDetailsAsync(Guid organisationId, string shareCode);
Task<Boolean?> GetShareCodeVerifyAsync(string formVersionId, string shareCode);
}
}