mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
further work
This commit is contained in:
76
webapp/views/components/LetterOptions.js
Normal file
76
webapp/views/components/LetterOptions.js
Normal file
@@ -0,0 +1,76 @@
|
||||
import { h } from 'preact';
|
||||
import Input from './Input';
|
||||
import TextAreaInput from './TextAreaInput';
|
||||
|
||||
export default function(props) {
|
||||
return (
|
||||
<div>
|
||||
<TextAreaInput
|
||||
name="address"
|
||||
text="Adresse"
|
||||
onchange={props.onChange}
|
||||
value={props.address}
|
||||
/>
|
||||
<Input
|
||||
name="subject"
|
||||
text="Betreff"
|
||||
onchange={props.onChange}
|
||||
value={props.subject}
|
||||
/>
|
||||
<Input
|
||||
name="yourRef"
|
||||
text="Ihr Zeichen"
|
||||
onchange={props.onChange}
|
||||
value={props.yourRef}
|
||||
/>
|
||||
<Input
|
||||
name="yourMail"
|
||||
text="Ihr Schreiben vom"
|
||||
onchange={props.onChange}
|
||||
value={props.yourMail}
|
||||
/>
|
||||
<Input
|
||||
name="customer"
|
||||
text="Kundernummer"
|
||||
onchange={props.onChange}
|
||||
value={props.customer}
|
||||
/>
|
||||
<Input
|
||||
name="invoice"
|
||||
text="Rechnung"
|
||||
onchange={props.onChange}
|
||||
value={props.invoice}
|
||||
/>
|
||||
<Input
|
||||
name="yourMail"
|
||||
text="Ihr Schreiben vom"
|
||||
onchange={props.onChange}
|
||||
value={props.yourMail}
|
||||
/>
|
||||
<Input
|
||||
name="date"
|
||||
text="Datum"
|
||||
onchange={props.onChange}
|
||||
value={props.date}
|
||||
/>
|
||||
<Input
|
||||
name="opening"
|
||||
text="Anrede"
|
||||
onchange={props.onChange}
|
||||
value={props.opening}
|
||||
/>
|
||||
<TextAreaInput
|
||||
name="body"
|
||||
text="Brieftext"
|
||||
onchange={props.onChange}
|
||||
value={props.body}
|
||||
/>
|
||||
<Input
|
||||
name="closing"
|
||||
text="Grußformel"
|
||||
onchange={props.onChange}
|
||||
value={props.closing}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +1,25 @@
|
||||
import { Component, h } from 'preact';
|
||||
|
||||
export default props => {
|
||||
if (props.pdfIsLoading) {
|
||||
return (
|
||||
<div>Lade...</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (props.pdfError) {
|
||||
return (
|
||||
<div>{props.pdfError}</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!props.pdfUrl) {
|
||||
return '';
|
||||
return (
|
||||
<div>Knopf drücken dann gibts hier was zu sehen!</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<embed src={props.pdfUrl} width="100%" height="100%"/>
|
||||
<embed src={props.pdfUrl} width="600px" height="1000px"/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user