From 367ff9051781a670c4d4cb1f360a9ce719fed240 Mon Sep 17 00:00:00 2001 From: stt Date: Sat, 23 May 2020 19:11:02 +0200 Subject: [PATCH 1/4] =?UTF-8?q?suchergebnis=20seite=20und=20angebotsdetail?= =?UTF-8?q?seite=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 8 +++++++ src/app/offers/offers-routing.module.ts | 17 +++++++++++++ src/app/offers/offers.module.ts | 20 ++++++++++++++++ src/app/offers/offers.page.html | 9 +++++++ src/app/offers/offers.page.scss | 0 src/app/offers/offers.page.spec.ts | 24 +++++++++++++++++++ src/app/offers/offers.page.ts | 15 ++++++++++++ .../searchresults-routing.module.ts | 17 +++++++++++++ src/app/searchresults/searchresults.module.ts | 20 ++++++++++++++++ src/app/searchresults/searchresults.page.html | 10 ++++++++ src/app/searchresults/searchresults.page.scss | 0 .../searchresults/searchresults.page.spec.ts | 24 +++++++++++++++++++ src/app/searchresults/searchresults.page.ts | 15 ++++++++++++ src/app/tab1/tab1.page.html | 14 ++++++----- 14 files changed, 187 insertions(+), 6 deletions(-) create mode 100644 src/app/offers/offers-routing.module.ts create mode 100644 src/app/offers/offers.module.ts create mode 100644 src/app/offers/offers.page.html create mode 100644 src/app/offers/offers.page.scss create mode 100644 src/app/offers/offers.page.spec.ts create mode 100644 src/app/offers/offers.page.ts create mode 100644 src/app/searchresults/searchresults-routing.module.ts create mode 100644 src/app/searchresults/searchresults.module.ts create mode 100644 src/app/searchresults/searchresults.page.html create mode 100644 src/app/searchresults/searchresults.page.scss create mode 100644 src/app/searchresults/searchresults.page.spec.ts create mode 100644 src/app/searchresults/searchresults.page.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 48fc28d..54d6514 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -5,6 +5,14 @@ const routes: Routes = [ { path: '', loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule) + }, + { + path: 'searchresults', + loadChildren: () => import('./searchresults/searchresults.module').then( m => m.SearchresultsPageModule) + }, + { + path: 'offers', + loadChildren: () => import('./offers/offers.module').then( m => m.OffersPageModule) } ]; @NgModule({ diff --git a/src/app/offers/offers-routing.module.ts b/src/app/offers/offers-routing.module.ts new file mode 100644 index 0000000..c0b4db3 --- /dev/null +++ b/src/app/offers/offers-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { OffersPage } from './offers.page'; + +const routes: Routes = [ + { + path: '', + component: OffersPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class OffersPageRoutingModule {} diff --git a/src/app/offers/offers.module.ts b/src/app/offers/offers.module.ts new file mode 100644 index 0000000..7dae5c7 --- /dev/null +++ b/src/app/offers/offers.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { OffersPageRoutingModule } from './offers-routing.module'; + +import { OffersPage } from './offers.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + OffersPageRoutingModule + ], + declarations: [OffersPage] +}) +export class OffersPageModule {} diff --git a/src/app/offers/offers.page.html b/src/app/offers/offers.page.html new file mode 100644 index 0000000..fadda25 --- /dev/null +++ b/src/app/offers/offers.page.html @@ -0,0 +1,9 @@ + + + offers + + + + + + diff --git a/src/app/offers/offers.page.scss b/src/app/offers/offers.page.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/offers/offers.page.spec.ts b/src/app/offers/offers.page.spec.ts new file mode 100644 index 0000000..6b42a67 --- /dev/null +++ b/src/app/offers/offers.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { OffersPage } from './offers.page'; + +describe('OffersPage', () => { + let component: OffersPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ OffersPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(OffersPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/offers/offers.page.ts b/src/app/offers/offers.page.ts new file mode 100644 index 0000000..e16557b --- /dev/null +++ b/src/app/offers/offers.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-offers', + templateUrl: './offers.page.html', + styleUrls: ['./offers.page.scss'], +}) +export class OffersPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/searchresults/searchresults-routing.module.ts b/src/app/searchresults/searchresults-routing.module.ts new file mode 100644 index 0000000..60d84e7 --- /dev/null +++ b/src/app/searchresults/searchresults-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { SearchresultsPage } from './searchresults.page'; + +const routes: Routes = [ + { + path: '', + component: SearchresultsPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class SearchresultsPageRoutingModule {} diff --git a/src/app/searchresults/searchresults.module.ts b/src/app/searchresults/searchresults.module.ts new file mode 100644 index 0000000..b43abd2 --- /dev/null +++ b/src/app/searchresults/searchresults.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { SearchresultsPageRoutingModule } from './searchresults-routing.module'; + +import { SearchresultsPage } from './searchresults.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + SearchresultsPageRoutingModule + ], + declarations: [SearchresultsPage] +}) +export class SearchresultsPageModule {} diff --git a/src/app/searchresults/searchresults.page.html b/src/app/searchresults/searchresults.page.html new file mode 100644 index 0000000..fc061b2 --- /dev/null +++ b/src/app/searchresults/searchresults.page.html @@ -0,0 +1,10 @@ + + + + Suchergebnisse + + + + + + diff --git a/src/app/searchresults/searchresults.page.scss b/src/app/searchresults/searchresults.page.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/searchresults/searchresults.page.spec.ts b/src/app/searchresults/searchresults.page.spec.ts new file mode 100644 index 0000000..68244e2 --- /dev/null +++ b/src/app/searchresults/searchresults.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { SearchresultsPage } from './searchresults.page'; + +describe('SearchresultsPage', () => { + let component: SearchresultsPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SearchresultsPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(SearchresultsPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/searchresults/searchresults.page.ts b/src/app/searchresults/searchresults.page.ts new file mode 100644 index 0000000..fa8c394 --- /dev/null +++ b/src/app/searchresults/searchresults.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-searchresults', + templateUrl: './searchresults.page.html', + styleUrls: ['./searchresults.page.scss'], +}) +export class SearchresultsPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/tab1/tab1.page.html b/src/app/tab1/tab1.page.html index f19bc01..57f0f75 100644 --- a/src/app/tab1/tab1.page.html +++ b/src/app/tab1/tab1.page.html @@ -1,13 +1,12 @@ + src="https://www.breisgau-hochschwarzwald.de/pb/site/Breisgau-Hochschwarzwald/get/params_E491248136/282741/plAn%20Logo.JPG" + /> - @@ -63,12 +62,15 @@ Batzenberg – Schönberg – Hexental - Dreisamtal, Gundelfingen-Glottertal + Dreisamtal, Gundelfingen-Glottertal Hochschwarzwald Stadt Freiburg - - Suche + Suche From c0f4bdf0d080ff8b1f3e3a358a470440f9d9f5eb Mon Sep 17 00:00:00 2001 From: stt Date: Sat, 23 May 2020 19:34:14 +0200 Subject: [PATCH 2/4] =?UTF-8?q?offer=20Interface=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/offer.model.ts | 82 ++++++++++++++++ src/app/searchresults/searchresults.page.html | 5 +- src/offer/offer.component.ts | 98 ++----------------- 3 files changed, 93 insertions(+), 92 deletions(-) create mode 100644 src/app/offer.model.ts diff --git a/src/app/offer.model.ts b/src/app/offer.model.ts new file mode 100644 index 0000000..130ec1d --- /dev/null +++ b/src/app/offer.model.ts @@ -0,0 +1,82 @@ +export interface Offer { + adr_anfahrt: string; + adr_hausnr: string; + adr_ort: string; + adr_plz: string; + adr_strasse: string; + con_fax: string; + con_mobile: string; + con_tel: string; + descr_einrichtung: string; + descr_long: string; + descr_short: string; + descr_titel: string; + descr_zusatz: string; + descr_date: Date; + detail_anmeldung: string; + detail_gender: string; + detail_cost: string; + details_teilnehmer: string; + details_zeit: string; + details_ziel: string; + detail_methods: string; + categories: { + Elternbildung: boolean; + "Soziale Teilhabe": boolean; + Beratung: boolean; + "Erährung und Bewegung": boolean; + "Familienfreundliche Angebote": boolean; + "Förderung der allgem. Lebenskompetenz": boolean; + "Frühe Hilfen": boolean; + "Körperliche Gesundheit": boolean; + "Seelische Gesundheit": boolean; + Inklusion: boolean; + "Medienpädagogik/-kompetenz": boolean; + "Migration und Integration": boolean; + "Offene Familientreffs": boolean; + "Partnerschaft und Sexualität": boolean; + "Planung, Unterstützung, Material": boolean; + "Prävention von Gewalt und Rechtsextremismus": boolean; + "Prävention von sexueller Gewalt": boolean; + "Prävention von Sucht": boolean; + Sontiges: boolean; + "Übergang in Kita/Schule/Beruf": boolean; + }; + region: { + "Batzenberg, Schönberg, Hexental": boolean; + "Dreisamtal, Gundelfingen": boolean; + Glottertal: boolean; + Hochschwarzwald: boolean; + "Kaiserstuhl, Tuniberg": boolean; + "Markgräflerland Nord": boolean; + "Markgräflerland Süd": boolean; + "Stadt Freiburg": boolean; + }; + zielgruppe: { + "Einrichtungen und Vereine": boolean; + Eltern: boolean; + Erwachsene: boolean; + Gemeinden: boolean; + "Kinder und Jugendliche": boolean; + "Medizinische Fachkräfte": boolean; + "Pädagogische Fachkräfte": boolean; + "allgemeine Bevölkerung": boolean; + }; + + altergruppe: { + "0-3 Jahre": boolean; + "3-6 Jahre": boolean; + "6-10 Jahre": boolean; + "10-16 Jahre": boolean; + "16-18 Jahre": boolean; + "18-27 Jahre": boolean; + Erwachsene: boolean; + Familienphase: boolean; + "Senioren und Familien": boolean; + }; + + geo_lat: number; + geo_lon: number; + link_title: string; + link_url: string; +} diff --git a/src/app/searchresults/searchresults.page.html b/src/app/searchresults/searchresults.page.html index fc061b2..4f08985 100644 --- a/src/app/searchresults/searchresults.page.html +++ b/src/app/searchresults/searchresults.page.html @@ -1,10 +1,13 @@ - + Suchergebnisse + + + diff --git a/src/offer/offer.component.ts b/src/offer/offer.component.ts index a197364..895c453 100644 --- a/src/offer/offer.component.ts +++ b/src/offer/offer.component.ts @@ -1,99 +1,15 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit } from "@angular/core"; +import { Offer } from "src/app/offer.model"; @Component({ - selector: 'app-offer', - templateUrl: './offer.component.html', - styleUrls: ['./offer.component.scss'], + selector: "app-offer", + templateUrl: "./offer.component.html", + styleUrls: ["./offer.component.scss"], }) export class OfferComponent implements OnInit { - adr_anfahrt: string; - adr_hausnr: string; - adr_ort: string; - adr_plz: string; - adr_strasse: string; - con_fax: string; - con_mobile: string; - con_tel: string; - descr_einrichtung: string; - descr_long: string; - descr_short: string; - descr_titel: string; - descr_zusatz: string; - descr_date: Date; - detail_anmeldung: string; - detail_gender: string; - detail_cost: string; - details_teilnehmer: string; - details_zeit: string; - details_ziel: string; - detail_methods: string; - categories: { - "Elternbildung": boolean, - "Soziale Teilhabe": boolean, - "Beratung": boolean, - "Erährung und Bewegung": boolean, - "Familienfreundliche Angebote": boolean, - "Förderung der allgem. Lebenskompetenz": boolean, - "Frühe Hilfen": boolean, - "Körperliche Gesundheit": boolean, - "Seelische Gesundheit": boolean, - "Inklusion": boolean, - "Medienpädagogik/-kompetenz": boolean, - "Migration und Integration": boolean, - "Offene Familientreffs": boolean, - "Partnerschaft und Sexualität": boolean, - "Planung, Unterstützung, Material": boolean, - "Prävention von Gewalt und Rechtsextremismus": boolean, - "Prävention von sexueller Gewalt": boolean, - "Prävention von Sucht": boolean, - "Sontiges": boolean, - "Übergang in Kita/Schule/Beruf": boolean, - } - region: { - "Batzenberg, Schönberg, Hexental": boolean; - "Dreisamtal, Gundelfingen": boolean; - "Glottertal": boolean; - "Hochschwarzwald": boolean; - "Kaiserstuhl, Tuniberg": boolean; - "Markgräflerland Nord": boolean; - "Markgräflerland Süd": boolean; - "Stadt Freiburg": boolean; - } - zielgruppe: { - "Einrichtungen und Vereine" : boolean; - "Eltern" : boolean; - "Erwachsene" : boolean; - "Gemeinden" : boolean; - "Kinder und Jugendliche" : boolean; - "Medizinische Fachkräfte" : boolean; - "Pädagogische Fachkräfte" : boolean; - "allgemeine Bevölkerung" : boolean; - } + private static instance: Offer; - altergruppe: { - "0-3 Jahre": boolean; - "3-6 Jahre": boolean; - "6-10 Jahre": boolean; - "10-16 Jahre": boolean; - "16-18 Jahre": boolean; - "18-27 Jahre": boolean; - "Erwachsene": boolean; - "Familienphase": boolean; - "Senioren und Familien": boolean; - } - - geo_lat: number; - geo_lon: number; - link_title: string; - link_url: string; - - - - constructor() { - - } + private constructor() {} ngOnInit() {} - } - From 163185a9a202f2b36c4b3fbb6fca449b3ed08885 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 23 May 2020 19:36:50 +0200 Subject: [PATCH 3/4] Quoting --- src/app/offer.model.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/offer.model.ts b/src/app/offer.model.ts index 130ec1d..00dd30d 100644 --- a/src/app/offer.model.ts +++ b/src/app/offer.model.ts @@ -21,16 +21,16 @@ export interface Offer { details_ziel: string; detail_methods: string; categories: { - Elternbildung: boolean; + "Elternbildung": boolean; "Soziale Teilhabe": boolean; - Beratung: boolean; + "Beratung": boolean; "Erährung und Bewegung": boolean; "Familienfreundliche Angebote": boolean; "Förderung der allgem. Lebenskompetenz": boolean; "Frühe Hilfen": boolean; "Körperliche Gesundheit": boolean; "Seelische Gesundheit": boolean; - Inklusion: boolean; + "Inklusion": boolean; "Medienpädagogik/-kompetenz": boolean; "Migration und Integration": boolean; "Offene Familientreffs": boolean; @@ -39,14 +39,14 @@ export interface Offer { "Prävention von Gewalt und Rechtsextremismus": boolean; "Prävention von sexueller Gewalt": boolean; "Prävention von Sucht": boolean; - Sontiges: boolean; + "Sontiges": boolean; "Übergang in Kita/Schule/Beruf": boolean; }; region: { "Batzenberg, Schönberg, Hexental": boolean; "Dreisamtal, Gundelfingen": boolean; - Glottertal: boolean; - Hochschwarzwald: boolean; + "Glottertal": boolean; + "Hochschwarzwald": boolean; "Kaiserstuhl, Tuniberg": boolean; "Markgräflerland Nord": boolean; "Markgräflerland Süd": boolean; @@ -54,24 +54,24 @@ export interface Offer { }; zielgruppe: { "Einrichtungen und Vereine": boolean; - Eltern: boolean; - Erwachsene: boolean; - Gemeinden: boolean; + "Eltern": boolean; + "Erwachsene": boolean; + "Gemeinden": boolean; "Kinder und Jugendliche": boolean; "Medizinische Fachkräfte": boolean; "Pädagogische Fachkräfte": boolean; "allgemeine Bevölkerung": boolean; }; - altergruppe: { + altersgruppe: { "0-3 Jahre": boolean; "3-6 Jahre": boolean; "6-10 Jahre": boolean; "10-16 Jahre": boolean; "16-18 Jahre": boolean; "18-27 Jahre": boolean; - Erwachsene: boolean; - Familienphase: boolean; + "Erwachsene": boolean; + "Familienphase": boolean; "Senioren und Familien": boolean; }; From 783f13a36a054f5950ab12d1dfd77aee8f64ec6e Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 23 May 2020 19:49:40 +0200 Subject: [PATCH 4/4] csv-parser dependency --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9654b69..9af49f9 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/status-bar": "^5.0.0", "@ionic/angular": "^5.0.0", + "csv-parser": "^2.3.2", "leaflet": "^1.6.0", "rxjs": "~6.5.1", "tslib": "^1.10.0",