diff --git a/web/src/views/JobApplications.vue b/web/src/views/JobApplications.vue
index 29ab8a9..3d5880a 100644
--- a/web/src/views/JobApplications.vue
+++ b/web/src/views/JobApplications.vue
@@ -3,30 +3,26 @@
* Route `/jobs/` — a private tracker for job
* applications and for the reusable reference snippets that feed the CV copy.
*
- * This view owns the page frame, the single error banner and the applications
- * table (pipeline bar, filter/sort, inline editing via an `editingId` plus a
+ * This view owns the page header, the single error banner and the applications
+ * table (pipeline tiles, filter/sort, inline editing via an `editingId` plus a
* scratch copy of the row). The two other pieces are components beside it:
- * JobReferences.vue (the Quick Reference box, a separate table) and
- * JobApplicationForm.vue (the add form). Data access is in
+ * JobReferences.vue (the Quick reference panel, a separate table) and
+ * JobApplicationForm.vue (the add form, opened from the header). Data access is in
* stores/jobApplications.js and stores/jobAppReferences.js; nothing here calls
* gql() directly.
*
* Rows also arrive from three places that are not this page: the email
* pipeline, the browser userscript in `public/job-capture.user.js`, which the
- * header links to for installing, and the leads inbox at `/jobs/leads`
+ * app shell's sidebar links to for installing, and the leads inbox at `/jobs/leads`
* (JobLeads.vue), where tracking a lead adds it here as Saved.
*/
import { ref, computed, onMounted } from "vue";
-import { RouterLink } from "vue-router";
import { storeToRefs } from "pinia";
import { useJobApplicationsStore } from "@/stores/jobApplications";
import { STATUS_OPTIONS, OPEN_STATUSES } from "./jobStatus";
import JobReferences from "./JobReferences.vue";
import JobApplicationForm from "./JobApplicationForm.vue";
-import "./jobs-shared.css";
-
-// Served from web/public/ under the app's base path (/jobs/).
-const userscriptUrl = `${import.meta.env.BASE_URL}job-capture.user.js`;
+import Icon from "@/components/Icon.vue";
const store = useJobApplicationsStore();
const { applications } = storeToRefs(store);
@@ -47,6 +43,18 @@ const search = ref("");
const statusFilter = ref(null);
const sortKey = ref("updatedAt");
const sortDir = ref("desc");
+// Narrows the table to isStale() rows: the follow-up queue.
+const staleOnly = ref(false);
+
+// The add form is folded away behind the header's button once there is a
+// table to look at; with no rows yet it is the only thing to do.
+const formOpen = ref(false);
+const showForm = computed(() => formOpen.value || !applications.value.length);
+
+function onCreated() {
+ clearError();
+ formOpen.value = false;
+}
function fail(err) {
console.error(err);
@@ -215,7 +223,7 @@ function statusLabel(status) {
}
function statusClass(status) {
- return `ja-badge-${status?.toLowerCase() ?? "unknown"}`;
+ return `status-${status?.toLowerCase() ?? "unknown"}`;
}
/** Whole days between a timestamp and now; null when there is no date. */
@@ -252,6 +260,7 @@ const visibleApplications = computed(() => {
const rows = applications.value.filter((app) => {
if (statusFilter.value && app.status?.toLowerCase() !== statusFilter.value)
return false;
+ if (staleOnly.value && !isStale(app)) return false;
if (!q) return true;
// Notes are searched because the email pipeline appends its findings
// there, making them the de-facto history of the application.
@@ -282,525 +291,663 @@ function toggleSort(key) {
}
}
+const staleCount = computed(() => applications.value.filter(isStale).length);
+
+const openCount = computed(() =>
+ applications.value.filter((app) =>
+ OPEN_STATUSES.includes(app.status?.toLowerCase()),
+ ).length,
+);
+
+function sortIcon(key) {
+ if (sortKey.value !== key) return null;
+ return sortDir.value === "asc" ? "chevron-up" : "chevron-down";
+}
+
+function ariaSort(key) {
+ if (sortKey.value !== key) return "none";
+ return sortDir.value === "asc" ? "ascending" : "descending";
+}
+
function toggleStatusFilter(status) {
statusFilter.value = statusFilter.value === status ? null : status;
}
onMounted(fetchApplications);
-
-
-
diff --git a/web/src/views/JobLeads.vue b/web/src/views/JobLeads.vue
index dafbb00..cfbcd2a 100644
--- a/web/src/views/JobLeads.vue
+++ b/web/src/views/JobLeads.vue
@@ -9,8 +9,8 @@
* the profile (JobSearchProfile.vue). Nothing reaches the tracker at /jobs/
* until **Track** is pressed on a lead, which adds it there as Saved.
*
- * This view owns the page frame, the single error banner, the run button and
- * the list. Data access is in stores/jobLeads.js; nothing here calls gql().
+ * This view owns the page header, the single error banner, the run buttons
+ * and the list. Data access is in stores/jobLeads.js; nothing here calls gql().
*
* There are three server jobs. "Check now" polls the sources and scores up to
* forty new leads; "Score unscored" polls nothing and scores the whole
@@ -26,7 +26,7 @@ import { useJobLeadsStore } from "@/stores/jobLeads";
import { useJobSearchProfileStore } from "@/stores/jobSearchProfile";
import JobSources from "./JobSources.vue";
import JobSearchProfile from "./JobSearchProfile.vue";
-import "./jobs-shared.css";
+import Icon from "@/components/Icon.vue";
const TABS = [
{ value: "new", label: "Inbox" },
@@ -117,6 +117,9 @@ function scoreClass(lead) {
return "jl-score-low";
}
+/** Fraction of the score ring to fill; an unscored lead gets an empty ring. */
+const scoreArc = (lead) => Math.max(0, Math.min(100, lead.score ?? 0));
+
/** The tooltip says when, which during a rescore is how to tell new from old. */
function scoreTitle(lead) {
if (lead.score == null) return "Not scored";
@@ -247,326 +250,315 @@ onBeforeUnmount(stopPolling);
-
-