|
@@ -290,11 +290,16 @@ class UserService
|
|
|
|
|
|
$user = Auth::user();
|
|
|
|
|
|
-
|
|
|
- $coach = CoachUser::create([
|
|
|
- 'user_id' => $user->id,
|
|
|
- 'state' => TechnicianStatus::PENDING->value,
|
|
|
- ]);
|
|
|
+
|
|
|
+ $coach = $user->coach;
|
|
|
+
|
|
|
+ if(!$coach){
|
|
|
+
|
|
|
+ $coach = CoachUser::create([
|
|
|
+ 'user_id' => $user->id,
|
|
|
+ 'state' => TechnicianStatus::PENDING->value,
|
|
|
+ ]);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$infoRecord = CoachInfoRecord::create([
|