Add first test suite; fix Timer resume, scraper silent failure
- backend/services/auth_test.go: token-version normalisation, the revocation rule, GenerateJWT/VerifyJWT claim handling. The happy path of AuthenticateTokenWithClaims still needs a DB driver we don't have. - python/tests: travelodge.py's pure functions and the NDJSON event contract. pytest is a commented-out dev dep so the image stays slim. - Timer.vue: the Paused screen now offers Resume, reaching pauseTimer's previously unreachable un-pause branch. - travelodge.py: warn when upstream parses but yields nothing usable, so a field rename is distinguishable from sold-out inventory. - CoverLetters.vue moved out of views/unused/ — it is live on /cv. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -15,7 +15,7 @@ import { ref, shallowRef } from "vue";
|
||||
import { RouterLink } from "vue-router";
|
||||
// import CVGeneral from "./CVGeneral.vue";
|
||||
import CVProgramming from "./CVProgramming.vue";
|
||||
import CoverLetters from "../unused/CoverLetters.vue";
|
||||
import CoverLetters from "./CoverLetters.vue";
|
||||
// import CVSecurity from "./CVSecurity.vue";
|
||||
// import CVBackend from "./CVBackend.vue";
|
||||
// import CVFrontend from "./CVFrontend.vue";
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
<script setup>
|
||||
/**
|
||||
* Editable cover-letter template (contenteditable paragraphs, print to PDF).
|
||||
* STATUS: live — CV.vue imports it as the "Cover Letter" tab on /cv.
|
||||
*/
|
||||
import { ref } from "vue";
|
||||
|
||||
const name = ref("Adam French");
|
||||
const phone = ref("+447563266931");
|
||||
const email = ref("[email protected]");
|
||||
const role = ref("Job title / role");
|
||||
const paragraphs = ref([
|
||||
"Why I'm interested in the company...",
|
||||
"Why I'm a strong fit for the role...",
|
||||
"Relevant experience and background...",
|
||||
]);
|
||||
const signoff = ref("Thank you for reading - Adam F");
|
||||
|
||||
function addParagraph() {
|
||||
paragraphs.value.push("New paragraph...");
|
||||
}
|
||||
|
||||
function removeParagraph(index) {
|
||||
paragraphs.value.splice(index, 1);
|
||||
}
|
||||
|
||||
function updateParagraph(index, event) {
|
||||
paragraphs.value[index] = event.target.innerText;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<div class="a5page">
|
||||
<div class="contact">
|
||||
<h1
|
||||
contenteditable="true"
|
||||
@blur="name = $event.target.innerText"
|
||||
>
|
||||
{{ name }}
|
||||
</h1>
|
||||
<div class="contact-details">
|
||||
<p
|
||||
contenteditable="true"
|
||||
@blur="phone = $event.target.innerText"
|
||||
>
|
||||
{{ phone }}
|
||||
</p>
|
||||
<p
|
||||
contenteditable="true"
|
||||
@blur="email = $event.target.innerText"
|
||||
>
|
||||
{{ email }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<h2 contenteditable="true" @blur="role = $event.target.innerText">
|
||||
{{ role }}
|
||||
</h2>
|
||||
<div
|
||||
v-for="(p, i) in paragraphs"
|
||||
:key="i"
|
||||
class="paragraph-wrapper"
|
||||
>
|
||||
<p contenteditable="true" @blur="updateParagraph(i, $event)">
|
||||
{{ p }}
|
||||
</p>
|
||||
<button
|
||||
class="no-print remove-btn"
|
||||
title="Remove paragraph"
|
||||
@click="removeParagraph(i)"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<p
|
||||
contenteditable="true"
|
||||
@blur="signoff = $event.target.innerText"
|
||||
>
|
||||
{{ signoff }}
|
||||
</p>
|
||||
<button class="no-print add-btn" @click="addParagraph()">
|
||||
+ Add paragraph
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.a5page {
|
||||
max-width: 210mm;
|
||||
min-height: 148mm;
|
||||
margin: 1rem auto;
|
||||
padding: 2rem 3rem;
|
||||
background: white;
|
||||
color: #222;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.a5page h1 {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.a5page h2 {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
|
||||
.a5page p {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.contact {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
border-bottom: 1px solid #333;
|
||||
padding-bottom: 0.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.contact-details {
|
||||
text-align: right;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.contact-details p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
[contenteditable="true"]:hover,
|
||||
[contenteditable="true"]:focus {
|
||||
outline: 1px dashed #999;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.paragraph-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.paragraph-wrapper .remove-btn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -1.5rem;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #c00;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.paragraph-wrapper:hover .remove-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
margin-top: 0.5rem;
|
||||
padding: 0.3rem 0.8rem;
|
||||
border: 1px solid #333;
|
||||
border-radius: 4px;
|
||||
background: white;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.add-btn:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
size: A5 landscape;
|
||||
margin: 0;
|
||||
}
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user