Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /var/www/simplisite/html/live/www.orki/site.config.php on line 81
Vue.component('configuratorpaymentwindow', { props: { show: { type: Boolean, default: false }, modalUrl: { type: String, required: true } }, template: `
Bezahlen
`, watch: { show(newValue) { if (newValue) { this.openModal(); } } }, mounted() { this.initializeModal(); }, methods: { initializeModal() { var self = this; const modalWindow = this.$refs.modalWindow; $(modalWindow).zahlsModal({ hidden: (transaction) => { self.$parent.step = 3; self.$parent.transaction = transaction; } }); }, openModal() { const modalWindow = this.$refs.modalWindow; modalWindow.click(); } } }); Vue.component('configuratorpayment', { props: ['src'], template: `
x
`, data() { return { transaction: null, lastPostMessageHeight: 0, scrollTimeout: null, }; }, mounted() { this.initializeIframe(); window.addEventListener('message', this.postMessageHandler, false); window.addEventListener('resize', this.updateIframeHeight); window.addEventListener('scroll', this.scrollHandler); }, beforeDestroy() { window.removeEventListener('message', this.postMessageHandler); window.removeEventListener('resize', this.updateIframeHeight); window.removeEventListener('scroll', this.scrollHandler); }, methods: { closeframe: function(){ this.$parent.step = 1; }, initializeIframe() { const iframe = this.$refs.iframe; iframe.onload = () => { iframe.contentWindow.postMessage( JSON.stringify({ origin: window.location.origin }), iframe.getAttribute('src') ); this.updateIframeHeight(); }; }, updateIframeHeight() { const iframe = this.$refs.iframe; const height = this.lastPostMessageHeight; iframe.style.height = '90svh'; /*if (window.innerWidth <= 590) { iframe.style.height = '90svh'; } else if (height) { iframe.style.height = height + 'px'; }*/ }, scrollHandler() { clearTimeout(this.scrollTimeout); this.scrollTimeout = setTimeout(() => { const iframe = this.$refs.iframe; iframe.contentWindow.postMessage( JSON.stringify({ scrollTopShoppingCart: window.scrollY - iframe.getBoundingClientRect().top, }), iframe.getAttribute('src') ); }, 100); }, scrollPage(offset) { const iframe = this.$refs.iframe; const positionToScrollTo = iframe.getBoundingClientRect().top + window.scrollY + offset; window.scrollTo({ top: positionToScrollTo, behavior: 'smooth' }); }, postMessageHandler(e) { var self = this; if (typeof e.data === 'string') { try { var data = JSON.parse(e.data); } catch (error) { return; } if (data && data.zahls) { Object.entries(data.zahls).forEach(([name, value]) => { switch (name) { case 'height': this.lastPostMessageHeight = parseInt(value, 10); this.updateIframeHeight(); break; case 'top': this.scrollPage(parseInt(value, 10)); break; case 'transaction': if (typeof value === 'object') { this.transaction = value; } break; case 'closeModal': window.location.href = value; break; } }); } } } } }); Vue.component('configuratorinput', { props: ['type','label','value','prefine','afterfine'], template: ``, computed: { val: { get: function(){ return this.value; }, set: function(v){ this.$emit('input',v); } } } }); Vue.component('configurator', { props: ['onorki','orkival'], template: `

`, methods: { getamount: function(a){ return (a <= 0 || a == '' || a == null) ? 1 : a; }, handleIntersection(entries) { var self = this; entries.forEach(entry => { if (entry.isIntersecting) { self.mobileviewed = true; } else{ self.mobileviewed = false; } }); }, mobileclick: function(){ window.location.hash = '#angebots'; var targetDiv = $('#angebots'); var targetPosition = targetDiv.offset(); targetPosition = targetPosition.top; targetPosition = targetPosition - 100; if(this.onorki){ $( "#scrollabocheck").scrollTop($( "#scrollabocheck .vCompContent > .selector").innerHeight()); } else{ $( "html" ).scrollTop( Math.round(targetPosition) ); } }, onResize: function() { this.window = window.innerWidth; }, packageselected: function(p){ return this.selectedpackage == p; }, selectpackage: function(p){ if(this.packages[p].available){ this.selectedpackage = p; } }, moduldisabled: function(m){ if(this.packages[this.selectedpackage].included.includes(m)){ return true; } else{ return false; } }, modulselected: function(m){ return (this.additionalmodules.includes(m) || this.moduldisabled(m)); }, selectmodule: function(m,mo,t){ if(!this.moduldisabled(m) && mo.available && mo.deselectable){ if(this.additionalmodules.includes(m)){ if(t == 'auto'){ var index = this.additionalmodules.indexOf(m); if (index !== -1) { this.additionalmodules.splice(index, 1); } } } else{ this.additionalmodules.push(m); if(mo.mustselect && mo.mustselect.length > 0){ for(key in mo.mustselect){ var itm = mo.mustselect[key]; this.selectmodule(itm,this.modules[itm],'select'); } } } } }, getmoduleprice: function(p){ return p[this.selectedpackage]; }, getmustselect: function(m){ var a = []; for(key in m.mustselect){ a.push(this.modules[m.mustselect[key]].title); } return a.join(', '); }, serviceselected: function(m){ return this.additionalservices.includes(m); }, selectservice: function(m,mo,t){ if(mo.available){ if(this.additionalservices.includes(m)){ if(t == 'auto'){ var index = this.additionalservices.indexOf(m); if (index !== -1) { this.additionalservices.splice(index, 1); } } } else{ this.additionalservices.push(m); if(mo.mustselect && mo.mustselect.length > 0){ for(key in mo.mustselect){ var itm = mo.mustselect[key]; this.selectservice(itm,this.services[itm],'select'); } } } } }, findKuerzel: function(begriff) { const kuerzelMap = { 'evang': ['evang.','evangelisch','ref.','reformiert'], 'kath': ['katholische', 'kath.'] }; for (let kuerzel in kuerzelMap) { if (kuerzelMap[kuerzel].includes(begriff.toLowerCase())) { return kuerzel; } } return ''; }, shorten: function (name) { name = name.replace(/[ä]/g, 'ae').replace(/[ö]/g, 'oe').replace(/[ü]/g, 'ue').replace(/[ß]/g, 'ss').replace(/[^a-zA-Z0-9]/g, ''); const kuerzelMap = { 'evang': ['evangelisch', 'evang.', 'evangelische', 'ref.', 'evang.-ref.', 'evangelisch-reformierte', 'evangelisch - reformierte', 'evang ref', 'evangelisch reformierte', 'evang.-ref.', 'evangelisch-reformierte', 'evang. - ref.'], 'kath': ['katholische', 'kath.'] }; for (let kuerzel in kuerzelMap) { for (let begriff of kuerzelMap[kuerzel]) { const index = name.toLowerCase().indexOf(begriff.toLowerCase()); if (index !== -1) { name = name.substring(0, index) + kuerzel + name.substring(index + begriff.length); } } } name = name.replace(/[\s-]/g, ''); name = name.replace(/kirche/gi, '').replace(/kirchgemeinde/gi, ''); return name.toLowerCase(); } }, computed: { isMobile: function() { return window.innerWidth <= 900; }, selectedmodules: function(){ var r = JSON.parse(JSON.stringify(this.packages[this.selectedpackage].included)); for(key in this.additionalmodules){ r.push(this.additionalmodules[key]); } return r; }, getdiff: function(){ var diff = 0; if(this.selectedpackage == 'unsupported'){ var am = Object.keys(this.additionalmodules).length - 1; if(am == 1){ diff = diff - 30; } else if(am == 2){ diff = diff - 20; } else if(am == 3){ diff = diff - 10; } else; } return diff; }, getpricing: function(){ var r = this.packages[this.selectedpackage].pricing; r = this.modules.orki.pricing[this.selectedpackage]; var am = 0; for(key in this.additionalmodules){ if(this.additionalmodules[key] !== 'orki'){ r = r+this.modules[this.additionalmodules[key]].pricing[this.selectedpackage]; am++; } } if(am > 0){ r = r + this.packages[this.selectedpackage].packagedis; if(this.selectedpackage == 'unsupported'){ if(am == 1){ r = r - 30; } else if(am == 2){ r = r - 20; } else if(am == 3){ r = r - 10; } else; } } return r; }, getpricingservices: function(){ var as = 0; for(a in this.additionalservices){ var service = this.services[this.additionalservices[a]]; as = as + (service.pricing * this.getamount(service.amount)); } return as; }, gettotalpricing: function(){ return (this.getpricing * 12) + this.getpricingservices; }, getsource: function(){ var s = 'https://orki.zahls.ch/de/pay?tid=5bdd1b3a&invoice_number=987654321&invoice_amount='+this.gettotalpricing+'&invoice_currency=1&contact_email=ruedi.eggenberger@ref-sennwald.ch'; //var s = 'https://orki.zahls.ch/de/vpos?amount='+this.gettotalpricing+'¤cy=CHF&purpose=987654321&contact_street=Üetlibergstrasse%2012&contact_company=Evang. Ref. Kirchgemeinde Sennwald'; return s; } }, watch: { selectedpackage: function(n){ /*this.additionalmodules = []; */ }, 'orga.name': function(n){ this.orga.shortlink = this.shorten(n); } }, data() { return { transaction: false, weiterstepsactive: false, window: 0, mobileviewed: false, step: 0, steps: [ {title: 'Infos zu Ihrer Kirchgemeinde',desc: 'Lassen Sie uns mehr über Ihre Organisation/Kirchgemeinde erfahren'}, {title: 'Infos zu Ihrer Kirchgemeinde 2'}, {title: 'Infos zu Ihrer Kirchgemeinde 3'}, {title: 'Infos zu Ihrer Kirchgemeinde 4'} ], additionalmodules: ['orki'], additionaloptions: 'included', additionalservices: [], selectedpackage: 'standard', orga: { name: '', shortlink: '' }, packages: { standard: { title: 'Support inbegriffen', desc: `Sämtlicher Support ist im Abonnement inbegriffen. Ausgeschlossen sind Schulungen und Spezialentwicklungen.`, included: [], pricing: 0, packagedis: 0, available: true }, unsupported: { title: 'Ohne Support', desc: 'Im Abonnement ist der Support nicht inbegriffen. Wenn Support benötigt wird, kostet dieser 79 CHF / Stunde und wird separat verrechnet.', included: [], pricing: 0, pricetag: 'Rabatt auf Abopreise', packagedis: 0, available: true } }, modules: { orki: { title: 'Grundfunktionen', desc: 'Veranstaltungs-Kalender gemeinsam mit Mitarbeitenden, Freiwilligen und Mitgliedern verwalten.', pricing: { standard: 89, unsupported: 79 }, deselectable: false, available: true }, ressourcen: { title: 'Räume und Inventar', desc: 'Einfache Verwaltung von Räumen und Inventar.', pricing: { standard: 7, unsupported: 5 }, deselectable: true, available: true }, forms: { title: 'Anmeldungen und Formulare', desc: 'Einfache Verwaltung von Veranstaltungs-Anmeldungen und Online-Formularen.', pricing: { standard: 7, unsupported: 5 }, deselectable: true, available: true }, courses: { title: 'Kurse und Begleitung', desc: 'Die Plattform und Verwaltungsfunktion für Kurs-Teilnehmende und -Leitende. Ideal z.B. für Konfirmations-/Firmkurse.', pricing: { standard: 7, unsupported: 5 }, /*mustselect: ['forms'],*/ deselectable: true, available: true, availabletext: 'in Entwicklung' }, publica: { title: 'Publica', desc: 'Gemeindeblätter, Webseite/n und Infodisplays verwalten.', pricing: { standard: 7, unsupported: 5 }, deselectable: true, available: false, availabletext: 'in Planung' }, gls: { title: 'Automatisierung', desc: 'Anbindung der Funktionen von Orki an bestehendes Gebäudeleitsystem (Heizungs-, Glocken- und Zugangssteuerung).', pricing: { standard: 7, unsupported: 5 }, deselectable: true, available: false, availabletext: 'in Planung' } }, services: { schulung: { title: 'Schulung', desc: `Schulung bei Ihnen vor Ort von maximal 3 Stunden. Anfahrtskosten werden separat verrechnet. Jede Wiederholung/Gruppe gilt als ein separater Termin.`, included: [], pricing: 359, amount: 1, amounttitle: 'Termine', packagedis: 0, available: true } } }; }, beforeUpdate: function(){ if(this.onorki){ this.$emit('update:orkival', this.getpricing); } }, mounted() { const observer = new IntersectionObserver(this.handleIntersection, { root: null, rootMargin: '0px', threshold: 0.5, // Hier kannst du den Schwellenwert anpassen }); observer.observe(this.$refs.elementToWatch); this.$nextTick(() => { window.addEventListener('resize', this.onResize); }) }, beforeDestroy() { window.removeEventListener('resize', this.onResize); } });