Update: 2026-05-04 21:37:54
This commit is contained in:
@@ -62,7 +62,7 @@ final class Encryption
|
||||
$tagLength = 16;
|
||||
|
||||
if (strlen($decoded) < $ivLength + $tagLength) {
|
||||
error_log("ENCRYPTION ERROR: Data too short for IV and TAG. Length: " . strlen($decoded));
|
||||
// This is likely legacy unencrypted data, return false silently
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -504,50 +504,50 @@
|
||||
<div x-show="currentInvoice?.status === 'approved'" class="w-full bg-emerald-900/30 text-emerald-400 py-3 rounded-2xl font-bold text-center border border-emerald-900/50">
|
||||
✅ مدققة وموثقة محلياً
|
||||
</div>
|
||||
|
||||
<!-- Edit Tenant Modal (Super Admin Only) -->
|
||||
<div x-show="showEditTenantModal" x-cloak class="fixed inset-0 bg-black/90 flex items-center justify-center p-6 z-[140]">
|
||||
<div class="bg-surface border border-gray-800 w-full max-w-xl p-10 rounded-[40px] shadow-2xl glass-elevated overflow-y-auto max-h-[90vh]">
|
||||
<h3 class="text-2xl font-bold mb-8 text-emerald-400">تعديل بيانات المكتب</h3>
|
||||
<form @submit.prevent="updateTenant" class="space-y-6">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">اسم المكتب</label>
|
||||
<input type="text" x-model="currentTenant.name" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500" required>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">البريد الرسمي</label>
|
||||
<input type="email" x-model="currentTenant.email" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">رقم الهاتف</label>
|
||||
<input type="text" x-model="currentTenant.phone" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">حالة المكتب</label>
|
||||
<select x-model="currentTenant.status" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500">
|
||||
<option value="active">نشط (Active)</option>
|
||||
<option value="suspended">معلق (Suspended)</option>
|
||||
<option value="trial">تجريبي (Trial)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-4 pt-6 border-t border-gray-800">
|
||||
<button type="submit" class="flex-1 bg-emerald-600 hover:bg-emerald-500 py-4 rounded-2xl font-bold transition-all btn-glow" :disabled="isBusy">
|
||||
<span x-show="!isBusy">💾 حفظ التعديلات</span>
|
||||
<span x-show="isBusy">⏳ جاري الحفظ...</span>
|
||||
</button>
|
||||
<button type="button" @click="showEditTenantModal = false" class="px-8 py-4 border border-gray-800 rounded-2xl hover:bg-gray-800 transition-colors">إلغاء</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit Tenant Modal (Super Admin Only) -->
|
||||
<div x-show="showEditTenantModal" x-cloak class="fixed inset-0 bg-black/90 flex items-center justify-center p-6 z-[140]">
|
||||
<div class="bg-surface border border-gray-800 w-full max-w-xl p-10 rounded-[40px] shadow-2xl glass-elevated overflow-y-auto max-h-[90vh]">
|
||||
<h3 class="text-2xl font-bold mb-8 text-emerald-400">تعديل بيانات المكتب</h3>
|
||||
<form @submit.prevent="updateTenant" class="space-y-6">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">اسم المكتب</label>
|
||||
<input type="text" x-model="currentTenant.name" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500" required>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">البريد الرسمي</label>
|
||||
<input type="email" x-model="currentTenant.email" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">رقم الهاتف</label>
|
||||
<input type="text" x-model="currentTenant.phone" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-500 uppercase mb-2">حالة المكتب</label>
|
||||
<select x-model="currentTenant.status" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none focus:border-emerald-500">
|
||||
<option value="active">نشط (Active)</option>
|
||||
<option value="suspended">معلق (Suspended)</option>
|
||||
<option value="trial">تجريبي (Trial)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-4 pt-6 border-t border-gray-800">
|
||||
<button type="submit" class="flex-1 bg-emerald-600 hover:bg-emerald-500 py-4 rounded-2xl font-bold transition-all btn-glow" :disabled="isBusy">
|
||||
<span x-show="!isBusy">💾 حفظ التعديلات</span>
|
||||
<span x-show="isBusy">⏳ جاري الحفظ...</span>
|
||||
</button>
|
||||
<button type="button" @click="showEditTenantModal = false" class="px-8 py-4 border border-gray-800 rounded-2xl hover:bg-gray-800 transition-colors">إلغاء</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add Tenant Modal (Super Admin Only) -->
|
||||
<div x-show="showAddTenantModal" x-cloak class="fixed inset-0 bg-black/90 flex items-center justify-center p-6 z-[140]">
|
||||
|
||||
Reference in New Issue
Block a user