85 lines
4.9 KiB
PHP
85 lines
4.9 KiB
PHP
<form method="POST" action="{{ route('settings.organization.update') }}" enctype="multipart/form-data" class="space-y-6">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
<!-- Organization Name -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.org_name') }}</label>
|
|
<input type="text" name="name" value="{{ old('name', $tenant?->name) }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500"
|
|
required>
|
|
</div>
|
|
|
|
<!-- Domain -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.domain') }}</label>
|
|
<input type="text" name="domain" value="{{ old('domain', $tenant?->domain) }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500"
|
|
placeholder="example.com" dir="ltr">
|
|
</div>
|
|
|
|
<!-- Base Currency -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.base_currency') }}</label>
|
|
<select name="base_currency_id"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500">
|
|
<option value="">— {{ __('common.select') }} —</option>
|
|
@foreach($currencies as $currency)
|
|
<option value="{{ $currency->id }}" {{ old('base_currency_id', $tenant?->base_currency_id) == $currency->id ? 'selected' : '' }}>
|
|
{{ $currency->name }} ({{ $currency->code }})
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<!-- Default Locale -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.default_locale') }}</label>
|
|
<select name="default_locale"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500">
|
|
<option value="fa" {{ old('default_locale', $tenant?->default_locale ?? 'fa') === 'fa' ? 'selected' : '' }}>فارسی</option>
|
|
<option value="en" {{ old('default_locale', $tenant?->default_locale) === 'en' ? 'selected' : '' }}>English</option>
|
|
<option value="ar" {{ old('default_locale', $tenant?->default_locale) === 'ar' ? 'selected' : '' }}>العربية</option>
|
|
</select>
|
|
</div>
|
|
|
|
<!-- Default Calendar -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.default_calendar') }}</label>
|
|
<select name="default_calendar"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-teal-500 focus:border-teal-500">
|
|
<option value="jalali" {{ old('default_calendar', $tenant?->default_calendar ?? 'jalali') === 'jalali' ? 'selected' : '' }}>{{ __('calendar.jalali') }}</option>
|
|
<option value="gregorian" {{ old('default_calendar', $tenant?->default_calendar) === 'gregorian' ? 'selected' : '' }}>{{ __('calendar.gregorian') }}</option>
|
|
</select>
|
|
</div>
|
|
|
|
<!-- Multi Currency -->
|
|
<div class="flex items-center gap-3 pt-6">
|
|
<input type="checkbox" name="allow_multi_currency" id="allow_multi_currency" value="1"
|
|
{{ old('allow_multi_currency', $tenant?->allow_multi_currency ?? true) ? 'checked' : '' }}
|
|
class="w-4 h-4 rounded border-gray-300 text-teal-600 focus:ring-teal-500">
|
|
<label for="allow_multi_currency" class="text-sm font-medium text-gray-700">{{ __('settings.allow_multi_currency') }}</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Logo -->
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">{{ __('settings.logo') }}</label>
|
|
<div class="flex items-center gap-4">
|
|
@if($tenant?->logo_path)
|
|
<img src="{{ Storage::url($tenant->logo_path) }}" alt="Logo" class="w-16 h-16 rounded-lg border border-gray-200 object-contain">
|
|
@endif
|
|
<input type="file" name="logo" accept="image/jpeg,image/png,image/svg+xml"
|
|
class="block w-full text-sm text-gray-500 file:me-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-teal-50 file:text-teal-700 hover:file:bg-teal-100">
|
|
</div>
|
|
<p class="text-xs text-gray-400 mt-1">{{ __('settings.logo_help') }}</p>
|
|
</div>
|
|
|
|
<div class="flex justify-end pt-4 border-t border-gray-100">
|
|
<button type="submit" class="px-6 py-2.5 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition-colors">
|
|
{{ __('common.save_changes') }}
|
|
</button>
|
|
</div>
|
|
</form>
|