File tree Expand file tree Collapse file tree
frontend/src/components/proposal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { getTopicActiveAnswers } from '../../models/ProposalModelFunctions';
2121import { Answer , QuestionaryStep } from '../../models/Questionary' ;
2222import { isRejection } from '../../models/Rejection' ;
2323import { Review } from '../../models/Review' ;
24- import { Roles } from '../../models/Role' ;
2524import { Sample } from '../../models/Sample' ;
2625import {
2726 TechnicalReview ,
@@ -260,9 +259,6 @@ export const collectProposalPDFData = async (
260259 if ( proposal === null ) {
261260 throw new Error ( 'Proposal not found' ) ;
262261 }
263- if ( ! proposal . submitted && user . currentRole ?. shortCode == Roles . USER ) {
264- throw new Error ( 'PDF cannot be downloaded pre submission ' ) ;
265- }
266262
267263 const call = await baseContext . queries . call . get ( user , proposal . callId ) ;
268264
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ function ProposalReview({ confirm }: ProposalSummaryProps) {
3535
3636 const { api } = useDataApiWithFeedback ( ) ;
3737 const isUserOfficer = useCheckAccess ( [ UserRole . USER_OFFICER ] ) ;
38- const isUser = useCheckAccess ( [ UserRole . USER ] ) ;
3938 const { isInternalUser } = useContext ( UserContext ) ;
4039 const callHasEnded = isCallEnded (
4140 state . proposal . call ?. startCall ,
@@ -193,9 +192,7 @@ function ProposalReview({ confirm }: ProposalSummaryProps) {
193192 onClick = { ( ) =>
194193 downloadPDFProposal ( [ proposal . primaryKey ] , proposal . title )
195194 }
196- disabled = {
197- ! allStepsComplete || isSubmitting || ( ! proposal . submitted && isUser )
198- }
195+ disabled = { ! allStepsComplete || isSubmitting }
199196 color = "secondary"
200197 >
201198 Download PDF
Original file line number Diff line number Diff line change @@ -288,22 +288,14 @@ const ProposalTable = ({
288288 } ,
289289 } ;
290290 } ,
291- ( rowData ) => {
292- const isSubmitted = rowData . submitted ;
293-
294- return {
295- icon : GetAppIcon ,
296- tooltip : ! isSubmitted
297- ? 'Only submitted proposals can be downloaded'
298- : 'Download Proposal' ,
299- disabled : ! isSubmitted ,
300-
301- onClick : ( event , rowData ) =>
302- downloadPDFProposal (
303- [ ( rowData as PartialProposalsDataType ) . primaryKey ] ,
304- ( rowData as PartialProposalsDataType ) . title
305- ) ,
306- } ;
291+ {
292+ icon : GetAppIcon ,
293+ tooltip : 'Download proposal' ,
294+ onClick : ( event , rowData ) =>
295+ downloadPDFProposal (
296+ [ ( rowData as PartialProposalsDataType ) . primaryKey ] ,
297+ ( rowData as PartialProposalsDataType ) . title
298+ ) ,
307299 } ,
308300 ( rowData ) => {
309301 const isPI = rowData . proposerId === userContext . user . id ;
You can’t perform that action at this time.
0 commit comments