File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import {
3434 EmailTemplateSize ,
3535 FrontendSettings ,
3636 Settings ,
37+ ProjectSettings ,
3738} from "../entities/settings" ;
3839import { User } from "../entities/user" ;
3940import { UserRole } from "../entities/user-role" ;
@@ -91,6 +92,22 @@ export class ApplicationSettingsDTO implements DTO<ApplicationSettings> {
9192 @IsNumber ( )
9293 @Expose ( )
9394 public hoursToConfirm ! : number ;
95+ @Type ( ( ) => Date )
96+ @IsDate ( )
97+ @Expose ( )
98+ public fillProfileFormFrom ! : Date ;
99+ @Type ( ( ) => Date )
100+ @IsDate ( )
101+ @Expose ( )
102+ public fillProfileFormUntil ! : Date ;
103+ @Type ( ( ) => Date )
104+ @IsDate ( )
105+ @Expose ( )
106+ public acceptanceDeadline ! : Date ;
107+ @Type ( ( ) => Date )
108+ @IsDate ( )
109+ @Expose ( )
110+ public confirmSpotUntil ! : Date ;
94111}
95112
96113export class ProjectSettingsDTO implements DTO < ProjectSettings > {
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ export class ApplicationSettings {
3030 @Column ( )
3131 public hoursToConfirm ! : number ;
3232 @Column ( )
33- public fillProfileFormFrom : Date ;
33+ public fillProfileFormFrom ! : Date ;
3434 @Column ( )
35- public fillProfileFormTo : Date ;
35+ public fillProfileFormUntil ! : Date ;
3636 @Column ( )
37- public acceptanceDeadline : Date ;
37+ public acceptanceDeadline ! : Date ;
3838 @Column ( )
39- public confirmSpotUntil : Date ;
39+ public confirmSpotUntil ! : Date ;
4040}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class Settings {
7171 public email ! : EmailSettings ;
7272 @Type ( ( ) => ProjectSettings )
7373 @Column ( ( ) => ProjectSettings )
74- public rating ! : ProjectSettings ;
74+ public project ! : ProjectSettings ;
7575}
7676
7777/**
Original file line number Diff line number Diff line change 99 EmailTemplate ,
1010 FrontendSettings ,
1111 Settings ,
12+ ProjectSettings ,
1213} from "../entities/settings" ;
1314import {
1415 ConfigurationServiceToken ,
@@ -102,6 +103,7 @@ export class SettingsService implements ISettingsService {
102103 settings . application = this . getDefaultApplicationSettings ( ) ;
103104 settings . frontend = this . getDefaultFrontendSettings ( ) ;
104105 settings . email = this . getDefaultEmailSettings ( ) ;
106+ settings . project = this . getDefaultProjectSettings ( ) ;
105107 return settings ;
106108 }
107109
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export const Status = () => {
3030
3131 const confirmationDays = Math . floor ( settings . application . hoursToConfirm / 24 ) ;
3232 const fillProfileFormFrom = settings . application . fillProfileFormFrom ;
33- const fillProfileFormTo = settings . application . fillProfileFormTo ;
33+ const fillProfileFormUntil = settings . application . fillProfileFormUntil ;
3434 const acceptanceDeadline = settings . application . acceptanceDeadline ;
3535 const confirmSpotUntil = settings . application . confirmSpotUntil ;
3636 const isExpired = user == null ? false : isConfirmationExpired ( user ) ;
@@ -102,7 +102,7 @@ export const Status = () => {
102102 < InternalLink to = { Routes . ProfileForm } >
103103 profile form
104104 </ InternalLink >
105- , any time between < b > { fillProfileFormFrom } - { fillProfileFormTo } </ b >
105+ , any time between < b > { fillProfileFormFrom } - { fillProfileFormUntil } </ b >
106106 </ Text >
107107 </ >
108108 ) }
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export const ProjectProjectSettings = () => {
9191
9292 useEffect ( ( ) => {
9393 // Only update if settings are loaded
94- if ( settings . rating ) {
94+ if ( settings . project ) {
9595 api . updateSettings ( settings as SettingsDTO ) ;
9696 }
9797 } , [ settings ] ) ;
You can’t perform that action at this time.
0 commit comments