@extends('layouts.admin') @section('title', 'Chỉnh sửa Giftcode') @section('content')

Chỉnh sửa Giftcode

Cập nhật thông tin mã quà tặng cho người chơi MU Online

@csrf @method('PUT')

Thông tin cơ bản

@error('name')
{{ $message }}
@enderror
@error('type')
{{ $message }}
@enderror
@error('limit')
{{ $message }}
@enderror
@error('period')
{{ $message }}
@enderror
@error('content')
{{ $message }}
@enderror
@error('accounts')
{{ $message }}
@enderror
Để trống nếu muốn tất cả nhân vật đều có thể sử dụng (mỗi nhân vật chỉ dùng 1 lần) @error('characters')
{{ $message }}
@enderror
@if($giftcode->guilds)
Bang hội đã chọn:
@php $selectedGuilds = explode(',', $giftcode->guilds); $guilds = \App\Models\Guild::whereIn('bhid', $selectedGuilds)->get(); @endphp @foreach($guilds as $guild)
@endforeach @endif
@error('guilds')
{{ $message }}
@enderror

Vật phẩm thưởng

Giao diện chỉnh sửa vật phẩm

ℹ️
Lưu ý: Sử dụng Legacy ID (14,15,16...) để tương thích với game hiện tại. Hệ thống sẽ tự động chuyển đổi khi cần thiết.
Vật phẩm phổ biến - Click để thêm
Thêm vật phẩm thủ công
Giỏ hàng vật phẩm
Tổng: 0 loại vật phẩm
@error('items')
{{ $message }}
@enderror

Mã Code (Không thể thay đổi)

@php $codes = $giftcode->getCodesArray(); @endphp @if(count($codes) > 1)
Giftcode này có {{ count($codes) }} mã code:
@foreach(array_slice($codes, 0, 5) as $code) {{ $code }} @endforeach @if(count($codes) > 5) ... và {{ count($codes) - 5 }} mã khác @endif
@else
Mã code:
{{ $codes[0] ?? 'N/A' }}
@endif

Cài đặt

is_active) ? 'checked' : '' }}>

Thống kê hiện tại

{{ number_format($giftcode->getUsageCount()) }}
Đã sử dụng
@php $remaining = $giftcode->limit > 0 ? max(0, $giftcode->limit - $giftcode->getUsageCount()) : 'Không giới hạn'; @endphp
{{ is_numeric($remaining) ? number_format($remaining) : $remaining }}
Còn lại
@php $usagePercent = $giftcode->limit > 0 ? ($giftcode->getUsageCount() / $giftcode->limit) * 100 : 0; @endphp
{{ number_format($usagePercent, 1) }}%
Tỷ lệ sử dụng
@if($giftcode->is_active) Hoạt động @else Vô hiệu @endif
Trạng thái
Hủy
@endsection