Neues Plugin IT-Service (OpenNIT); Abteilung bei „Geschrieben von“
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m27s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m41s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m32s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m29s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m33s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m30s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m35s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m27s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m41s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m32s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m29s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m33s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m30s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m35s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c713194a83
commit
c1117829c3
139 changed files with 2455 additions and 398 deletions
53
plugins-core/it-service/resources/js/widgets/MyIt.vue
Normal file
53
plugins-core/it-service/resources/js/widgets/MyIt.vue
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { CalendarClock, LifeBuoy, MessageSquarePlus } from '@lucide/vue';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
import { http } from '@/lib/http';
|
||||
|
||||
/**
|
||||
* „Meine IT“ auf der Startseite. Lädt die Zahlen selbst nach, damit die Startseite
|
||||
* nicht auf OpenNIT warten muss.
|
||||
*/
|
||||
const data = ref(null);
|
||||
const failed = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
data.value = await http.get('/it-service/uebersicht');
|
||||
} catch {
|
||||
failed.value = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Panel title="Meine IT" action-label="Öffnen" action-href="/it-service">
|
||||
<div v-if="!data && !failed" class="grid grid-cols-2 gap-2"><Skeleton class="h-16" /><Skeleton class="h-16" /></div>
|
||||
<template v-else-if="data">
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<Link href="/it-service" class="rounded-md bg-muted px-3 py-2.5 hover:bg-brand-soft">
|
||||
<span class="block text-xl font-semibold tabular-nums">{{ data.open_tickets }}</span>
|
||||
<span class="flex items-center gap-1 text-xs text-muted-foreground"><LifeBuoy class="size-3.5" /> offene Tickets</span>
|
||||
</Link>
|
||||
<Link href="/it-service" class="rounded-md bg-muted px-3 py-2.5 hover:bg-brand-soft">
|
||||
<span class="block text-xl font-semibold tabular-nums">{{ data.loans }}</span>
|
||||
<span class="flex items-center gap-1 text-xs text-muted-foreground"><CalendarClock class="size-3.5" /> Ausleihen</span>
|
||||
</Link>
|
||||
</div>
|
||||
<ul v-if="data.latest.length" class="mt-3 grid gap-0.5">
|
||||
<li v-for="ticket in data.latest" :key="ticket.id">
|
||||
<Link :href="`/it-service/tickets/${ticket.id}`" class="flex items-center justify-between gap-2 rounded px-1 py-1 text-[13px] hover:bg-accent">
|
||||
<span class="truncate">{{ ticket.subject }}</span>
|
||||
<span class="shrink-0 text-[11px] text-muted-foreground">{{ ticket.status_label }}</span>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<p v-else class="text-[13px] text-muted-foreground">Der IT-Service ist gerade nicht erreichbar.</p>
|
||||
<Link href="/it-service/tickets/neu" class="mt-3 flex items-center gap-1.5 border-t pt-3 text-[13px] font-medium text-brand-text hover:underline">
|
||||
<MessageSquarePlus class="size-4" /> IT-Problem melden
|
||||
</Link>
|
||||
</Panel>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue