import axios from 'axios'; import 'alpinejs'; import wNumb from 'wnumb'; var units = window.units = { currency: wNumb({ mark: ',', thousand: '.', prefix: '', suffix: '', decimals: 2 }), percent: wNumb({ mark: ',', thousand: '', prefix: '', suffix: '', decimals: 2 }) }; window.stepper = { parts: { notar: 0.02, grundsteuer: 0.065, makler: 0.0357 }, units: units, step: 0, greetings: [ { value: 'frau', label: 'Frau' }, { value: 'herr', label: 'Herr' }, { value: 'divers', label: 'Divers' }, ], jobs: [ { value: 'angestellt', label: 'Angestellte*r' }, ], titles: [ { value: 'prof', label: 'Prof' }, { value: 'dr', label: 'Dr' }, ], value: { kind: null, kauf: { kaufpreis: 300000, modernisierung: 0, baukosten: 0, eigenkapital: 0, }, bau: { grundstueckspreis: 300000, bezahlt: '0', baukosten: 0, eigenkapital: 0, }, anschluss: { objektwert: 300000, umschuldung: 50000, zuskap: 50000 }, wert: 300000, umschuldung: 0, kapital_zus: 0, greeting: null, title: null, firstname: '', lastname: '', zip: '', location: '', phone: '', email: '', job: '', haushalt: '', einnahme: '' }, kinds: [ {label: 'Kauf einer Immobilie', value: 'kauf', icon: 'home'}, {label: 'Eigenes Bauvorhaben', value: 'bau', icon: 'home'}, {label: 'Anschlussfinanzierung', value: 'anschluss', icon: 'home'} ], /* Methods */ svg(icon) { return ``; }, submit() { axios.post('/wp-admin/admin-ajax.php?action=stepper_submit', { ...this.value }); } };