Add comment
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a66145e105
commit
ae4941d1e4
|
@ -79,6 +79,7 @@ class MemberRequest extends FormRequest
|
||||||
'fax' => '',
|
'fax' => '',
|
||||||
'other_country' => '',
|
'other_country' => '',
|
||||||
'salutation' => '',
|
'salutation' => '',
|
||||||
|
'comment' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ class MemberResource extends JsonResource
|
||||||
'is_leader' => $this->leaderMemberships->count() > 0,
|
'is_leader' => $this->leaderMemberships->count() > 0,
|
||||||
'group_id' => $this->group_id,
|
'group_id' => $this->group_id,
|
||||||
'salutation' => $this->salutation,
|
'salutation' => $this->salutation,
|
||||||
|
'comment' => $this->comment,
|
||||||
'links' => [
|
'links' => [
|
||||||
'show' => route('member.show', ['member' => $this->getModel()]),
|
'show' => route('member.show', ['member' => $this->getModel()]),
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->text('comment')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('comment');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -167,6 +167,14 @@
|
||||||
size="sm"
|
size="sm"
|
||||||
required
|
required
|
||||||
></f-select>
|
></f-select>
|
||||||
|
<f-textarea
|
||||||
|
rows="3"
|
||||||
|
id="comment"
|
||||||
|
class="col-span-2"
|
||||||
|
v-model="inner.comment"
|
||||||
|
label="Kommentar"
|
||||||
|
size="sm"
|
||||||
|
></f-textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</box>
|
</box>
|
||||||
|
|
|
@ -16,7 +16,7 @@ class EditTest extends TestCase
|
||||||
{
|
{
|
||||||
$this->withoutExceptionHandling();
|
$this->withoutExceptionHandling();
|
||||||
$this->login()->loginNami();
|
$this->login()->loginNami();
|
||||||
$member = Member::factory()->defaults()->create(['salutation' => 'Doktor', 'firstname' => 'Max']);
|
$member = Member::factory()->defaults()->create(['salutation' => 'Doktor', 'firstname' => 'Max', 'comment' => 'Lorem bla']);
|
||||||
$activity = Activity::factory()->inNami(66)->hasAttached(Subactivity::factory()->inNami(56)->name('Biber'))->name('€ Mitglied')->create();
|
$activity = Activity::factory()->inNami(66)->hasAttached(Subactivity::factory()->inNami(56)->name('Biber'))->name('€ Mitglied')->create();
|
||||||
$subactivity = $activity->subactivities->first();
|
$subactivity = $activity->subactivities->first();
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ class EditTest extends TestCase
|
||||||
$this->assertInertiaHas('€ Mitglied', $response, "activities.{$activity->id}");
|
$this->assertInertiaHas('€ Mitglied', $response, "activities.{$activity->id}");
|
||||||
$this->assertInertiaHas('Max', $response, 'data.firstname');
|
$this->assertInertiaHas('Max', $response, 'data.firstname');
|
||||||
$this->assertInertiaHas('Doktor', $response, 'data.salutation');
|
$this->assertInertiaHas('Doktor', $response, 'data.salutation');
|
||||||
|
$this->assertInertiaHas('Lorem bla', $response, 'data.comment');
|
||||||
$this->assertInertiaHas('edit', $response, 'mode');
|
$this->assertInertiaHas('edit', $response, 'mode');
|
||||||
$this->assertInertiaHas(false, $response, 'conflict');
|
$this->assertInertiaHas(false, $response, 'conflict');
|
||||||
$this->assertInertiaHas(['name' => 'E-Mail', 'id' => 'E-Mail'], $response, 'billKinds.0');
|
$this->assertInertiaHas(['name' => 'E-Mail', 'id' => 'E-Mail'], $response, 'billKinds.0');
|
||||||
|
|
|
@ -46,6 +46,7 @@ class StoreTest extends TestCase
|
||||||
'subscription_id' => $subscription->id,
|
'subscription_id' => $subscription->id,
|
||||||
'bill_kind' => 'Post',
|
'bill_kind' => 'Post',
|
||||||
'salutation' => 'Doktor',
|
'salutation' => 'Doktor',
|
||||||
|
'comment' => 'Lorem bla',
|
||||||
]));
|
]));
|
||||||
|
|
||||||
$response->assertRedirect('/member')->assertSessionHasNoErrors();
|
$response->assertRedirect('/member')->assertSessionHasNoErrors();
|
||||||
|
@ -72,6 +73,7 @@ class StoreTest extends TestCase
|
||||||
'zip' => '42719',
|
'zip' => '42719',
|
||||||
'fax' => '+49 666',
|
'fax' => '+49 666',
|
||||||
'salutation' => 'Doktor',
|
'salutation' => 'Doktor',
|
||||||
|
'comment' => 'Lorem bla',
|
||||||
]);
|
]);
|
||||||
NamiPutMemberAction::spy()->shouldHaveReceived('handle')->withArgs(fn (Member $memberParam, Activity $activityParam, Subactivity $subactivityParam) => $memberParam->is($member)
|
NamiPutMemberAction::spy()->shouldHaveReceived('handle')->withArgs(fn (Member $memberParam, Activity $activityParam, Subactivity $subactivityParam) => $memberParam->is($member)
|
||||||
&& $activityParam->is($activity)
|
&& $activityParam->is($activity)
|
||||||
|
|
Loading…
Reference in New Issue