mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 14:57:58 +01:00
* chore: add a formatter, matching the style this repo already writes singleQuote=true was chosen by counting this repo's own imports, not by fleet decree. The fleet is genuinely split and the two repos that already had a .prettierrc disagreed with each other, so there was no standard to restore. Quote style does not cross repo boundaries; having a gate does. Markdown is ignored for now — prettier rewraps prose, which would bury the real diff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style: format with prettier, and close a comment that was never closed The formatter refused this repo outright, which turned out to be a real defect rather than a tooling complaint. kivitendo-intake.css opens a header comment, and line 17 contains an inner /* ⚠ PRÜFEN */ — CSS comments do not nest, so that inner terminator CLOSES the header. Everything after it is parsed as CSS until the stray */ on line 20. A browser mis-parses it the same way. The file exists in two places (public/presentations/ and deliverables/), both carrying the same defect; fixing one still failed the gate, which is how the duplicate surfaced at all. Mechanical otherwise. This SHA is listed in .git-blame-ignore-revs. * chore: teach git blame to skip the reformat * fix: undo a 3-way merge duplication in AdminSidebar.tsx Merging main with -X theirs duplicated a 30-line block: main's currency-sweep commit and this branch's prettier reformat both touched overlapping lines in the single-destination-group render path, and the -X theirs strategy inserted rather than replaced, leaving two near-identical copies and a dangling closing brace — SyntaxError: ',' expected at line 298. The branch has no legitimate change to this file's logic, only formatting, so main's content is correct outright. Took it wholesale rather than hand-editing the merge result. * fix(lint): reattach 5 directives the reformat detached Four eslint-disable-next-line sites for react-hooks/set-state-in-effect and one @ts-expect-error, all the same defect: the directive sat above useEffect( (or above a JSX element), while the statement that actually errors is 1-2 lines further down inside the block. eslint/tsc report at the real statement; the directive, still bound to its original line number, protects nothing there. TimecardReviewDrawer.tsx (x2), DataEntryTabs.tsx, AppointmentBookingForm.tsx, CreatePoolModal.tsx. Same root cause documented for hirnli, fleetcrown and ivy-portal earlier today — a positional directive is a hidden dependency on formatting, and this is the fourth distinct shape it's taken. * fix(i18n): restore a same-line audit-exemption marker Fifth shape of today's positional-directive defect, this time the repo's own i18n-hardcoded-audit convention rather than eslint or tsc: a // i18n-ok comment exempts a hardcoded string only when it trails the SAME line. prettier wrapped this one if-statement's long condition onto its own line, leaving the marker on the return statement below — the exact sibling one line down ('fortgeschrittene bis experten') stayed on one line because it was short enough not to wrap, and it alone kept passing. Restored the one-line form and added // prettier-ignore so a future reformat cannot re-split it. Verified against the real audit script locally: 0 new violations. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
119 lines
3.7 KiB
JavaScript
Executable File
119 lines
3.7 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Sample data population script for Reboot Content
|
|
* This creates sample pages that can be managed through the admin interface
|
|
*/
|
|
|
|
const samplePages = [
|
|
{
|
|
slug: 'about',
|
|
title: 'About RevampIT',
|
|
content: `
|
|
<h2>Our Mission</h2>
|
|
<p>At RevampIT, we believe in giving technology a second life. Founded in 2009, we've been at the forefront of sustainable IT practices in Switzerland.</p>
|
|
|
|
<h2>What We Do</h2>
|
|
<ul>
|
|
<li>Computer repair and refurbishment</li>
|
|
<li>Linux installation and support</li>
|
|
<li>Open-source software consulting</li>
|
|
<li>IT education and workshops</li>
|
|
</ul>
|
|
|
|
<h2>Our Impact</h2>
|
|
<p>Every year, we save hundreds of devices from landfill and provide affordable technology solutions to those who need them most.</p>
|
|
`,
|
|
seo_title: 'About Us - RevampIT',
|
|
seo_description:
|
|
"Learn about RevampIT's mission to extend the life of IT devices and promote sustainable computing practices.",
|
|
is_published: true,
|
|
},
|
|
{
|
|
slug: 'contact',
|
|
title: 'Contact Us',
|
|
content: `
|
|
<h2>Get in Touch</h2>
|
|
<p>Ready to give your old computer a second life? We'd love to hear from you!</p>
|
|
|
|
<h3>Visit Our Store</h3>
|
|
<p>RevampIT<br>
|
|
Sample Address 123<br>
|
|
8000 Zurich, Switzerland</p>
|
|
|
|
<h3>Opening Hours</h3>
|
|
<p>Monday - Friday: 9:00 - 18:00<br>
|
|
Saturday: 10:00 - 16:00<br>
|
|
Sunday: Closed</p>
|
|
|
|
<h3>Contact Information</h3>
|
|
<p>Email: info@revampit.ch<br>
|
|
Phone: +41 XX XXX XX XX</p>
|
|
`,
|
|
seo_title: 'Contact RevampIT',
|
|
seo_description:
|
|
'Get in touch with RevampIT for computer repair, Linux support, and sustainable IT solutions.',
|
|
is_published: true,
|
|
},
|
|
{
|
|
slug: 'services',
|
|
title: 'Our Services',
|
|
content: `
|
|
<h2>Professional IT Services</h2>
|
|
<p>We offer comprehensive IT solutions tailored to your needs.</p>
|
|
|
|
<h3>Computer Repair</h3>
|
|
<p>From hardware diagnostics to component replacement, we fix all types of computer issues.</p>
|
|
|
|
<h3>Linux Support</h3>
|
|
<p>Installation, configuration, and troubleshooting for all major Linux distributions.</p>
|
|
|
|
<h3>Data Recovery</h3>
|
|
<p>Professional data recovery services for lost or corrupted files.</p>
|
|
|
|
<h3>Consulting</h3>
|
|
<p>Expert advice on sustainable IT practices and open-source solutions.</p>
|
|
`,
|
|
seo_title: 'IT Services - RevampIT',
|
|
seo_description:
|
|
'Professional computer repair, Linux support, and IT consulting services in Zurich.',
|
|
is_published: true,
|
|
},
|
|
];
|
|
|
|
async function populateSampleData() {
|
|
console.log('🚀 Populating sample pages for Reboot Content admin interface...');
|
|
|
|
for (const page of samplePages) {
|
|
try {
|
|
const response = await fetch('http://localhost:3001/api/content/static-pages', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(page),
|
|
});
|
|
|
|
if (response.ok) {
|
|
const result = await response.json();
|
|
console.log(`✅ Created page: ${page.title} (ID: ${result.data?.id})`);
|
|
} else {
|
|
const error = await response.json();
|
|
console.log(`❌ Failed to create ${page.title}:`, error.message);
|
|
}
|
|
} catch (error) {
|
|
console.log(`❌ Error creating ${page.title}:`, error.message);
|
|
}
|
|
}
|
|
|
|
console.log('✨ Sample data population complete!');
|
|
console.log('📝 You can now visit /admin to manage these pages');
|
|
}
|
|
|
|
// Only run if called directly
|
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
populateSampleData().catch(console.error);
|
|
}
|
|
|
|
export { populateSampleData, samplePages };
|