Add application workflow and lead analytics
Test and publish / test (push) Successful in 2m33s
Test and publish / publish (push) Successful in 11m9s

This commit is contained in:
2026-10-23 20:45:48 +01:00
parent d0074aea46
commit 1147bc5697
35 changed files with 4337 additions and 131 deletions
+28
View File
@@ -0,0 +1,28 @@
import { defineStore } from "pinia";
import { gql } from "@/graphql";
export const useAnalyticsStore = defineStore("analytics", {
state: () => ({ data: null, loading: false, error: null }),
actions: {
async fetch() {
this.loading = true;
this.error = null;
try {
const result = await gql(`query DashboardAnalytics {
analytics {
totalApplications statusCounts { status count }
transitions { from to count }
responseCount interviewCount offerCount
responseRate interviewRate offerRate
averageDaysToResponse averageDaysToInterview averageDaysToOffer
}
}`);
this.data = result.analytics;
} catch (error) {
this.error = error;
} finally {
this.loading = false;
}
},
},
});