fix missing env variable

This commit is contained in:
Tykayn 2021-12-21 17:33:26 +01:00 committed by tykayn
parent e28b8d6ae4
commit afc37caba2
4 changed files with 26 additions and 16 deletions

View File

@ -126,6 +126,10 @@ export class PollService implements Resolve<Poll> {
whoCanChangeAnswers: ['', [Validators.required]],
isAboutDate: [true, [Validators.required]],
expiresDaysDelay: [environment.expiresDaysDelay, []],
expiracy_date: [
this.DateUtilitiesService.addDaysToDate(environment.expiresDaysDelay, new Date()),
[Validators.required],
],
isZeroKnoledge: [false, [Validators.required]],
isProtectedByPassword: [false, [Validators.required]],
isOwnerNotifiedByEmailOnNewVote: [true, [Validators.required]],

View File

@ -4,7 +4,8 @@
Saisissez la date de fin de votre sondage
</h3>
<p>
Par défaut votre sondage prendra fin 30 jours après le dernier jour sélectionné dans vos propositions
Par défaut votre sondage prendra fin {{ environment.expiresDaysDelay }} jours après le dernier jour
sélectionné dans vos propositions
</p>
<div class="date-expiracy">
<div class="columns">
@ -17,7 +18,7 @@
</div>
<div class="columns">
<div class="column">
<input formControlName="expiracy" type="text" id="expiracy" />
<input formControlName="expiracy_date" type="text" id="expiracy" />
</div>
<div class="column is-narrow">
<img class="icon" src="assets/icons/calendar.svg" alt="icone calendrier" />
@ -27,11 +28,11 @@
</div>
<div class="columns">
<div class="column is-narrow">
<input type="checkbox" formControlName="limit_votants" id="limit_votants" />
<input type="checkbox" formControlName="hasMaxCountOfAnswers" id="hasMaxCountOfAnswers" />
<img class="icon" src="assets/icons/users.svg" alt="icone utilisateurs" />
</div>
<div class="column">
<label for="limit_votants">
<label for="maxCountOfAnswers">
<h4 class="title is-4">
Limiter le nombre de votants par proposition
</h4>
@ -39,6 +40,19 @@
Vous pouvez pour l'ensemble de vos options limiter le nombre de votants
</p>
</label>
<div *ngIf="form.value.hasMaxCountOfAnswers">
<label for="maxCountOfAnswers">
Préciser le nombre maximum de participations
</label>
<input
#maxCountOfAnswers
id="maxCountOfAnswers"
matInput
type="number"
formControlName="maxCountOfAnswers"
required
/>
</div>
</div>
</div>
<hr />
@ -152,15 +166,6 @@
<p>
Utile pour réserver des places à un évènement.
</p>
<input
*ngIf="form.value.hasMaxCountOfAnswers"
#maxCountOfAnswers
id="maxCountOfAnswers"
matInput
type="number"
formControlName="maxCountOfAnswers"
required
/>
</fieldset>
<fieldset class="work-in-progress">

View File

@ -27,10 +27,11 @@ export const environment = {
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
creation_display_proposals_time_slices: false,
creation_email_is_required: true,
display_header_create_button: false,
display_menu_creation: false,
display_routes: false,
display_header_create_button: false,
expiresDaysDelay: 60,
enable_colored_weekend_days: false,
expiresDaysDelay: 30,
frontDomain: productionBaseUrl,
interval_days_default: 7,
maxCountOfAnswers: 300,

View File

@ -32,7 +32,7 @@ export const environment = {
display_menu_creation: false,
display_routes: false, // demo paths to test polls
enable_colored_weekend_days: false, // color differently the weekend days
expiresDaysDelay: 60,
expiresDaysDelay: 30,
frontDomain: 'http://127.0.0.1:4200',
interval_days_default: 7,
maxCountOfAnswers: 300,