Compare commits
No commits in common. "88ff6c860fbec7dbbf38b7769f6cef0f26cb3d9e" and "f9854d52f8aa46bc0a17b44e78237b1765fed0c1" have entirely different histories.
88ff6c860f
...
f9854d52f8
@ -1,26 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::table('companies', function (Blueprint $table)
|
|
||||||
{
|
|
||||||
$table->string('inn')->nullable()->change();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@ -22,12 +22,10 @@ public function __invoke(Request $request)
|
|||||||
'name' => 'required|max:255',
|
'name' => 'required|max:255',
|
||||||
'email' => 'required|email|unique:companies',
|
'email' => 'required|email|unique:companies',
|
||||||
'phone' => 'required',
|
'phone' => 'required',
|
||||||
'inn' => 'required_if:type,' . CompanyType::Agency->value . '|unique:companies',
|
'inn' => 'required|unique:companies',
|
||||||
|
'legal_address' => 'required',
|
||||||
'type' => Rule::enum(CompanyType::class),
|
'type' => Rule::enum(CompanyType::class),
|
||||||
'city_id' => 'required'
|
'city_id' => 'required'
|
||||||
],
|
|
||||||
[
|
|
||||||
'inn.required_if' => 'Необходимо указать ИНН агентства'
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$request->request->add([
|
$request->request->add([
|
||||||
|
|||||||
@ -60,19 +60,17 @@ class="form-label">{{ __(ucfirst(strtolower($type)) . ' name') }}</label>
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($type != Modules\Main\Models\Company\CompanyType::SelfEmployer->value)
|
<div class="mb-3">
|
||||||
<div class="mb-3">
|
<label for="companyInn" class="form-label">{{ __('Inn') }}</label>
|
||||||
<label for="companyInn" class="form-label">{{ __('Inn') }}</label>
|
<input type="text" class="form-control" id="companyInn" name="inn"
|
||||||
<input type="text" class="form-control" id="companyInn" name="inn"
|
value="{{ old('inn') }}">
|
||||||
value="{{ old('inn') }}">
|
@error('inn')
|
||||||
@error('inn')
|
<span class="invalid-feedback d-block" role="alert">
|
||||||
<span class="invalid-feedback d-block" role="alert">
|
<strong>{{ $message }}</strong>
|
||||||
<strong>{{ $message }}</strong>
|
</span>
|
||||||
</span>
|
@enderror
|
||||||
@enderror
|
</div>
|
||||||
</div>
|
<div class="mb-3">
|
||||||
@endif
|
|
||||||
<div class="mb-3 d-none">
|
|
||||||
<label for="companyLegalAddress" class="form-label">{{ __('Legal address') }}</label>
|
<label for="companyLegalAddress" class="form-label">{{ __('Legal address') }}</label>
|
||||||
<input type="text" class="form-control" id="companyLegalAddress" name="legal_address"
|
<input type="text" class="form-control" id="companyLegalAddress" name="legal_address"
|
||||||
value="{{ old('legal_address') }}">
|
value="{{ old('legal_address') }}">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user