fixing search module, and schedule module
This commit is contained in:
@@ -65,6 +65,11 @@ class EducationalGroupResource extends Resource
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getEloquentQuery()->with('faculty');
|
||||||
|
}
|
||||||
|
|
||||||
public static function table(Table $table): Table
|
public static function table(Table $table): Table
|
||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
@@ -81,14 +86,11 @@ class EducationalGroupResource extends Resource
|
|||||||
->searchable()
|
->searchable()
|
||||||
->description(fn ($record) => $record->faculty->title ?? ''),
|
->description(fn ($record) => $record->faculty->title ?? ''),
|
||||||
|
|
||||||
BadgeColumn::make('education_form_id')
|
TextColumn::make('education_form_id')
|
||||||
->label('Форма обучения')
|
->label('Форма обучения')
|
||||||
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)?->label())
|
->badge()
|
||||||
->color(fn ($state) => match($state) {
|
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)?->getLabel())
|
||||||
FormEducation::FULL_TIME->value => 'success',
|
->color(fn ($state) => FormEducation::tryFrom($state)?->getColor())
|
||||||
FormEducation::PART_TIME->value => 'warning',
|
|
||||||
default => 'gray',
|
|
||||||
})
|
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
TextColumn::make('created_at')
|
TextColumn::make('created_at')
|
||||||
@@ -97,6 +99,7 @@ class EducationalGroupResource extends Resource
|
|||||||
->sortable()
|
->sortable()
|
||||||
->toggleable(),
|
->toggleable(),
|
||||||
])
|
])
|
||||||
|
|
||||||
->filters([
|
->filters([
|
||||||
Tables\Filters\SelectFilter::make('faculty_id')
|
Tables\Filters\SelectFilter::make('faculty_id')
|
||||||
->label('Факультет')
|
->label('Факультет')
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class EditPost extends EditRecord
|
|||||||
protected function mutateFormDataBeforeFill(array $data): array
|
protected function mutateFormDataBeforeFill(array $data): array
|
||||||
{
|
{
|
||||||
$post = Post::query()->with(['seo', 'slide'])->find($data['id']);
|
$post = Post::query()->with(['seo', 'slide'])->find($data['id']);
|
||||||
$data['slide'] = $post->slide->toArray() ?? null;
|
$data['slide'] = $post->slide ? $post->slide->toArray() : null;
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources;
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Enums\FormEducation;
|
||||||
use App\Filament\Resources\ScheduleResource\Pages;
|
use App\Filament\Resources\ScheduleResource\Pages;
|
||||||
use App\Models\EducationalGroup;
|
use App\Models\EducationalGroup;
|
||||||
use App\Models\Schedule;
|
use App\Models\Schedule;
|
||||||
@@ -48,16 +49,6 @@ class ScheduleResource extends Resource
|
|||||||
->required()
|
->required()
|
||||||
->live()
|
->live()
|
||||||
->helperText('Выберите группу для которой создается расписание'),
|
->helperText('Выберите группу для которой создается расписание'),
|
||||||
|
|
||||||
Toggle::make('is_zaoch')
|
|
||||||
->label('Форма обучения')
|
|
||||||
->inline(false)
|
|
||||||
->onColor('success')
|
|
||||||
->offColor('primary')
|
|
||||||
->helperText('Очная | Заочная')
|
|
||||||
->afterStateHydrated(function (Toggle $component, $state) {
|
|
||||||
$component->state((bool) $state);
|
|
||||||
}),
|
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@@ -91,10 +82,11 @@ class ScheduleResource extends Resource
|
|||||||
fn (TemporaryUploadedFile $file): string =>
|
fn (TemporaryUploadedFile $file): string =>
|
||||||
str(Str::slug(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME) . '-' . Carbon::now()->timestamp) . '.' . $file->getClientOriginalExtension()
|
str(Str::slug(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME) . '-' . Carbon::now()->timestamp) . '.' . $file->getClientOriginalExtension()
|
||||||
)
|
)
|
||||||
->afterStateUpdated(function ($set, $state) {
|
)
|
||||||
$set('title', pathinfo($state?->getClientOriginalName(), PATHINFO_FILENAME));
|
->afterStateUpdated(function ($set, $state) {
|
||||||
})
|
$set('title', pathinfo($state?->getClientOriginalName(), PATHINFO_FILENAME));
|
||||||
->visibility('public')),
|
})
|
||||||
|
->visibility('public'),
|
||||||
])
|
])
|
||||||
->itemLabel(fn (array $state): ?string => $state['title'] ?? 'Новый файл')
|
->itemLabel(fn (array $state): ?string => $state['title'] ?? 'Новый файл')
|
||||||
->collapsible()
|
->collapsible()
|
||||||
@@ -108,7 +100,7 @@ class ScheduleResource extends Resource
|
|||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('educational_group.title')
|
TextColumn::make('educationalGroup.title')
|
||||||
->label('Учебная группа')
|
->label('Учебная группа')
|
||||||
->sortable()
|
->sortable()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
@@ -118,13 +110,11 @@ class ScheduleResource extends Resource
|
|||||||
->getStateUsing(fn ($record) => count($record->file ?? []))
|
->getStateUsing(fn ($record) => count($record->file ?? []))
|
||||||
->badge(),
|
->badge(),
|
||||||
|
|
||||||
IconColumn::make('is_zaoch')
|
TextColumn::make('educationalGroup.education_form_id')
|
||||||
->label('Форма обучения')
|
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)->getLabel())
|
||||||
->boolean()
|
->color(fn ($state) => FormEducation::tryFrom($state)?->getColor())
|
||||||
->trueIcon('heroicon-o-academic-cap')
|
->badge()
|
||||||
->falseIcon('heroicon-o-building-office')
|
->label('Форма обучения'),
|
||||||
->trueColor('success')
|
|
||||||
->falseColor('primary'),
|
|
||||||
|
|
||||||
TextColumn::make('updated_at')
|
TextColumn::make('updated_at')
|
||||||
->label('Обновлено')
|
->label('Обновлено')
|
||||||
@@ -163,8 +153,7 @@ class ScheduleResource extends Resource
|
|||||||
->emptyStateActions([
|
->emptyStateActions([
|
||||||
Tables\Actions\CreateAction::make()
|
Tables\Actions\CreateAction::make()
|
||||||
->label('Добавить расписание'),
|
->label('Добавить расписание'),
|
||||||
])
|
]);
|
||||||
->defaultSort('educational_group.title');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRelations(): array
|
public static function getRelations(): array
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use App\Enums\LevelEducational;
|
|||||||
use App\Http\Resources\DirectionStudyResource;
|
use App\Http\Resources\DirectionStudyResource;
|
||||||
use App\Http\Resources\EducationalProgramFullResource;
|
use App\Http\Resources\EducationalProgramFullResource;
|
||||||
use App\Models\AdmissionCampaign;
|
use App\Models\AdmissionCampaign;
|
||||||
|
use App\Models\AdmissionPlan;
|
||||||
use App\Models\DirectionStudy;
|
use App\Models\DirectionStudy;
|
||||||
use App\Models\EducationalProgram;
|
use App\Models\EducationalProgram;
|
||||||
use App\Services\App\Seo\SeoPageProvider;
|
use App\Services\App\Seo\SeoPageProvider;
|
||||||
@@ -39,19 +40,33 @@ class ClientProgramController extends Controller
|
|||||||
});
|
});
|
||||||
|
|
||||||
$formsEdu = Cache::remember($cacheKeyForms, now()->addDay(), function () {
|
$formsEdu = Cache::remember($cacheKeyForms, now()->addDay(), function () {
|
||||||
return collect(FormEducation::cases())
|
return AdmissionPlan::distinct()
|
||||||
->mapWithKeys(fn($form) => [$form->name => $form->getLabel()]);
|
->pluck('contests')
|
||||||
|
->flatten(1)
|
||||||
|
->filter(fn ($item) => isset($item['form_education']))
|
||||||
|
->pluck('form_education')
|
||||||
|
->unique()
|
||||||
|
->map(fn ($item) => FormEducation::tryFrom((int)$item))
|
||||||
|
->filter()
|
||||||
|
->mapWithKeys(fn ($form) => [$form->name => $form->getLabel()]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$budgetEdu = Cache::remember($cacheKeyBudgets, now()->addDay(), function () {
|
$budgetEdu = Cache::remember($cacheKeyBudgets, now()->addDay(), function () {
|
||||||
return collect(BudgetEducation::cases())
|
return AdmissionPlan::distinct()
|
||||||
->mapWithKeys(fn($type) => [$type->name => $type->getLabel()]);
|
->pluck('contests')
|
||||||
|
->flatten(1)
|
||||||
|
->filter(fn ($item) => isset($item['places']['form_budget']))
|
||||||
|
->pluck('places.form_budget')
|
||||||
|
->unique()
|
||||||
|
->map(fn ($item) => BudgetEducation::tryFrom($item))
|
||||||
|
->filter()
|
||||||
|
->mapWithKeys(fn ($form) => [$form->name => $form->getLabel()]);
|
||||||
});
|
});
|
||||||
|
|
||||||
$seo = Cache::remember($cacheKeySeo, now()->addDay(), function () {
|
$seo = Cache::remember($cacheKeySeo, now()->addDay(), function () {
|
||||||
return $this->seoPageProvider->getSeoForCurrentPage();
|
return $this->seoPageProvider->getSeoForCurrentPage();
|
||||||
});
|
});
|
||||||
;
|
|
||||||
|
|
||||||
$naprs = Cache::remember($cacheKey, now()->addHours(), function () use ($request, $activeCampaign) {
|
$naprs = Cache::remember($cacheKey, now()->addHours(), function () use ($request, $activeCampaign) {
|
||||||
return DirectionStudyResource::collection(
|
return DirectionStudyResource::collection(
|
||||||
@@ -144,16 +159,16 @@ class ClientProgramController extends Controller
|
|||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function applyBudgetFilter($query, $budget)
|
private function applyBudgetFilter($query, $budget): void
|
||||||
{
|
{
|
||||||
$budgetValue = Str::of(BudgetEducation::fromName($budget)->value)->toString();
|
$budgetValue = Str::of(BudgetEducation::fromName($budget)->value)->toString();
|
||||||
|
|
||||||
$query->whereHas('programs.admission_plans', function ($query) use ($budgetValue) {
|
$query->whereHas('programs.admission_plans', function ($query) use ($budgetValue) {
|
||||||
$query->whereJsonContains('contests', ['financing_source' => $budgetValue]);
|
$query->where('contests', 'like', '%"form_budget":"'.$budgetValue.'"%');
|
||||||
})
|
})
|
||||||
->with(['programs' => function ($query) use ($budgetValue) {
|
->with(['programs' => function ($query) use ($budgetValue) {
|
||||||
$query->whereHas('admission_plans', function ($query) use ($budgetValue) {
|
$query->whereHas('admission_plans', function ($query) use ($budgetValue) {
|
||||||
$query->whereJsonContains('contests', ['financing_source' => $budgetValue]);
|
$query->where('contests', 'like', '%"form_budget":"'.$budgetValue.'"%');
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,14 +39,11 @@ class ClientScheduleController extends Controller
|
|||||||
->get());
|
->get());
|
||||||
|
|
||||||
$schedulesByFaculty = $educationalGroups->groupBy(function ($group) {
|
$schedulesByFaculty = $educationalGroups->groupBy(function ($group) {
|
||||||
return $group->faculty->title; // Предполагаем, что у факультета есть поле 'name'
|
return $group->faculty->title;
|
||||||
});
|
});
|
||||||
|
|
||||||
$schedulesByFaculty = $schedulesByFaculty->toArray();
|
$schedulesByFaculty = $schedulesByFaculty->toArray();
|
||||||
|
|
||||||
if ($request->has('favorite') && empty($request->input('favorite'))) {
|
|
||||||
$schedulesByFaculty = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$forms_education = [];
|
$forms_education = [];
|
||||||
@@ -55,11 +52,6 @@ class ClientScheduleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$filters = [
|
$filters = [
|
||||||
'direction_filter' => [
|
|
||||||
'type' => 'direction',
|
|
||||||
'value' => request()->input('direction'),
|
|
||||||
'param' => 'direction'
|
|
||||||
],
|
|
||||||
'form_education_filter' => [
|
'form_education_filter' => [
|
||||||
'type' => 'form',
|
'type' => 'form',
|
||||||
'value' => request()->input('form'),
|
'value' => request()->input('form'),
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class SearchController extends Controller
|
|||||||
$resources = $this->sortResourcesByCategory($resources, $request->query('category'));
|
$resources = $this->sortResourcesByCategory($resources, $request->query('category'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginate_data = $this->createPaginate($resources, $request, 10);
|
$paginate_data = $this->createPaginate($resources, $request, 7);
|
||||||
|
|
||||||
$sortedData = $this->sortByType($paginate_data['paginator'], $req);
|
$sortedData = $this->sortByType($paginate_data['paginator'], $req);
|
||||||
|
|
||||||
@@ -114,14 +114,24 @@ class SearchController extends Controller
|
|||||||
private function getMatches(string $haystack, string $needle): array
|
private function getMatches(string $haystack, string $needle): array
|
||||||
{
|
{
|
||||||
$matches = [];
|
$matches = [];
|
||||||
|
// while (($offset = mb_strpos($haystack, $needle, $offset, 'UTF-8')) !== false) {
|
||||||
|
// $left = max(0, $offset - 50);
|
||||||
|
// $right = min(mb_strlen($haystack, 'UTF-8'), $offset + 100);
|
||||||
|
// $excerpt = mb_substr($haystack, $left, $right - $left, 'UTF-8');
|
||||||
|
// $matches[] = $excerpt;
|
||||||
|
// $offset += mb_strlen($needle, 'UTF-8');
|
||||||
|
// }
|
||||||
|
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
while (($offset = mb_strpos($haystack, $needle, $offset, 'UTF-8')) !== false) {
|
if (($offset = mb_strpos($haystack, $needle, $offset, 'UTF-8')) !== false) {
|
||||||
$left = max(0, $offset - 50);
|
for ($i = 0; 1 > count($matches); $i++) {
|
||||||
$right = min(mb_strlen($haystack, 'UTF-8'), $offset + 100);
|
$left = max(0, $offset - 50);
|
||||||
$excerpt = mb_substr($haystack, $left, $right - $left, 'UTF-8');
|
$right = min(mb_strlen($haystack, 'UTF-8'), $offset + 100);
|
||||||
$matches[] = $excerpt;
|
$excerpt = mb_substr($haystack, $left, $right - $left, 'UTF-8');
|
||||||
$offset += mb_strlen($needle, 'UTF-8');
|
$matches[] = $excerpt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $matches;
|
return $matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ class Schedule extends Model
|
|||||||
'file' => 'array',
|
'file' => 'array',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function subSchedules()
|
|
||||||
{
|
|
||||||
return $this->hasMany(SubSchedule::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function faculty()
|
public function faculty()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Faculty::class);
|
return $this->belongsTo(Faculty::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function educationalGroup(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(EducationalGroup::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,10 @@ class EducationForm {
|
|||||||
this.DETAILED_TARGET_QUOTA
|
this.DETAILED_TARGET_QUOTA
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default EducationForm;
|
export default EducationForm;
|
||||||
@@ -12,8 +12,6 @@ class EducationForm {
|
|||||||
return Object.values(this).find(item => item.value == value) || null;
|
return Object.values(this).find(item => item.value == value) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Метод для получения имени
|
|
||||||
getName() {
|
getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ import BasicPageContainer from "@/componentss/ui/templates/BasicPageContainer.vu
|
|||||||
import AcademicJournalsListBreadcrumbs
|
import AcademicJournalsListBreadcrumbs
|
||||||
from "@/componentss/features/academicJournals/components/AcademicJournalsListBreadcrumbs.vue.vue";
|
from "@/componentss/features/academicJournals/components/AcademicJournalsListBreadcrumbs.vue.vue";
|
||||||
import BasicPageWrapper from "@/componentss/ui/wrappers/BasicPageWrapper.vue";
|
import BasicPageWrapper from "@/componentss/ui/wrappers/BasicPageWrapper.vue";
|
||||||
|
import BasicListBadge from "@/componentss/shared/badge/BasicListBadge.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Index",
|
name: "Index",
|
||||||
components: {
|
components: {
|
||||||
|
BasicListBadge,
|
||||||
BasicPageWrapper, AcademicJournalsListBreadcrumbs, BasicPageContainer,
|
BasicPageWrapper, AcademicJournalsListBreadcrumbs, BasicPageContainer,
|
||||||
ProgramLevelEduFilter,
|
ProgramLevelEduFilter,
|
||||||
FormEducationalFilter,
|
FormEducationalFilter,
|
||||||
@@ -32,10 +34,10 @@ export default {
|
|||||||
Link,
|
Link,
|
||||||
Head,
|
Head,
|
||||||
},
|
},
|
||||||
data() {
|
computed: {
|
||||||
return {
|
hasActiveFilters() {
|
||||||
|
return this.filters.budget_filter.value || this.filters.direction_filter.value || this.filters.formEdu_filter.value;
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
campaignName: {
|
campaignName: {
|
||||||
@@ -98,7 +100,7 @@ export default {
|
|||||||
<div class="space-y-5 md:space-y-4 mx-auto max-w-3xl w-full">
|
<div class="space-y-5 md:space-y-4 mx-auto max-w-3xl w-full">
|
||||||
<div>
|
<div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="my-10 w-full">
|
<div class="mt-10 mb-5 w-full">
|
||||||
<ProgramListBreadcrumbs />
|
<ProgramListBreadcrumbs />
|
||||||
<div class="flex items-center gap-x-2">
|
<div class="flex items-center gap-x-2">
|
||||||
<ProgramLevelEduFilter :levels="levelsEducational" :level_filter="filters.level_filter" />
|
<ProgramLevelEduFilter :levels="levelsEducational" :level_filter="filters.level_filter" />
|
||||||
@@ -110,7 +112,15 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container py-5 lg:py-4">
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<!-- <h3 class="text-sm text-gray-500 mb-4">Найдено программ: {{ naprs.meta.total }}</h3>-->
|
||||||
|
<div v-if="hasActiveFilters" class="flex-wrap flex gap-3 md:items-center">
|
||||||
|
<BasicListBadge :filters="filters" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
<div class="w-full mx-auto flex flex-wrap lg:justify-between">
|
<div class="w-full mx-auto flex flex-wrap lg:justify-between">
|
||||||
<template v-for="naprs in transformToColumns(this.naprs.data)">
|
<template v-for="naprs in transformToColumns(this.naprs.data)">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
|||||||
import BasicFooter from "@/footers/BasicFooter.vue";
|
import BasicFooter from "@/footers/BasicFooter.vue";
|
||||||
import BasicListFilter from "@/componentss/shared/filter/BasicListFilter.vue";
|
import BasicListFilter from "@/componentss/shared/filter/BasicListFilter.vue";
|
||||||
import FormEducationalFilter from "@/componentss/shared/filter/filters/FormEducationalFilter.vue";
|
import FormEducationalFilter from "@/componentss/shared/filter/filters/FormEducationalFilter.vue";
|
||||||
|
import MetaTags from "@/componentss/shared/SEO/MetaTags.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -22,6 +23,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
MetaTags,
|
||||||
FormEducationalFilter,
|
FormEducationalFilter,
|
||||||
BasicListFilter,
|
BasicListFilter,
|
||||||
BasicFooter,
|
BasicFooter,
|
||||||
@@ -40,7 +42,10 @@ export default {
|
|||||||
},
|
},
|
||||||
schedulesByFaculty: {
|
schedulesByFaculty: {
|
||||||
type: Object
|
type: Object
|
||||||
}
|
},
|
||||||
|
seo: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search: debounce(function () {
|
search: debounce(function () {
|
||||||
@@ -53,18 +58,28 @@ export default {
|
|||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
}, 300),
|
}, 300),
|
||||||
toggleFavorite(group) {
|
toggleFavorite(group) {
|
||||||
const index = this.favoriteGroups.findIndex(g => g === group);
|
if (!this.favoriteGroups) {
|
||||||
if (index === -1) {
|
this.favoriteGroups = [];
|
||||||
this.favoriteGroups.push(group);
|
}
|
||||||
} else {
|
|
||||||
this.favoriteGroups.splice(index, 1);
|
const index = this.favoriteGroups.findIndex(g => g === group);
|
||||||
}
|
if (index === -1) {
|
||||||
localStorage.setItem('favoriteGroups', JSON.stringify(this.favoriteGroups));
|
this.favoriteGroups.push(group);
|
||||||
},
|
} else {
|
||||||
isFavorite(group) {
|
this.favoriteGroups.splice(index, 1);
|
||||||
return this.favoriteGroups.some(g => g === group);
|
}
|
||||||
},
|
|
||||||
|
localStorage.setItem('favoriteGroups', JSON.stringify(this.favoriteGroups));
|
||||||
|
},
|
||||||
|
|
||||||
|
isFavorite(group) {
|
||||||
|
// Если favoriteGroups не существует или не является массивом, возвращаем false
|
||||||
|
if (!Array.isArray(this.favoriteGroups)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this.favoriteGroups.some(g => g === group);
|
||||||
|
},
|
||||||
toggleShowFavorites() {
|
toggleShowFavorites() {
|
||||||
this.loading = true; // Включаем состояние загрузки
|
this.loading = true; // Включаем состояние загрузки
|
||||||
|
|
||||||
@@ -97,7 +112,7 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
preserveState: true,
|
preserveState: true,
|
||||||
data: {
|
data: {
|
||||||
favorite: (this.favoriteGroups.length !== 0) ? this.favoriteGroups : "",
|
favorite: (this.favoriteGroups?.length !== 0) ? this.favoriteGroups : "",
|
||||||
},
|
},
|
||||||
onFinish: callback, // Вызываем колбэк после завершения запроса
|
onFinish: callback, // Вызываем колбэк после завершения запроса
|
||||||
});
|
});
|
||||||
@@ -123,12 +138,15 @@ export default {
|
|||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MainPageNavBar class="border-b" :sections="$page.props.navigation"></MainPageNavBar>
|
<MetaTags :seo="this.seo" />
|
||||||
|
<MainPageNavBar class="border-b" :sections="$page.props.navigation" />
|
||||||
|
|
||||||
<div class="flex flex-col h-screen">
|
<div class="flex flex-col h-screen">
|
||||||
<main class="flex-grow">
|
<main class="flex-grow">
|
||||||
@@ -159,7 +177,6 @@ export default {
|
|||||||
id="hs-search-article-1"
|
id="hs-search-article-1"
|
||||||
class="py-2.5 px-4 block w-full border-transparent rounded-lg disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100"
|
class="py-2.5 px-4 block w-full border-transparent rounded-lg disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100"
|
||||||
placeholder="Поиск"
|
placeholder="Поиск"
|
||||||
:disabled="filters.favorite_filter.value !== null"
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -170,7 +187,7 @@ export default {
|
|||||||
<button
|
<button
|
||||||
@click="toggleShowFavorites"
|
@click="toggleShowFavorites"
|
||||||
type="button"
|
type="button"
|
||||||
:disabled="favoriteGroups?.length === 0 || loading"
|
:disabled="loading"
|
||||||
:class="
|
:class="
|
||||||
filters.favorite_filter.value !== null ? 'bg-primary text-white hover:bg-primary-dark': 'text-gray-700 hover:bg-gray-100',
|
filters.favorite_filter.value !== null ? 'bg-primary text-white hover:bg-primary-dark': 'text-gray-700 hover:bg-gray-100',
|
||||||
loading ? 'animate-pulse' : ''
|
loading ? 'animate-pulse' : ''
|
||||||
@@ -192,9 +209,8 @@ export default {
|
|||||||
|
|
||||||
<div class="mx-auto max-w-2xl hs-accordion-group grid gap-3">
|
<div class="mx-auto max-w-2xl hs-accordion-group grid gap-3">
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<transition-group name="fade">
|
<template v-for="(faculty, title) in schedulesByFaculty">
|
||||||
<template v-for="(faculty, title) in schedulesByFaculty">
|
<div>
|
||||||
<div class="">
|
|
||||||
<h2 class="text-center text-gray-800 font-medium">{{ title }}</h2>
|
<h2 class="text-center text-gray-800 font-medium">{{ title }}</h2>
|
||||||
<hr class="mt-2 mb-4">
|
<hr class="mt-2 mb-4">
|
||||||
<template v-for="educationalGroup in faculty" :key="educationalGroup.data.id">
|
<template v-for="educationalGroup in faculty" :key="educationalGroup.data.id">
|
||||||
@@ -245,7 +261,15 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</transition-group>
|
<div v-if="schedulesByFaculty.length === 0">
|
||||||
|
<div class="h-full flex flex-col items-center justify-center gap-1">
|
||||||
|
<p class="font-light">Извините, ничего не найдено</p>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-gray-700">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
@@ -276,7 +300,6 @@ export default {
|
|||||||
.fade-enter-from,
|
.fade-enter-from,
|
||||||
.fade-leave-to {
|
.fade-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(30px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gg-enter-active,
|
.gg-enter-active,
|
||||||
|
|||||||
@@ -13,6 +13,62 @@ export default {
|
|||||||
stroke_width: 1.5,
|
stroke_width: 1.5,
|
||||||
stroke: 'currentColor',
|
stroke: 'currentColor',
|
||||||
},
|
},
|
||||||
|
post_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
faculty_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
educational_group_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"/>',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
additional_education_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
event_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
educational_program_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
page_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
|
person_search: {
|
||||||
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />',
|
||||||
|
viewBox: '0 0 24 24',
|
||||||
|
fill: 'none',
|
||||||
|
stroke_width: 1.5,
|
||||||
|
stroke: 'currentColor',
|
||||||
|
},
|
||||||
line: {
|
line: {
|
||||||
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M4.499 8.248h15m-15 7.501h15" />',
|
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M4.499 8.248h15m-15 7.501h15" />',
|
||||||
viewBox: '0 0 24 24',
|
viewBox: '0 0 24 24',
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div class="border-b w-full">
|
||||||
|
<a v-if="item.tag === 'Post'" :href="route('client.post.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
|
<BasicIcon name="post_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
|
<div class="px-4 space-y-1 py-2">
|
||||||
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
|
<p class="text-xs text-gray-500">{{ item.data.created_post }}</p>
|
||||||
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BasicResultItem",
|
||||||
|
components: {BasicIcon, Link},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
tag: {
|
||||||
|
type: String,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
+13
-20
@@ -1,33 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<Link v-if="item.tag === 'AdditionalEducation'" data-hs-overlay="#hs-basic-modal" :href="route('client.additionalEducation.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<a v-if="item.tag === 'additionalEducation'" :href="route('client.additionalEducation.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" />
|
<BasicIcon name="additional_education_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
|
||||||
</Link>
|
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultAdditionalEducationItem",
|
name: "ResultAdditionalEducationItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
+27
-15
@@ -8,29 +8,41 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<span class="text-sm">{{ item.data.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<template v-for="schedule in item.data.schedules">
|
|
||||||
<div class="mb-2">
|
<div class="border-b w-full">
|
||||||
<div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div v-if="item.tag === 'EducationalGroup'" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<Link href="/"
|
<BasicIcon name="post_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">
|
<div class="px-4 space-y-1 py-2">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<p class="text-xs text-gray-500">{{ item.data.created_post }}</p>
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5"/>
|
<template v-for="schedule in item.data.schedules">
|
||||||
</svg>
|
<div class="mb-2">
|
||||||
<p class="truncate">{{ schedule.title }}</p>
|
<div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
||||||
</Link>
|
<Link href="/"
|
||||||
</div>
|
class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">
|
||||||
</div>
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
||||||
</template>
|
stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5"/>
|
||||||
|
</svg>
|
||||||
|
<p class="truncate">{{ schedule.title }}</p>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultEducationalGroupItem",
|
name: "ResultEducationalGroupItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
+13
-20
@@ -1,33 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<Link v-if="item.tag === 'EducationalProgram'" data-hs-overlay="#hs-basic-modal" :href="route('client.program.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<a v-if="item.tag === 'EducationalProgram'" :href="route('client.program.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5" />
|
<BasicIcon name="educational_program_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
<span class="text-sm">{{ item.data.name }}</span>
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
</Link>
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<div v-if="item.matches.length !== 0" class="">
|
</div>
|
||||||
<template v-for="match in item.matches.slice(0,3)">
|
</div>
|
||||||
<div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
</a>
|
||||||
<div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">
|
</div>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />
|
|
||||||
</svg>
|
|
||||||
<p class="truncate">{{ match }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultEducationalProgramItem",
|
name: "ResultEducationalProgramItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -1,34 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<Link v-if="item.tag === 'Event'" data-hs-overlay="#hs-basic-modal" :href="route('client.event.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<a v-if="item.tag === 'Event'" :href="route('client.event.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z" />
|
<BasicIcon name="event_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
<div class="flex items-center gap-x-2">
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<span class="text-xs text-gray-500">Начало {{ item.data.event_date_start }} в {{ item.data.event_time_start }}</span>
|
</div>
|
||||||
</div> </Link>
|
</div>
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
</a>
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
</div>
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultEventItem",
|
name: "ResultEventItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -1,30 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<a v-if="item.tag === 'Faculty'" data-hs-overlay="#hs-basic-modal" :href="route('client.faculty.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
<a v-if="item.tag === 'Faculty'" :href="route('client.faculty.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
|
<BasicIcon name="faculty_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
</a>
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
</div>
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
</div>
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
</a>
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
</div>
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultFacultyItem",
|
name: "ResultFacultyItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -1,37 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<Link v-if="item.tag === 'Page' && item.data.is_url == false" data-hs-overlay="#hs-basic-modal" :href="route('page.view', item.data.path) + '/'" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<a v-if="item.tag === 'Page' && item.data.is_url == false" :href="route('page.view', item.data.path) + '/'" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
|
<BasicIcon name="page_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
</Link>
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
<a v-if="item.tag === 'Page' && item.data.is_url == true" data-hs-overlay="#hs-basic-modal" :href="item.data.path" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
</div>
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
|
</div>
|
||||||
</svg>
|
</a>
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<a v-if="item.tag === 'Page' && item.data.is_url == true" :href="item.data.path" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
</a>
|
<BasicIcon name="page_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
<div class="px-4 space-y-1 py-2">
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
</div>
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
</div>
|
||||||
<!-- </svg>-->
|
</a>
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultPageItem",
|
name: "ResultPageItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<a v-if="item.tag === 'User'" data-hs-overlay="#hs-basic-modal" :href="route('client.person.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5">
|
<a v-if="item.tag === 'User'" :href="route('client.person.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
|
<BasicIcon name="post_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
<span class="text-sm">{{ item.data.name }}</span>
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
</a>
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
</div>
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
</div>
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
</a>
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
</div>
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultPersonItem",
|
name: "ResultPersonItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -1,33 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<a v-if="item.tag === 'Post'" data-hs-overlay="#hs-basic-modal" :href="route('client.post.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
<div class="border-b w-full">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
<a v-if="item.tag === 'Post'" :href="route('client.post.show', item.data.slug)" target="_blank" class="rounded-lg hover:bg-[#F2F2F2] my-1 px-4 w-full flex items-center">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" />
|
<BasicIcon name="post_search" class="w-5 h-5 flex-shrink-0 text-gray-500" />
|
||||||
</svg>
|
<div class="px-4 space-y-1 py-2">
|
||||||
<div class="flex items-center gap-x-2">
|
<p class="text-sm">{{ item.data.title }}</p>
|
||||||
<span class="text-sm">{{ item.data.title }}</span>
|
<p class="text-xs text-gray-500">{{ item.data.created_post }}</p>
|
||||||
<span class="text-xs text-gray-500">{{ item.data.created_post }}</span>
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
</div>
|
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||||
</a>
|
</div>
|
||||||
<!-- <div v-if="item.matches.length !== 0" class="">-->
|
</div>
|
||||||
<!-- <template v-for="match in item.matches.slice(0,3)">-->
|
</a>
|
||||||
<!-- <div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">-->
|
</div>
|
||||||
<!-- <div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">-->
|
|
||||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">-->
|
|
||||||
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />-->
|
|
||||||
<!-- </svg>-->
|
|
||||||
<!-- <p class="truncate">{{ match }}</p>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Link} from "@inertiajs/vue3";
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ResultPostItem",
|
name: "ResultPostItem",
|
||||||
components: {Link},
|
components: {BasicIcon, Link},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCategory: 'All',
|
selectedCategory: 'All',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
class="px-2 font-light duration-300">
|
class="px-2 font-light duration-300">
|
||||||
<template v-for="(elements, tag) in result">
|
<template v-for="(elements, tag) in result">
|
||||||
<component
|
<component
|
||||||
|
class="rounded-none"
|
||||||
v-for="(item, index) in elements"
|
v-for="(item, index) in elements"
|
||||||
:key="index"
|
:key="index"
|
||||||
:is="getComponent(tag)"
|
:is="getComponent(tag)"
|
||||||
@@ -36,6 +37,7 @@ import ResultFacultyItem from "@/componentss/features/search/components/Items/Re
|
|||||||
import ResultEducationalGroupItem from "@/componentss/features/search/components/Items/ResultEducationalGroupItem.vue";
|
import ResultEducationalGroupItem from "@/componentss/features/search/components/Items/ResultEducationalGroupItem.vue";
|
||||||
import ResultAdditionalEducationItem
|
import ResultAdditionalEducationItem
|
||||||
from "@/componentss/features/search/components/Items/ResultAdditionalEducationItem.vue";
|
from "@/componentss/features/search/components/Items/ResultAdditionalEducationItem.vue";
|
||||||
|
import BasicResultItem from "@/componentss/features/search/components/Items/BasicResultItem.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -50,7 +52,9 @@ export default {
|
|||||||
PreSearchLinkList,
|
PreSearchLinkList,
|
||||||
ResultPersonItem,
|
ResultPersonItem,
|
||||||
ResultFacultyItem,
|
ResultFacultyItem,
|
||||||
Link},
|
Link,
|
||||||
|
BasicResultItem
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
}
|
||||||
@@ -67,6 +71,7 @@ export default {
|
|||||||
User: 'ResultPersonItem',
|
User: 'ResultPersonItem',
|
||||||
Faculty: 'ResultFacultyItem'
|
Faculty: 'ResultFacultyItem'
|
||||||
};
|
};
|
||||||
|
|
||||||
return componentMap[type] || null;
|
return componentMap[type] || null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<a v-if="item.tag === 'Post'" data-hs-overlay="#hs-basic-modal" :href="route('client.post.show', item.data.slug)" class="my-1 flex gap-3 px-2 py-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" />
|
||||||
|
</svg>
|
||||||
|
<div class="flex items-center gap-x-2">
|
||||||
|
<span class="text-sm">{{ item.data.title }}</span>
|
||||||
|
<span class="text-xs text-gray-500">{{ item.data.created_post }}</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div v-if="item.matches.length !== 0" class="">
|
||||||
|
<div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
||||||
|
<div class="ml-[8px] flex h-12 w-full items-center gap-2 overflow-hidden border-l border-gray-200 px-4 pl-[22px] text-sm text-gray-900 md:h-10">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5" />
|
||||||
|
</svg>
|
||||||
|
<p class="truncate">{{ item.matches[0] }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ResultPostItem",
|
||||||
|
components: {Link},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectedCategory: 'All',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -13,6 +13,7 @@ import CategoryBadge from "@/componentss/shared/badge/badges/CategoryBadge.vue";
|
|||||||
import TagBadge from "@/componentss/shared/badge/badges/TagBadge.vue";
|
import TagBadge from "@/componentss/shared/badge/badges/TagBadge.vue";
|
||||||
import SortingByBadge from "@/componentss/shared/badge/badges/SortingByBadge.vue";
|
import SortingByBadge from "@/componentss/shared/badge/badges/SortingByBadge.vue";
|
||||||
import IsOnlineBadge from "@/componentss/shared/badge/badges/IsOnlineBadge.vue";
|
import IsOnlineBadge from "@/componentss/shared/badge/badges/IsOnlineBadge.vue";
|
||||||
|
import EduBudgetBadge from "@/componentss/shared/badge/badges/EduBudgetBadge.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "BasicListBadge",
|
name: "BasicListBadge",
|
||||||
components: {
|
components: {
|
||||||
@@ -21,7 +22,8 @@ export default {
|
|||||||
CategoryBadge,
|
CategoryBadge,
|
||||||
TagBadge,
|
TagBadge,
|
||||||
SortingByBadge,
|
SortingByBadge,
|
||||||
IsOnlineBadge
|
IsOnlineBadge,
|
||||||
|
EduBudgetBadge
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -34,7 +36,8 @@ export default {
|
|||||||
category: 'CategoryBadge',
|
category: 'CategoryBadge',
|
||||||
tag: 'TagBadge',
|
tag: 'TagBadge',
|
||||||
sort: 'SortingByBadge',
|
sort: 'SortingByBadge',
|
||||||
is_online: 'IsOnlineBadge'
|
is_online: 'IsOnlineBadge',
|
||||||
|
budget: 'EduBudgetBadge'
|
||||||
};
|
};
|
||||||
return componentMap[type] || null;
|
return componentMap[type] || null;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<span v-if="filter.value !== null" class="inline-flex items-center gap-x-1.5 py-1.5 ps-3 pe-2 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
|
||||||
|
{{ BudgetEducation.fromName(filter.value).label }}
|
||||||
|
<button @click.prevent="clearFilter" type="button" class="shrink-0 size-4 inline-flex items-center justify-center rounded-full hover:bg-primary-lighter focus:outline-none focus:bg-blue-200 focus:text-blue-500">
|
||||||
|
<span class="sr-only">Remove badge</span>
|
||||||
|
<svg class="shrink-0 size-3" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M18 6 6 18"></path>
|
||||||
|
<path d="m6 6 12 12"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {Link} from "@inertiajs/vue3";
|
||||||
|
import slugify from "slugify";
|
||||||
|
import BudgetEducation from "@/Enum/BudgetEducation.js";
|
||||||
|
export default {
|
||||||
|
name: "EduBudgetBadge",
|
||||||
|
components: {Link},
|
||||||
|
computed: {
|
||||||
|
BudgetEducation() {
|
||||||
|
return BudgetEducation
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clearFilter() {
|
||||||
|
let url = new URL(window.location.href);
|
||||||
|
url.searchParams.delete(this.filter.param);
|
||||||
|
let newUrl = url.toString();
|
||||||
|
this.$inertia.visit(newUrl,{
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
filter: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user