Aus dem Explorer
This commit is contained in:
parent
10ef83c26a
commit
53d00fd1ba
@ -47,8 +47,8 @@
|
|||||||
"budgets": [
|
"budgets": [
|
||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "4mb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Gruppe } from '../Gruppe';
|
import { Gruppe } from '../Gruppe';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class GruppeService {
|
export class GruppeService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/group_data.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/group_data.php";
|
||||||
strAnfrage ="";
|
strAnfrage ="";
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Kompetenz } from '../kompetenz';
|
import { Kompetenz } from '../kompetenz';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
// https://angular.de/artikel/angular-tutorial-deutsch/#komponenten-und-services
|
// https://angular.de/artikel/angular-tutorial-deutsch/#komponenten-und-services
|
||||||
// Umgang mit Asynchronität
|
// Umgang mit Asynchronität
|
||||||
@ -12,7 +13,8 @@ import { Kompetenz } from '../kompetenz';
|
|||||||
|
|
||||||
export class KompetenzService {
|
export class KompetenzService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/kompetenzen.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/kompetenzen.php";
|
||||||
strAnfrage?: string;
|
strAnfrage?: string;
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
|
@ -2,13 +2,15 @@ import { Injectable } from '@angular/core';
|
|||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Lehrling } from '../lehrling';
|
import { Lehrling } from '../lehrling';
|
||||||
import { map, Observable } from 'rxjs';
|
import { map, Observable } from 'rxjs';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class LehrlingService {
|
export class LehrlingService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/apprentice_list.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = "/api/apprentice_list.php";
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
getLehrlinge() {
|
getLehrlinge() {
|
||||||
|
@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpSentEvent } from '@angular/common/http';
|
import { HttpSentEvent } from '@angular/common/http';
|
||||||
import { Userlogin } from '../Userlogin';
|
import { Userlogin } from '../Userlogin';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -10,7 +11,9 @@ import { Userlogin } from '../Userlogin';
|
|||||||
export class LoginService {
|
export class LoginService {
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
baseUrl = "http://localhost/bildungdb/api";
|
|
||||||
|
private API_URL = environment.API_URL;
|
||||||
|
baseUrl = this.API_URL + "/api";
|
||||||
|
|
||||||
login(logindata): any {
|
login(logindata): any {
|
||||||
const strloginapi = this.baseUrl + '/login.php';
|
const strloginapi = this.baseUrl + '/login.php';
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { _Modul } from '../_Modul';
|
import { _Modul } from '../_Modul';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ModulService {
|
export class ModulService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/modul.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/modul.php";
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Profession } from '../Profession';
|
import { Profession } from '../Profession';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ProfessionService {
|
export class ProfessionService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/profession.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/profession.php";
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
getProfessionList() {
|
getProfessionList() {
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Pruefung } from '../Pruefung';
|
import { Pruefung } from '../Pruefung';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class PruefungService {
|
export class PruefungService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/pruefung.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/pruefung.php";
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Pruefungsergebnis } from '../Pruefungsergebnis';
|
import { Pruefungsergebnis } from '../Pruefungsergebnis';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class PruefungsergebnisService {
|
export class PruefungsergebnisService {
|
||||||
|
|
||||||
public $url = "http://localhost/bildungdb/api/pruefungsergebnis.php";
|
private API_URL = environment.API_URL;
|
||||||
|
public $url = this.API_URL + "/api/pruefungsergebnis.php";
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
|
@ -2,13 +2,14 @@ import { HttpClient } from '@angular/common/http';
|
|||||||
import { EventEmitter, Injectable, Output } from '@angular/core';
|
import { EventEmitter, Injectable, Output } from '@angular/core';
|
||||||
import { User } from '../user';
|
import { User } from '../user';
|
||||||
import { map, Observable } from 'rxjs';
|
import { map, Observable } from 'rxjs';
|
||||||
|
import { environment } from '../../environments/environment';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class UserService {
|
export class UserService {
|
||||||
|
|
||||||
public baseUrl = "http://localhost/bildungdb/api/";
|
private API_URL = environment.API_URL;
|
||||||
|
public baseUrl = this.API_URL + "/api/";
|
||||||
|
|
||||||
redirectUrl?: string;
|
redirectUrl?: string;
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ export class UserService {
|
|||||||
constructor(private httpClient : HttpClient) { }
|
constructor(private httpClient : HttpClient) { }
|
||||||
|
|
||||||
public userlogin(username:string, password:string) {
|
public userlogin(username:string, password:string) {
|
||||||
return this.httpClient.post<any>(this.baseUrl + '/login.php', { username, password })
|
return this.httpClient.post<any>(this.baseUrl + 'login.php', { username, password })
|
||||||
.pipe(map((Usermodule: { name: string; }[]) => {
|
.pipe(map((Usermodule: { name: string; }[]) => {
|
||||||
this.setToken(Usermodule[0].name);
|
this.setToken(Usermodule[0].name);
|
||||||
this.getLoggedInName.emit(true);
|
this.getLoggedInName.emit(true);
|
||||||
@ -25,7 +26,7 @@ public userlogin(username:string, password:string) {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
public userregistration(name: string,email: string,pwd: string,login: string) {
|
public userregistration(name: string,email: string,pwd: string,login: string) {
|
||||||
return this.httpClient.post<any>(this.baseUrl + '/registration.php', { name,email, pwd,login })
|
return this.httpClient.post<any>(this.baseUrl + 'registration.php', { name,email, pwd,login })
|
||||||
.pipe(map(Usermodule => {
|
.pipe(map(Usermodule => {
|
||||||
return Usermodule;
|
return Usermodule;
|
||||||
}));
|
}));
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
API_URL: 'https://bfi.opencloud.at',
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
API_URL: 'http://localhost/bildungdb',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user