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
|
||||
{
|
||||
return $table
|
||||
@@ -81,14 +86,11 @@ class EducationalGroupResource extends Resource
|
||||
->searchable()
|
||||
->description(fn ($record) => $record->faculty->title ?? ''),
|
||||
|
||||
BadgeColumn::make('education_form_id')
|
||||
TextColumn::make('education_form_id')
|
||||
->label('Форма обучения')
|
||||
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)?->label())
|
||||
->color(fn ($state) => match($state) {
|
||||
FormEducation::FULL_TIME->value => 'success',
|
||||
FormEducation::PART_TIME->value => 'warning',
|
||||
default => 'gray',
|
||||
})
|
||||
->badge()
|
||||
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)?->getLabel())
|
||||
->color(fn ($state) => FormEducation::tryFrom($state)?->getColor())
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
@@ -97,6 +99,7 @@ class EducationalGroupResource extends Resource
|
||||
->sortable()
|
||||
->toggleable(),
|
||||
])
|
||||
|
||||
->filters([
|
||||
Tables\Filters\SelectFilter::make('faculty_id')
|
||||
->label('Факультет')
|
||||
|
||||
@@ -30,7 +30,7 @@ class EditPost extends EditRecord
|
||||
protected function mutateFormDataBeforeFill(array $data): array
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Enums\FormEducation;
|
||||
use App\Filament\Resources\ScheduleResource\Pages;
|
||||
use App\Models\EducationalGroup;
|
||||
use App\Models\Schedule;
|
||||
@@ -48,16 +49,6 @@ class ScheduleResource extends Resource
|
||||
->required()
|
||||
->live()
|
||||
->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 =>
|
||||
str(Str::slug(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME) . '-' . Carbon::now()->timestamp) . '.' . $file->getClientOriginalExtension()
|
||||
)
|
||||
)
|
||||
->afterStateUpdated(function ($set, $state) {
|
||||
$set('title', pathinfo($state?->getClientOriginalName(), PATHINFO_FILENAME));
|
||||
})
|
||||
->visibility('public')),
|
||||
->visibility('public'),
|
||||
])
|
||||
->itemLabel(fn (array $state): ?string => $state['title'] ?? 'Новый файл')
|
||||
->collapsible()
|
||||
@@ -108,7 +100,7 @@ class ScheduleResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('educational_group.title')
|
||||
TextColumn::make('educationalGroup.title')
|
||||
->label('Учебная группа')
|
||||
->sortable()
|
||||
->searchable(),
|
||||
@@ -118,13 +110,11 @@ class ScheduleResource extends Resource
|
||||
->getStateUsing(fn ($record) => count($record->file ?? []))
|
||||
->badge(),
|
||||
|
||||
IconColumn::make('is_zaoch')
|
||||
->label('Форма обучения')
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-academic-cap')
|
||||
->falseIcon('heroicon-o-building-office')
|
||||
->trueColor('success')
|
||||
->falseColor('primary'),
|
||||
TextColumn::make('educationalGroup.education_form_id')
|
||||
->formatStateUsing(fn ($state) => FormEducation::tryFrom($state)->getLabel())
|
||||
->color(fn ($state) => FormEducation::tryFrom($state)?->getColor())
|
||||
->badge()
|
||||
->label('Форма обучения'),
|
||||
|
||||
TextColumn::make('updated_at')
|
||||
->label('Обновлено')
|
||||
@@ -163,8 +153,7 @@ class ScheduleResource extends Resource
|
||||
->emptyStateActions([
|
||||
Tables\Actions\CreateAction::make()
|
||||
->label('Добавить расписание'),
|
||||
])
|
||||
->defaultSort('educational_group.title');
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
|
||||
@@ -9,6 +9,7 @@ use App\Enums\LevelEducational;
|
||||
use App\Http\Resources\DirectionStudyResource;
|
||||
use App\Http\Resources\EducationalProgramFullResource;
|
||||
use App\Models\AdmissionCampaign;
|
||||
use App\Models\AdmissionPlan;
|
||||
use App\Models\DirectionStudy;
|
||||
use App\Models\EducationalProgram;
|
||||
use App\Services\App\Seo\SeoPageProvider;
|
||||
@@ -39,19 +40,33 @@ class ClientProgramController extends Controller
|
||||
});
|
||||
|
||||
$formsEdu = Cache::remember($cacheKeyForms, now()->addDay(), function () {
|
||||
return collect(FormEducation::cases())
|
||||
->mapWithKeys(fn($form) => [$form->name => $form->getLabel()]);
|
||||
return AdmissionPlan::distinct()
|
||||
->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 () {
|
||||
return collect(BudgetEducation::cases())
|
||||
->mapWithKeys(fn($type) => [$type->name => $type->getLabel()]);
|
||||
return AdmissionPlan::distinct()
|
||||
->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 () {
|
||||
return $this->seoPageProvider->getSeoForCurrentPage();
|
||||
});
|
||||
;
|
||||
|
||||
$naprs = Cache::remember($cacheKey, now()->addHours(), function () use ($request, $activeCampaign) {
|
||||
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();
|
||||
|
||||
$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) {
|
||||
$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());
|
||||
|
||||
$schedulesByFaculty = $educationalGroups->groupBy(function ($group) {
|
||||
return $group->faculty->title; // Предполагаем, что у факультета есть поле 'name'
|
||||
return $group->faculty->title;
|
||||
});
|
||||
|
||||
$schedulesByFaculty = $schedulesByFaculty->toArray();
|
||||
|
||||
if ($request->has('favorite') && empty($request->input('favorite'))) {
|
||||
$schedulesByFaculty = [];
|
||||
}
|
||||
|
||||
|
||||
$forms_education = [];
|
||||
@@ -55,11 +52,6 @@ class ClientScheduleController extends Controller
|
||||
}
|
||||
|
||||
$filters = [
|
||||
'direction_filter' => [
|
||||
'type' => 'direction',
|
||||
'value' => request()->input('direction'),
|
||||
'param' => 'direction'
|
||||
],
|
||||
'form_education_filter' => [
|
||||
'type' => 'form',
|
||||
'value' => request()->input('form'),
|
||||
|
||||
@@ -77,7 +77,7 @@ class SearchController extends Controller
|
||||
$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);
|
||||
|
||||
@@ -114,14 +114,24 @@ class SearchController extends Controller
|
||||
private function getMatches(string $haystack, string $needle): array
|
||||
{
|
||||
$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;
|
||||
while (($offset = mb_strpos($haystack, $needle, $offset, 'UTF-8')) !== false) {
|
||||
if (($offset = mb_strpos($haystack, $needle, $offset, 'UTF-8')) !== false) {
|
||||
for ($i = 0; 1 > count($matches); $i++) {
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
||||
return $matches;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,15 +15,15 @@ class Schedule extends Model
|
||||
'file' => 'array',
|
||||
];
|
||||
|
||||
public function subSchedules()
|
||||
{
|
||||
return $this->hasMany(SubSchedule::class);
|
||||
}
|
||||
|
||||
public function faculty()
|
||||
{
|
||||
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
|
||||
];
|
||||
}
|
||||
|
||||
getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
export default EducationForm;
|
||||
@@ -12,8 +12,6 @@ class EducationForm {
|
||||
return Object.values(this).find(item => item.value == value) || null;
|
||||
}
|
||||
|
||||
|
||||
// Метод для получения имени
|
||||
getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@ import BasicPageContainer from "@/componentss/ui/templates/BasicPageContainer.vu
|
||||
import AcademicJournalsListBreadcrumbs
|
||||
from "@/componentss/features/academicJournals/components/AcademicJournalsListBreadcrumbs.vue.vue";
|
||||
import BasicPageWrapper from "@/componentss/ui/wrappers/BasicPageWrapper.vue";
|
||||
import BasicListBadge from "@/componentss/shared/badge/BasicListBadge.vue";
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
components: {
|
||||
BasicListBadge,
|
||||
BasicPageWrapper, AcademicJournalsListBreadcrumbs, BasicPageContainer,
|
||||
ProgramLevelEduFilter,
|
||||
FormEducationalFilter,
|
||||
@@ -32,10 +34,10 @@ export default {
|
||||
Link,
|
||||
Head,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
computed: {
|
||||
hasActiveFilters() {
|
||||
return this.filters.budget_filter.value || this.filters.direction_filter.value || this.filters.formEdu_filter.value;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
campaignName: {
|
||||
@@ -98,7 +100,7 @@ export default {
|
||||
<div class="space-y-5 md:space-y-4 mx-auto max-w-3xl w-full">
|
||||
<div>
|
||||
<div class="">
|
||||
<div class="my-10 w-full">
|
||||
<div class="mt-10 mb-5 w-full">
|
||||
<ProgramListBreadcrumbs />
|
||||
<div class="flex items-center gap-x-2">
|
||||
<ProgramLevelEduFilter :levels="levelsEducational" :level_filter="filters.level_filter" />
|
||||
@@ -110,7 +112,15 @@ export default {
|
||||
</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">
|
||||
<template v-for="naprs in transformToColumns(this.naprs.data)">
|
||||
<div class="flex flex-col">
|
||||
|
||||
@@ -9,6 +9,7 @@ import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
import BasicFooter from "@/footers/BasicFooter.vue";
|
||||
import BasicListFilter from "@/componentss/shared/filter/BasicListFilter.vue";
|
||||
import FormEducationalFilter from "@/componentss/shared/filter/filters/FormEducationalFilter.vue";
|
||||
import MetaTags from "@/componentss/shared/SEO/MetaTags.vue";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -22,6 +23,7 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {
|
||||
MetaTags,
|
||||
FormEducationalFilter,
|
||||
BasicListFilter,
|
||||
BasicFooter,
|
||||
@@ -40,6 +42,9 @@ export default {
|
||||
},
|
||||
schedulesByFaculty: {
|
||||
type: Object
|
||||
},
|
||||
seo: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -54,15 +59,25 @@ export default {
|
||||
});
|
||||
}, 300),
|
||||
toggleFavorite(group) {
|
||||
if (!this.favoriteGroups) {
|
||||
this.favoriteGroups = [];
|
||||
}
|
||||
|
||||
const index = this.favoriteGroups.findIndex(g => g === group);
|
||||
if (index === -1) {
|
||||
this.favoriteGroups.push(group);
|
||||
} else {
|
||||
this.favoriteGroups.splice(index, 1);
|
||||
}
|
||||
|
||||
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() {
|
||||
@@ -97,7 +112,7 @@ export default {
|
||||
method: 'get',
|
||||
preserveState: true,
|
||||
data: {
|
||||
favorite: (this.favoriteGroups.length !== 0) ? this.favoriteGroups : "",
|
||||
favorite: (this.favoriteGroups?.length !== 0) ? this.favoriteGroups : "",
|
||||
},
|
||||
onFinish: callback, // Вызываем колбэк после завершения запроса
|
||||
});
|
||||
@@ -124,11 +139,14 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<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">
|
||||
<main class="flex-grow">
|
||||
@@ -159,7 +177,6 @@ export default {
|
||||
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"
|
||||
placeholder="Поиск"
|
||||
:disabled="filters.favorite_filter.value !== null"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,7 +187,7 @@ export default {
|
||||
<button
|
||||
@click="toggleShowFavorites"
|
||||
type="button"
|
||||
:disabled="favoriteGroups?.length === 0 || loading"
|
||||
:disabled="loading"
|
||||
:class="
|
||||
filters.favorite_filter.value !== null ? 'bg-primary text-white hover:bg-primary-dark': 'text-gray-700 hover:bg-gray-100',
|
||||
loading ? 'animate-pulse' : ''
|
||||
@@ -192,9 +209,8 @@ export default {
|
||||
|
||||
<div class="mx-auto max-w-2xl hs-accordion-group grid gap-3">
|
||||
<div class="space-y-4">
|
||||
<transition-group name="fade">
|
||||
<template v-for="(faculty, title) in schedulesByFaculty">
|
||||
<div class="">
|
||||
<div>
|
||||
<h2 class="text-center text-gray-800 font-medium">{{ title }}</h2>
|
||||
<hr class="mt-2 mb-4">
|
||||
<template v-for="educationalGroup in faculty" :key="educationalGroup.data.id">
|
||||
@@ -245,7 +261,15 @@ export default {
|
||||
</template>
|
||||
</div>
|
||||
</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>
|
||||
</article>
|
||||
@@ -276,7 +300,6 @@ export default {
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
}
|
||||
|
||||
.gg-enter-active,
|
||||
|
||||
@@ -13,6 +13,62 @@ export default {
|
||||
stroke_width: 1.5,
|
||||
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: {
|
||||
path: '<path stroke-linecap="round" stroke-linejoin="round" d="M4.499 8.248h15m-15 7.501h15" />',
|
||||
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>
|
||||
<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">
|
||||
<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="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" />
|
||||
</svg>
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<BasicIcon name="additional_education_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>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultAdditionalEducationItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
+13
-1
@@ -8,6 +8,13 @@
|
||||
</svg>
|
||||
<span class="text-sm">{{ item.data.title }}</span>
|
||||
</div>
|
||||
|
||||
<div class="border-b w-full">
|
||||
<div v-if="item.tag === 'EducationalGroup'" 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>
|
||||
<template v-for="schedule in item.data.schedules">
|
||||
<div class="mb-2">
|
||||
<div class="flex gap-3 px-2 items-center hover:bg-[#F2F2F2] rounded-lg">
|
||||
@@ -22,15 +29,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultEducationalGroupItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
+9
-16
@@ -1,22 +1,14 @@
|
||||
<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">
|
||||
<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="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" />
|
||||
</svg>
|
||||
|
||||
<span class="text-sm">{{ item.data.name }}</span>
|
||||
</Link>
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<BasicIcon name="educational_program_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>
|
||||
<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>
|
||||
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,10 +16,11 @@
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultEducationalProgramItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -1,34 +1,25 @@
|
||||
<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">
|
||||
<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="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" />
|
||||
</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.event_date_start }} в {{ item.data.event_time_start }}</span>
|
||||
</div> </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>-->
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<BasicIcon name="event_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>
|
||||
<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: "ResultEventItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -1,30 +1,25 @@
|
||||
<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">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
||||
<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" />
|
||||
</svg>
|
||||
<span class="text-sm">{{ item.data.title }}</span>
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<BasicIcon name="faculty_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>
|
||||
<div v-if="item.matches.length !== 0" class="">
|
||||
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<!-- <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>-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultFacultyItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
<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">
|
||||
<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="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" />
|
||||
</svg>
|
||||
<span class="text-sm">{{ item.data.title }}</span>
|
||||
</Link>
|
||||
<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">
|
||||
<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="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" />
|
||||
</svg>
|
||||
<span class="text-sm">{{ item.data.title }}</span>
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<BasicIcon name="page_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>
|
||||
<div v-if="item.matches.length !== 0" class="">
|
||||
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<!-- <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>-->
|
||||
<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">
|
||||
<BasicIcon name="page_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>
|
||||
<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: "ResultPageItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -1,30 +1,24 @@
|
||||
<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">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5">
|
||||
<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" />
|
||||
</svg>
|
||||
<span class="text-sm">{{ item.data.name }}</span>
|
||||
<div class="border-b w-full">
|
||||
<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">
|
||||
<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>
|
||||
<div v-if="item.matches.length !== 0" class="">
|
||||
<p class="truncate text-[13px] text-gray-500">{{ item.matches[0] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<!-- <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>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultPersonItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -1,33 +1,25 @@
|
||||
<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 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 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>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Link} from "@inertiajs/vue3";
|
||||
import BasicIcon from "@/componentss/ui/icons/BasicIcon.vue";
|
||||
|
||||
export default {
|
||||
name: "ResultPostItem",
|
||||
components: {Link},
|
||||
components: {BasicIcon, Link},
|
||||
data() {
|
||||
return {
|
||||
selectedCategory: 'All',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
class="px-2 font-light duration-300">
|
||||
<template v-for="(elements, tag) in result">
|
||||
<component
|
||||
class="rounded-none"
|
||||
v-for="(item, index) in elements"
|
||||
:key="index"
|
||||
: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 ResultAdditionalEducationItem
|
||||
from "@/componentss/features/search/components/Items/ResultAdditionalEducationItem.vue";
|
||||
import BasicResultItem from "@/componentss/features/search/components/Items/BasicResultItem.vue";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -50,7 +52,9 @@ export default {
|
||||
PreSearchLinkList,
|
||||
ResultPersonItem,
|
||||
ResultFacultyItem,
|
||||
Link},
|
||||
Link,
|
||||
BasicResultItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
@@ -67,6 +71,7 @@ export default {
|
||||
User: 'ResultPersonItem',
|
||||
Faculty: 'ResultFacultyItem'
|
||||
};
|
||||
|
||||
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 SortingByBadge from "@/componentss/shared/badge/badges/SortingByBadge.vue";
|
||||
import IsOnlineBadge from "@/componentss/shared/badge/badges/IsOnlineBadge.vue";
|
||||
import EduBudgetBadge from "@/componentss/shared/badge/badges/EduBudgetBadge.vue";
|
||||
export default {
|
||||
name: "BasicListBadge",
|
||||
components: {
|
||||
@@ -21,7 +22,8 @@ export default {
|
||||
CategoryBadge,
|
||||
TagBadge,
|
||||
SortingByBadge,
|
||||
IsOnlineBadge
|
||||
IsOnlineBadge,
|
||||
EduBudgetBadge
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -34,7 +36,8 @@ export default {
|
||||
category: 'CategoryBadge',
|
||||
tag: 'TagBadge',
|
||||
sort: 'SortingByBadge',
|
||||
is_online: 'IsOnlineBadge'
|
||||
is_online: 'IsOnlineBadge',
|
||||
budget: 'EduBudgetBadge'
|
||||
};
|
||||
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