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

Feat/swu eval flow backend #485

Merged
merged 58 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d077c97
feat: add team question response evaluation id validation
IanFonzie Aug 21, 2024
57b9f01
feat: edit swu team question evaluation permission
IanFonzie Aug 26, 2024
1b55c49
feat: add update score helper
IanFonzie Aug 28, 2024
dab3b8f
fix: use correct resource wording for error
IanFonzie Aug 28, 2024
9679314
feat: update team question response evaluation db function
IanFonzie Aug 28, 2024
0942bcd
fix: reflect correct updates in comment
IanFonzie Aug 28, 2024
dbc065a
feat: update team question response evaluation status db function
IanFonzie Aug 28, 2024
a33cdcf
fix: typescript compilation errors
IanFonzie Aug 28, 2024
86397ad
feat: update types
IanFonzie Aug 28, 2024
2545e69
feat: read evaluation response by proposal and panel member
IanFonzie Sep 4, 2024
e04d4a2
feat: validate score note function
IanFonzie Sep 5, 2024
67d34ae
refactor: don't allow multiple evaluations of type per evaluator
IanFonzie Sep 5, 2024
5cd1c41
feat: first attempt at read many swu evaluations permission
IanFonzie Sep 6, 2024
30d6a03
refactor: move new panel statuses to proposal
IanFonzie Sep 6, 2024
067b64b
refactor: use proposal evaluation statuses instead of opportunity sta…
IanFonzie Sep 6, 2024
cc4676e
refactor: combine statuses for opportunity panel evaluation
IanFonzie Sep 6, 2024
be7257c
feat: read own swu evaluations permission
IanFonzie Sep 6, 2024
72a13e7
feat: add slim swu evaluation
IanFonzie Sep 9, 2024
048800f
feat: raw swu evaluation to swu evaluation slim helper
IanFonzie Sep 9, 2024
1c6ece9
feat: first pass at reading many swu evaluations with proposal
IanFonzie Sep 9, 2024
ada4c96
feat: read one swu proposal slim
IanFonzie Sep 10, 2024
475aed9
refactor: read slim proposal
IanFonzie Sep 10, 2024
cbf0a12
refactor: include proposal in slim evaluation
IanFonzie Sep 10, 2024
47af2b4
feat: read own swu evaluations
IanFonzie Sep 10, 2024
680be75
feat: read many swu evaluations resource
IanFonzie Sep 10, 2024
f7e59c2
fix: allow gov users to view evaluations when opportunity has moved b…
IanFonzie Sep 10, 2024
2c08cb7
feat: read one swu evaluation permission
IanFonzie Sep 11, 2024
055b63b
feat: read one swu evaluation resource
IanFonzie Sep 11, 2024
e921cc0
fix: use appropriate proposal status for edit permission
IanFonzie Sep 11, 2024
f3dd5df
fix: adjust read many permission to be based on opportunities
IanFonzie Sep 16, 2024
b23e0e3
fix: query many evaluations using opportunity id
IanFonzie Sep 16, 2024
5e7314c
fix: validate and read many evaluations using opportunity
IanFonzie Sep 16, 2024
aee2b0e
feat: add front-end api actions
IanFonzie Sep 16, 2024
4e1ea81
feat: add proposal panel evaluation statuses to front-end helpers
IanFonzie Sep 16, 2024
f1f3d1b
feat: compare swu anonymous proponent numbers
IanFonzie Sep 16, 2024
6dff341
feat: add evaluations to tabs
IanFonzie Sep 16, 2024
565e812
feat: overview scaffolding
IanFonzie Sep 16, 2024
10c792e
refactor: provide multiple evaluations through query params
IanFonzie Sep 24, 2024
7046634
refactor: use opportunity questions to validate
IanFonzie Sep 26, 2024
4873c11
Revert "refactor: provide multiple evaluations through query params"
IanFonzie Sep 26, 2024
1a8d454
feat: evaluation initializers pages
IanFonzie Oct 9, 2024
6dae86a
feat: add read individual evaluations permission
IanFonzie Oct 9, 2024
a2fdf49
feat: add read individual consensus evaluations db helper
IanFonzie Oct 9, 2024
402f441
refactor: remove slim question response evaluation type
IanFonzie Oct 9, 2024
0a4389e
feat: connect question evaluation intializer pages
IanFonzie Oct 9, 2024
7ea31c0
refactor: migration changes for refactor
IanFonzie Oct 9, 2024
c49ab06
feat: team questions scaffolding
IanFonzie Oct 9, 2024
5135719
fix: consensus typo
IanFonzie Oct 9, 2024
2afab9b
refactor: pass evaluation and panel evaluations in separately
IanFonzie Oct 16, 2024
076260c
refactor: init with separate evaluation and panel evaluations
IanFonzie Oct 16, 2024
9e3a6bd
feat: add toasts for draft creation and changes
IanFonzie Oct 16, 2024
607754f
refactor: allow null evaluation and remove unnecessary helper
IanFonzie Oct 16, 2024
cef3f42
feat: team questions save draft and changes
IanFonzie Oct 16, 2024
6ec9b7c
fix: use correct condition for read many operations
IanFonzie Oct 17, 2024
8e51a04
fix: display existing evaluations in overview
IanFonzie Oct 17, 2024
13551a9
feat: cancel drafts
IanFonzie Oct 19, 2024
97bb175
fix: proposal typo
IanFonzie Oct 19, 2024
693eed0
refactor: team questions proposal tab to opportunity tab navigation
IanFonzie Oct 25, 2024
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
36 changes: 36 additions & 0 deletions src/back-end/lib/db/proposal/sprint-with-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,42 @@ export const readManyProposalTeamQuestionResponses = tryDb<
return valid(results);
});

export const readOneSWUProposalSlim = tryDb<
[Id, AuthenticatedSession],
SWUProposalSlim | null
>(async (connection, id, session) => {
const result = await generateSWUProposalQuery(connection)
.where({ "proposals.id": id })
.first();

if (result) {
// Fetch submittedAt date if applicable
result.submittedAt = await getSWUProposalSubmittedAt(connection, result);

// Fetch team questions (scores only included if admin/owner)
const canReadScores = await readSWUProposalScore(
connection,
session,
result.opportunity,
result.id,
result.status,
result.organization
);

// Check for permissions on viewing scores and rank
if (canReadScores) {
// Set scores and rankings
await calculateScores(connection, session, result.opportunity, [result]);
}
}

return valid(
result
? await rawSWUProposalSlimToSWUProposalSlim(connection, result, session)
: null
);
});

export const readOneSWUProposal = tryDb<
[Id, AuthenticatedSession],
SWUProposal | null
Expand Down
Loading
Loading