feat: add server modules (stripe, contract, ai, facebook)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
export function generateAdoptionContract(params: {
|
||||
orgName: string;
|
||||
orgCity: string;
|
||||
orgState: string;
|
||||
petName: string;
|
||||
species: string;
|
||||
breed: string;
|
||||
sex: string;
|
||||
age: string;
|
||||
adopterName: string;
|
||||
adopterEmail: string;
|
||||
adoptionFee: number;
|
||||
agreementItems: string[];
|
||||
date: string;
|
||||
}): string {
|
||||
const items = params.agreementItems
|
||||
.map((item, i) => `<li>${i + 1}. ${item}</li>`)
|
||||
.join('\n');
|
||||
|
||||
return `<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Adoption Contract — ${params.petName}</title>
|
||||
<style>
|
||||
body { font-family: Georgia, serif; max-width: 800px; margin: 0 auto; padding: 40px; }
|
||||
h1 { text-align: center; }
|
||||
.info { margin: 20px 0; }
|
||||
.info dt { font-weight: bold; display: inline; }
|
||||
.info dd { display: inline; margin: 0 20px 0 5px; }
|
||||
ol { line-height: 1.8; }
|
||||
.signatures { margin-top: 60px; display: flex; justify-content: space-between; }
|
||||
.sig-line { border-top: 1px solid #000; width: 200px; padding-top: 5px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>${params.orgName}</h1>
|
||||
<h2 style="text-align: center;">Adoption Contract</h2>
|
||||
|
||||
<dl class="info">
|
||||
<dt>Pet Name:</dt><dd>${params.petName}</dd>
|
||||
<dt>Species:</dt><dd>${params.species}</dd>
|
||||
<dt>Breed:</dt><dd>${params.breed || 'Unknown'}</dd>
|
||||
<dt>Sex:</dt><dd>${params.sex}</dd>
|
||||
<dt>Age:</dt><dd>${params.age || 'Unknown'}</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="info">
|
||||
<dt>Adopter:</dt><dd>${params.adopterName}</dd>
|
||||
<dt>Email:</dt><dd>${params.adopterEmail}</dd>
|
||||
<dt>Adoption Fee:</dt><dd>$${(params.adoptionFee / 100).toFixed(2)}</dd>
|
||||
<dt>Date:</dt><dd>${params.date}</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Terms of Adoption</h3>
|
||||
<ol>${items}</ol>
|
||||
|
||||
<div class="signatures">
|
||||
<div>
|
||||
<div class="sig-line">Adopter Signature</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="sig-line">${params.orgName} Representative</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
Reference in New Issue
Block a user