Add letter address

This commit is contained in:
philipp lang 2021-04-11 17:37:26 +02:00
parent ffd4ff7b90
commit 0602d86e69
6 changed files with 11 additions and 4 deletions

View File

@ -10,7 +10,7 @@ class Member extends Model
{
use Notifiable;
public $fillable = ['firstname', 'lastname', 'nickname', 'other_country', 'birthday', 'joined_at', 'send_newspaper', 'address', 'further_address', 'zip', 'location', 'main_phone', 'mobile_phone', 'work_phone', 'fax', 'email', 'email_parents', 'nami_id', 'letter_address', 'country_id', 'way_id', 'nationality_id', 'fee_id', 'region_id', 'gender_id', 'confession_id'];
public $fillable = ['firstname', 'lastname', 'nickname', 'other_country', 'birthday', 'joined_at', 'send_newspaper', 'address', 'further_address', 'zip', 'location', 'main_phone', 'mobile_phone', 'work_phone', 'fax', 'email', 'email_parents', 'nami_id', 'letter_address', 'country_id', 'way_id', 'nationality_id', 'fee_id', 'region_id', 'gender_id', 'confession_id', 'letter_address'];
public $dates = ['joined_at', 'birthday'];

View File

@ -40,6 +40,7 @@ class MemberResource extends JsonResource
'nationality_id' => $this->nationality_id,
'other_country' => $this->other_country,
'confession_id' => $this->confession_id,
'letter_address' => $this->letter_address,
];
}
}

View File

@ -39,6 +39,7 @@ class CreateMembersTable extends Migration
$table->integer('nami_id')->nullable();
$table->foreignId('nationality_id')->constrained();
$table->foreignId('fee_id')->constrained();
$table->text('letter_address')->nullable();
$table->timestamps();
});

2
resources/js/app.js vendored
View File

@ -7,6 +7,7 @@ import Sprite from './components/Sprite.js';
import FText from './components/FText.vue';
import FSelect from './components/FSelect.vue';
import FTextarea from './components/FTextarea.vue';
import Pages from './components/Pages.vue';
import VBool from './components/VBool.vue';
import App from './layouts/App.vue';
@ -14,6 +15,7 @@ import App from './layouts/App.vue';
Vue.use(plugin)
Vue.component('f-text', FText);
Vue.component('f-select', FSelect);
Vue.component('f-textarea', FTextarea);
Vue.component('sprite', Sprite);
Vue.component('pages', Pages);
Vue.component('v-bool', VBool);

View File

@ -1,6 +1,6 @@
<template>
<label class="flex flex-col relative">
<span v-if="label && !inset" class="font-semibold text-gray-700" :class="{
<span v-if="label && !inset" class="font-semibold text-gray-400" :class="{
'text-xs': size == 'sm',
'text-sm': size === null
}">{{ label }}<span v-show="required" class="text-red-800">&nbsp;*</span></span>
@ -9,9 +9,9 @@
'text-sm': size === null
}">{{ label }}<span v-show="required" class="text-red-800">&nbsp;*</span></span>
<textarea v-text="value" @input="trigger" :placeholder="placeholder"
class="h-full outline-none border-gray-400 border-solid" :rows="rows"
class="h-full outline-none bg-gray-700 border-gray-600 border-solid" :rows="rows"
:class="{
'rounded-lg text-sm border-2 p-2 text-gray-800': size === null,
'rounded-lg text-sm border-2 p-2 text-gray-300': size === null,
'rounded-lg py-2 px-2 text-xs border-2 text-gray-800': size == 'sm'
}"
></textarea>

View File

@ -76,6 +76,9 @@
<div>
<f-select :options="confessions" id="confession_id" v-model="inner.confession_id" label="Konfession"></f-select>
</div>
<div>
<f-textarea rows="4" id="letter_address" v-model="inner.letter_address" label="Brief-Adresse"></f-textarea>
</div>
</div>
</div>
</form>