🐛 fix compile with rename pollservice functions

This commit is contained in:
Tykayn 2021-11-08 18:25:04 +01:00 committed by tykayn
parent 19127328d2
commit 2f1309bf6f
3 changed files with 12 additions and 12 deletions

View File

@ -166,9 +166,9 @@ export class PollService implements Resolve<Poll> {
) { ) {
if (this.pass_hash) { if (this.pass_hash) {
this.storageService.vote_stack.pass_hash = this.pass_hash; this.storageService.vote_stack.pass_hash = this.pass_hash;
await this.loadPollBycustom_urlWithPasswordHash(wantedcustom_url, this.pass_hash); await this.loadPollByCustomUrlWithPasswordHash(wantedcustom_url, this.pass_hash);
} else { } else {
await this.loadPollBycustom_url(wantedcustom_url); await this.loadPollByCustomUrl(wantedcustom_url);
} }
} }
const loadedPoll = this._poll.getValue(); const loadedPoll = this._poll.getValue();
@ -198,7 +198,7 @@ export class PollService implements Resolve<Poll> {
} }
} }
public async loadPollBycustom_url(custom_url: string): Promise<void> { public async loadPollByCustomUrl(custom_url: string): Promise<void> {
if (custom_url) { if (custom_url) {
const poll: Poll | undefined = await this.apiService.getPollByCustomUrl(custom_url); const poll: Poll | undefined = await this.apiService.getPollByCustomUrl(custom_url);
@ -214,7 +214,7 @@ export class PollService implements Resolve<Poll> {
} }
} }
public async loadPollBycustom_urlWithPasswordHash(custom_url: string, hash: string): Promise<void> { public async loadPollByCustomUrlWithPasswordHash(custom_url: string, hash: string): Promise<void> {
if (custom_url) { if (custom_url) {
const poll: Poll | undefined = await this.apiService.getPollByCustomUrlWithHash(custom_url, hash); const poll: Poll | undefined = await this.apiService.getPollByCustomUrlWithHash(custom_url, hash);
@ -359,7 +359,7 @@ export class PollService implements Resolve<Poll> {
this.apiService.createPoll(newpoll).then((resp) => { this.apiService.createPoll(newpoll).then((resp) => {
console.log('poll created resp', resp); console.log('poll created resp', resp);
console.log('TODO fill admin_key'); console.log('TODO fill admin_key');
this.admin_key = resp.data.admin_key; // this.admin_key = resp.data.admin_key;
}); });
} }

View File

@ -7,7 +7,7 @@
</h2> </h2>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<label class="hidden" for="title">Titre</label> <label for="title">Titre</label>
<input <input
class="input-lg" class="input-lg"
#title #title

View File

@ -76,12 +76,12 @@ export class PollResultsDetailedComponent {
storeVoteStackAndReloadPoll(voteStack: any) { storeVoteStackAndReloadPoll(voteStack: any) {
if (voteStack.status == 200) { if (voteStack.status == 200) {
this.storageService.mapVotes(voteStack.data); this.storageService.mapVotes(voteStack.data);
// this.pollService.enrichVoteStackWithCurrentPollChoicesDefaultVotes(this.storageService.vote_stack); this.pollService.enrichVoteStackWithCurrentPollChoicesDefaultVotes(this.storageService.vote_stack);
// if (this.pass_hash) { if (this.pollService.pass_hash) {
// this.pollService.loadPollByCustomUrlWithPasswordHash(this.poll.custom_url, this.pass_hash); this.pollService.loadPollByCustomUrlWithPasswordHash(this.poll.custom_url, this.pollService.pass_hash);
// } else { } else {
this.pollService.loadPollByCustomUrl(this.poll.custom_url); this.pollService.loadPollByCustomUrl(this.poll.custom_url);
// } }
} else { } else {
this.toastService.display('erreur à l enregistrement'); this.toastService.display('erreur à l enregistrement');
} }