Compare commits

..

3 Commits

Author SHA1 Message Date
85d3baa2c4 fix onfilixt 2026-05-17 15:15:17 +03:30
81401060b0 fix confilict 2026-05-17 14:48:07 +03:30
c994a3cbd0 create edit in profile controller foe expert and this dependency 2026-05-16 16:11:57 +03:30
148 changed files with 110 additions and 65 deletions

0
backend/.dockerignore Executable file → Normal file
View File

0
backend/.editorconfig Executable file → Normal file
View File

0
backend/.env.example Executable file → Normal file
View File

0
backend/.gitattributes vendored Executable file → Normal file
View File

0
backend/.gitignore vendored Executable file → Normal file
View File

0
backend/.npmrc Executable file → Normal file
View File

0
backend/Dockerfile Executable file → Normal file
View File

0
backend/Dockerfile.production Executable file → Normal file
View File

0
backend/README.md Executable file → Normal file
View File

0
backend/app/Admin/Controllers/AuthController.php Executable file → Normal file
View File

View File

View File

View File

1
backend/app/Admin/Controllers/ProfileController.php Executable file → Normal file
View File

@@ -53,4 +53,5 @@ class ProfileController extends Controller
return $this->successResponse();
}
}

View File

0
backend/app/Admin/Requests/Auth/LoginRequest.php Executable file → Normal file
View File

0
backend/app/Admin/Requests/Auth/RegisterRequest.php Executable file → Normal file
View File

View File

View File

View File

View File

View File

View File

9
backend/app/Admin/Requests/Profile/EditRequest.php Executable file → Normal file
View File

@@ -4,8 +4,6 @@ namespace App\Admin\Requests\Profile;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Validator;
class EditRequest extends FormRequest
{
@@ -24,13 +22,12 @@ class EditRequest extends FormRequest
*/
public function rules(): array
{
$user = $this->user();
return [
'username' => 'string|max:255',
'first_name' => 'required|string',
'last_name' => 'required|string',
'national_id' => 'required',
'first_name' => 'string',
'last_name' => 'string',
'email' => 'string|email|max:255',
'national_id' => 'string',
'phone_number' => 'string',
'province_id' => 'string',
'city_id' => 'string',

View File

View File

View File

View File

0
backend/app/Admin/Resources/ExpertResource.php Executable file → Normal file
View File

0
backend/app/Facades/DataTable/DataTable.php Executable file → Normal file
View File

0
backend/app/Facades/DataTable/DataTableFacade.php Executable file → Normal file
View File

0
backend/app/Facades/File/File.php Executable file → Normal file
View File

0
backend/app/Facades/File/FileFacade.php Executable file → Normal file
View File

0
backend/app/Http/Controllers/Controller.php Executable file → Normal file
View File

0
backend/app/Mail/LoginNotificationMail.php Executable file → Normal file
View File

0
backend/app/Models/City.php Executable file → Normal file
View File

0
backend/app/Models/Document.php Executable file → Normal file
View File

0
backend/app/Models/Expert.php Executable file → Normal file
View File

0
backend/app/Models/Province.php Executable file → Normal file
View File

View File

@@ -10,8 +10,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Hash;
use Laravel\Passport\Bridge\Client;
use Laravel\Passport\HasApiTokens;
#[Guarded(['id'])]
@@ -26,14 +24,4 @@ class User extends Authenticatable
{
return $this->morphToMany(Document::class, 'documentable');
}
public function validateForPassportPasswordGrant(string $password): bool
{
return Hash::check($password, $this->password);
}
public function findForPassport(string $username, Client $client): User
{
return $this->where('username', $username)->first();
}
}

View File

@@ -22,8 +22,6 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
Passport::enablePasswordGrant();
Passport::tokensExpireIn(CarbonInterval::minutes(1));
Passport::refreshTokensExpireIn(CarbonInterval::minutes(5));
Passport::personalAccessTokensExpireIn(CarbonInterval::minutes(1));
}
}

0
backend/app/Providers/DataTableServiceProvider.php Executable file → Normal file
View File

0
backend/app/Providers/FileServiceProvider.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/DataTableInput.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/DataTableService.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/Enums/DataType.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/Enums/SearchType.php Executable file → Normal file
View File

View File

View File

View File

0
backend/app/Services/DataTable/Filter/ApplyFilter.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/Filter/Filter.php Executable file → Normal file
View File

View File

