Skip to content

Commit 0803afb

Browse files
committed
Update Service Agreement template
Signed-off-by: Vaishnavi <majojuvaishnavi@gmail.com>
1 parent 90eb012 commit 0803afb

File tree

1 file changed

+49
-28
lines changed

1 file changed

+49
-28
lines changed

src/samples/playground.ts

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,79 +6,100 @@ concept ServiceItem {
66
o Integer quantity
77
}
88
9+
concept Compensation {
10+
o ServiceItem[] services
11+
o Integer paymentTerms
12+
}
13+
914
@template
1015
concept ServiceAgreement {
1116
o String clientName
1217
o String clientAddress
1318
o String providerName
1419
o String providerAddress
1520
o DateTime effectiveDate
16-
o ServiceItem[] services
17-
o Integer paymentTerms
21+
o Compensation compensation
1822
}`;
1923

2024
const TEMPLATE = `# SERVICE AGREEMENT
2125
22-
This Service Agreement is made and entered into as of {{effectiveDate as "D MMMM YYYY"}} by and between {{clientName}}, located at {{clientAddress}} (Client), and {{providerName}}, located at {{providerAddress}} (SProvider).
26+
This Service Agreement is made and entered into as of
27+
{{effectiveDate as "D MMMM YYYY"}}
28+
by and between {{clientName}}, located at {{clientAddress}} (Client),
29+
and {{providerName}}, located at {{providerAddress}} (Provider).
30+
31+
---
2332
2433
## 1. Services
2534
26-
Provider shall perform the following services for Client:
35+
{{#clause compensation}}
36+
### Services Provided
2737
2838
{{#ulist services}}
2939
- {{description}} at {{rate as "0.00"}} per unit × {{quantity}}
3040
{{/ulist}}
3141
32-
## 2. Compensation
42+
### Payment Terms
43+
Payment is due within {{paymentTerms}} days of invoice.
44+
{{/clause}}
45+
46+
---
3347
34-
In consideration for the services provided, Client shall pay Provider the total amount calculated below:
48+
## 2. Total Compensation
3549
3650
**Total Service Value:** {{%
37-
return '$' + services
51+
return '$' + compensation.services
3852
.map(s => s.rate * s.quantity)
3953
.reduce((sum, cur) => sum + cur, 0)
4054
.toFixed(2);
4155
%}}
4256
43-
Payment is due within {{paymentTerms}} days of invoice.
57+
---
4458
4559
## 3. Execution
4660
47-
IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the date first written above.
61+
IN WITNESS WHEREOF, the parties hereto have executed this Agreement.
4862
49-
---
63+
### Client:
64+
![Client Logo](https://ui-avatars.com/api/?name=AcmeCorp&size=40)
5065
51-
### Client:
5266
{{clientName}}
5367
54-
### Provider:
68+
### Provider:
69+
70+
![provider logo](https://ui-avatars.com/api/?name=DevConsult+Ltd&size=40)
71+
5572
{{providerName}}
73+
5674
`;
5775

5876
const DATA = {
5977
"$class": "org.accordproject.service@1.0.0.ServiceAgreement",
6078
"effectiveDate": "2026-02-01T00:00:00Z",
61-
"paymentTerms": 30,
6279
"clientName": "Acme Corp",
6380
"clientAddress": "123 Business Road, London, UK",
6481
"providerName": "DevConsult Ltd",
6582
"providerAddress": "456 Tech Street, Berlin, Germany",
66-
"services": [
67-
{
68-
"$class": "org.accordproject.service@1.0.0.ServiceItem",
69-
"description": "Backend Development",
70-
"rate": 80,
71-
"quantity": 40
72-
},
73-
{
74-
"$class": "org.accordproject.service@1.0.0.ServiceItem",
75-
"description": "Code Review",
76-
"rate": 60,
77-
"quantity": 10
78-
}
79-
]
83+
"compensation": {
84+
"$class": "org.accordproject.service@1.0.0.Compensation",
85+
"paymentTerms": 30,
86+
"services": [
87+
{
88+
"$class": "org.accordproject.service@1.0.0.ServiceItem",
89+
"description": "Backend Development",
90+
"rate": 80,
91+
"quantity": 40
92+
},
93+
{
94+
"$class": "org.accordproject.service@1.0.0.ServiceItem",
95+
"description": "Code Review",
96+
"rate": 60,
97+
"quantity": 10
98+
}
99+
]
100+
}
80101
};
81102

82103
const NAME = 'Service Agreement';
83104

84-
export { NAME, MODEL, DATA, TEMPLATE };
105+
export { NAME, MODEL, DATA, TEMPLATE };

0 commit comments

Comments
 (0)