Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -8,6 +8,7 @@ import {LocationService} from "../../service/http/location.service";
|
||||
import {LocationEntity} from "../../interface/LocationEntity";
|
||||
import {WaypointsEntity} from "../../interface/WaypointsEntity";
|
||||
import {WaypointService} from "../../service/http/waypoint.service"
|
||||
import {cookieService} from "../../service/cookie.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-list',
|
||||
@@ -15,6 +16,7 @@ import {WaypointService} from "../../service/http/waypoint.service"
|
||||
styleUrls: ['./list.component.css']
|
||||
})
|
||||
export class ListComponent implements OnInit, OnChanges {
|
||||
username: string = '';
|
||||
locationParams: string | undefined
|
||||
locations: LocationEntity[] | undefined;
|
||||
location: LocationEntity | undefined;
|
||||
@@ -37,11 +39,13 @@ export class ListComponent implements OnInit, OnChanges {
|
||||
private readTranslationJsonService: ReadTranslateJsonService,
|
||||
private locationService: LocationService,
|
||||
private waypointService: WaypointService,
|
||||
private cookieService: cookieService,
|
||||
) {
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.translations = this.readTranslationJsonService.getListTransaltions();
|
||||
this.username = this.cookieService.getUsername();
|
||||
this.route.params.subscribe(params => {
|
||||
this.locationParams = params['location'];
|
||||
});
|
||||
|
||||
0
src/app/component/login/login.component.css
Normal file
0
src/app/component/login/login.component.css
Normal file
31
src/app/component/login/login.component.html
Normal file
31
src/app/component/login/login.component.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="h-screen w-screen flex items-center justify-center">
|
||||
<div class="max-w-md py-12">
|
||||
|
||||
<div class="bg-white px-6 py-8 rounded-lg shadow-md w-[400px]">
|
||||
|
||||
<h2 class="text-center text-2xl font-bold mb-8">Accedi</h2>
|
||||
|
||||
<form>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="email" class="block text-gray-700 font-bold mb-2">Email:</label>
|
||||
<input type="email" id="email" name="email" placeholder="Inserisci la tua email"
|
||||
class="w-full px-4 py-2 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="password" class="block text-gray-700 font-bold mb-2">Password:</label>
|
||||
<input type="password" id="password" name="password" placeholder="Inserisci la tua password"
|
||||
class="w-full px-4 py-2 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<button type="submit" class="btn gap-2 border-primary bg-primary text-secondary hover:bg-secondary hover:text-primary hover:border-primary py-2 w-full">Accedi</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
10
src/app/component/login/login.component.ts
Normal file
10
src/app/component/login/login.component.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrls: ['./login.component.css']
|
||||
})
|
||||
export class LoginComponent {
|
||||
|
||||
}
|
||||
@@ -1,11 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Management</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="dropdown dropdown-hover" id="translate">
|
||||
<label tabindex="0" class="btn m-1 bg-black border-neutral text-base-100"
|
||||
id="translateLabel">{{translations.translate}}</label>
|
||||
@@ -192,5 +184,4 @@
|
||||
<button (click)="closeWaypointForm()">{{translations.close}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import {ActivatedRoute} from "@angular/router";
|
||||
import {LocationService} from "../../service/http/location.service";
|
||||
import {UserService} from "../../service/http/user.service";
|
||||
import {WaypointService} from "../../service/http/waypoint.service";
|
||||
import {toNumbers} from "@angular/compiler-cli/src/version_helpers";
|
||||
import {managementTranslations} from "../../interface/translations";
|
||||
import {TranslateService} from "../../service/language/translate.service";
|
||||
import {ReadTranslateJsonService} from "../../service/language/readTranslateJson.service";
|
||||
import {cookieService} from "../../service/cookie.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -18,6 +18,8 @@ import {ReadTranslateJsonService} from "../../service/language/readTranslateJson
|
||||
})
|
||||
|
||||
export class ManagementComponent implements OnInit {
|
||||
|
||||
username: string = '';
|
||||
showUserForm: boolean = false;
|
||||
showLocationForm: boolean = false;
|
||||
showWaypointForm: boolean = false;
|
||||
@@ -39,11 +41,13 @@ export class ManagementComponent implements OnInit {
|
||||
private userService: UserService,
|
||||
private translateService: TranslateService,
|
||||
private readTranslationJsonService: ReadTranslateJsonService,
|
||||
private cookieService: cookieService,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.translations = this.readTranslationJsonService.getManagementTranslations();
|
||||
this.username = this.cookieService.getUsername();
|
||||
this.locationService.getLocations().subscribe(locations => {
|
||||
this.locations = locations;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user