Update: 2026-05-04 21:43:07

This commit is contained in:
Hamza-Ayed
2026-05-04 21:43:07 +03:00
parent 23189713dc
commit 70446519e0

View File

@@ -354,6 +354,18 @@
<option value="viewer">مشاهد فقط</option>
<option x-show="user?.role === 'super_admin'" value="admin">مدير مكتب</option>
</select>
<template x-if="user?.role === 'super_admin'">
<div>
<label class="block text-[10px] font-bold text-gray-500 uppercase mb-2 mr-2">اختر المكتب المحاسبي</label>
<select x-model="newUser.tenant_id" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none" required>
<option value="">-- اختر المكتب --</option>
<template x-for="t in tenants" :key="t.id">
<option :value="t.id" x-text="t.name"></option>
</template>
</select>
</div>
</template>
<div class="flex gap-4 pt-4">
<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">حفظ المستخدم</button>
<button type="button" @click="showAddUserModal = false" class="px-8 py-4 border border-gray-800 rounded-2xl">إلغاء</button>
@@ -371,6 +383,18 @@
<input type="text" x-model="newCompany.tax_identification_number" placeholder="الرقم الضريبي (TIN)" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none" required>
<input type="text" x-model="newCompany.commercial_registration_number" placeholder="رقم السجل التجاري" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none">
<input type="text" x-model="newCompany.address" placeholder="العنوان" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none">
<template x-if="user?.role === 'super_admin'">
<div>
<label class="block text-[10px] font-bold text-gray-500 uppercase mb-2 mr-2">إسناد للمكتب المحاسبي</label>
<select x-model="newCompany.tenant_id" class="w-full bg-gray-950 border border-gray-800 p-4 rounded-2xl outline-none" required>
<option value="">-- اختر المكتب --</option>
<template x-for="t in tenants" :key="t.id">
<option :value="t.id" x-text="t.name"></option>
</template>
</select>
</div>
</template>
<div class="flex gap-4 pt-4">
<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">إضافة الشركة</button>
<button type="button" @click="showAddCompanyModal = false" class="px-8 py-4 border border-gray-800 rounded-2xl">إلغاء</button>
@@ -598,8 +622,8 @@
showAddTenantModal: false, showEditTenantModal: false,
isBusy: false, globalError: '',
newUser: { name: '', email: '', password: '', role: 'accountant' },
newCompany: { name: '', tax_identification_number: '', commercial_registration_number: '', address: '' },
newUser: { name: '', email: '', password: '', role: 'accountant', tenant_id: '' },
newCompany: { name: '', tax_identification_number: '', commercial_registration_number: '', address: '', tenant_id: '' },
newTenant: { name: '', email: '', phone: '', manager_name: '', manager_email: '', manager_password: '' },
connectData: { client_id: '', secret_key: '', income_source_sequence: '1' },
uploadData: { company_id: '' },