Add Anhangsverzeichnis and ToDos
This commit is contained in:
		
							
								
								
									
										47
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								README.md
									
									
									
									
									
								
							@ -1,11 +1,34 @@
 | 
			
		||||
# ToDos
 | 
			
		||||
 | 
			
		||||
- [ ] Add checkboxes to the Inhaltsverzeichnis
 | 
			
		||||
- [ ] Link to Podio Tutorial
 | 
			
		||||
- [ ] Add General ToDo section
 | 
			
		||||
    - [ ] Kassenbons getackert, nicht geklebt?
 | 
			
		||||
    - [ ] Bons die länge als das Blatt sind, so gefaltet, dass sowohl Gesamtsumme als auch Posten sichbar sind?
 | 
			
		||||
    - [ ] Anhänge mit Postennummer nummeriert?
 | 
			
		||||
    - [ ] Rechnungen haben alle Rechnungssteller/in als Rechnungsaddresse?
 | 
			
		||||
    - [ ] Haben alle Rechnungen eine Rechnungsnummer?
 | 
			
		||||
    - [ ] Haben alle Rechnungen eine Steuer ausgewiesen?
 | 
			
		||||
    - [ ] Sind alle Rechnungen "echte" Rechnungen? (Keine Proforma, keine Angebote, keine Lieferscheine)
 | 
			
		||||
    - [ ] Rechnungen in Auslandswährung haben entweder Umrechnungsfaktor auf Zahlungsbeleg oder auf link von Oskar
 | 
			
		||||
    - [ ] Ist Pfand und Alkohol aus Bewirtungsrechnungen per Nebenrechnung herausgerechnet?
 | 
			
		||||
    - [ ] Alles ausgedruckt und Deckblatt NUR oben links handschriftlich unterschrieben?
 | 
			
		||||
    - [ ] Alle Blätter mit Büroklammer zusammengeheftet und bei Finanzleitung abgegeben?
 | 
			
		||||
- [ ] Multiple Kostenstellen -> multiple pages
 | 
			
		||||
- [ ] Kostenstelle Tanken -> Start / Ziel + Kilometer
 | 
			
		||||
- [ ] Toggle Nebenrechnung erforderlich?
 | 
			
		||||
- [ ] Toggle single Kontoauszug
 | 
			
		||||
 | 
			
		||||
# React + TypeScript + Vite
 | 
			
		||||
 | 
			
		||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
 | 
			
		||||
 | 
			
		||||
