mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for phone validation
This commit is contained in:
parent
a0208c8031
commit
dff9c9566c
11
app/Http/Requests/Vendor/UpdateVendorRequest.php
vendored
11
app/Http/Requests/Vendor/UpdateVendorRequest.php
vendored
@ -35,17 +35,13 @@ class UpdateVendorRequest extends Request
|
||||
{
|
||||
/* Ensure we have a client name, and that all emails are unique*/
|
||||
|
||||
$rules['country_id'] = 'integer|nullable';
|
||||
$rules['country_id'] = 'integer';
|
||||
|
||||
if ($this->number) {
|
||||
$rules['number'] = Rule::unique('vendors')->where('company_id', auth()->user()->company()->id)->ignore($this->vendor->id);
|
||||
}
|
||||
|
||||
// if($this->id_number)
|
||||
// $rules['id_number'] = Rule::unique('vendors')->where('company_id', auth()->user()->company()->id)->ignore($this->vendor->id);
|
||||
|
||||
|
||||
$rules['contacts.*.email'] = 'nullable|distinct';
|
||||
// $rules['id_number'] = 'unique:vendors,id_number,'.$this->id.',id,company_id,'.auth()->user()->company()->id;
|
||||
|
||||
return $rules;
|
||||
}
|
||||
@ -67,6 +63,9 @@ class UpdateVendorRequest extends Request
|
||||
$input['assigned_user_id'] = $this->decodePrimaryKey($input['assigned_user_id']);
|
||||
}
|
||||
|
||||
if(array_key_exists('country_id', $input) && is_null($input['country_id']))
|
||||
unset($input['country_id']);
|
||||
|
||||
$input = $this->decodePrimaryKeys($input);
|
||||
|
||||
$this->replace($input);
|
||||
|
@ -167,7 +167,7 @@ class Import implements ShouldQueue
|
||||
|
||||
public $tries = 1;
|
||||
|
||||
public $timeout = 0;
|
||||
public $timeout = 10000000;
|
||||
|
||||
// public $backoff = 86430;
|
||||
|
||||
@ -188,10 +188,10 @@ class Import implements ShouldQueue
|
||||
$this->resources = $resources;
|
||||
}
|
||||
|
||||
public function middleware()
|
||||
{
|
||||
return [new WithoutOverlapping("only_one_migration_at_a_time_ever")];
|
||||
}
|
||||
// public function middleware()
|
||||
// {
|
||||
// return [new WithoutOverlapping("only_one_migration_at_a_time_ever")];
|
||||
// }
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
|
@ -59,8 +59,10 @@ class UserRepository extends BaseRepository
|
||||
// if(array_key_exists('oauth_provider_id', $details))
|
||||
// unset($details['oauth_provider_id']);
|
||||
|
||||
if (request()->has('validated_phone'))
|
||||
if (request()->has('validated_phone')){
|
||||
$details['phone'] = request()->input('validated_phone');
|
||||
$user->verified_phone_number = false;
|
||||
}
|
||||
|
||||
$user->fill($details);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user