Stage history editor: - The edit form's Pipeline section is now the application's history: one row per step (stage + date), Add Step and Remove Step, kept in date order. The last step is the current stage and the first step's date the date applied, replacing the separate Stage and Date Applied fields. An application logged after the fact (applied, interviewed, rejected) keeps its whole path. - JobsDatabase::replaceStageHistory() rewrites a job's history in one transaction (sorted, repeats collapsed, stage and date applied kept in step); StageHistoryModel backs the section; JobsModel::addJob() now returns the new id so a new application's history can be saved. - `kareer history <id> [Stage=YYYY-MM-DD ...]` shows or replaces it. Auto-ghosting: - Applications still at Applied with no activity (the later of the date applied and the last stage change) for more than 30 days move to Ghosted, recorded like any stage change. Runs at startup for GUI and CLI, after switching databases, and shortly after the setting changes. - Preferences gains an Applications section: on/off and the number of days (kareerrc [AutoGhost]). The GUI shows a passive notification; the CLI notes it on stderr so --json output stays clean. Fixes: - The Add Application form pre-filled empty text fields with the word "undefined" (typing "a" gave "undefineda"): fields with no value reached QML as undefined. Every field now gets a typed default. - Embed the app icon as the window icon fallback, so the window and About page show it when running uninstalled. Tests: history replacement and the after-the-fact Allstate case, the ghosting rules (fresh/stale/logged-late/reopened/threshold), and empty new-form fields. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01BxDf7HqD1xPnsZP8wt3NTk
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
SPDX-FileCopyrightText: 2026 ToServeTheKing <[email protected]>
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QDate>
|
|
#include <QDateTime>
|
|
#include <QString>
|
|
|
|
/// A single job application and everything tracked about it.
|
|
struct Job {
|
|
int id = -1;
|
|
QString company;
|
|
QString title;
|
|
QString location;
|
|
QString remoteType; ///< "Onsite", "Hybrid", "Remote", or empty if unknown.
|
|
QString source; ///< Where the lead came from (referral, LinkedIn, ...).
|
|
QString url;
|
|
QDate dateApplied;
|
|
int salaryMin = -1; ///< -1 means unset.
|
|
int salaryMax = -1;
|
|
int salaryExpectation = -1;
|
|
QString currency = QStringLiteral("USD");
|
|
QString notes; ///< Free text: expectations, interview notes, etc.
|
|
QString contact;
|
|
QString stage;
|
|
QDateTime createdAt;
|
|
QDateTime updatedAt;
|
|
};
|
|
|
|
/// One step in an application's history: the stage it moved to, and when.
|
|
struct StageStep {
|
|
QString stage;
|
|
QDateTime at;
|
|
};
|
|
|
|
/// One recorded move from one stage to another (or from "Start" for the
|
|
/// initial application), used to build the Sankey diagram.
|
|
struct StageTransition {
|
|
int jobId = -1;
|
|
QString fromStage; ///< Empty means JobStage::Start.
|
|
QString toStage;
|
|
QDateTime changedAt;
|
|
};
|