Replace the PHP/Markdown seeding with a data-driven generator in scripts/sdlc-seed and regenerate all 59 work products.
26 lines
844 B
JavaScript
26 lines
844 B
JavaScript
// Document scaffold shared by every generated work product.
|
|
import { CODE, PROJECT_TH } from './project.mjs';
|
|
import { control, signatures, doc } from './lib.mjs';
|
|
|
|
/**
|
|
* Build a work product in the audited package layout:
|
|
* title → footer marker → document-control block → body sections → three signature tables.
|
|
*/
|
|
export function workProduct({ type, footer, rows, body, secretary, reviewer, approver }) {
|
|
return doc(
|
|
`# ${type}`,
|
|
`<!-- footer: ${footer} -->`,
|
|
control(rows),
|
|
body,
|
|
signatures(secretary, reviewer, approver),
|
|
);
|
|
}
|
|
|
|
/** The Document No / Project Name / Project Code rows every work product starts with. */
|
|
export const head = (type, release, extra = []) => [
|
|
['Document No', type, 'Release, Version, By:', release],
|
|
['Project Name', PROJECT_TH],
|
|
['Project Code', CODE],
|
|
...extra,
|
|
];
|