mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
window reload is simpler than setting defaults
This commit is contained in:
@@ -7,26 +7,6 @@ import {generatePdf, getLatest} from './apiHelper';
|
|||||||
|
|
||||||
import './App.css';
|
import './App.css';
|
||||||
|
|
||||||
const DEFAULT_OPTIONS = Object.freeze({
|
|
||||||
template: 'brief-fam',
|
|
||||||
subject: '',
|
|
||||||
yourRef: '',
|
|
||||||
yourRefName: '',
|
|
||||||
yourMail: '',
|
|
||||||
myRef: '',
|
|
||||||
customer: '',
|
|
||||||
invoice: '',
|
|
||||||
date: '',
|
|
||||||
signature: '',
|
|
||||||
specialMail: '',
|
|
||||||
address: '',
|
|
||||||
opening: '',
|
|
||||||
body: '',
|
|
||||||
closing: '',
|
|
||||||
ps: '',
|
|
||||||
enclosing: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this._getLatest();
|
this._getLatest();
|
||||||
@@ -61,10 +41,7 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onClear() {
|
_onClear() {
|
||||||
this.setState({
|
window.location.reload();
|
||||||
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
||||||
pdfUrl: null,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onGenerate() {
|
_onGenerate() {
|
||||||
|
|||||||
Reference in New Issue
Block a user