2022-11-18 11:55:42 +00:00
|
|
|
@extends('layouts.admin')
|
|
|
|
|
|
|
|
@section('title', '工单: ' . $workOrder->title)
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<h3>{{ $workOrder->title }}</h3>
|
2023-01-17 12:53:34 +00:00
|
|
|
<p>
|
|
|
|
UUID: {{ $workOrder->uuid }}
|
2023-02-22 14:40:56 +00:00
|
|
|
<br/>
|
2023-02-03 13:07:57 +00:00
|
|
|
创建时间: {{ $workOrder->created_at }}, {{ $workOrder->created_at->diffForHumans() }}。
|
2023-02-22 14:40:56 +00:00
|
|
|
<br/>
|
2023-02-03 13:07:57 +00:00
|
|
|
最后更新时间: {{ $workOrder->updated_at }}。
|
2023-01-17 12:53:34 +00:00
|
|
|
</p>
|
2022-11-19 02:28:04 +00:00
|
|
|
<a href="{{ route('admin.work-orders.edit', $workOrder) }}">编辑此工单</a>
|
2023-01-04 19:17:10 +00:00
|
|
|
<a href="{{ route('admin.users.edit', $workOrder->user_id) }}">用户: {{ $workOrder->user->name }}</a>
|
2023-01-02 16:17:57 +00:00
|
|
|
|
2023-01-14 12:15:04 +00:00
|
|
|
@if($workOrder->ip)
|
|
|
|
<p>IP 地址: {{ $workOrder->ip }}</p>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if($workOrder->host_id)
|
|
|
|
<a href="{{ route('admin.hosts.edit', $workOrder->host_id) }}">主机: {{ $workOrder->host->name }}</a>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if($workOrder->module_id)
|
|
|
|
<a href="{{ route('admin.modules.show', $workOrder->module_id) }}">模块: {{ $workOrder->module->name }}</a>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<p>@parsedown($workOrder->content)</p>
|
|
|
|
<hr/>
|
2022-11-18 11:55:42 +00:00
|
|
|
|
|
|
|
<x-work-order-status :status="$workOrder->status"></x-work-order-status>
|
|
|
|
|
|
|
|
<div class="mt-3">
|
|
|
|
<h4>对话记录</h4>
|
|
|
|
|
|
|
|
@foreach($replies as $reply)
|
|
|
|
<div class="card border-light mb-3 shadow">
|
2023-01-01 13:00:21 +00:00
|
|
|
<div class="card-header d-flex w-100 justify-content-between">
|
2023-01-01 13:36:06 +00:00
|
|
|
@if ($reply->role === 'user')
|
2023-01-02 16:29:17 +00:00
|
|
|
@if ($reply->user)
|
2023-02-01 05:47:32 +00:00
|
|
|
<a href="{{ route('admin.users.edit', $reply->user) }}">{{ $reply->user->name }}</a>
|
2023-01-01 13:36:06 +00:00
|
|
|
@else
|
|
|
|
{{ $reply->name }}
|
|
|
|
@endif
|
|
|
|
@elseif ($reply->role === 'admin')
|
2023-01-05 14:36:19 +00:00
|
|
|
<span class="text-primary">{{ config('app.display_name') }} 的 {{ $reply->name }}</span>
|
2023-01-01 13:36:06 +00:00
|
|
|
@elseif ($reply->role === 'module')
|
2023-01-01 13:00:21 +00:00
|
|
|
<a href="{{ route('admin.modules.edit', $workOrder->module_id) }}">{{ $workOrder->module->name }}
|
|
|
|
@if ($reply->name)
|
|
|
|
的 {{ $reply->name }}
|
|
|
|
@endif
|
|
|
|
</a>
|
2023-01-01 13:36:06 +00:00
|
|
|
@elseif ($reply->role === 'guest')
|
2023-01-01 13:00:21 +00:00
|
|
|
{{ $reply->name }}
|
2022-11-18 11:55:42 +00:00
|
|
|
@endif
|
|
|
|
|
2023-01-14 12:15:04 +00:00
|
|
|
|
2023-01-02 15:43:56 +00:00
|
|
|
<span class="text-end">
|
2023-01-02 16:11:29 +00:00
|
|
|
@if($reply->is_pending)
|
|
|
|
<span class="badge bg-primary">投递中</span>
|
|
|
|
@endif
|
|
|
|
|
2023-01-02 15:43:56 +00:00
|
|
|
<a href="{{ route('admin.work-orders.replies.edit', [$workOrder, $reply]) }}">编辑</a>
|
|
|
|
{{ $reply->created_at }}
|
|
|
|
</span>
|
2022-11-18 11:55:42 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
2023-01-02 16:05:46 +00:00
|
|
|
@parsedown($reply->content)
|
2022-11-18 11:55:42 +00:00
|
|
|
</div>
|
2023-01-14 12:15:04 +00:00
|
|
|
|
|
|
|
@if($reply->ip)
|
|
|
|
|
|
|
|
<div class="card-footer">
|
|
|
|
<span>IP 地址: {{ $reply->ip }}</span>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2022-11-18 11:55:42 +00:00
|
|
|
</div>
|
|
|
|
@endforeach
|
2023-01-02 15:48:45 +00:00
|
|
|
|
|
|
|
{{ $replies->links() }}
|
2022-11-18 11:55:42 +00:00
|
|
|
</div>
|
2022-11-19 02:28:04 +00:00
|
|
|
|
2022-12-09 08:14:37 +00:00
|
|
|
<h4 class="mt-3">您的回复</h4>
|
|
|
|
<form method="POST" action="{{ route('admin.work-orders.replies.store', $workOrder->id) }}">
|
|
|
|
@csrf
|
2023-02-22 14:40:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
<x-markdown-editor name="content" placeholder="作为 {{ config('app.display_name') }} 的 {{ Auth::guard('admin')->user()->name }} 回复。" />
|
2022-12-09 08:14:37 +00:00
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary mt-3 mb-3">提交</button>
|
2023-02-22 14:40:56 +00:00
|
|
|
|
2022-12-09 08:14:37 +00:00
|
|
|
</form>
|
|
|
|
|
2023-02-22 14:40:56 +00:00
|
|
|
|
2022-11-18 11:55:42 +00:00
|
|
|
@endsection
|