mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
fix deps to config prop
This commit is contained in:
parent
c302663994
commit
e7343810d5
@ -37,6 +37,10 @@ export class Poll {
|
||||
|
||||
public has_several_hours?: boolean = false;
|
||||
public hasSeveralHours?: boolean = false;
|
||||
public isOwnerNotifiedByEmailOnNewVote?: boolean = true;
|
||||
public isOwnerNotifiedByEmailOnNewComment?: boolean = true;
|
||||
public isMaybeAnswerAvailable?: boolean = true;
|
||||
public areResultsPublic?: boolean = true;
|
||||
|
||||
public allowSeveralHours?: boolean;
|
||||
|
||||
|
@ -30,29 +30,19 @@ export class StepperComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.configurationFormGroup = this.fb.group({
|
||||
title: [this.poll ? this.poll.configuration : false, [Validators.required]],
|
||||
isAboutDate: [this.poll ? this.poll.configuration.isAboutDate : false, [Validators.required]],
|
||||
isProtectedByPassword: [
|
||||
this.poll ? this.poll.configuration.isProtectedByPassword : false,
|
||||
[Validators.required],
|
||||
],
|
||||
title: [this.poll ? this.poll : false, [Validators.required]],
|
||||
isAboutDate: [this.poll ? this.poll.kind === 'date' : false, [Validators.required]],
|
||||
isProtectedByPassword: [this.poll ? this.poll.password.length : false, [Validators.required]],
|
||||
isOwnerNotifiedByEmailOnNewVote: [
|
||||
this.poll ? this.poll.configuration.isOwnerNotifiedByEmailOnNewVote : false,
|
||||
this.poll ? this.poll.isOwnerNotifiedByEmailOnNewVote : false,
|
||||
[Validators.required],
|
||||
],
|
||||
isOwnerNotifiedByEmailOnNewComment: [
|
||||
this.poll ? this.poll.configuration.isOwnerNotifiedByEmailOnNewComment : false,
|
||||
[Validators.required],
|
||||
],
|
||||
isMaybeAnswerAvailable: [
|
||||
this.poll ? this.poll.configuration.isMaybeAnswerAvailable : false,
|
||||
[Validators.required],
|
||||
],
|
||||
areResultsPublic: [this.poll ? this.poll.configuration.areResultsPublic : true, [Validators.required]],
|
||||
expiracyNumberOfDays: [
|
||||
this.poll ? DateService.diffInDays(new Date(), this.poll.configuration.expiracyDate) : 60,
|
||||
this.poll ? this.poll.isOwnerNotifiedByEmailOnNewComment : false,
|
||||
[Validators.required],
|
||||
],
|
||||
areResultsPublic: [this.poll ? this.poll.areResultsPublic : true, [Validators.required]],
|
||||
expiracyNumberOfDays: [this.poll ? this.poll.default_expiracy_days_from_now : '60', [Validators.required]],
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
class="button"
|
||||
[ngClass]="{ 'is-selected is-warning': answer == 'MAYBE' }"
|
||||
(click)="vote('MAYBE')"
|
||||
*ngIf="poll.configuration.isMaybeAnswerAvailable"
|
||||
*ngIf="poll.isMaybeAnswerAvailable"
|
||||
>
|
||||
MAYBE
|
||||
</button>
|
||||
@ -27,7 +27,7 @@
|
||||
{{ choice.counts.get(answerEnum.YES) }}
|
||||
<img class="image is-24x24" src="../../../assets/img/icon_voter_YES.svg" />
|
||||
</button>
|
||||
<button class="button is-white" *ngIf="poll.configuration.isMaybeAnswerAvailable">
|
||||
<button class="button is-white" *ngIf="poll.isMaybeAnswerAvailable">
|
||||
{{ choice.counts.get(answerEnum.MAYBE) }}
|
||||
<img class="image is-24x24" src="../../../assets/img/icon_voter_MAYBE.svg" />
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user