feat: qwinsta/logoff buttons on events list and detail (0.20.4)

RDG flap actions were only on the dashboard; add shared composable and
modal so operators can reset stuck sessions from События and event detail.
This commit is contained in:
2026-06-20 17:24:16 +10:00
parent 34a1670ea9
commit a35e50ccd1
8 changed files with 397 additions and 268 deletions
+18
View File
@@ -7,6 +7,21 @@
<p v-else-if="loading">Загрузка</p>
<template v-else-if="event">
<h1>{{ event.title }}</h1>
<p v-if="event.rdg_flap" class="event-rdg-actions">
<button
type="button"
class="secondary"
:disabled="qwinstaLoadingId === event.id"
@click="runQwinsta(event)"
>
qwinsta (RDG flap)
</button>
</p>
<RdgQwinstaModal
:modal="qwinstaModal"
@close="closeQwinstaModal"
@logoff="runLogoff"
/>
<div class="card report-meta">
<dl class="detail-fields">
<div class="detail-field">
@@ -74,7 +89,9 @@
import { computed, onMounted, ref, watch } from "vue";
import { useRoute } from "vue-router";
import { apiFetch, type EventDetail } from "../api";
import RdgQwinstaModal from "../components/RdgQwinstaModal.vue";
import ReportBodyCard from "../components/ReportBodyCard.vue";
import { useRdgQwinsta } from "../composables/useRdgQwinsta";
import { eventsBackQueryFromDetail } from "../utils/eventsListQuery";
import { dailyReportTypeLabel, isDailyReportType } from "../utils/reportDisplay";
@@ -84,6 +101,7 @@ const route = useRoute();
const event = ref<EventDetail | null>(null);
const loading = ref(false);
const error = ref("");
const { qwinstaLoadingId, qwinstaModal, closeQwinstaModal, runQwinsta, runLogoff } = useRdgQwinsta();
const fromReports = computed(() => route.query.from === "reports");
const isReport = computed(() => (event.value ? isDailyReportType(event.value.type) : false));