printout and time change

This commit is contained in:
Julian Krauser 2024-10-29 15:23:22 +01:00
parent a112805fbb
commit 848a9e86fc
4 changed files with 53 additions and 32 deletions

View file

@ -247,14 +247,8 @@ export async function createProtocolPrintoutById(req: Request, res: Response): P
month: "2-digit",
year: "numeric",
}),
start: new Date(protocol.starttime).toLocaleTimeString("de-DE", {
minute: "2-digit",
hour: "2-digit",
}),
end: new Date(protocol.endtime).toLocaleTimeString("de-DE", {
minute: "2-digit",
hour: "2-digit",
}),
start: protocol.starttime,
end: protocol.endtime,
agenda,
decisions,
presence: presence.map((p) => p.member),

View file

@ -11,10 +11,10 @@ export class protocol {
@Column({ type: "date" })
date: Date;
@Column({ type: "timestamp", nullable: true })
@Column({ type: "time", nullable: true })
starttime: Date;
@Column({ type: "timestamp", nullable: true })
@Column({ type: "time", nullable: true })
endtime: Date;
@Column({ type: "text", nullable: true })

View file

@ -14,8 +14,8 @@ export class Protocol1729347911107 implements MigrationInterface {
{ name: "id", type: variableType_int, isPrimary: true, isGenerated: true, generationStrategy: "increment" },
{ name: "title", type: "varchar", length: "255", isNullable: false },
{ name: "date", type: "date", isNullable: false },
{ name: "starttime", type: "timestamp", isNullable: true },
{ name: "endtime", type: "timestamp", isNullable: true },
{ name: "starttime", type: "time", isNullable: true },
{ name: "endtime", type: "time", isNullable: true },
{ name: "summary", type: "text", isNullable: true },
],
}),

View file

@ -9,33 +9,60 @@
<p>Am {{date}} von {{start}} Uhr bis {{end}} Uhr</p>
<p>Ausdruck Nr {{iteration}}</p>
<br />
<p><b>Zusammenfassung:</b></p>
<p>{{{summary}}}</p>
<h2>Anwesenheit</h2>
<br />
<br />
<h2>Anwesenheit ({{presence.length}})</h2>
<ul>
{{#each presence}}
<li>{{this.firstname}} {{this.lastname}}</li>
{{/each}}
</ul>
<br />
<h2>Agenda</h2>
<ul>
{{#each agenda}}
<li>{{this.topic}}: {{{this.context}}}</li>
<div>
<h3>{{this.topic}}</h3>
<span>{{{this.context}}}</span>
</div>
{{/each}}
</ul>
<br />
<h2>Entscheidungen</h2>
<ul>
{{#each decisions}}
<li>{{this.topic}}: {{{this.context}}}</li>
<div>
<h3>{{this.topic}}</h3>
<span>{{{this.context}}}</span>
</div>
{{/each}}
</ul>
<h2>Abstimmungen - <small>(für|enthalten|gegen)</small></h2>
<ul>
<br />
<h2>Abstimmungen</h2>
{{#each votings}}
<li>
{{this.topic}}: {{{this.context}}} <br />
({{this.favour}}|{{this.abstain}}|{{this.against}})
</li>
<div>
<h3>{{this.topic}}</h3>
<p><b>Ergebnis:</b> dafür: {{this.favour}} | enthalten: {{this.abstain}} | dagegen: {{this.against}}</p>
<span>{{{this.context}}}</span>
</div>
{{/each}}
</ul>
</body>
<style>
h2,
h3,
p,
span,
ul,
li {
padding: 0;
margin: 0;
}
h1,
h2 {
color: #990b00;
}
h2 {
margin-bottom: 5px;
}
</style>
</html>