Verified Commit 1321111e authored by Korko's avatar Korko
Browse files

Fix dearsanta interface

parent a584827e
......@@ -22,10 +22,7 @@ class DearSantaController extends Controller
public function fetch(Participant $participant)
{
return response()->json([
'participant' => [
'id' => $participant->hash,
'name' => $participant->name,
],
'participant' => $participant->only(['hash', 'name']),
'draw' => $participant->draw->mail_title,
'organizer' => $participant->draw->organizer->name,
'emails' => $participant->dearSanta->mapWithKeys(function ($email) {
......
......@@ -129,7 +129,7 @@ vue__WEBPACK_IMPORTED_MODULE_17___default.a.use(vuelidate__WEBPACK_IMPORTED_MODU
fetchState: function fetchState() {
var app = this;
return jquery__WEBPACK_IMPORTED_MODULE_15___default.a.ajax({
url: "/dearsanta/".concat(this.data.santa.id, "/fetchState"),
url: "/dearsanta/".concat(this.data.participant.hash, "/fetchState"),
type: 'POST',
data: {
_token: this.csrf
......@@ -172,7 +172,7 @@ var render = function() {
"ajax-form",
{
attrs: {
action: "/dearsanta/" + _vm.data.santa.id + "/send",
action: "/dearsanta/" + _vm.data.participant.hash + "/send",
$v: _vm.$v
},
on: { success: _vm.success }
......
......@@ -56,7 +56,7 @@
fetchState() {
var app = this;
return jQuery.ajax({
url: `/dearsanta/${this.data.santa.id}/fetchState`,
url: `/dearsanta/${this.data.participant.hash}/fetchState`,
type: 'POST',
data: { _token: this.csrf },
success(data) {
......@@ -79,7 +79,7 @@
<template>
<div>
<ajax-form :action="`/dearsanta/${data.santa.id}/send`" :$v="$v" @success="success">
<ajax-form :action="`/dearsanta/${data.participant.hash}/send`" :$v="$v" @success="success">
<fieldset>
<div class="form-group">
<label for="mailContent">{{ $t('dearsanta.content.label') }}</label>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment