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