для отладки на боевой добавил временно возможность видеть токен компании в админке
This commit is contained in:
parent
f011fd2eae
commit
afe70fb616
@ -45,6 +45,10 @@ public function edit(Company $company)
|
|||||||
public function update(Request $request, Company $company)
|
public function update(Request $request, Company $company)
|
||||||
{
|
{
|
||||||
$company->update($request->only('name', 'email', 'phone'));
|
$company->update($request->only('name', 'email', 'phone'));
|
||||||
|
if ($request->token) {
|
||||||
|
$company->bitrixy->token = $request->token;
|
||||||
|
$company->bitrixy->save();
|
||||||
|
}
|
||||||
return to_route('admin.companies.edit', ['company' => $company]);
|
return to_route('admin.companies.edit', ['company' => $company]);
|
||||||
}
|
}
|
||||||
public function delete(Company $company) {
|
public function delete(Company $company) {
|
||||||
|
|||||||
@ -32,12 +32,14 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@if (env('APP_DEBUG'))
|
||||||
<div class="mb-3">
|
<div class="mb-3 d-none">
|
||||||
<label for="tokenFormControl" class="form-label">Секретный токен для вебхука</label>
|
<label for="tokenFormControl" class="form-label">Секретный токен для вебхука</label>
|
||||||
<input type="text" disabled class="form-control" id="tokenFormControl" value="{{ $company->bitrixy->token }}">
|
<input type="text" class="form-control" name="token" id="tokenFormControl"
|
||||||
<small style="font-size:10px">* Служебное поле доступно в режиме тестирования приложения</small>
|
value="{{ $company->bitrixy->token }}">
|
||||||
</div>
|
<small style="font-size:10px">* Служебное поле доступно в режиме тестирования приложения</small>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Сохранить</button>
|
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||||||
</form>
|
</form>
|
||||||
@ -71,13 +73,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<div class="dropdown" style="">
|
<div class="dropdown" style="">
|
||||||
<button class="btn btn-light" type="button" id="dropdownMenuButton"
|
<button class="btn btn-light" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown"
|
||||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="bi bi-three-dots-vertical"></i>
|
<i class="bi bi-three-dots-vertical"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||||
<form method="post"
|
<form method="post" action="{{ route('admin.users.role.delete', ['userRole' => 999]) }}">
|
||||||
action="{{ route('admin.users.role.delete', ['userRole' => 999]) }}">
|
|
||||||
@csrf
|
@csrf
|
||||||
<button class="dropdown-item" type="submit">Удалить</button>
|
<button class="dropdown-item" type="submit">Удалить</button>
|
||||||
</form>
|
</form>
|
||||||
@ -121,13 +122,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<div class="dropdown" style="">
|
<div class="dropdown" style="">
|
||||||
<button class="btn btn-light" type="button" id="dropdownMenuButton"
|
<button class="btn btn-light" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown"
|
||||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="bi bi-three-dots-vertical"></i>
|
<i class="bi bi-three-dots-vertical"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||||
<form method="post"
|
<form method="post" action="{{ route('admin.users.role.delete', ['userRole' => 999]) }}">
|
||||||
action="{{ route('admin.users.role.delete', ['userRole' => 999]) }}">
|
|
||||||
@csrf
|
@csrf
|
||||||
<button class="dropdown-item" type="submit">Удалить</button>
|
<button class="dropdown-item" type="submit">Удалить</button>
|
||||||
</form>
|
</form>
|
||||||
@ -141,4 +141,4 @@
|
|||||||
</div>
|
</div>
|
||||||
@livewire('company.agent.create', ['containerId' => 'createAgentModal', 'companyId' => $company->id])
|
@livewire('company.agent.create', ['containerId' => 'createAgentModal', 'companyId' => $company->id])
|
||||||
@livewire('company.admin.create', ['containerId' => 'createCompanyAdminModal', 'companyId' => $company->id])
|
@livewire('company.admin.create', ['containerId' => 'createCompanyAdminModal', 'companyId' => $company->id])
|
||||||
@endsection
|
@endsection
|
||||||
Loading…
Reference in New Issue
Block a user