lk.zachem.info/app/Modules/Main/Views/company/agents/table.blade.php
Thekindbull b5b50159a7 - обновлена работа с администраированием агентств: сделано редактирование данных, а также управление агентами из админки (добавление, удаление)
- проведен рефакторинг компоненты создания агента
- в админку добавлена работа с url на стороне битрикса
- проведен рефакторинг кода по отправке данных в битрикс
- разнесены оставшиеся миграции по модулям
2025-11-11 15:29:04 +08:00

43 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('content')
<div>
<form class="d-flex mb-3" method="GET" action="{{ route('company.agents.table') }}">
<div class="p-2 border rounded-3 border-1 bg-white">
<input type="radio" class="btn-check" name="status" value="all" id="option5" autocomplete="off"
onclick="this.form.submit()" {{ $status == 'all' || !$status ? 'checked' : '' }}>
<label class="btn p-2 fs-5" for="option5">Все</label>
<input type="radio" class="btn-check" name="status" value="{{ $statuses::ACTIVE }}" id="option6"
autocomplete="off" onclick="this.form.submit()" {{ $status == $statuses::ACTIVE ? 'checked' : '' }}>
<label class="btn p-2 fs-5" for="option6">Активные</label>
<input type="radio" class="btn-check" name="status" value="{{ $statuses::DISMISSED }}" id="option7"
autocomplete="off" onclick="this.form.submit()" {{ $status == $statuses::DISMISSED ? 'checked' : '' }}>
<label class="btn p-2 fs-5" for="option7">Уволенные</label>
</div>
<div class="ms-auto p-2">
<button type="button" class="btn btn-primary py-2 px-3 fs-5" data-bs-toggle="modal"
data-bs-target="#createAgentModal">
<i class="bi bi-person-plus"></i>
</button>
</div>
</form>
@if (!$status || $status == 'all' || $status == $statuses::ACTIVE)
<h4 class="fw-bold mt-5 mb-3">Активные</h4>
<div class="fs-5 bg-light mb-2">
@livewire('agentsTable', ['status' => $statuses::ACTIVE])
</div>
@endif
@if (!$status || $status == 'all' || $status == $statuses::DISMISSED)
<h4 class="fw-bold mt-5 mb-3">Уволенные</h4>
<div class="fs-5 bg-light mb-2">
@livewire('agentsTable', ['status' => $statuses::DISMISSED])
</div>
@endif
</div>
@livewire('company.agent.create', ['containerId' => 'createAgentModal', 'companyId' => $companyId])
@endsection