fix: [loan] 상품권 카테고리는 상태 무관하게 수정/삭제 가능하도록 변경

- isEditable(): 상품권이면 상태와 무관하게 수정 허용
- isDeletable(): 상품권이면 상태와 무관하게 삭제 허용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-03-05 21:42:00 +09:00
parent 652ac3d1ec
commit 7fe856f3b7

View File

@@ -219,10 +219,14 @@ public function getElapsedDaysAttribute(): int
// ========================================================================= // =========================================================================
/** /**
* 수정 가능 여부 (미정산 상태) * 수정 가능 여부 (미정산 상태 또는 상품권)
*/ */
public function isEditable(): bool public function isEditable(): bool
{ {
if ($this->category === self::CATEGORY_GIFT_CERTIFICATE) {
return true;
}
return in_array($this->status, [ return in_array($this->status, [
self::STATUS_OUTSTANDING, self::STATUS_OUTSTANDING,
self::STATUS_HOLDING, self::STATUS_HOLDING,
@@ -230,10 +234,14 @@ public function isEditable(): bool
} }
/** /**
* 삭제 가능 여부 (미정산/보유 상태) * 삭제 가능 여부 (미정산/보유 상태 또는 상품권)
*/ */
public function isDeletable(): bool public function isDeletable(): bool
{ {
if ($this->category === self::CATEGORY_GIFT_CERTIFICATE) {
return true;
}
return in_array($this->status, [ return in_array($this->status, [
self::STATUS_OUTSTANDING, self::STATUS_OUTSTANDING,
self::STATUS_HOLDING, self::STATUS_HOLDING,