Currently, two official plugins are available:
 | 
			
		||||
 | 
			
		||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
 | 
			
		||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
 | 
			
		||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md)
 | 
			
		||||
  uses [Babel](https://babeljs.io/) for Fast Refresh
 | 
			
		||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast
 | 
			
		||||
  Refresh
 | 
			
		||||
 | 
			
		||||
## Expanding the ESLint configuration
 | 
			
		||||
 | 
			
		||||
@ -15,16 +38,18 @@ If you are developing a production application, we recommend updating the config
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
export default {
 | 
			
		||||
  // other rules...
 | 
			
		||||
  parserOptions: {
 | 
			
		||||
    ecmaVersion: 'latest',
 | 
			
		||||
    sourceType: 'module',
 | 
			
		||||
    project: ['./tsconfig.json', './tsconfig.node.json'],
 | 
			
		||||
    tsconfigRootDir: __dirname,
 | 
			
		||||
  },
 | 
			
		||||
    // other rules...
 | 
			
		||||
    parserOptions: {
 | 
			
		||||
        ecmaVersion: 'latest',
 | 
			
		||||
        sourceType: 'module',
 | 
			
		||||
        project: ['./tsconfig.json', './tsconfig.node.json'],
 | 
			
		||||
        tsconfigRootDir: __dirname,
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
 | 
			
		||||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked`
 | 
			
		||||
  or `plugin:@typescript-eslint/strict-type-checked`
 | 
			
		||||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
 | 
			
		||||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
 | 
			
		||||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and
 | 
			
		||||
  add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
 | 
			
		||||
 | 
			
		||||
@ -2,11 +2,13 @@ import {Document} from '@react-pdf/renderer';
 | 
			
		||||
import Person from "../../data/Person.ts";
 | 
			
		||||
import AuszahlungPage from "./AuszahlungPage.tsx";
 | 
			
		||||
import Posten from "../../data/Posten.ts";
 | 
			
		||||
import Verzeichnis from "./Verzeichnis.tsx";
 | 
			
		||||
 | 
			
		||||
const MyDocument = ({person, bankdaten, posten}: { person: Person, bankdaten: any, posten: Posten[] }) => {
 | 
			
		||||
    return (
 | 
			
		||||
        <Document>
 | 
			
		||||
            <AuszahlungPage person={person} bank={bankdaten} posten={posten}/>
 | 
			
		||||
            <Verzeichnis posten={posten}/>
 | 
			
		||||
        </Document>
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										67
									
								
								src/components/pdf/Verzeichnis.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								src/components/pdf/Verzeichnis.tsx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,67 @@
 | 
			
		||||
import Posten from "../../data/Posten.ts";
 | 
			
		||||
import {StyleSheet, Page, View, Text} from "@react-pdf/renderer";
 | 
			
		||||
 | 
			
		||||
const styles = StyleSheet.create({
 | 
			
		||||
    page: {
 | 
			
		||||
        flexDirection: 'column',
 | 
			
		||||
        backgroundColor: '#ffffff',
 | 
			
		||||
        paddingLeft: '2cm',
 | 
			
		||||
        paddingRight: '2cm',
 | 
			
		||||
        paddingTop: '1.5cm',
 | 
			
		||||
        paddingBottom: '1.5cm',
 | 
			
		||||
        fontFamily: 'Helvetica',
 | 
			
		||||
        fontSize: 11,
 | 
			
		||||
    },
 | 
			
		||||
    section: {},
 | 
			
		||||
    h1: {
 | 
			
		||||
        fontSize: 24,
 | 
			
		||||
        marginBottom: 10,
 | 
			
		||||
    },
 | 
			
		||||
    postenGroup: {
 | 
			
		||||
        marginBottom: 10,
 | 
			
		||||
    },
 | 
			
		||||
    posten: {
 | 
			
		||||
        marginBottom: 2,
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const Verzeichnis = ({posten}: { posten: Posten[] }) => {
 | 
			
		||||
    let index = 1;
 | 
			
		||||
    const verzeichnisList = posten.map((posten) => {
 | 
			
		||||
        if (posten.getZahlungsart() === "Bar") {
 | 
			
		||||
            return (
 | 
			
		||||
                <View style={styles.postenGroup}>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. Originalrechnung für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                </View>
 | 
			
		||||
            )
 | 
			
		||||
        } else if (posten.getZahlungsart() === "PayPal") {
 | 
			
		||||
            return (
 | 
			
		||||
                <View style={styles.postenGroup}>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. Originalrechnung für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. PayPal Beleg für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. Bankauszug für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                </View>
 | 
			
		||||
            )
 | 
			
		||||
        } else {
 | 
			
		||||
            return (
 | 
			
		||||
                <View style={styles.postenGroup}>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. Originalrechnung für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                    <Text style={styles.posten}>{index++}. Bankauszug für Posten Nr. {posten.getNummer()}</Text>
 | 
			
		||||
                </View>
 | 
			
		||||
            )
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        <Page size="A4" wrap={true} style={styles.page}>
 | 
			
		||||
            <View style={styles.section}>
 | 
			
		||||
                <Text style={styles.h1}>Inhaltsverzeichnis der Anhänge</Text>
 | 
			
		||||
                <View style={styles.section}>
 | 
			
		||||
                    {verzeichnisList}
 | 
			
		||||
                </View>
 | 
			
		||||
            </View>
 | 
			
		||||
        </Page>
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default Verzeichnis;
 | 
			
		||||
		Reference in New Issue
	
	Block a user