Add Line ID field to member lifecycle
This commit is contained in:
@@ -85,6 +85,7 @@ class ImportMembers extends Command
|
|||||||
$memberNumber = isset($indexes['member_number']) ? trim($row[$indexes['member_number']] ?? '') : '';
|
$memberNumber = isset($indexes['member_number']) ? trim($row[$indexes['member_number']] ?? '') : '';
|
||||||
$nationalId = isset($indexes['national_id']) ? trim($row[$indexes['national_id']] ?? '') : '';
|
$nationalId = isset($indexes['national_id']) ? trim($row[$indexes['national_id']] ?? '') : '';
|
||||||
$phone = trim($row[$indexes['phone']] ?? '');
|
$phone = trim($row[$indexes['phone']] ?? '');
|
||||||
|
$lineId = isset($indexes['line_id']) ? trim($row[$indexes['line_id']] ?? '') : '';
|
||||||
$phoneHome = isset($indexes['phone_home']) ? trim($row[$indexes['phone_home']] ?? '') : '';
|
$phoneHome = isset($indexes['phone_home']) ? trim($row[$indexes['phone_home']] ?? '') : '';
|
||||||
$phoneFax = isset($indexes['phone_fax']) ? trim($row[$indexes['phone_fax']] ?? '') : '';
|
$phoneFax = isset($indexes['phone_fax']) ? trim($row[$indexes['phone_fax']] ?? '') : '';
|
||||||
$birthDate = isset($indexes['birth_date']) ? trim($row[$indexes['birth_date']] ?? '') : '';
|
$birthDate = isset($indexes['birth_date']) ? trim($row[$indexes['birth_date']] ?? '') : '';
|
||||||
@@ -125,6 +126,7 @@ class ImportMembers extends Command
|
|||||||
'email' => $email,
|
'email' => $email,
|
||||||
'national_id' => $nationalId !== '' ? $nationalId : null,
|
'national_id' => $nationalId !== '' ? $nationalId : null,
|
||||||
'phone' => $phone !== '' ? $phone : null,
|
'phone' => $phone !== '' ? $phone : null,
|
||||||
|
'line_id' => $lineId !== '' ? $lineId : null,
|
||||||
'phone_home' => $phoneHome !== '' ? $phoneHome : null,
|
'phone_home' => $phoneHome !== '' ? $phoneHome : null,
|
||||||
'phone_fax' => $phoneFax !== '' ? $phoneFax : null,
|
'phone_fax' => $phoneFax !== '' ? $phoneFax : null,
|
||||||
'birth_date' => $birthDate !== '' ? $birthDate : null,
|
'birth_date' => $birthDate !== '' ? $birthDate : null,
|
||||||
|
|||||||
@@ -17,12 +17,13 @@ class AdminMemberController extends Controller
|
|||||||
{
|
{
|
||||||
$query = Member::query()->with('user');
|
$query = Member::query()->with('user');
|
||||||
|
|
||||||
// Text search (name, email, phone, national ID)
|
// Text search (name, email, phone, Line ID, national ID)
|
||||||
if ($search = $request->string('search')->toString()) {
|
if ($search = $request->string('search')->toString()) {
|
||||||
$query->where(function ($q) use ($search) {
|
$query->where(function ($q) use ($search) {
|
||||||
$q->where('full_name', 'like', "%{$search}%")
|
$q->where('full_name', 'like', "%{$search}%")
|
||||||
->orWhere('email', 'like', "%{$search}%")
|
->orWhere('email', 'like', "%{$search}%")
|
||||||
->orWhere('phone', 'like', "%{$search}%");
|
->orWhere('phone', 'like', "%{$search}%")
|
||||||
|
->orWhere('line_id', 'like', "%{$search}%");
|
||||||
|
|
||||||
// Search by national ID hash if provided
|
// Search by national ID hash if provided
|
||||||
if (!empty($search)) {
|
if (!empty($search)) {
|
||||||
@@ -256,7 +257,13 @@ class AdminMemberController extends Controller
|
|||||||
if ($search = $request->string('search')->toString()) {
|
if ($search = $request->string('search')->toString()) {
|
||||||
$query->where(function ($q) use ($search) {
|
$query->where(function ($q) use ($search) {
|
||||||
$q->where('full_name', 'like', "%{$search}%")
|
$q->where('full_name', 'like', "%{$search}%")
|
||||||
->orWhere('email', 'like', "%{$search}%");
|
->orWhere('email', 'like', "%{$search}%")
|
||||||
|
->orWhere('phone', 'like', "%{$search}%")
|
||||||
|
->orWhere('line_id', 'like', "%{$search}%");
|
||||||
|
|
||||||
|
if (!empty($search)) {
|
||||||
|
$q->orWhere('national_id_hash', hash('sha256', $search));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,6 +283,7 @@ class AdminMemberController extends Controller
|
|||||||
'Full Name',
|
'Full Name',
|
||||||
'Email',
|
'Email',
|
||||||
'Phone',
|
'Phone',
|
||||||
|
'Line ID',
|
||||||
'Address Line 1',
|
'Address Line 1',
|
||||||
'Address Line 2',
|
'Address Line 2',
|
||||||
'City',
|
'City',
|
||||||
@@ -297,6 +305,7 @@ class AdminMemberController extends Controller
|
|||||||
$member->full_name,
|
$member->full_name,
|
||||||
$member->email,
|
$member->email,
|
||||||
$member->phone,
|
$member->phone,
|
||||||
|
$member->line_id,
|
||||||
$member->address_line_1,
|
$member->address_line_1,
|
||||||
$member->address_line_2,
|
$member->address_line_2,
|
||||||
$member->city,
|
$member->city,
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class MemberDashboardController extends Controller
|
|||||||
$validated = $request->validate([
|
$validated = $request->validate([
|
||||||
'full_name' => ['required', 'string', 'max:255'],
|
'full_name' => ['required', 'string', 'max:255'],
|
||||||
'phone' => ['nullable', 'string', 'max:20'],
|
'phone' => ['nullable', 'string', 'max:20'],
|
||||||
|
'line_id' => ['nullable', 'string', 'max:100'],
|
||||||
'national_id' => ['nullable', 'string', 'max:20'],
|
'national_id' => ['nullable', 'string', 'max:20'],
|
||||||
'address_line_1' => ['nullable', 'string', 'max:255'],
|
'address_line_1' => ['nullable', 'string', 'max:255'],
|
||||||
'address_line_2' => ['nullable', 'string', 'max:255'],
|
'address_line_2' => ['nullable', 'string', 'max:255'],
|
||||||
@@ -69,6 +70,7 @@ class MemberDashboardController extends Controller
|
|||||||
'full_name' => $validated['full_name'],
|
'full_name' => $validated['full_name'],
|
||||||
'email' => $user->email,
|
'email' => $user->email,
|
||||||
'phone' => $validated['phone'] ?? null,
|
'phone' => $validated['phone'] ?? null,
|
||||||
|
'line_id' => $validated['line_id'] ?? null,
|
||||||
'national_id' => $validated['national_id'] ?? null,
|
'national_id' => $validated['national_id'] ?? null,
|
||||||
'address_line_1' => $validated['address_line_1'] ?? null,
|
'address_line_1' => $validated['address_line_1'] ?? null,
|
||||||
'address_line_2' => $validated['address_line_2'] ?? null,
|
'address_line_2' => $validated['address_line_2'] ?? null,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class PublicMemberRegistrationController extends Controller
|
|||||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email', 'unique:members,email'],
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email', 'unique:members,email'],
|
||||||
'password' => ['required', 'confirmed', Password::defaults()],
|
'password' => ['required', 'confirmed', Password::defaults()],
|
||||||
'phone' => ['nullable', 'string', 'max:20'],
|
'phone' => ['nullable', 'string', 'max:20'],
|
||||||
|
'line_id' => ['nullable', 'string', 'max:100'],
|
||||||
'national_id' => ['nullable', 'string', 'max:20'],
|
'national_id' => ['nullable', 'string', 'max:20'],
|
||||||
'address_line_1' => ['nullable', 'string', 'max:255'],
|
'address_line_1' => ['nullable', 'string', 'max:255'],
|
||||||
'address_line_2' => ['nullable', 'string', 'max:255'],
|
'address_line_2' => ['nullable', 'string', 'max:255'],
|
||||||
@@ -57,6 +58,7 @@ class PublicMemberRegistrationController extends Controller
|
|||||||
'full_name' => $validated['full_name'],
|
'full_name' => $validated['full_name'],
|
||||||
'email' => $validated['email'],
|
'email' => $validated['email'],
|
||||||
'phone' => $validated['phone'] ?? null,
|
'phone' => $validated['phone'] ?? null,
|
||||||
|
'line_id' => $validated['line_id'] ?? null,
|
||||||
'national_id' => $validated['national_id'] ?? null,
|
'national_id' => $validated['national_id'] ?? null,
|
||||||
'address_line_1' => $validated['address_line_1'] ?? null,
|
'address_line_1' => $validated['address_line_1'] ?? null,
|
||||||
'address_line_2' => $validated['address_line_2'] ?? null,
|
'address_line_2' => $validated['address_line_2'] ?? null,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class StoreMemberRequest extends FormRequest
|
|||||||
'email' => ['required', 'email', 'max:255', 'unique:users,email'],
|
'email' => ['required', 'email', 'max:255', 'unique:users,email'],
|
||||||
'national_id' => ['nullable', 'string', 'max:50'],
|
'national_id' => ['nullable', 'string', 'max:50'],
|
||||||
'phone' => ['nullable', 'string', 'max:50'],
|
'phone' => ['nullable', 'string', 'max:50'],
|
||||||
|
'line_id' => ['nullable', 'string', 'max:100'],
|
||||||
'phone_home' => ['nullable', 'string', 'max:50'],
|
'phone_home' => ['nullable', 'string', 'max:50'],
|
||||||
'phone_fax' => ['nullable', 'string', 'max:50'],
|
'phone_fax' => ['nullable', 'string', 'max:50'],
|
||||||
'birth_date' => ['nullable', 'date'],
|
'birth_date' => ['nullable', 'date'],
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class UpdateMemberRequest extends FormRequest
|
|||||||
'email' => ['required', 'email', 'max:255'],
|
'email' => ['required', 'email', 'max:255'],
|
||||||
'national_id' => ['nullable', 'string', 'max:50'],
|
'national_id' => ['nullable', 'string', 'max:50'],
|
||||||
'phone' => ['nullable', 'string', 'max:50'],
|
'phone' => ['nullable', 'string', 'max:50'],
|
||||||
|
'line_id' => ['nullable', 'string', 'max:100'],
|
||||||
'phone_home' => ['nullable', 'string', 'max:50'],
|
'phone_home' => ['nullable', 'string', 'max:50'],
|
||||||
'phone_fax' => ['nullable', 'string', 'max:50'],
|
'phone_fax' => ['nullable', 'string', 'max:50'],
|
||||||
'birth_date' => ['nullable', 'date'],
|
'birth_date' => ['nullable', 'date'],
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class Member extends Model
|
|||||||
'full_name',
|
'full_name',
|
||||||
'email',
|
'email',
|
||||||
'phone',
|
'phone',
|
||||||
|
'line_id',
|
||||||
'phone_home',
|
'phone_home',
|
||||||
'phone_fax',
|
'phone_fax',
|
||||||
'address_line_1',
|
'address_line_1',
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->string('line_id', 100)->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('line_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid gap-6 sm:grid-cols-2">
|
<div class="grid gap-6 sm:grid-cols-3">
|
||||||
<div>
|
<div>
|
||||||
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
行動電話
|
行動電話
|
||||||
@@ -186,6 +186,22 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="line_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
|
Line ID
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="line_id"
|
||||||
|
id="line_id"
|
||||||
|
value="{{ old('line_id') }}"
|
||||||
|
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
@error('line_id')
|
||||||
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="phone_home" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label for="phone_home" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
室內電話
|
室內電話
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid gap-6 sm:grid-cols-2">
|
<div class="grid gap-6 sm:grid-cols-3">
|
||||||
<div>
|
<div>
|
||||||
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
行動電話
|
行動電話
|
||||||
@@ -184,6 +184,22 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="line_id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
|
Line ID
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="line_id"
|
||||||
|
id="line_id"
|
||||||
|
value="{{ old('line_id', $member->line_id) }}"
|
||||||
|
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 sm:text-sm dark:bg-gray-900 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
@error('line_id')
|
||||||
|
<p class="mt-2 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="phone_home" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label for="phone_home" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
室內電話
|
室內電話
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<li><code class="text-gray-800 dark:text-gray-200">member_number</code> (optional)</li>
|
<li><code class="text-gray-800 dark:text-gray-200">member_number</code> (optional)</li>
|
||||||
<li><code class="text-gray-800 dark:text-gray-200">email</code></li>
|
<li><code class="text-gray-800 dark:text-gray-200">email</code></li>
|
||||||
<li><code class="text-gray-800 dark:text-gray-200">phone</code></li>
|
<li><code class="text-gray-800 dark:text-gray-200">phone</code></li>
|
||||||
|
<li><code class="text-gray-800 dark:text-gray-200">line_id</code> (optional)</li>
|
||||||
<li><code class="text-gray-800 dark:text-gray-200">phone_home</code> (optional)</li>
|
<li><code class="text-gray-800 dark:text-gray-200">phone_home</code> (optional)</li>
|
||||||
<li><code class="text-gray-800 dark:text-gray-200">phone_fax</code> (optional)</li>
|
<li><code class="text-gray-800 dark:text-gray-200">phone_fax</code> (optional)</li>
|
||||||
<li><code class="text-gray-800 dark:text-gray-200">birth_date</code> (YYYY-MM-DD, optional)</li>
|
<li><code class="text-gray-800 dark:text-gray-200">birth_date</code> (YYYY-MM-DD, optional)</li>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<form method="GET" action="{{ route('admin.members.index') }}" class="mb-4 space-y-4" role="search" aria-label="搜尋和篩選會員">
|
<form method="GET" action="{{ route('admin.members.index') }}" class="mb-4 space-y-4" role="search" aria-label="搜尋和篩選會員">
|
||||||
<div>
|
<div>
|
||||||
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
依姓名、電子郵件、電話或身分證號搜尋
|
依姓名、電子郵件、電話、Line ID 或身分證號搜尋
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
placeholder="輸入搜尋關鍵字..."
|
placeholder="輸入搜尋關鍵字..."
|
||||||
>
|
>
|
||||||
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
||||||
在姓名、電子郵件、電話號碼和身分證號中搜尋
|
在姓名、電子郵件、電話號碼、Line ID 和身分證號中搜尋
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,15 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||||
|
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||||
|
Line ID
|
||||||
|
</dt>
|
||||||
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
||||||
|
{{ $member->line_id ?? __('Not set') }}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||||
室內電話/傳真
|
室內電話/傳真
|
||||||
|
|||||||
@@ -34,6 +34,13 @@
|
|||||||
<x-input-error :messages="$errors->get('phone')" class="mt-2" />
|
<x-input-error :messages="$errors->get('phone')" class="mt-2" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Line ID -->
|
||||||
|
<div class="mt-4">
|
||||||
|
<x-input-label for="line_id" :value="__('Line ID')" />
|
||||||
|
<x-text-input id="line_id" class="block mt-1 w-full" type="text" name="line_id" :value="old('line_id')" maxlength="100" />
|
||||||
|
<x-input-error :messages="$errors->get('line_id')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- National ID (Optional) -->
|
<!-- National ID (Optional) -->
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-input-label for="national_id" :value="__('National ID (Optional)')" />
|
<x-input-label for="national_id" :value="__('National ID (Optional)')" />
|
||||||
|
|||||||
@@ -92,6 +92,15 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||||
|
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||||
|
{{ __('Line ID') }}
|
||||||
|
</dt>
|
||||||
|
<dd class="mt-1 text-xl font-semibold text-gray-900 dark:text-gray-100">
|
||||||
|
{{ $member->line_id ?: __('Not set') }}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700 px-4 py-5 sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
<dt class="truncate text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||||
{{ __('Membership Type') }}
|
{{ __('Membership Type') }}
|
||||||
|
|||||||
@@ -50,6 +50,13 @@
|
|||||||
<x-input-error :messages="$errors->get('phone')" class="mt-2" />
|
<x-input-error :messages="$errors->get('phone')" class="mt-2" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Line ID -->
|
||||||
|
<div class="mt-4">
|
||||||
|
<x-input-label for="line_id" :value="__('Line ID')" />
|
||||||
|
<x-text-input id="line_id" class="block mt-1 w-full" type="text" name="line_id" :value="old('line_id')" maxlength="100" />
|
||||||
|
<x-input-error :messages="$errors->get('line_id')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- National ID (Optional) -->
|
<!-- National ID (Optional) -->
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-input-label for="national_id" :value="__('National ID (Optional)')" />
|
<x-input-label for="national_id" :value="__('National ID (Optional)')" />
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class MemberRegistrationTest extends TestCase
|
|||||||
'password' => 'Password123!',
|
'password' => 'Password123!',
|
||||||
'password_confirmation' => 'Password123!',
|
'password_confirmation' => 'Password123!',
|
||||||
'phone' => '0912345678',
|
'phone' => '0912345678',
|
||||||
|
'line_id' => 'john_doe_line',
|
||||||
'address_line_1' => '123 Test St',
|
'address_line_1' => '123 Test St',
|
||||||
'city' => 'Taipei',
|
'city' => 'Taipei',
|
||||||
'postal_code' => '100',
|
'postal_code' => '100',
|
||||||
@@ -62,6 +63,7 @@ class MemberRegistrationTest extends TestCase
|
|||||||
'full_name' => 'John Doe',
|
'full_name' => 'John Doe',
|
||||||
'email' => 'john@example.com',
|
'email' => 'john@example.com',
|
||||||
'phone' => '0912345678',
|
'phone' => '0912345678',
|
||||||
|
'line_id' => 'john_doe_line',
|
||||||
'membership_status' => Member::STATUS_PENDING,
|
'membership_status' => Member::STATUS_PENDING,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -256,6 +258,7 @@ class MemberRegistrationTest extends TestCase
|
|||||||
|
|
||||||
$member = Member::where('email', 'john@example.com')->first();
|
$member = Member::where('email', 'john@example.com')->first();
|
||||||
$this->assertNull($member->phone);
|
$this->assertNull($member->phone);
|
||||||
|
$this->assertNull($member->line_id);
|
||||||
$this->assertNull($member->address_line_1);
|
$this->assertNull($member->address_line_1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ trait CreatesMemberData
|
|||||||
'password' => 'Password123!',
|
'password' => 'Password123!',
|
||||||
'password_confirmation' => 'Password123!',
|
'password_confirmation' => 'Password123!',
|
||||||
'phone' => '0912345678',
|
'phone' => '0912345678',
|
||||||
|
'line_id' => 'line.member.test',
|
||||||
'national_id' => 'A123456789',
|
'national_id' => 'A123456789',
|
||||||
'address_line_1' => '123 Test Street',
|
'address_line_1' => '123 Test Street',
|
||||||
'address_line_2' => '',
|
'address_line_2' => '',
|
||||||
|
|||||||
Reference in New Issue
Block a user