.shadow-sm.rounded-lg.bg-white.p-4.w-full.mb-5(v-if="warnings.length")
.relative.z-10(aria-labelledby="modal-title", role="dialog", aria-modal="true" v-if="boxToResolve > 0")
.fixed.inset-0.bg-gray-900.bg-opacity-90.transition-opacity
.fixed.inset-0.z-10.overflow-y-auto
.flex.min-h-full.items-end.justify-center.p-4.text-center(class="sm:items-center sm:p-0")
.relative.transform.overflow-hidden.rounded-lg.bg-white.text-left.shadow-xl.transition-all(class="sm:my-8 sm:w-full sm:max-w-lg")
.bg-white.px-4.pt-5.pb-4(class="sm:p-6 sm:pb-4")
label.block.text-sm.font-medium.text-gray-700(for="admin_note") Add a note
span.text-gray-300 (Optional)
.mt-1
textarea#description.mt-1.block.w-full.rounded-md.border-gray-300.border-1.px-2.py-1(
name="warning_note" rows="3"
class="focus:border-green-500 focus:ring-green-500 sm:text-sm"
v-model="form.admin_note"
)
.bg-gray-50.px-4.py-3(class="sm:flex sm:flex-row-reverse sm:px-6")
button.inline-flex.w-full.justify-center.rounded-md.border.border-transparent.bg-green-600.px-4.py-2.text-base.font-medium.text-white.shadow-sm(
type="button"
:class="{'hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm': true, 'opacity-25 cursor-default': isLoading}"
:disabled="isLoading" :readonly="isLoading"
@click="editWarning"
)
| Save
button.mt-3.inline-flex.w-full.justify-center.rounded-md.border.border-gray-300.bg-white.px-4.py-2.text-base.font-medium.text-gray-700.shadow-sm(
type="button"
class="hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
@click="boxToResolve = 0"
) Cancel
h2.text-xl.font-bold(v-if="me && me.is_staff") Reports
h2.text-xl.font-bold(v-else) My reports
ul(role="list" v-if="me")
li.text-sm.rounded-md.border.border-gray-200.mt-3(v-for="warning in warnings" :key="warning.id")
.py-3.pl-3.pr-4(v-if="!me.is_staff")
h3.flex.leading-6.mb-2.float-right
| {{ warning.created|moment("DD/MM/YYYY HH:mm") }}
p {{ warning.note }}
.py-3.pl-3.pr-4(v-else)
h3.flex.leading-6.mb-2.float-right
| {{ warning.created|moment("DD/MM/YYYY HH:mm") }}
.flex
.mr-3(style="flex-shrink: 0;")
user-avatar(:data="warning.user")
p.leading-8
a.text-green-800(class="hover:text-green-700" :href="'/user/'+warning.user.id")
| @
span.underline {{ warning.user.username }}
p.leading-8.ml-5 {{ warning.note }}
.pr-3
button(
class="ml-5 cursor-pointer rounded-md border border-green-600 flex bg-green-600 py-2 px-3 text-xs font-medium leading-4 text-white shadow-sm hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2"
v-if="!warning.resolved_by"
@click="boxToResolve = warning.id"
)
| Resolve
.bg-green-50.py-3.pl-3.pr-4(v-if="warning.resolved_by")
em Resolved by:
h3.flex.leading-6.mb-2.float-right
| {{ warning.updated|moment("DD/MM/YYYY HH:mm") }}
.flex
.mr-3(style="flex-shrink: 0;")
user-avatar(:data="warning.resolved")
p.leading-8
a.text-green-800(class="hover:text-green-700" :href="'/user/'+warning.user.id")
| @
span.underline {{ warning.resolved.username }}
p.leading-8.ml-5 {{ warning.admin_note }}