@@ -17,6 +17,7 @@ class UserProfile extends CapsPage {
1717 'settings' : undefined ,
1818 'logged_user' : null ,
1919 'form_templates_enabled' : null ,
20+ 'degree_sessions_enabled' : null ,
2021 'user' : undefined ,
2122 'proposals' : undefined ,
2223 'forms' : undefined ,
@@ -37,7 +38,8 @@ class UserProfile extends CapsPage {
3738 await this . setStateAsync ( {
3839 'settings' : status . settings ,
3940 'logged_user' : status . user ,
40- 'form_templates_enabled' : status . form_templates_enabled
41+ 'form_templates_enabled' : status . form_templates_enabled ,
42+ 'degree_sessions_enabled' : status . degree_sessions_enabled
4143 } ) ;
4244 this . loadUserData ( ) ;
4345 } catch ( err ) {
@@ -54,7 +56,7 @@ class UserProfile extends CapsPage {
5456 this . loadProposals ( ) ;
5557 this . loadForms ( ) ;
5658 this . loadDocuments ( ) ;
57- this . loadThesisDefenses ( ) ;
59+ if ( this . state . degree_sessions_enabled ) this . loadThesisDefenses ( ) ;
5860 } catch ( err ) {
5961 this . flashCatch ( err ) ;
6062 }
@@ -210,10 +212,11 @@ class UserProfile extends CapsPage {
210212 proposals = { this . state . proposals }
211213 onProposalDeleteClicked = { this . onProposalDeleteClicked . bind ( this ) } >
212214 </ ProposalsBlock >
215+ { this . state . degree_sessions_enabled &&
213216 < ThesisDefensesBlock className = "mt-4"
214217 defenses = { this . state . thesis_defenses }
215218 root = { this . props . root } >
216- </ ThesisDefensesBlock >
219+ </ ThesisDefensesBlock > }
217220 { ( this . state . form_templates_enabled || ( this . state . forms && this . state . forms . length > 0 ) ) &&
218221 < FormsBlock className = "mt-4"
219222 onDeleteClicked = { this . onFormDeleteClicked . bind ( this ) }
@@ -223,7 +226,7 @@ class UserProfile extends CapsPage {
223226 </ FormsBlock > }
224227 { this . state . logged_user . admin &&
225228 < >
226- < h2 > Documenti e allegati</ h2 >
229+ < h2 className = "mt-4" > Documenti e allegati</ h2 >
227230 < DocumentsBlock className = "mt-4"
228231 loadingDocument = { this . state . loadingDocument }
229232 documents = { this . state . documents }
0 commit comments