live charts update added
110
app/Http/Controllers/ConsultantRequestFormController.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class ConsultantRequestFormController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('consultant.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$user = Auth::user();
|
||||
$state = $user->consultant_state;
|
||||
if ($state !== 'incomplete') {
|
||||
return redirect()->route('consultant_request.show', [$user]);
|
||||
}
|
||||
return view(
|
||||
'consultant.registration',
|
||||
[
|
||||
'user' => $user,
|
||||
'currentConsultantRegistrationState' => $state,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(User $user)
|
||||
{
|
||||
$requestData = $user->consultant_request;
|
||||
$medicalEducations = $requestData ? json_decode($requestData->completed_courses, true) : [];
|
||||
$certs = $user->attachments()->certs()->get();
|
||||
return view(
|
||||
'consultant.show',
|
||||
[
|
||||
'user' => $user,
|
||||
'currentConsultantRegistrationState' => $user->consultant_state,
|
||||
'medicalEducations' => $medicalEducations,
|
||||
'certPhotos' => $certs,
|
||||
'requestData' => $requestData,
|
||||
]
|
||||
);
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,6 @@ class DiaryController extends Controller
|
||||
/* $curDiary = Diary::find($id); */
|
||||
$daysCount = Diary::where('user_id', auth()->id())->count();
|
||||
return view('diary.show', ['curDiary' => $diary, 'daysCount' => $daysCount]);
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,8 +6,6 @@ use App\Models\UserDetailz;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Asantibanez\LivewireCharts\Models\LineChartModel;
|
||||
use Asantibanez\LivewireCharts\Models\AreaChartModel;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
@@ -18,59 +16,7 @@ class ProfileController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$user = Auth::user();
|
||||
$lastFourMisures = $user
|
||||
->circumference_measures()
|
||||
->orderBy('created_at', 'desc')
|
||||
->limit(4)
|
||||
->get()
|
||||
->sortBy('id');
|
||||
|
||||
$lastOneMisure = $user->circumference_measures()->get()->last();
|
||||
|
||||
$lineChartModel =
|
||||
(new LineChartModel())
|
||||
->setSmoothCurve()
|
||||
->multiLine()
|
||||
->setColors(['#b2df8a', '#1f78b4', '#e3a6a6']);
|
||||
|
||||
$lastFourMisures->each(
|
||||
function ($item, $key) use ($lineChartModel) {
|
||||
$createdAt = \Carbon\Carbon::parse($item['created_at'])->format('d.m.y');
|
||||
$lineChartModel->addSeriesPoint(__('chest'), $createdAt, $item['chest_circumference']);
|
||||
$lineChartModel->addSeriesPoint(__('waist'), $createdAt, $item['waist_circumference']);
|
||||
$lineChartModel->addSeriesPoint(__('hip'), $createdAt, $item['hip_circumference']);
|
||||
});
|
||||
|
||||
$areaChartModel =
|
||||
(new AreaChartModel())
|
||||
->setSmoothCurve()
|
||||
->setColors(['#b7d7e8']);
|
||||
|
||||
$lastFourWeightMisures = $user
|
||||
->weight_measures()
|
||||
->orderBy('created_at', 'desc')
|
||||
->limit(4)
|
||||
->get()
|
||||
->sortBy('id');
|
||||
|
||||
$lastFourWeightMisures->each(
|
||||
function ($item, $key) use ($areaChartModel) {
|
||||
$createdAt = \Carbon\Carbon::parse($item['created_at'])->format('d.m.y');
|
||||
$areaChartModel->addPoint($createdAt, $item['weight']);
|
||||
}
|
||||
);
|
||||
|
||||
return view(
|
||||
'profile.index',
|
||||
[
|
||||
'user' => $user,
|
||||
'lastFourMisures' => $lastFourMisures,
|
||||
'lastOneMisure' => $lastOneMisure,
|
||||
'lineChartModel' => $lineChartModel,
|
||||
'areaChartModel' => $areaChartModel,
|
||||
]
|
||||
);
|
||||
return view('profile.index', ['user' => Auth::user()]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,4 +181,5 @@ class UserDetailzController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
17
app/Http/Livewire/Consultant/ListConsultants.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Consultant;
|
||||
|
||||
use App\Models\ConsultantEducation;
|
||||
use Livewire\Component;
|
||||
|
||||
class ListConsultants extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view(
|
||||
'livewire.consultant.list-consultants',
|
||||
['consultantRequests' => ConsultantEducation::all()]
|
||||
);
|
||||
}
|
||||
}
|
||||
158
app/Http/Livewire/Consultant/RegistrationForm.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Consultant;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\ConsultantEducation;
|
||||
use App\Models\UserAttachment;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
|
||||
class RegistrationForm extends Component
|
||||
{
|
||||
use WithFileUploads;
|
||||
|
||||
public User $user;
|
||||
public $medicalEducations = [];
|
||||
public $vkLink = "";
|
||||
public $instagramLink = "";
|
||||
public $facebookLink = "";
|
||||
public $telegramLink = "";
|
||||
public $hasMedicalEducation = false;
|
||||
public $certPhotos = [];
|
||||
public $tmpCertPhotos = [];
|
||||
|
||||
protected $rules = [
|
||||
'medicalEducations.*.title' => 'required|string|min:6',
|
||||
'medicalEducations.*.date' => 'required|date',
|
||||
'vkLink' => 'required|url',
|
||||
'instagramLink' => 'required|url',
|
||||
'facebookLink' => 'required|url',
|
||||
'telegramLink' => 'required|url',
|
||||
'hasMedicalEducation' => 'required|boolean',
|
||||
'tmpCertPhotos.*' => 'image|max:4024'
|
||||
];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->user = Auth::user();
|
||||
$consultant_request = $this->user->consultant_request;
|
||||
if ($consultant_request) {
|
||||
$this->medicalEducations = json_decode($consultant_request->completed_courses, true);
|
||||
$this->vkLink = $consultant_request->vk_link;
|
||||
$this->instagramLink = $consultant_request->insta_link;
|
||||
$this->facebookLink= $consultant_request->fb_link;
|
||||
$this->telegramLink = $consultant_request->tg_link;
|
||||
$this->hasMedicalEducation = $consultant_request->has_medical_education;
|
||||
}
|
||||
|
||||
$photos = $this->user->attachments()->certs()->get();
|
||||
|
||||
if ($photos) {
|
||||
$this->certPhotos = collect($photos);
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.consultant.registration-form');
|
||||
}
|
||||
|
||||
public function addEducation()
|
||||
{
|
||||
$this->validate();
|
||||
$medicalEducations = $this->medicalEducations;
|
||||
$this->resetExcept(
|
||||
[
|
||||
'user',
|
||||
'vkLink',
|
||||
'instagramLink',
|
||||
'facebookLink',
|
||||
'telegramLink',
|
||||
'hasMedicalEducation',
|
||||
'certPhotos',
|
||||
'tmpCertPhotos'
|
||||
]
|
||||
);
|
||||
|
||||
$this->medicalEducations = $medicalEducations;
|
||||
}
|
||||
|
||||
public function remove($index)
|
||||
{
|
||||
$filteredEducations = array_filter(
|
||||
$this->medicalEducations,
|
||||
function($val, $key) use ($index) {
|
||||
return $key != $index;
|
||||
},
|
||||
ARRAY_FILTER_USE_BOTH
|
||||
);
|
||||
|
||||
$this->medicalEducations = array_values($filteredEducations);
|
||||
}
|
||||
|
||||
public function save()
|
||||
{
|
||||
$data = [
|
||||
'user_id' => $this->user->id,
|
||||
'completed_courses' => json_encode($this->medicalEducations),
|
||||
'vk_link' => $this->vkLink,
|
||||
'insta_link' => $this->instagramLink,
|
||||
'fb_link' => $this->facebookLink,
|
||||
'tg_link' => $this->telegramLink,
|
||||
'has_medical_education' => $this->hasMedicalEducation,
|
||||
'request_state' => 'created',
|
||||
];
|
||||
|
||||
$this->validate();
|
||||
|
||||
ConsultantEducation::updateOrCreate(
|
||||
[
|
||||
'user_id' => $this->user->id
|
||||
],
|
||||
$data
|
||||
);
|
||||
|
||||
/* $newConsultantRequest->save(); */
|
||||
|
||||
$attachmentGroup = "user_certs";
|
||||
|
||||
foreach($this->tmpCertPhotos as $photo) {
|
||||
$curCert = $photo->storePublicly("public/" . $attachmentGroup . "/" . $this->user->id);
|
||||
$fileData = [
|
||||
'user_id' => $this->user->id,
|
||||
'group' => $attachmentGroup,
|
||||
'original_name' => $photo->getClientOriginalName(),
|
||||
'size' => $photo->getSize(),
|
||||
];
|
||||
|
||||
$newFile = UserAttachment::updateOrCreate(
|
||||
$fileData,
|
||||
[
|
||||
'path' => preg_replace("/public\//xi", "/storage/", $curCert),
|
||||
'specs' => json_encode(
|
||||
[
|
||||
'ext' => $photo->extension(),
|
||||
'original_path' => $curCert,
|
||||
]
|
||||
)
|
||||
]
|
||||
);
|
||||
$newFile->save();
|
||||
$this->certPhotos = collect($this->user->attachments()->certs()->get());
|
||||
$this->reset('tmpCertPhotos');
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteImg($id)
|
||||
{
|
||||
$file = UserAttachment::find($id);
|
||||
$fileSpecs = json_decode($file->specs, true);
|
||||
Storage::delete($fileSpecs['original_path']);
|
||||
$file->delete();
|
||||
|
||||
$this->certPhotos = $this->certPhotos->whereNotIn('id', [$id]);
|
||||
}
|
||||
}
|
||||
66
app/Http/Livewire/Diary/MealPhotos.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Diary;
|
||||
|
||||
use App\Models\Meal;
|
||||
use App\Models\UserAttachment;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class MealPhotos extends Component
|
||||
{
|
||||
use WithFileUploads;
|
||||
|
||||
public Meal $meal;
|
||||
public $tmpMealPhotos = [];
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view(
|
||||
'livewire.diary.meal-photos',
|
||||
[
|
||||
'curMealPhotos' => $this->meal->photos
|
||||
],
|
||||
);
|
||||
}
|
||||
public function updatedTmpMealPhotos($values)
|
||||
{
|
||||
/* dd($values); */
|
||||
$newPhotos = collect($values)->take(3);
|
||||
$attachmentGroup = "meal_photos";
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
$filePath = $attachmentGroup . "/" . $userId . "/" . $this->meal->id;
|
||||
$publicFilePath = "public/" . $filePath;
|
||||
|
||||
foreach($newPhotos as $photo) {
|
||||
|
||||
$curPhoto = $photo
|
||||
->storePublicly($publicFilePath);
|
||||
|
||||
$fileData = [
|
||||
'user_id' => $userId,
|
||||
'group' => $attachmentGroup,
|
||||
'original_name' => $photo->getClientOriginalName(),
|
||||
'size' => $photo->getSize(),
|
||||
];
|
||||
|
||||
$newFile = UserAttachment::updateOrCreate(
|
||||
$fileData,
|
||||
[
|
||||
'path' => preg_replace("/public\//xi", "/storage/", $curPhoto),
|
||||
'specs' => json_encode(
|
||||
[
|
||||
'ext' => $photo->extension(),
|
||||
'original_path' => $curPhoto,
|
||||
]
|
||||
)
|
||||
]
|
||||
);
|
||||
$newFile->save();
|
||||
$this->meal->photos()->attach($newFile->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ class MealForm extends Component
|
||||
'portion' => 'required|min:1'
|
||||
];
|
||||
|
||||
protected $listeners = ['food-intake-updated' => '$refresh'];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->diary = Diary::find($this->diaryId);
|
||||
@@ -63,7 +65,23 @@ class MealForm extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.meal-form');
|
||||
$types = [0, 1, 2, 3, 4];
|
||||
$typeNames = ['Завтрак', 'Обед', 'Ужин', 'Ланч', 'Перекусы'];
|
||||
$typeCssIds = ['breakfast', 'dinner', 'supper', 'lunch', 'snacks'];
|
||||
|
||||
return view(
|
||||
'livewire.meal-form',
|
||||
[
|
||||
'types' => $types,
|
||||
'typeNames' => $typeNames,
|
||||
'typeCssIds' => $typeCssIds,
|
||||
'curMeal' => $this
|
||||
->diary
|
||||
->meals
|
||||
->where('type', $this->type)
|
||||
->first(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function setType(int $type): void
|
||||
@@ -113,6 +131,8 @@ class MealForm extends Component
|
||||
}
|
||||
}
|
||||
}
|
||||
/* $this->emit('food-intake-updated'); */
|
||||
$this->emitSelf('food-intake-updated');
|
||||
}
|
||||
|
||||
public function addPortion()
|
||||
@@ -142,12 +162,14 @@ class MealForm extends Component
|
||||
$this->delPortion($key, $item);
|
||||
$this->fill($filed);
|
||||
}
|
||||
|
||||
private function addPortionIfItFilled()
|
||||
{
|
||||
if (mb_strlen($this->product_name) && $this->quantity && mb_strlen($this->portion)) {
|
||||
$this->addPortion();
|
||||
}
|
||||
}
|
||||
|
||||
public function delPortion($key, $item)
|
||||
{
|
||||
if (isset($item['id'])) {
|
||||
|
||||
55
app/Http/Livewire/Profile/CircumferenceChart.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Profile;
|
||||
|
||||
use Livewire\Component;
|
||||
use App\Models\User;
|
||||
use Asantibanez\LivewireCharts\Models\LineChartModel;
|
||||
|
||||
class CircumferenceChart extends Component
|
||||
{
|
||||
public User $user;
|
||||
|
||||
protected $listeners = ['circumference-chart-updated' => '$refresh'];
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
||||
$lastOneMisure = $this
|
||||
->user
|
||||
->circumference_measures()
|
||||
->get()
|
||||
->last();
|
||||
|
||||
$lastFourMisures = $this
|
||||
->user
|
||||
->circumference_measures()
|
||||
->orderBy('created_at', 'desc')
|
||||
->limit(4)
|
||||
->get()
|
||||
->sortBy('id');
|
||||
|
||||
$lineChartModel =
|
||||
(new LineChartModel())
|
||||
->setSmoothCurve()
|
||||
->multiLine()
|
||||
->setColors(['#b2df8a', '#1f78b4', '#e3a6a6']);
|
||||
|
||||
$lastFourMisures->each(
|
||||
function ($item, $key) use ($lineChartModel) {
|
||||
$createdAt = \Carbon\Carbon::parse($item['created_at'])->format('d.m.y');
|
||||
$lineChartModel->addSeriesPoint(__('chest'), $createdAt, $item['chest_circumference']);
|
||||
$lineChartModel->addSeriesPoint(__('waist'), $createdAt, $item['waist_circumference']);
|
||||
$lineChartModel->addSeriesPoint(__('hip'), $createdAt, $item['hip_circumference']);
|
||||
});
|
||||
|
||||
return view(
|
||||
'livewire.profile.circumference-chart',
|
||||
[
|
||||
'user' => $this->user,
|
||||
'lineChartModel' => $lineChartModel,
|
||||
'lastOneMisure' => $lastOneMisure,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
44
app/Http/Livewire/Profile/WeightChart.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Profile;
|
||||
|
||||
use Livewire\Component;
|
||||
use App\Models\User;
|
||||
use Asantibanez\LivewireCharts\Models\AreaChartModel;
|
||||
|
||||
class WeightChart extends Component
|
||||
{
|
||||
public User $user;
|
||||
|
||||
protected $listeners = ['weight-chart-updated' => '$refresh'];
|
||||
|
||||
public function render()
|
||||
{
|
||||
$areaChartModel =
|
||||
(new AreaChartModel())
|
||||
->setSmoothCurve()
|
||||
->setColors(['#b7d7e8']);
|
||||
|
||||
$lastFourWeightMisures = $this->user
|
||||
->weight_measures()
|
||||
->orderBy('created_at', 'desc')
|
||||
->limit(4)
|
||||
->get()
|
||||
->sortBy('id');
|
||||
|
||||
$lastFourWeightMisures->each(
|
||||
function ($item, $key) use ($areaChartModel) {
|
||||
$createdAt = \Carbon\Carbon::parse($item['created_at'])->format('d.m.y');
|
||||
$areaChartModel->addPoint($createdAt, $item['weight']);
|
||||
}
|
||||
);
|
||||
|
||||
return view(
|
||||
'livewire.profile.weight-chart',
|
||||
[
|
||||
'user' => $this->user,
|
||||
'areaChartModel' => $areaChartModel,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class AddCircumference extends ModalComponent
|
||||
]);
|
||||
$newMeasure->save();
|
||||
$this->reset(['chest_circumference', 'waist_circumference', 'hip_circumference']);
|
||||
$this->emitTo('profile.circumference-chart', 'circumference-chart-updated');
|
||||
$this->closeModal();
|
||||
/* dd($newMeasure); */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,9 @@ class AddWeight extends ModalComponent
|
||||
]);
|
||||
$newMeasure->save();
|
||||
$this->reset(['weight']);
|
||||
|
||||
$this->emitTo('profile.weight-chart', 'weight-chart-updated');
|
||||
$this->closeModal();
|
||||
/* dd($newMeasure); */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
18
app/Models/ConsultantEducation.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ConsultantEducation extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\UserAttachment;
|
||||
|
||||
class Meal extends Model
|
||||
{
|
||||
@@ -26,4 +27,9 @@ class Meal extends Model
|
||||
{
|
||||
return $this->hasMany(Portion::class);
|
||||
}
|
||||
|
||||
public function photos()
|
||||
{
|
||||
return $this->belongsToMany(UserAttachment::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Auth\MustVerifyEmail as UserMustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Fortify\TwoFactorAuthenticatable;
|
||||
use Laravel\Jetstream\HasProfilePhoto;
|
||||
@@ -13,6 +14,8 @@ use Laravel\Sanctum\HasApiTokens;
|
||||
use App\Models\UserDetailz;
|
||||
use App\Models\CircumferenceMeasure;
|
||||
use App\Models\WeightMeasure;
|
||||
use App\Models\ConsultantEducation;
|
||||
use App\Models\UserAttachment;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
@@ -89,4 +92,21 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
return $this->hasMany(WeightMeasure::class);
|
||||
}
|
||||
|
||||
public function consultant_request()
|
||||
{
|
||||
return $this->hasOne(ConsultantEducation::class);
|
||||
}
|
||||
|
||||
public function attachments()
|
||||
{
|
||||
return $this->hasMany(UserAttachment::class);
|
||||
}
|
||||
|
||||
protected function consultantState(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn () => $this->consultant_request ? $this->consultant_request->request_state : 'incomplete',
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
29
app/Models/UserAttachment.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Meal;
|
||||
|
||||
class UserAttachment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function scopeCerts($query)
|
||||
{
|
||||
return $query->where('user_attachments.group', 'user_certs');
|
||||
}
|
||||
|
||||
public function meals()
|
||||
{
|
||||
return $this->belongsToMany(Meal::class);
|
||||
}
|
||||
}
|
||||
636
composer.lock
generated
@@ -33,6 +33,16 @@ return [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'permissions' => [
|
||||
'file' => [
|
||||
'public' => 0644,
|
||||
'private' => 0644,
|
||||
],
|
||||
'dir' => [
|
||||
'public' => 0755,
|
||||
'private' => 0755,
|
||||
],
|
||||
],
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
@@ -41,6 +51,16 @@ return [
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
'permissions' => [
|
||||
'file' => [
|
||||
'public' => 0644,
|
||||
'private' => 0644,
|
||||
],
|
||||
'dir' => [
|
||||
'public' => 0755,
|
||||
'private' => 0755,
|
||||
],
|
||||
],
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('consultant_education', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('user_id');
|
||||
$table->json('completed_courses');
|
||||
$table->boolean('has_medical_education')->default(false);
|
||||
$table->string('vk_link')->default('');
|
||||
$table->string('insta_link')->default('');
|
||||
$table->string('fb_link')->default('');
|
||||
$table->string('tg_link')->default('');
|
||||
$table->string('request_state')->default('');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('consultant_education');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_attachments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('user_id');
|
||||
$table->string('group')->default('user_files');
|
||||
$table->string('original_name');
|
||||
$table->string('path');
|
||||
$table->integer('size')->default(0);
|
||||
$table->json('specs');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_attachments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->boolean('is_consultant')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('is_consultant');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('meal_user_attachment', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('meal_id');
|
||||
$table->bigInteger('user_attachment_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('meal_user_attachment');
|
||||
}
|
||||
};
|
||||
11
lang/en/consultant_request.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'has_medical_education' => 'I have medical graduate',
|
||||
'photos_of_certs' => 'Certificates photos',
|
||||
'vk_link' => 'VKontakte profile',
|
||||
'insta_link' => 'Instagram profile',
|
||||
'fb_link' => 'Facebook profile',
|
||||
'tg_link' => 'Telegram profile',
|
||||
'consultant_registration' => 'Registration of consultant',
|
||||
];
|
||||
38
lang/en/profile.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'consultants' => 'Consultants',
|
||||
'blog' => 'Blog',
|
||||
'settings' => 'Settings',
|
||||
'plans_passed' => 'Plans passed',
|
||||
'blog_posts' => 'Blog posts',
|
||||
'views' => 'Views',
|
||||
'likes' => 'Likes',
|
||||
'circumference' => 'Circumference',
|
||||
'chest' => 'Chest',
|
||||
'waist' => 'Waist',
|
||||
'hips' => 'Hips',
|
||||
'weight' => 'Weight',
|
||||
'was' => 'Was',
|
||||
'became' => 'Became',
|
||||
'passed_plans' => 'Passed plans',
|
||||
'easy' => 'Easy',
|
||||
'moderate' => 'Moderate',
|
||||
'full' => 'Full',
|
||||
'done' => 'Done',
|
||||
'in_the_process' => 'In the process',
|
||||
'create_a_post' => 'Create a post',
|
||||
'all_posts' => 'ALL POSTS',
|
||||
'comment' => 'Comment',
|
||||
'like' => 'Like',
|
||||
'share' => 'Share',
|
||||
'change_photo' => 'change photo',
|
||||
'is_online' => 'Online',
|
||||
'is_offline' => 'Offline',
|
||||
'edit' => 'Edit',
|
||||
'is_consultant' => 'Consultant',
|
||||
'is_user' => 'User',
|
||||
'profile' => 'Profile',
|
||||
'user_data_for' => 'User data for',
|
||||
'become_a_consultant' => 'Become a consultant',
|
||||
];
|
||||
@@ -61,4 +61,8 @@ return [
|
||||
'optional_info' => 'Further information',
|
||||
'any_additional_info' => 'Enter any additional information you want',
|
||||
'complete' => 'COMPLETE',
|
||||
'consultant_title' => 'Become a consultant',
|
||||
'consultant_instruction_part1' => "To become a consultant, register as a user (if you haven't already)",
|
||||
'consultant_instruction_part2' => 'Go to the settings, at the bottom of the section click on "Become a Consultant".',
|
||||
'consultant_instruction_part3' => 'Fill out the form and wait for confirmation from our moderators',
|
||||
];
|
||||
|
||||
11
lang/ru/consultant_request.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'has_medical_education' => 'У меня есть медицинское образование',
|
||||
'photos_of_certs' => 'Фотокопии сертификатов',
|
||||
'vk_link' => 'Профиль во ВКонтакте',
|
||||
'insta_link' => 'Профиль в Instagram',
|
||||
'fb_link' => 'Профиль в Facebook',
|
||||
'tg_link' => 'Профиль в Telegram',
|
||||
'consultant_registration' => 'Регистрация консультанта',
|
||||
];
|
||||
38
lang/ru/profile.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'consultants' => 'Консультанты',
|
||||
'blog' => 'Блог',
|
||||
'settings' => 'Настройки',
|
||||
'plans_passed' => 'Планов пройдено',
|
||||
'blog_posts' => 'Записей в блоге',
|
||||
'views' => 'Просмотров',
|
||||
'likes' => 'Лайков',
|
||||
'circumference' => 'Обхват',
|
||||
'chest' => 'Грудь',
|
||||
'waist' => 'Талия',
|
||||
'hips' => 'Бедра',
|
||||
'weight' => 'Вес',
|
||||
'was' => 'Было',
|
||||
'became' => 'Стало',
|
||||
'passed_plans' => 'Пройденные планы',
|
||||
'easy' => 'Лёгкий',
|
||||
'moderate' => 'Умеренный',
|
||||
'full' => 'Полный',
|
||||
'done' => 'Готов',
|
||||
'in_the_process' => 'В процессе',
|
||||
'create_a_post' => 'Создать публикацию',
|
||||
'all_posts' => 'ВСЕ ПУБЛИКАЦИИ',
|
||||
'comment' => 'Комментировать',
|
||||
'like' => 'Нравится',
|
||||
'share' => 'Поделится',
|
||||
'change_photo' => 'сменить фото',
|
||||
'is_online' => 'В сети',
|
||||
'is_offline' => 'Нет на месте',
|
||||
'edit' => 'Редактировать',
|
||||
'is_consultant' => 'Консультант',
|
||||
'is_user' => 'Пользователь',
|
||||
'profile' => 'Профиль',
|
||||
'user_data_for' => 'Данные пользователя',
|
||||
'become_a_consultant' => 'Стать консультантом',
|
||||
];
|
||||
@@ -60,5 +60,9 @@ return [
|
||||
'step9_head' => 'Почти готово :)',
|
||||
'optional_info' => 'Дополнительная информация',
|
||||
'any_additional_info' => 'Введите здесь информацию которая, по вашему мнению, будет полезна для консультатна по питанию',
|
||||
'complete' => 'ЗАВЕРШИТЬ'
|
||||
'complete' => 'ЗАВЕРШИТЬ',
|
||||
'consultant_title' => 'Стать консультантом',
|
||||
'consultant_instruction_part1' => 'Чтобы стать консультантом, зарегистрируйтесь как пользователь (если еще не зарегистрированы)',
|
||||
'consultant_instruction_part2' => 'Перейдите в раздел настройки, внизу раздела нажмите на кнопку "Стать консультантом"',
|
||||
'consultant_instruction_part3' => 'Заполните форму и ожидайте подтверждения наших модераторов',
|
||||
];
|
||||
|
||||
7
public/css/bootstrap.rtl.min.css
vendored
@@ -13,6 +13,7 @@
|
||||
--main_ffamily: 'Mulish';
|
||||
--main_fcolor: #323F4B;
|
||||
--grey_color: #7B8794;
|
||||
--light_grey_color: #f0f2f5;
|
||||
--blue_color: #2F80ED;
|
||||
--light_blue_color: #B9D7FF;
|
||||
--white_fcolor: #fff;
|
||||
@@ -106,16 +107,9 @@ a {
|
||||
.--no_wrap_normal {
|
||||
white-space: normal;
|
||||
}
|
||||
.--is_edit {
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='13' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.5 19L15.25 4.25L20.25 9.25L5.5 24H0.5V19ZM24.125 5.375L21.6875 7.8125L16.6875 2.8125L19.125 0.375C19.375 0.125 19.6875 0 20.0625 0C20.4375 0 20.75 0.125 21 0.375L24.125 3.5C24.375 3.75 24.5 4.0625 24.5 4.4375C24.5 4.8125 24.375 5.125 24.125 5.375Z' fill='%23323F4B'/%3E%3C/svg%3E");
|
||||
background-position: calc(100% - 5px) calc(100% - 5px);
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 35px;
|
||||
padding-bottom: 35px;
|
||||
}
|
||||
|
||||
.--bg_white {
|
||||
background-color: var(--white_fcolor);
|
||||
background-color: var(--white_fcolor)!important;
|
||||
}
|
||||
|
||||
.--bg_note {
|
||||
@@ -138,6 +132,10 @@ a {
|
||||
background-color: var(--red_color);
|
||||
}
|
||||
|
||||
.bg_light_grey {
|
||||
background-color: var(--light_grey_color);
|
||||
}
|
||||
|
||||
.--shadow {
|
||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
@@ -296,7 +294,7 @@ hr {
|
||||
|
||||
.--arr_right:before,
|
||||
.--arr_right:after {
|
||||
left: -20px;
|
||||
left: -19px;
|
||||
top: calc(50% - 10px);
|
||||
border-right: 10px solid #fff;
|
||||
}
|
||||
@@ -304,7 +302,7 @@ hr {
|
||||
.--arr_top:before,
|
||||
.--arr_top:after {
|
||||
left: calc(50% - 10px);
|
||||
top: -20px;
|
||||
top: -19px;
|
||||
border-bottom: 10px solid #fff;
|
||||
}
|
||||
|
||||
@@ -420,6 +418,14 @@ hr {
|
||||
box-shadow: 0 0 0 0.15rem rgb(114 222 44);
|
||||
}
|
||||
|
||||
.--mw-100p {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.--mw-1170 {
|
||||
max-width: 1140px;
|
||||
}
|
||||
|
||||
.--mw-1000 {
|
||||
max-width: 1000px;
|
||||
}
|
||||
@@ -428,6 +434,18 @@ hr {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.--h_100 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.--h_90vh {
|
||||
height: 90vh;
|
||||
}
|
||||
|
||||
.--h_80vh {
|
||||
height: 80vh;
|
||||
}
|
||||
|
||||
.w-45 {
|
||||
width: 45%!important;
|
||||
}
|
||||
@@ -440,6 +458,14 @@ hr {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.--is_edit {
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.5 19L15.25 4.25L20.25 9.25L5.5 24H0.5V19ZM24.125 5.375L21.6875 7.8125L16.6875 2.8125L19.125 0.375C19.375 0.125 19.6875 0 20.0625 0C20.4375 0 20.75 0.125 21 0.375L24.125 3.5C24.375 3.75 24.5 4.0625 24.5 4.4375C24.5 4.8125 24.375 5.125 24.125 5.375Z' fill='%23323F4B'/%3E%3C/svg%3E");
|
||||
background-position: calc(100% - 5px) calc(100% - 5px);
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 35px;
|
||||
padding-bottom: 35px;
|
||||
}
|
||||
|
||||
header,
|
||||
#TopMenu a {
|
||||
position: relative;
|
||||
@@ -797,6 +823,148 @@ ul.checks li:before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
|
||||
.--z_search {
|
||||
padding-left: 2.8em;
|
||||
background-color: var(--light_grey_color);
|
||||
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICA8cGF0aCBkPSJNOSAxN0MxMy40MTgzIDE3IDE3IDEzLjQxODMgMTcgOUMxNyA0LjU4MTcyIDEzLjQxODMgMSA5IDFDNC41ODE3MiAxIDEgNC41ODE3MiAxIDlDMSAxMy40MTgzIDQuNTgxNzIgMTcgOSAxN1oiIHN0cm9rZT0iIzdCODc5NCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCiAgICA8cGF0aCBkPSJNMTguOTk5OSAxOC45OTk5TDE0LjY0OTkgMTQuNjQ5OSIgc3Ryb2tlPSIjN0I4Nzk0IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPC9zdmc+");
|
||||
background-repeat: no-repeat;
|
||||
background-position: .8em center;
|
||||
}
|
||||
|
||||
#chatList .--z_search {
|
||||
width: calc(100% - 1rem);
|
||||
}
|
||||
|
||||
#chatList .contacts_block,
|
||||
#chatBlock .messages_container {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#chatList .contacts_block {
|
||||
height: calc(100% - 3.85rem);
|
||||
}
|
||||
|
||||
#chatList .contacts_block::-webkit-scrollbar,
|
||||
#chatBlock .messages_container::-webkit-scrollbar {width:6px;}
|
||||
|
||||
#chatList .contacts_block::-webkit-scrollbar-track,
|
||||
#chatBlock .messages_container::-webkit-scrollbar-track {background-color:transparent;}
|
||||
|
||||
#chatList .contacts_block::-webkit-scrollbar-thumb,
|
||||
#chatBlock .messages_container::-webkit-scrollbar-thumb {background-color:var(--blue_color);border-radius:3px;}
|
||||
|
||||
#chatList .contacts_block::-webkit-scrollbar-thumb:hover,
|
||||
#chatBlock .messages_container::-webkit-scrollbar-thumb:hover {background-color:#4a8fec}
|
||||
|
||||
#chatList .--item {
|
||||
cursor: pointer;
|
||||
background-color: #f6faff;
|
||||
transition: background-color .3s;
|
||||
}
|
||||
|
||||
#chatList .--item:hover {
|
||||
background-color: var(--light_grey_color);
|
||||
}
|
||||
|
||||
#chatList .--item.--active {
|
||||
background-color: #2f80ed;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#chatList .--item.--active,
|
||||
#chatList .--item.--active .--f_grey {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#chatList .--item .-emj {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#chatBlock {
|
||||
padding-top: 75px!important;
|
||||
padding-bottom: 67px!important;
|
||||
}
|
||||
|
||||
#chatBlock .chat_top_pannel,
|
||||
#chatBlock .chat_bottom_panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#chatBlock .chat_top_pannel {
|
||||
height: fit-content;
|
||||
top: 0;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
}
|
||||
|
||||
#chatBlock .dropdown-menu .dropdown-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
#chatBlock > hr {
|
||||
margin-left: -1rem;
|
||||
margin-right: -1rem;
|
||||
background: #f1f1f2;
|
||||
}
|
||||
|
||||
#chatBlock .--message p,
|
||||
#chatBlock .--message .--comment {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
#chatBlock .--message .--comment {
|
||||
margin-top: .5rem;
|
||||
padding-left: 8px;
|
||||
border-left: 2px solid #E6E6E6;
|
||||
}
|
||||
|
||||
#chatBlock .--message img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#chatBlock .chat_plan {
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
#chatBlock .chat_plan .plan_img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
#chatBlock .chat_bottom_panel {
|
||||
background-color: #f6faff;
|
||||
border-top: 1px solid #f3f3f3;
|
||||
}
|
||||
|
||||
#chatBlock .chat_top_pannel button,
|
||||
#chatBlock .chat_bottom_panel button {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#chatBlock .chat_bottom_panel textarea {
|
||||
height: 50px;
|
||||
min-height: 50px;
|
||||
max-height: 150px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
#chatList .contacts_block img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
#calendar .fl-col {
|
||||
width: calc(15% - 6px);
|
||||
margin: 0 0 -1px -1px;
|
||||
@@ -1019,6 +1187,56 @@ footer ul.--menu li {
|
||||
#calendar .badge:not(.--start_finish) {
|
||||
float: none;
|
||||
}
|
||||
#main {
|
||||
height: auto!important;
|
||||
}
|
||||
#main.--active #chatList {
|
||||
left: 0;
|
||||
}
|
||||
#main:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(24, 119, 242, 0.5);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
#main:after,
|
||||
#chatList {
|
||||
transition: all .3s ease;
|
||||
}
|
||||
#main.--active:after {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
#chatList,
|
||||
#chatBlock {
|
||||
height: 100vh;
|
||||
border-radius: 0;
|
||||
}
|
||||
#chatList {
|
||||
position: absolute!important;
|
||||
z-index: 1;
|
||||
height: 100%;
|
||||
left: -100%;
|
||||
}
|
||||
#chatBlock .messages_container {
|
||||
background-color: #f6faff;
|
||||
}
|
||||
#chatBlock .messages_container > div > img {
|
||||
display: none;
|
||||
}
|
||||
#chatBlock .messages_container .--message {
|
||||
padding: .85rem;
|
||||
background-color: #fff;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
@@ -1035,67 +1253,7 @@ footer ul.--menu li {
|
||||
}
|
||||
}
|
||||
|
||||
.animate-spin {
|
||||
animation: spin 1s linear infinite
|
||||
.meal-photos-container img {
|
||||
width: 100px;
|
||||
height: 64px;
|
||||
}
|
||||
label.error_password {
|
||||
padding-top: 3px;
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
}
|
||||
label.error, label.error::placeholder {
|
||||
padding-top: 3px;
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
input.error {
|
||||
border-color: red;
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.25rem rgb(197 62 112 / 25%);
|
||||
}
|
||||
|
||||
.fl-col a {
|
||||
color: var(--main_fcolor);
|
||||
font-family: var(--main_ffamily);
|
||||
}
|
||||
|
||||
#calendar .fl-col-text .--day_num:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
.bg-cover {
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
.bg-center {
|
||||
background-position: 50%
|
||||
}
|
||||
|
||||
.bg-no-repeat {
|
||||
background-repeat: no-repeat
|
||||
}
|
||||
.w-20 {
|
||||
width: 5rem
|
||||
}
|
||||
.h-20 {
|
||||
height: 5rem
|
||||
}
|
||||
.w-32 {
|
||||
width: 8rem
|
||||
}
|
||||
.h-32 {
|
||||
height: 8rem
|
||||
}
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
.rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
3
public/img/add_plus.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.8125 0C7.29375 0 6.78125 0.05 6.29063 0.15L6.89687 3.2125C7.19851 3.15359 7.50517 3.12428 7.8125 3.125H9.24375V0H7.8125ZM14.975 0H12.1094V3.125H14.975V0ZM20.7031 0H17.8375V3.125H20.7031V0ZM26.4313 0H23.5687V3.125H26.4313V0ZM32.1625 0H29.2969V3.125H32.1625V0ZM37.8906 0H35.025V3.125H37.8906V0ZM42.1875 0H40.7562V3.125H42.1875C42.5 3.125 42.8094 3.15625 43.1031 3.21563L43.7094 0.15C43.2082 0.0505495 42.6985 0.000310783 42.1875 0V0ZM48.6844 3.46875C48.1132 2.61704 47.3807 1.88554 46.5281 1.31562L44.7906 3.9125C45.3031 4.25625 45.7438 4.69688 46.0875 5.20938L48.6813 3.47187L48.6844 3.46875ZM3.46875 1.31562C2.61704 1.88678 1.88554 2.61934 1.31562 3.47187L3.9125 5.20938C4.25625 4.69688 4.69688 4.25625 5.20938 3.9125L3.46875 1.31875V1.31562ZM50 7.8125C50 7.29375 49.95 6.78125 49.85 6.29063L46.7875 6.89687C46.8438 7.19063 46.875 7.49687 46.875 7.8125V9.24375H50V7.8125ZM0.15 6.29063C0.0505495 6.79182 0.000310783 7.30153 0 7.8125L0 9.24375H3.125V7.8125C3.125 7.5 3.15625 7.19063 3.21563 6.89687L0.15 6.29063ZM0 12.1094V14.975H3.125V12.1094H0ZM50 14.975V12.1094H46.875V14.975H50ZM0 17.8375V20.7031H3.125V17.8375H0ZM50 20.7031V17.8375H46.875V20.7031H50ZM0 23.5687V26.4313H3.125V23.5687H0ZM46.875 26.4313H50V23.5687H46.875V26.4313ZM0 29.2969V32.1625H3.125V29.2969H0ZM50 32.1625V29.2969H46.875V32.1625H50ZM0 35.025V37.8906H3.125V35.025H0ZM50 37.8906V35.025H46.875V37.8906H50ZM0 40.7562V42.1875C0 42.7062 0.05 43.2188 0.15 43.7094L3.2125 43.1031C3.15359 42.8015 3.12428 42.4948 3.125 42.1875V40.7562H0ZM50 42.1875V40.7562H46.875V42.1875C46.875 42.5 46.8438 42.8094 46.7844 43.1031L49.85 43.7094C49.95 43.2156 50 42.7094 50 42.1875ZM1.31562 46.5312C1.8875 47.3813 2.61875 48.1125 3.47187 48.6844L5.20938 46.0875C4.69642 45.7442 4.25581 45.3036 3.9125 44.7906L1.31875 46.5281L1.31562 46.5312ZM46.5312 48.6844C47.3813 48.1125 48.1125 47.3812 48.6844 46.5281L46.0875 44.7906C45.7438 45.3031 45.3031 45.7438 44.7906 46.0875L46.5281 48.6813L46.5312 48.6844ZM6.29063 49.85C6.78438 49.95 7.29063 50 7.8125 50H9.24375V46.875H7.8125C7.5 46.875 7.19063 46.8438 6.89687 46.7844L6.29063 49.85ZM42.1875 50C42.7062 50 43.2188 49.95 43.7094 49.85L43.1031 46.7875C42.8015 46.8464 42.4948 46.8757 42.1875 46.875H40.7562V50H42.1875ZM12.1094 50H14.975V46.875H12.1094V50ZM17.8375 50H20.7031V46.875H17.8375V50ZM23.5687 46.875V50H26.4313V46.875H23.5687ZM29.2969 50H32.1625V46.875H29.2969V50ZM35.025 50H37.8906V46.875H35.025V50ZM26.5625 14.0625C26.5625 13.6481 26.3979 13.2507 26.1049 12.9576C25.8118 12.6646 25.4144 12.5 25 12.5C24.5856 12.5 24.1882 12.6646 23.8951 12.9576C23.6021 13.2507 23.4375 13.6481 23.4375 14.0625V23.4375H14.0625C13.6481 23.4375 13.2507 23.6021 12.9576 23.8951C12.6646 24.1882 12.5 24.5856 12.5 25C12.5 25.4144 12.6646 25.8118 12.9576 26.1049C13.2507 26.3979 13.6481 26.5625 14.0625 26.5625H23.4375V35.9375C23.4375 36.3519 23.6021 36.7493 23.8951 37.0424C24.1882 37.3354 24.5856 37.5 25 37.5C25.4144 37.5 25.8118 37.3354 26.1049 37.0424C26.3979 36.7493 26.5625 36.3519 26.5625 35.9375V26.5625H35.9375C36.3519 26.5625 36.7493 26.3979 37.0424 26.1049C37.3354 25.8118 37.5 25.4144 37.5 25C37.5 24.5856 37.3354 24.1882 37.0424 23.8951C36.7493 23.6021 36.3519 23.4375 35.9375 23.4375H26.5625V14.0625Z" fill="#7B8794"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
60
public/img/blanc_pic.svg
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="100"
|
||||
height="64"
|
||||
viewBox="0 0 100 64"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="default.svg"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs12" />
|
||||
<sodipodi:namedview
|
||||
id="namedview10"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.0934854"
|
||||
inkscape:cx="-5.4965385"
|
||||
inkscape:cy="51.545317"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="966"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg8" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="m 4.3035335,10.306499 c 0,-1.0891819 1.6920529,-1.972137 3.7793082,-1.972137 H 91.227614 c 2.087311,0 3.779308,0.8829551 3.779308,1.972137 v 43.387002 c 0,1.089211 -1.691997,1.972137 -3.779308,1.972137 H 8.0828417 c -2.0872553,0 -3.7793082,-0.882926 -3.7793082,-1.972137 z"
|
||||
stroke="#acccf8"
|
||||
stroke-width="2.73007"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path2" />
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="m 22.667,26.6667 c 2.2091,0 4,-1.7908 4,-4 0,-2.2091 -1.7909,-4 -4,-4 -2.2091,0 -4,1.7909 -4,4 0,2.2092 1.7909,4 4,4 z"
|
||||
stroke="#acccf8"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path4" />
|
||||
<path
|
||||
d="M 93.709355,40.0001 68.591638,26.6667 13.333,56.0001"
|
||||
stroke="#acccf8"
|
||||
stroke-width="2.74505"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
id="path6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 120 KiB |
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js?id=61bc5ee37517ea84ed7e5224dcfca15c",
|
||||
"/css/app.css": "/css/app.css?id=81fdb40f7ac557297537184cf6593829"
|
||||
"/css/app.css": "/css/app.css?id=41eb9e82e4c72a0d4b068e64ea20aa44"
|
||||
}
|
||||
|
||||
8
resources/views/consultant/index.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@extends('layouts/eatvio')
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<livewire:consultant.list-consultants />
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
28
resources/views/consultant/registration.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layouts/eatvio')
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('profile.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">{{ __('profile.profile') }}</span></a>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="text-end me-2">
|
||||
<small><a href="{{ route('profile.index') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small class="py-1">{{ $user->is_consultant ? __('profile.is_consultant') : __('profile.is_user') }}</small>
|
||||
</div>
|
||||
<a href="{{ route('profile.index') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px" class="profile_image" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<div class="d-flex px-md-5 justify-content-between align-items-center flex-wrap flex-lg-nowrap flex-column-reverse flex-lg-row overflow-x-xs-scroll">
|
||||
<h3>{{ __('consultant_request.consultant_registration') }}: {{ $user->name }}</h3>
|
||||
<span @class(
|
||||
[
|
||||
'badge',
|
||||
'bg-info text-dark' => $currentConsultantRegistrationState == 'created',
|
||||
'bg-secondary' => $currentConsultantRegistrationState == 'incomplite',
|
||||
]
|
||||
)> {{ $currentConsultantRegistrationState ?? "" }} </span>
|
||||
</div>
|
||||
<livewire:consultant.registration-form :user="$user">
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
85
resources/views/consultant/show.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
@extends('layouts/eatvio')
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('profile.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">{{ __('profile.profile') }}</span></a>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="text-end me-2">
|
||||
<small><a href="{{ route('profile.index') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small class="py-1">{{ $user->is_consultant ? __('profile.is_consultant') : __('profile.is_user') }}</small>
|
||||
</div>
|
||||
<a href="{{ route('profile.index') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px" class="profile_image" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<div class="d-flex px-md-5 justify-content-between align-items-center flex-wrap flex-lg-nowrap flex-column-reverse flex-lg-row overflow-x-xs-scroll">
|
||||
<h3>{{ __('consultant_request.consultant_registration') }}: {{ $user->name }}</h3>
|
||||
<span @class(
|
||||
[
|
||||
'badge',
|
||||
'bg-info text-dark' => $currentConsultantRegistrationState == 'created',
|
||||
'bg-secondary' => $currentConsultantRegistrationState == 'incomplite',
|
||||
]
|
||||
)> {{ $currentConsultantRegistrationState ?? "" }} </span>
|
||||
</div>
|
||||
@php
|
||||
$defaultIndex = 0;
|
||||
@endphp
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
@if($medicalEducations)
|
||||
<h4> Gradusctions </h4>
|
||||
<div class="row h5">
|
||||
<div class="col-sm-4 col-lg-8">
|
||||
<span class="ml-3">Title</span>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<span class="ml-1">Completion date</span>
|
||||
</div>
|
||||
</div>
|
||||
@foreach($medicalEducations as $index => $medicalEducation)
|
||||
<div class="row" wire:key="post-field-{{ $index }}">
|
||||
<div class="col-sm-4 col-lg-8">
|
||||
<span class="ml-3">{{ $medicalEducation['title'] ?? '' }}</span>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<span class="ml-1">{{ $medicalEducation['date'] ?? '' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@if($certPhotos)
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<h4> Certificates photos </h4>
|
||||
<div class="row mt-3">
|
||||
@foreach($certPhotos as $photo)
|
||||
<div class="col-3 cert-img-parent">
|
||||
<img class="certs-imgs" src="{{ $photo["path"] }}" />
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<h4> Social networks </h4>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<a href="{{ $requestData->vk_link }}" class="w-50 me-3 btn btn-lg btn-primary btn-block w-100 --f_bolder" target="_blank">VK</a>
|
||||
<a href="{{ $requestData->insta_link }}" class="w-50 btn btn-lg btn-primary btn-block w-100 --f_bolder" target="_blank">INSTARGRAM</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a href="{{ $requestData->fb_link }}" class="w-50 me-3 btn btn-lg btn-primary btn-block w-100 --f_bolder" target="_blank">FACEBOOK</a>
|
||||
<a href="{{ $requestData->tg_link }}" class="w-50 btn btn-lg btn-primary btn-block w-100 --f_bolder" target="_blank">TELEGRAM</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<div class="container p-0 --mw-130 mt-3">
|
||||
<button wire:click.prevent="save" class="btn btn-lg btn-primary btn-block w-100 --f_bolder disabled:opacity-50" type="button">
|
||||
<span wire:loading="" wire:target="save" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
<span>{{ __('profile.done') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@@ -5,8 +5,8 @@
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('calendar.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Календарь</span></a>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">{{ $daysCount }} День</div>
|
||||
<div class="--f_blue">{{ $curDiary->date }}</div>
|
||||
<div class="--f_bolder"><a class="link-dark" href="{{ route('calendar.index') }}">{{ $daysCount }} День</a></div>
|
||||
<div class="--f_blue"><a href="{{ route('calendar.index') }}">{{ $curDiary->date }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="{{ route('diary.update', $curDiary) }}">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('calendar.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Календарь</span></a>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">{{ $daysCount }} День</div>
|
||||
<div class="--f_bolder"><a class="link-dark" href="{{ route('calendar.index') }}">{{ $daysCount }} День</a></div>
|
||||
<div class="--f_blue">{{ $curDiary->date }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,7 @@ $currentLocale = LaravelLocalization::getCurrentLocale();
|
||||
</button>
|
||||
</div>
|
||||
<div class="text-center my-3">
|
||||
<a href="#" class="text-uppercase --f_bolder" style="color:var(--main_fcolor)">{{ __('auth.anhor_i_am_consultant') }}</a>
|
||||
<a href="#" data-bs-toggle="modal" data-bs-target="#consultantModal" class="text-uppercase --f_bolder" style="color:var(--main_fcolor)">{{ __('auth.anhor_i_am_consultant') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -280,6 +280,26 @@ $currentLocale = LaravelLocalization::getCurrentLocale();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" id="consultantModal" area-hidden="true" tabindex="-1" aria-labelledby="consultantModalTitle">
|
||||
<div class="modal-dialog p-0 --popup_style --b_radius">
|
||||
<div class="modal-content">
|
||||
<div class="p-3">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title --medium_title" id="consultantModalTitle">{{ __('reg_form.consultant_title') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ __('reg_form.consultant_instruction_part1') }}</p>
|
||||
<p>{{ __('reg_form.consultant_instruction_part2') }}</p>
|
||||
<p>{{ __('reg_form.consultant_instruction_part3') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<footer>
|
||||
<div class="container --mw-1000 py-5 --f_bold">
|
||||
@@ -310,6 +330,9 @@ $currentLocale = LaravelLocalization::getCurrentLocale();
|
||||
const regModal = document.getElementById('regModal'),
|
||||
regFormModal = new bootstrap.Modal(regModal, {});
|
||||
|
||||
const consultantModal = document.getElementById('consultantModal'),
|
||||
consultantFormModal = new bootstrap.Modal(consultantModal, {});
|
||||
|
||||
$(document).ready(() => {
|
||||
const regTitle = $(regModal).find('.modal-title'),
|
||||
close = $(regModal).find('.close'),
|
||||
@@ -317,6 +340,8 @@ $(document).ready(() => {
|
||||
prgrssbar = $('.progress-bar', progress),
|
||||
steps = $('#registrationSteps'),
|
||||
stepsCnt = 10;
|
||||
const consultantTitle = $(consultantModal).find('.modal'),
|
||||
consultantClose = $(consultantModal).find('.close');
|
||||
|
||||
// https://github.com/rstaib/jquery-steps/wiki/Settings
|
||||
steps.steps({
|
||||
@@ -343,6 +368,7 @@ $(document).ready(() => {
|
||||
// http://t1m0n.name/air-datepicker/docs/index-ru.html
|
||||
regModal.addEventListener('shown.bs.modal', (e) => { $('#birthdate').datepicker() });
|
||||
close.bind('click', () => { regFormModal.hide() });
|
||||
consultantClose.bind('click', () => { consultantFormModal.hide() });
|
||||
{{-- regFormModal.show(); --}}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<div>
|
||||
@if($consultantRequests)
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">user id</th>
|
||||
<th scope="col">medical edu</th>
|
||||
<th scope="col">state</th>
|
||||
<th scope="col">last update</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($consultantRequests as $consultantRequest)
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<a href="{{ route('consultant_request.show', $consultantRequest->user) }}">
|
||||
{{ $consultantRequest->id }}
|
||||
</a>
|
||||
</th>
|
||||
<td>{{ $consultantRequest->user->name }}</td>
|
||||
<td>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
value=""
|
||||
id="flexCheckCheckedDisabled"
|
||||
@checked($consultantRequest->has_medical_education)
|
||||
disabled />
|
||||
</td>
|
||||
<td>
|
||||
@if ($consultantRequest->request_state === 'created')
|
||||
<span
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800 bg-info">
|
||||
{{ $consultantRequest->request_state }}
|
||||
</span>
|
||||
@else
|
||||
<span
|
||||
class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-red-100 text-red-800">
|
||||
{{ $consultantRequest->request_state }}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $consultantRequest->updated_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
103
resources/views/livewire/consultant/registration-form.blade.php
Normal file
@@ -0,0 +1,103 @@
|
||||
@php
|
||||
$defaultIndex = 0;
|
||||
@endphp
|
||||
<div class="mt-3">
|
||||
<div class="" id="pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="pills-0" role="tabpanel" aria-labelledby="pills-0-tab">
|
||||
<form class="form-signin" name='init_registration' method="post" >
|
||||
@if($medicalEducations)
|
||||
@foreach($medicalEducations as $index => $medicalEducation)
|
||||
<div class="row" wire:key="post-field-{{ $index }}">
|
||||
<div class="col-sm-4 col-lg-8">
|
||||
<span class="ml-3">{{ $medicalEducation['title'] ?? '' }}</span>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<span class="ml-1">{{ $medicalEducation['date'] ?? '' }}</span>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-1">
|
||||
<button class="btn btn-outline-danger" wire:click.prevent="remove({{ $index }})">x</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@php
|
||||
$index = isset($index) ? $index + 1 : $defaultIndex;
|
||||
@endphp
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-lg-8">
|
||||
<input type="text" wire:model.defer="medicalEducations.{{ $index }}.title" id="inputMedicalEducation{{ $index }}" name="medicalEductaion" class="form-control my-3" placeholder="Education">
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<input type="date" id="birthdate{{ $index }}" wire:model.defer="medicalEducations.{{ $index }}.date" name="dateOfMedicalEducationComplition" data-date-format="yyyy-mm-dd" class="form-control my-3 text-center --f_bold" required="" autocomplete="off">
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-1">
|
||||
<button wire:click.prevent="addEducation" class="btn btn-lg btn-primary btn-block --f_bolder disabled:opacity-50 my-3" type="button">
|
||||
<span wire:loading="" wire:target="addEducation" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label for="certPhotos" class="h5 ml-1">{{ __('consultant_request.photos_of_certs') }}</label>
|
||||
<input type="file" wire:model="tmpCertPhotos" accept="image/*" name="certPhotos" class="form-control mb-3" multiple />
|
||||
</div>
|
||||
@foreach($certPhotos as $photo)
|
||||
<div class="col-2 cert-img-parent">
|
||||
<button wire:click.prevent="deleteImg('{{ $photo["id"] }}')">x</button>
|
||||
<img class="certs-imgs" src="{{ $photo["path"] }}" />
|
||||
</div>
|
||||
@endforeach
|
||||
@foreach($tmpCertPhotos as $photo)
|
||||
<div class="col-2"><img class="certs-imgs" src="{{ $photo->temporaryUrl() }}" /></div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div>
|
||||
<label for="vkLink" class="h5 ml-1">{{ __('consultant_request.vk_link') }} @error('vkLink')<div class="alert alert-danger">{{ $message }}</div>@enderror</label>
|
||||
<input type="url" wire:model.defer="vkLink" name="vkLink" class="form-control mb-3" placeholder="https://vk.com/username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label for="instagramLink" class="h5 ml-1">{{ __('consultant_request.insta_link') }} @error('instagramLink')<div class="alert alert-danger">{{ $message }}</div>@enderror</label>
|
||||
<input type="url" wire:model.defer="instagramLink" name="instagramLink" class="form-control mb-3" placeholder="https://www.instagram.com/username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label for="facebookLink" class="h5 ml-1">{{ __('consultant_request.fb_link') }} @error('facebookLink')<div class="alert alert-danger">{{ $message }}</div>@enderror</label>
|
||||
<input type="url" wire:model.defer="facebookLink" name="facebookLink" class="form-control mb-3" placeholder="https://www.facebook.com/username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<label for="telegramLink" class="h5 ml-1">{{ __('consultant_request.tg_link') }} @error('telegramLink')<div class="alert alert-danger">{{ $message }}</div>@enderror</label>
|
||||
<input type="url" wire:model.defer="telegramLink" name="telegramLink" class="form-control mb-3" placeholder="https://t.me/@username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div>
|
||||
<label for="hasMedicalEducation" class="h5 ml-1">{{ __('consultant_request.has_medical_education') }}</label>
|
||||
<input type="checkbox" wire:model.defer="hasMedicalEducation" name="hasMedicalEducation" class="mb-1 ml-2" >
|
||||
</div>
|
||||
</div>
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="container p-0 --mw-130">
|
||||
<button wire:click.prevent="save" class="btn btn-lg btn-primary btn-block w-100 --f_bolder disabled:opacity-50" type="button">
|
||||
<span wire:loading="" wire:target="save" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
||||
<span>{{ __('profile.done') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
24
resources/views/livewire/diary/meal-photos.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="d-flex w-md-50 ms-lg-4 align-items-center meal-photos-container" x-data>
|
||||
<input type="file" wire:model="tmpMealPhotos" accept="image/*" x-ref="MealPhotos" name="mealPhotos" class="hidden" multiple />
|
||||
|
||||
@php $previews = collect($tmpMealPhotos)->take(3); @endphp
|
||||
|
||||
@foreach($previews as $tmpPhoto)
|
||||
<img width="100" height="67" src="{{ $tmpPhoto->temporaryUrl() }}">
|
||||
@endforeach
|
||||
|
||||
@if(count($curMealPhotos) > 0)
|
||||
@foreach($curMealPhotos as $photo)
|
||||
<img width="100" height="67" src="{{ $photo->path }}" />
|
||||
@endforeach
|
||||
@else
|
||||
<img src="/img/blanc_pic.svg" >
|
||||
@endif
|
||||
{{-- @php dump($tmpMealPhotos) @endphp --}}
|
||||
@if(count($curMealPhotos) < 3 )
|
||||
<button x-on:click.prevent="$refs.MealPhotos.click()" type="button">
|
||||
<img src="/img/add_plus.svg" />
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
@php
|
||||
$types = [0, 1, 2, 3, 4];
|
||||
$typeNames = ['Завтрак', 'Обед', 'Ужин', 'Ланч', 'Перекусы'];
|
||||
$typeCssIds = ['breakfast', 'dinner', 'supper', 'lunch', 'snacks']
|
||||
@endphp
|
||||
<div class="container mb-4 py-3 overflow-hidden --bg_white --shadow --radius --mw-1000" data-diary-id={{ $diaryId }}>
|
||||
<div class="d-flex px-md-5 justify-content-between align-items-center flex-wrap flex-lg-nowrap flex-column-reverse flex-lg-row overflow-x-xs-scroll">
|
||||
<ul class="nav nav-pills flex-nowrap --bordered --radius --tabs_blue" id="pills-tab" role="tablist">
|
||||
@@ -38,8 +33,10 @@
|
||||
</div>
|
||||
<div class="my-3 px-md-5">
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
@foreach($types as $curType)
|
||||
<div wire:key="portion-edit-{{ $curType }}" @class(['tab-pane','fade','show' => ($type == $curType), 'active' => ($type == $curType )]) id="pills-{{ $curType }}" role="tabpanel" aria-labelledby="pills-{{ $curType }}-tab">
|
||||
@php $curType = $type @endphp
|
||||
{{-- @foreach($types as $curType) --}}
|
||||
{{-- <div wire:key="portion-edit-{{ $curType }}" @class(['tab-pane','fade','show' => ($type == $curType), 'active' => ($type == $curType )]) id="pills-{{ $curType }}" role="tabpanel" aria-labelledby="pills-{{ $curType }}-tab"> --}}
|
||||
<div wire:key="portion-edit-{{ $curType }}" @class(['tab-pane','fade','show', 'active']) id="pills-{{ $curType }}" role="tabpanel" aria-labelledby="pills-{{ $curType }}-tab">
|
||||
<div class="d-flex align-items-center flex-wrap flex-sm-nowrap" data-row="0">
|
||||
<div class="fs-6 py-2 w-100">
|
||||
<input wire:model.defer="product_name" name="product_name" type="text" class="form-control fs-6 py-2 w-100 @error('product_name') error @enderror" placeholder="Введите название продукта...." />
|
||||
@@ -89,8 +86,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($curMeal)
|
||||
<livewire:diary.meal-photos :meal="$curMeal" :wire:key="$curMeal->id">
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
{{-- @endforeach --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 px-md-5 text-center">
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="mb-4 p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<small class="--f_black">{{ __('profile.circumference') }}:</small>
|
||||
<div class="d-flex align-items-center">
|
||||
<small class="me-3">{{ __('profile.chest') }}:<span class="ms-2 --f_bold --f_rose">{{ $lastOneMisure->chest_circumference ?? '0' }}</span></small>
|
||||
<small class="me-3">{{ __('profile.waist') }}:<span class="ms-2 --f_bold --f_blue">{{ $lastOneMisure->waist_circumference ?? '0' }}</span></small>
|
||||
<small>{{ __('profile.hips') }}:<span class="ms-2 --f_bold --f_lime">{{ $lastOneMisure->hip_circumference ?? '0'}}</span></small>
|
||||
</div>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">
|
||||
<button onclick="Livewire.emit('openModal', 'user.add-circumference')" style="border: none;background: none;">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" style="height: 14rem;" id="circumference_misure_chart">
|
||||
<livewire:livewire-line-chart
|
||||
:line-chart-model="$lineChartModel"
|
||||
key="{{ $lineChartModel->reactiveKey() }}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,6 +2,6 @@
|
||||
<pre x-show="!editMode" x-html="$wire.description"></pre>
|
||||
@if(auth()->user()->id === $user->id)
|
||||
<textarea x-show="editMode" x-on:click.outside="editMode = false" x-transition rows="8" cols="40" x-text="$wire.description" x-model.lazy="$wire.description"></textarea>
|
||||
<button type="button" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition mt-2 mr-2" x-on:click="editMode = ! editMode">Редактировать</button>
|
||||
<button type="button" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition mt-2 mr-2" x-on:click="editMode = ! editMode">{{ __('profile.edit') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@endif
|
||||
<div class="px-2">
|
||||
<div class="profile_img mx-auto --radius_100 overflow-hidden" x-show="! photoPreview">
|
||||
<img src="{{ $this->user->profile_photo_url }}" />
|
||||
<img src="{{ $this->user->profile_photo_url }}" style="height: 130px;"/>
|
||||
</div>
|
||||
<div class="profile_img mx-auto --radius_100 overflow-hidden" x-show="photoPreview" style="display: none;">
|
||||
<span class="block rounded-full w-32 h-32 bg-cover bg-no-repeat bg-center"
|
||||
@@ -25,10 +25,10 @@
|
||||
</div>
|
||||
|
||||
@if(auth()->user()->id === $user->id)
|
||||
<button type="button" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition mt-2 mr-2" x-on:click.prevent="$refs.photo.click()">сменить фото</button>
|
||||
<button type="button" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition mt-2 mr-2" x-on:click.prevent="$refs.photo.click()">{{ __('profile.change_photo') }}</button>
|
||||
@endif
|
||||
<small class="d-flex align-items-center my-2"><svg width="10" height="10" class="me-2"><use xlink:href="#TimeSmall"></use></svg>с {{ $this->user->created_at->isoFormat('LL') }}</small>
|
||||
<small class="d-flex align-items-center my-2"><svg width="10" height="10" class="me-2" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" r="4" fill="{{ $isOnline ? "#00ff00" : "#7B8794" }}"/></svg> {{ $isOnline ? 'Online' : 'Нет на месте' }}</small>
|
||||
<small class="d-flex align-items-center my-2"><svg width="10" height="10" class="me-2" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" r="4" fill="{{ $isOnline ? "#00ff00" : "#7B8794" }}"/></svg> {{ $isOnline ? __('profile.is_online') : __('profile.is_offline')}}</small>
|
||||
<img src="/img/checklist_1.png" class="my-3" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
22
resources/views/livewire/profile/weight-chart.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="mb-4 p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<small class="--f_black">{{ __('profile.weight') }}:</small>
|
||||
<div class="d-flex align-items-center">
|
||||
<small class="me-3">{{ __('profile.was') }}:<span class="ms-2 --f_bold --f_gold">{{ $user->weight_measures()->get()->first()->weight ?? '0' }}</span></small>
|
||||
<small>{{ __('profile.became') }}:<span class="ms-2 --f_bold --f_green">{{ $user->weight_measures()->get()->last()->weight ?? '0' }}</span></small>
|
||||
</div>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">
|
||||
<button onclick="Livewire.emit('openModal', 'user.add-weight')" style="border: none;background: none;">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-100" style="height: 14rem;" id="weight_misure_chart">
|
||||
<livewire:livewire-area-chart
|
||||
:area-chart-model="$areaChartModel"
|
||||
key="{{ $areaChartModel->reactiveKey() }}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,13 +2,13 @@
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('profile') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Профиль</span></a>
|
||||
<a href="{{ route('profile.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Профиль</span></a>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="text-end me-2">
|
||||
<small><a href="{{ route('profile') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small><a href="{{ route('profile.index') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small class="py-1">Консультант</small>
|
||||
</div>
|
||||
<a href="{{ route('profile') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px"></a>
|
||||
<a href="{{ route('profile.index') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px" class="profile_image" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('profile') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Профиль</span></a>
|
||||
<a href="{{ route('profile.index') }}" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">{{ __('profile.profile') }}</span></a>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="text-end me-2">
|
||||
<small><a href="{{ route('profile') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small class="py-1">Консультант</small>
|
||||
<small><a href="{{ route('profile.index') }}" class="--f_bold --f_main">{{ $user->name }}</a></small><br>
|
||||
<small class="py-1">{{ $user->is_consultant ? __('profile.is_consultant') : __('profile.is_user') }}</small>
|
||||
</div>
|
||||
<a href="{{ route('profile') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px"></a>
|
||||
<a href="{{ route('profile.index') }}" class="d-none d-md-block --radius_100 overflow-hidden"><img src="{{ $user->profile_photo_url }}" width="42px" height="42px" class="profile_image" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<div class="d-flex px-md-5 justify-content-between align-items-center flex-wrap flex-lg-nowrap flex-column-reverse flex-lg-row overflow-x-xs-scroll">
|
||||
<h3>Данные пользователя: {{ $user->name }}</h3>
|
||||
<h3>{{ __('profile.user_data_for') }}: {{ $user->name }}</h3>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder"><a href="{{ route('user_detailz.edit', ['user_detailz' => $userDetailz]) }}">
|
||||
<svg version="1.1" id="svg870" width="12" height="24" viewBox="0 0 638.33765 638.33765" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
@@ -45,5 +45,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
|
||||
<a href="{{ route('consultant_request.create') }}" class="btn btn-lg btn-outline-danger btn-block w-100 --f_bolder disabled:opacity-50" role="button" aria-pressed="true">{{ __('profile.become_a_consultant') }}</a>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
@section('main_section')
|
||||
<section class="py-5" id="main">
|
||||
<div class="container d-flex justify-content-between align-items-center mb-5 px-4 py-4 --bg_white --shadow --radius --mw-1000">
|
||||
<a href="#" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">Консультанты</span></a>
|
||||
<a href="#" class="d-flex align-items-center --f_bold --f_main"><svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg><span class="d-none d-md-inline">{{ __('profile.consultants') }}</span></a>
|
||||
<div class="d-flex align-items-center">
|
||||
<a href="#" class="d-flex align-items-center me-4 --f_bold --f_main"><svg width="24" height="24" class="me-2"><use xlink:href="#Blog"></use></svg><span class="d-none d-md-inline">Блог</span></a>
|
||||
<a href="{{ route('user_detailz.show', ['user_detailz' => $user->detailz]) }}" class="d-flex align-items-center --f_bold --f_main"><svg width="24" height="24" class="me-2"><use xlink:href="#Settings"></use></svg><span class="d-none d-md-inline">Настройки</span></a>
|
||||
<a href="#" class="d-flex align-items-center me-4 --f_bold --f_main"><svg width="24" height="24" class="me-2"><use xlink:href="#Blog"></use></svg><span class="d-none d-md-inline">{{ __('profile.blog') }}</span></a>
|
||||
<a href="{{ route('user_detailz.show', ['user_detailz' => $user->detailz]) }}" class="d-flex align-items-center --f_bold --f_main"><svg width="24" height="24" class="me-2"><use xlink:href="#Settings"></use></svg><span class="d-none d-md-inline">{{ __('profile.settings') }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,16 +14,17 @@
|
||||
<div class="col-lg-8 d-flex justify-content-between flex-column flex-sm-row me-lg-4 mb-4 mb-lg-0 px-3 py-4 --bg_white --shadow --radius --no_wrap">
|
||||
@livewire('profile.photo-form', ['user' => $user])
|
||||
<div class="flex-grow-1 --no_wrap_normal">
|
||||
<div class="h3 --f_bold">{{ auth()->user()->name }}</div>
|
||||
<div class="h3 --f_bold">{{ $user->name }}</div>
|
||||
<p>{{ $user->is_consultant ? __('profile.is_consultant') : __('profile.is_user') }}</p>
|
||||
@livewire('profile.description-form', ['user' => $user])
|
||||
</div>
|
||||
</div>
|
||||
<div class="col px-4 px-lg-5 py-4 --bg_white --shadow --radius --no_wrap flex-grow-1">
|
||||
<nav class="nav flex-column --menu_icons ps-4">
|
||||
<div><i class="--f_blue --f_bold fs-5">3</i><span class="nav-item">Планов пройдено</span></div>
|
||||
<div><i class="--f_blue --f_bold fs-5">64</i><span class="nav-item">Записей в блоге</span></div>
|
||||
<div><svg width="20" height="15"><use xlink:href="#Eye"></use></svg><span class="nav-item">Просмотров: 2102</span></div>
|
||||
<div><svg width="17" height="14"><use xlink:href="#Heart"></use></svg><span class="nav-item">Лайков: 128</span></div>
|
||||
<div><i class="--f_blue --f_bold fs-5">3</i><span class="nav-item">{{ __('profile.plans_passed') }}</span></div>
|
||||
<div><i class="--f_blue --f_bold fs-5">64</i><span class="nav-item">{{ __('profile.blog_posts') }}</span></div>
|
||||
<div><svg width="20" height="15"><use xlink:href="#Eye"></use></svg><span class="nav-item">{{ __('profile.views') }}: 2102</span></div>
|
||||
<div><svg width="17" height="14"><use xlink:href="#Heart"></use></svg><span class="nav-item">{{ __('profile.likes') }}: 128</span></div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,74 +34,27 @@
|
||||
<div class="container mb-3 --mw-1000">
|
||||
<div class="row justify-content-between flex-lg-nowrap --mw-1000">
|
||||
<div class="col-lg-6 px-0 me-lg-4">
|
||||
@livewire('profile.circumference-chart', ['user' => $user])
|
||||
@livewire('profile.weight-chart', ['user' => $user])
|
||||
|
||||
<div class="mb-4 p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<small class="--f_black">Обхват:</small>
|
||||
<div class="d-flex align-items-center">
|
||||
<small class="me-3">Грудь:<span class="ms-2 --f_bold --f_rose">{{ $lastOneMisure->chest_circumference }}</span></small>
|
||||
<small class="me-3">Талия:<span class="ms-2 --f_bold --f_blue">{{ $lastOneMisure->waist_circumference }}</span></small>
|
||||
<small>Бедра:<span class="ms-2 --f_bold --f_lime">{{ $lastOneMisure->hip_circumference }}</span></small>
|
||||
</div>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">
|
||||
<button onclick="Livewire.emit('openModal', 'user.add-circumference')" style="border: none;background: none;">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <img src="/img/chart_1.svg" class="w-100" /> --}}
|
||||
<div class="w-100" style="height: 14rem;" id="circumference_misure_chart">
|
||||
<livewire:livewire-line-chart
|
||||
:line-chart-model="$lineChartModel"
|
||||
key="{{ $lineChartModel->reactiveKey() }}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4 p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<small class="--f_black">Вес:</small>
|
||||
<div class="d-flex align-items-center">
|
||||
<small class="me-3">Было:<span class="ms-2 --f_bold --f_gold">{{ $user->weight_measures()->get()->first()->weight }}</span></small>
|
||||
<small>Стало:<span class="ms-2 --f_bold --f_green">{{ $user->weight_measures()->get()->last()->weight }}</span></small>
|
||||
</div>
|
||||
<div class="fs-5_5 text-center">
|
||||
<div class="--f_bolder">
|
||||
<button onclick="Livewire.emit('openModal', 'user.add-weight')" style="border: none;background: none;">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" style="height: 14rem;" id="weight_misure_chart">
|
||||
<livewire:livewire-area-chart
|
||||
:area-chart-model="$areaChartModel"
|
||||
key="{{ $areaChartModel->reactiveKey() }}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4 p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<div class="h5">Пройденные планы:</div>
|
||||
<div class="h5">{{ __('profile.passed_plans') }}:</div>
|
||||
<hr/>
|
||||
<table class="table --table_blue mb-0 fs-4_5 --f_bold"><tbody>
|
||||
<tr>
|
||||
<td><img src="/img/plan_1.png" class="--radius_100" width="26px" height="26px" /></td>
|
||||
<td class="w-50 text-start ps-0">Лёгкий</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-success">Готов</small></td>
|
||||
<td class="w-50 text-start ps-0">{{ __('profile.easy') }}</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-success">{{ __('profile.done') }}</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/img/plan_2.png" class="--radius_100" width="26px" height="26px" /></td>
|
||||
<td class="w-50 text-start ps-0">Умеренный</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-success">Готов</small></td>
|
||||
<td class="w-50 text-start ps-0">{{ __('profile.moderate') }}</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-success">{{ __('profile.done') }}</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/img/plan_3.png" class="--radius_100" width="26px" height="26px" /></td>
|
||||
<td class="w-50 text-start ps-0">Полный</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-warning">В процессе</small></td>
|
||||
<td class="w-50 text-start ps-0">{{ __('profile.full') }}</td>
|
||||
<td class="w-50 text-end"><small class="px-3 py-1 badge rounded-pill bg-warning">{{ __('profile.in_the_process') }}</small></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
@@ -110,10 +64,10 @@
|
||||
|
||||
|
||||
<div class="p-3 --bg_white --shadow --radius --no_wrap">
|
||||
<a href="#" class="btn btn-lg btn_light --btn_light_color btn-block w-100 --f_bold">Создать публикацию</a>
|
||||
<a href="#" class="btn btn-lg btn_light --btn_light_color btn-block w-100 --f_bold">{{ __('profile.create_a_post') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="h4 my-3 --f_grey">ВСЕ ПУБЛИКАЦИИ</div>
|
||||
<div class="h4 my-3 --f_grey">{{ __('profile.all_posts') }}</div>
|
||||
|
||||
<div class="p-3 --bg_white --shadow --radius --no_wrap">
|
||||
|
||||
@@ -156,17 +110,17 @@
|
||||
<div class="d-flex mt-3 align-items-center justify-content-between --f_bold">
|
||||
<a href="#" class="d-flex align-items-center --f_main"><small>
|
||||
<svg width="21" height="20" class="me-1"><use xlink:href="#ActionComment"></use></svg>
|
||||
Комментировать
|
||||
{{ __('profile.comment') }}
|
||||
</small></a>
|
||||
|
||||
<a href="#" class="d-flex align-items-center --f_main"><small>
|
||||
<svg width="24" height="21" class="me-1"><use xlink:href="#HeartPath"></use></svg>
|
||||
Нравится
|
||||
{{ __('profile.like') }}
|
||||
</small></a>
|
||||
|
||||
<a href="#" class="d-flex align-items-center --f_main"><small>
|
||||
<svg width="21" height="22" class="me-1"><use xlink:href="#Share"></use></svg>
|
||||
<span class="d-none d-sm-inline">Поделится</span>
|
||||
<span class="d-none d-sm-inline">{{ __('profile.share') }}</span>
|
||||
</small></a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use App\Http\Controllers\CalendarController;
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use App\Http\Controllers\UserDetailzController;
|
||||
use App\Http\Controllers\UserController;
|
||||
use App\Http\Controllers\ConsultantRequestFormController;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -35,11 +36,13 @@ Route::group([
|
||||
return view('home');
|
||||
})->name('home');
|
||||
|
||||
Route::middleware([
|
||||
'auth:sanctum',
|
||||
config('jetstream.auth_session'),
|
||||
'verified'
|
||||
])->group(function () {
|
||||
Route::middleware(
|
||||
[
|
||||
'auth:sanctum',
|
||||
config('jetstream.auth_session'),
|
||||
'verified'
|
||||
]
|
||||
)->group(function () {
|
||||
Route::get('/dashboard', function () { return view('dashboard'); })->name('dashboard');
|
||||
/* Route::get('/profile', function () { return view('profile.index'); })->name('profile'); */
|
||||
Route::resource('profile', ProfileController::class);
|
||||
@@ -50,5 +53,11 @@ Route::group([
|
||||
Route::resource('calendar', CalendarController::class);
|
||||
Route::resource('user_detailz', UserDetailzController::class);
|
||||
Route::resource('user', UserController::class)->only('show');
|
||||
Route::resource('consultant_request', ConsultantRequestFormController::class)
|
||||
->parameters(
|
||||
[
|
||||
'consultant_request' => 'user'
|
||||
]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||