Add phone login support and member import functionality
Features: - Support login via phone number or email (LoginRequest) - Add members:import-roster command for Excel roster import - Merge survey emails with roster data Code Quality (Phase 1-4): - Add database locking for balance calculation - Add self-approval checks for finance workflow - Create service layer (FinanceDocumentApprovalService, PaymentVerificationService) - Add HasAccountingEntries and HasApprovalWorkflow traits - Create FormRequest classes for validation - Add status-badge component - Define authorization gates in AuthServiceProvider - Add accounting config file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\HasApprovalWorkflow;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class MembershipPayment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasApprovalWorkflow, HasFactory;
|
||||
|
||||
// Status constants
|
||||
const STATUS_PENDING = 'pending';
|
||||
@@ -97,12 +98,7 @@ class MembershipPayment extends Model
|
||||
return $this->belongsTo(User::class, 'rejected_by_user_id');
|
||||
}
|
||||
|
||||
// Status check methods
|
||||
public function isPending(): bool
|
||||
{
|
||||
return $this->status === self::STATUS_PENDING;
|
||||
}
|
||||
|
||||
// Status check methods (isPending and isRejected provided by HasApprovalWorkflow trait)
|
||||
public function isApprovedByCashier(): bool
|
||||
{
|
||||
return $this->status === self::STATUS_APPROVED_CASHIER;
|
||||
@@ -118,10 +114,7 @@ class MembershipPayment extends Model
|
||||
return $this->status === self::STATUS_APPROVED_CHAIR;
|
||||
}
|
||||
|
||||
public function isRejected(): bool
|
||||
{
|
||||
return $this->status === self::STATUS_REJECTED;
|
||||
}
|
||||
// isRejected() provided by HasApprovalWorkflow trait
|
||||
|
||||
// Workflow validation methods
|
||||
public function canBeApprovedByCashier(): bool
|
||||
|
||||
Reference in New Issue
Block a user