View File

0
backend/app/Services/DataTable/Sort/ApplySort.php Executable file → Normal file
View File

0
backend/app/Services/DataTable/Sort/Sort.php Executable file → Normal file
View File

View File

View File

View File

0
backend/app/User/Controllers/AuthController.php Executable file → Normal file
View File

View File

@@ -0,0 +1,14 @@
<?php
namespace App\User\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ConfirmController extends Controller
{
public function index()
{
//
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\User\Controller\Dashboard;
use App\Http\Controllers\Controller;
use App\Traits\ApiResponse;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class DocumentationController extends Controller
{
use ApiResponse;
public function store(StoreRequest $request): jsonResponse
{
//
}
public function update(UpdateRequest $request): JsonResponse
{
//
}
}

12
backend/app/User/Controllers/ProfileController.php Executable file → Normal file
View File

@@ -24,7 +24,17 @@ class ProfileController extends Controller
{
$user = Auth::user();
$user->update($request->validated());
$user->update([
'first_name' => $request->first_name,
'last_name' => $request->last_name,
'national_id' => $request->national_id,
'address' => $request->address,
'postal_code' => $request->postal_code,
'phone_number' => $request->phone_number,
'province_id' => $request->province_id,
'city_id' => $request->city_id,
'status' => 1
]);
return $this->successResponse();
}

0
backend/app/User/Requests/Auth/LoginRequest.php Executable file → Normal file
View File

0
backend/app/User/Requests/Auth/RegisterRequest.php Executable file → Normal file
View File

View File

40
backend/app/User/Requests/Profile/EditRequest.php Executable file → Normal file
View File

@@ -4,8 +4,6 @@ namespace App\User\Requests\Profile;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Validator;
class EditRequest extends FormRequest
{
@@ -24,18 +22,10 @@ class EditRequest extends FormRequest
*/
public function rules(): array
{
$user = $this->user();
return [
'first_name' => [
Rule::prohibitedIf($user->kyc_status == 1), 'string',
],
'last_name' => [
Rule::prohibitedIf($user->kyc_status == 1), 'string',
],
'national_id' => [
Rule::prohibitedIf($user->kyc_status == 1), 'string',
],
'first_name' => 'required|string',
'last_name' => 'required|string',
'national_id' => 'required',
'address' => 'required',
'postal_code' => 'required',
'phone_number' => 'required',
@@ -43,28 +33,4 @@ class EditRequest extends FormRequest
'city_id' => 'required',
];
}
public function after(): array
{
return [
function (Validator $validator) {
$user = $this->user();
if ($user->kyc_status == 1) {
$lockedFields = [
'first_name',
'last_name',
'national_id',
];
foreach ($lockedFields as $field) {
if ($this->filled($field)) {
$validator->errors()->add(
$field,
'you cannot change this field.'
);
}
}
}
},
];
}
}

0
backend/app/User/Resources/UserResource.php Executable file → Normal file
View File

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Services\FIB;
namespace App\User\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Services\FIB;
namespace App\User\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Services\FIB;
namespace App\User\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Services\FIB;
namespace App\User\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Services\FIB;
namespace App\User\Services\FIB;
use Exception;
use Illuminate\Http\Client\ConnectionException;

0
backend/artisan Executable file → Normal file
View File

0
backend/bootstrap/providers.php Executable file → Normal file
View File

0
backend/composer.json Executable file → Normal file
View File

0
backend/composer.lock generated Executable file → Normal file
View File

0
backend/config/app.php Executable file → Normal file
View File

0
backend/config/cache.php Executable file → Normal file
View File

0
backend/config/database.php Executable file → Normal file
View File

0
backend/config/fib.php Executable file → Normal file
View File

0
backend/config/filesystems.php Executable file → Normal file
View File

0
backend/config/logging.php Executable file → Normal file
View File

0
backend/config/mail.php Executable file → Normal file
View File

0
backend/config/passport.php Executable file → Normal file
View File

0
backend/config/permission.php Executable file → Normal file
View File

0
backend/config/queue.php Executable file → Normal file
View File

0
backend/config/services.php Executable file → Normal file
View File

0
backend/database/.gitignore vendored Executable file → Normal file
View File

0
backend/database/factories/CityFactory.php Executable file → Normal file
View File

0
backend/database/factories/DocumentFactory.php Executable file → Normal file
View File

0
backend/database/factories/ExpertFactory.php Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More