wochenbericht-manager/src/jsx/ui/components/templates.jsx

78 lines
2.1 KiB
JavaScript

import axios from 'axios'
export class Templates{
static template = {
header:"",
wochenbericht:"",
wochenbericht_2:"",
wochenbericht_2_wo_time:"",
monatsbericht:"",
arbeitszeiten:"",
footer:""
};
static getTemplates(){
axios.get('/templates/header.ptt')
.then ((result) => {
Templates.template.header = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/wochenbericht.ptt')
.then ((result) => {
Templates.template.wochenbericht = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/wochenbericht_2.ptt')
.then ((result) => {
Templates.template.wochenbericht_2 = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/wochenbericht_2_wo_time.ptt')
.then ((result) => {
Templates.template.wochenbericht_2_wo_time = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/monatsbericht.ptt')
.then ((result) => {
Templates.template.monatsbericht = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/arbeitszeiten.ptt')
.then ((result) => {
Templates.template.arbeitszeiten = result.data;
})
.catch ((error) => {
console.log(error);
})
axios.get('/templates/footer.ptt')
.then ((result) => {
Templates.template.footer = result.data;
})
.catch ((error) => {
console.log(error);
})
}
printTimes(){
return ``
}
}