run through pint
This commit is contained in:
@@ -91,6 +91,6 @@ class LoanOrder extends Model
|
||||
*/
|
||||
public function workProvince(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Province::class, 'province_id');
|
||||
return $this->belongsTo(Province::class, 'province_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class User extends Authenticatable
|
||||
if ($this->isMe()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->hasRole(['king', 'superadmin', 'admin']);
|
||||
|
||||
return $this->hasRole(['king', 'superadmin', 'admin']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,12 @@
|
||||
|
||||
namespace App\Nova\Dashboards;
|
||||
|
||||
use Laravel\Nova\Cards\Help;
|
||||
use Laravel\Nova\Dashboards\Main as Dashboard;
|
||||
|
||||
class Main extends Dashboard
|
||||
{
|
||||
/**
|
||||
* Get the displayable name of the dashboard.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function name(): string
|
||||
{
|
||||
@@ -19,8 +16,6 @@ class Main extends Dashboard
|
||||
|
||||
/**
|
||||
* Get the cards for the dashboard.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function cards(): array
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ use App\Repos\Order\Loan\LoanTypeRepo;
|
||||
use App\Repos\Order\OrderRepo;
|
||||
use App\Repos\System\Settings\Legal\EducationRepo;
|
||||
use App\Repos\System\Settings\Legal\MarriageRepo;
|
||||
use App\Repos\System\Settings\Legal\PassportRepo;
|
||||
use App\Repos\System\Settings\Location\RegionRepo;
|
||||
use Laravel\Nova\Fields\Badge;
|
||||
use Laravel\Nova\Fields\BelongsTo;
|
||||
@@ -16,7 +15,6 @@ use Laravel\Nova\Fields\Date;
|
||||
use Laravel\Nova\Fields\Email;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Image;
|
||||
use Laravel\Nova\Fields\Number;
|
||||
use Laravel\Nova\Fields\Select;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
use Laravel\Nova\Panel;
|
||||
@@ -30,7 +28,8 @@ class LoanOrderFieldsForDetail
|
||||
public static function make(): array
|
||||
{
|
||||
return [
|
||||
ID::make()->sortable(),
|
||||
ID::make()->hide(),
|
||||
Text::make(__('ID'), 'unique_id'),
|
||||
|
||||
Badge::make(__('Status'), 'status')
|
||||
->map(OrderRepo::statusClasses())
|
||||
@@ -59,7 +58,7 @@ class LoanOrderFieldsForDetail
|
||||
|
||||
new Panel(__('Personal data'), [
|
||||
Text::make(
|
||||
__('Full Name'),
|
||||
__('Full Name'),
|
||||
fn ($model) => sprintf('%s %s %s', $model->customer_name, $model->customer_surname, $model->customer_patronic_name)
|
||||
),
|
||||
|
||||
@@ -132,9 +131,9 @@ class LoanOrderFieldsForDetail
|
||||
|
||||
new Panel(__('Passport'), [
|
||||
Text::make(__('Passport'), fn ($model) => sprintf(
|
||||
'%s %s, %sý',
|
||||
$model->passport_serie,
|
||||
$model->passport_id,
|
||||
'%s %s, %sý',
|
||||
$model->passport_serie,
|
||||
$model->passport_id,
|
||||
$model->passport_given_at?->format('d.m.Y')
|
||||
)),
|
||||
|
||||
@@ -143,7 +142,7 @@ class LoanOrderFieldsForDetail
|
||||
|
||||
Text::make(__('Born place (passport)'), 'born_place')
|
||||
->size('w-1/2'),
|
||||
|
||||
|
||||
Image::make(__('Passport (page 1)'), 'passport_one')
|
||||
->size('w-1/2'),
|
||||
|
||||
@@ -156,6 +155,6 @@ class LoanOrderFieldsForDetail
|
||||
Image::make(__('Passport (page 32)'), 'passport_four')
|
||||
->size('w-1/2'),
|
||||
]),
|
||||
];
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,28 +303,28 @@ class LoanOrder extends Resource
|
||||
new Panel(__('Passport'), [
|
||||
Image::make(__('Passport (page 1)'), 'passport_one')
|
||||
->size('w-1/2')
|
||||
->deletable(false)
|
||||
->deletable(false)
|
||||
->rules('max:2048')
|
||||
->creationRules('required')
|
||||
->updateRules('nullable'),
|
||||
|
||||
Image::make(__('Passport (page 2-3)'), 'passport_two')
|
||||
->size('w-1/2')
|
||||
->deletable(false)
|
||||
->deletable(false)
|
||||
->rules('max:2048')
|
||||
->creationRules('required')
|
||||
->updateRules('nullable'),
|
||||
|
||||
Image::make(__('Passport (page 8-9)'), 'passport_three')
|
||||
->size('w-1/2')
|
||||
->deletable(false)
|
||||
->deletable(false)
|
||||
->rules('max:2048')
|
||||
->creationRules('required')
|
||||
->updateRules('nullable'),
|
||||
|
||||
Image::make(__('Passport (page 32)'), 'passport_four')
|
||||
->size('w-1/2')
|
||||
->deletable(false)
|
||||
->deletable(false)
|
||||
->rules('max:2048')
|
||||
->creationRules('required')
|
||||
->updateRules('nullable'),
|
||||
|
||||
@@ -6,7 +6,6 @@ use App\Nova\Resources\System\Roles\Role;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rules;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\MorphMany;
|
||||
use Laravel\Nova\Fields\MorphToMany;
|
||||
use Laravel\Nova\Fields\Password;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
@@ -46,7 +45,7 @@ class User extends Resource
|
||||
public static function indexQuery(NovaRequest $request, $query)
|
||||
{
|
||||
$query->where('email', '!=', 'nurmuhammet@mail.com')
|
||||
->where('email', '!=', 'mahmyt1206@gmail.com');
|
||||
->where('email', '!=', 'mahmyt1206@gmail.com');
|
||||
|
||||
return $query;
|
||||
}
|
||||
@@ -69,8 +68,6 @@ class User extends Resource
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fields(NovaRequest $request): array
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\Branch;
|
||||
|
||||
use App\Models\Branch\Branch;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class BranchPolicy
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\Order\Loan;
|
||||
|
||||
use App\Models\Order\Loan\LoanOrder;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class LoanOrderPolicy
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\Order\Loan;
|
||||
|
||||
use App\Models\Order\Loan\LoanType;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class LoanTypePolicy
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\System\Location;
|
||||
|
||||
use App\Models\System\Location\Province;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class ProvincePolicy
|
||||
{
|
||||
@@ -16,7 +15,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,7 +27,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -40,7 +39,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,7 +51,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,7 +63,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -88,7 +87,7 @@ class ProvincePolicy
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\System\Roles;
|
||||
|
||||
use App\Models\System\Roles\Permission;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class PermissionPolicy
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Policies\System\Roles;
|
||||
|
||||
use App\Models\System\Roles\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class RolePolicy
|
||||
{
|
||||
@@ -57,7 +56,7 @@ class RolePolicy
|
||||
])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
@@ -99,7 +98,7 @@ class UserPolicy
|
||||
if ($model->email === 'nurmuhammet@mail.com') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected $policies = [
|
||||
User::class => UserPolicy::class,
|
||||
|
||||
|
||||
Role::class => RolePolicy::class,
|
||||
Permission::class => PermissionPolicy::class,
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Nova\Events\ServingNova;
|
||||
use Laravel\Nova\Fields\Date;
|
||||
use Laravel\Nova\Fields\Field;
|
||||
use Laravel\Nova\Menu\Menu;
|
||||
use Laravel\Nova\Menu\MenuGroup;
|
||||
use Laravel\Nova\Menu\MenuItem;
|
||||
|
||||
2
lang/vendor/nova/tk.json
vendored
2
lang/vendor/nova/tk.json
vendored
@@ -198,7 +198,7 @@
|
||||
"Hong Kong": "Gonkong",
|
||||
"Hungary": "Wengriýa",
|
||||
"Iceland": "Islandiýa",
|
||||
"ID": "Şahsyýetnamasy",
|
||||
"ID": "ID",
|
||||
"If you did not request a password reset, no further action is required.": "Paroly täzeden dikeltmegi talap etmedik bolsaňyz, mundan başga çäre görülmeli däl.",
|
||||
"Impersonate": "Özüňi görkezmek",
|
||||
"Increase": "Köpeltmek",
|
||||
|
||||
Reference in New Issue
Block a user