+
Naptár
+
{{dayOfWeek.name}}
diff --git a/customer/app/src/app/layout/guest-layout/guest-layout.component.html b/customer/app/src/app/layout/guest-layout/guest-layout.component.html
new file mode 100644
index 0000000..07a640c
--- /dev/null
+++ b/customer/app/src/app/layout/guest-layout/guest-layout.component.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/customer/app/src/app/layout/guest-layout/guest-layout.component.scss b/customer/app/src/app/layout/guest-layout/guest-layout.component.scss
new file mode 100644
index 0000000..fba55dc
--- /dev/null
+++ b/customer/app/src/app/layout/guest-layout/guest-layout.component.scss
@@ -0,0 +1,4 @@
+div{
+ background: url("/assets/images/cutlercross-background.jpg");
+ background-repeat: repeat-y;
+}
diff --git a/customer/app/src/app/layout/guest-layout/guest-layout.component.ts b/customer/app/src/app/layout/guest-layout/guest-layout.component.ts
new file mode 100644
index 0000000..90b556f
--- /dev/null
+++ b/customer/app/src/app/layout/guest-layout/guest-layout.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-guest-layout',
+ templateUrl: './guest-layout.component.html',
+ styleUrls: ['./guest-layout.component.scss']
+})
+export class GuestLayoutComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/customer/app/src/app/layout/secured-layout/secured-layout.component.html b/customer/app/src/app/layout/secured-layout/secured-layout.component.html
new file mode 100644
index 0000000..00f6057
--- /dev/null
+++ b/customer/app/src/app/layout/secured-layout/secured-layout.component.html
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/customer/app/src/app/layout/secured-layout/secured-layout.component.scss b/customer/app/src/app/layout/secured-layout/secured-layout.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/customer/app/src/app/layout/secured-layout/secured-layout.component.ts b/customer/app/src/app/layout/secured-layout/secured-layout.component.ts
new file mode 100644
index 0000000..e97891d
--- /dev/null
+++ b/customer/app/src/app/layout/secured-layout/secured-layout.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-secured-layout',
+ templateUrl: './secured-layout.component.html',
+ styleUrls: ['./secured-layout.component.scss']
+})
+export class SecuredLayoutComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/customer/app/src/app/pages/event-details/event-details.component.spec.ts b/customer/app/src/app/pages/event-details/event-details.component.spec.ts
deleted file mode 100644
index 512e609..0000000
--- a/customer/app/src/app/pages/event-details/event-details.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { EventDetailsComponent } from './event-details.component';
-
-describe('EventDetailsComponent', () => {
- let component: EventDetailsComponent;
- let fixture: ComponentFixture
;
-
- beforeEach(waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [ EventDetailsComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(EventDetailsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/customer/app/src/app/pages/event-details/event-details.component.ts b/customer/app/src/app/pages/event-details/event-details.component.ts
index 66fb1d7..cebddd4 100644
--- a/customer/app/src/app/pages/event-details/event-details.component.ts
+++ b/customer/app/src/app/pages/event-details/event-details.component.ts
@@ -24,6 +24,7 @@ export class EventDetailsComponent implements OnInit {
) { }
ngOnInit() {
+ console.info("event details")
this.formControls = {
idEvent: ["", [Validators.required ]],
}
diff --git a/customer/app/src/app/pages/home/home.component.html b/customer/app/src/app/pages/home/home.component.html
index 284e31a..e5a3c6b 100644
--- a/customer/app/src/app/pages/home/home.component.html
+++ b/customer/app/src/app/pages/home/home.component.html
@@ -1,9 +1,7 @@
-
diff --git a/customer/app/src/app/pages/home/home.component.spec.ts b/customer/app/src/app/pages/home/home.component.spec.ts
deleted file mode 100644
index b19cfbd..0000000
--- a/customer/app/src/app/pages/home/home.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { HomeComponent } from './home.component';
-
-describe('HomeComponent', () => {
- let component: HomeComponent;
- let fixture: ComponentFixture;
-
- beforeEach(waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [ HomeComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(HomeComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/customer/app/src/app/pages/login/login.component.html b/customer/app/src/app/pages/login/login.component.html
index 0a62245..8cfbd69 100644
--- a/customer/app/src/app/pages/login/login.component.html
+++ b/customer/app/src/app/pages/login/login.component.html
@@ -1,9 +1,11 @@
-
-
-
+
diff --git a/customer/app/src/app/pages/login/login.component.scss b/customer/app/src/app/pages/login/login.component.scss
index 19a9167..e69de29 100644
--- a/customer/app/src/app/pages/login/login.component.scss
+++ b/customer/app/src/app/pages/login/login.component.scss
@@ -1,8 +0,0 @@
-//.btn-primary{
-// background-color: #e5ce48;
-// color: orangered;
-// border: 1px solid orangered;
-//}
-//.btn-primary:hover{
-// background-color: orange;
-//}
diff --git a/customer/app/src/app/pages/login/login.component.spec.ts b/customer/app/src/app/pages/login/login.component.spec.ts
deleted file mode 100644
index eb0c71a..0000000
--- a/customer/app/src/app/pages/login/login.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-
-import { LoginComponent } from './login.component';
-
-describe('LoginComponent', () => {
- let component: LoginComponent;
- let fixture: ComponentFixture
;
-
- beforeEach(waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [ LoginComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(LoginComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/customer/app/src/app/pages/login/login.component.ts b/customer/app/src/app/pages/login/login.component.ts
index 0396591..febd9b9 100644
--- a/customer/app/src/app/pages/login/login.component.ts
+++ b/customer/app/src/app/pages/login/login.component.ts
@@ -32,7 +32,7 @@ export class LoginComponent implements OnInit {
this.authenticationService.logout();
// get return url from route parameters or default to '/'
- this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/';
+ this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/home';
}
diff --git a/customer/app/src/app/pages/password-change/password-change.component.html b/customer/app/src/app/pages/password-change/password-change.component.html
new file mode 100644
index 0000000..44e5add
--- /dev/null
+++ b/customer/app/src/app/pages/password-change/password-change.component.html
@@ -0,0 +1,37 @@
+
diff --git a/customer/app/src/app/pages/password-change/password-change.component.scss b/customer/app/src/app/pages/password-change/password-change.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/customer/app/src/app/pages/password-change/password-change.component.ts b/customer/app/src/app/pages/password-change/password-change.component.ts
new file mode 100644
index 0000000..57786b7
--- /dev/null
+++ b/customer/app/src/app/pages/password-change/password-change.component.ts
@@ -0,0 +1,69 @@
+import { Component, OnInit } from '@angular/core';
+import {AbstractControl, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators} from "@angular/forms";
+import {FormHelperService} from "../../services/form-helper.service";
+import {AuthenticationService} from "../../services/authentication.service";
+import {ToastrService} from "ngx-toastr";
+
+@Component({
+ selector: 'app-password-change',
+ templateUrl: './password-change.component.html',
+ styleUrls: ['./password-change.component.scss']
+})
+export class PasswordChangeComponent implements OnInit {
+
+ public passwordChangeForm: FormGroup ;
+ public loading: boolean = false;
+
+ constructor(
+ public validationService: FormHelperService,
+ public authenticationService: AuthenticationService,
+ private toastr: ToastrService
+ ) { }
+
+ ngOnInit(): void {
+ this.passwordChangeForm = new FormGroup({
+ passwordOld: new FormControl(null, [ Validators.required, ]),
+ password: new FormControl(null, [ Validators.required,Validators.minLength(6)]),
+ passwordRepeat: new FormControl(null, [ Validators.required,Validators.minLength(6)]),
+ },
+ {
+ validators: [this.checkPasswords]
+ });
+ }
+
+ changePassword() {
+ if (!this.passwordChangeForm.valid){
+ return;
+ }
+ this.loading = true;
+ this.authenticationService.passwordChange({
+ passwordOld: this.passwordChangeForm.value.passwordOld,
+ password: this.passwordChangeForm.value.password
+ }).subscribe(value => {
+ this.loading = false;
+ this.toastr.success('Sikeresen megváltoztatta a jelszavát', 'Jelszó módosítás');
+ this.passwordChangeForm.reset();
+ },
+ error => {
+ this.loading = false;
+ this.toastr.error(error, 'Jelszó módosítás');
+ })
+ }
+
+ checkPasswords: ValidatorFn = (group: AbstractControl): ValidationErrors | null => {
+
+
+ if ( group.hasError("password") || group.hasError("passwordRepeat")){
+ return null;
+ }
+ if ( !group.get("passwordRepeat").dirty || !group.get("passwordRepeat").touched ){
+ return null;
+ }
+
+ let password = this.validationService.getValue(this.passwordChangeForm,"password");
+ let passwordRepeat = this.validationService.getValue(this.passwordChangeForm,"passwordRepeat");
+
+ return password === passwordRepeat ? null : { notSame: true }
+ }
+
+}
diff --git a/customer/app/src/app/services/authentication.service.ts b/customer/app/src/app/services/authentication.service.ts
index 476ccc0..aa5a072 100644
--- a/customer/app/src/app/services/authentication.service.ts
+++ b/customer/app/src/app/services/authentication.service.ts
@@ -3,6 +3,7 @@ import { HttpClient } from "@angular/common/http";
import { map } from 'rxjs/operators';
import {Endpoints} from "./endpoints";
import {BehaviorSubject} from "rxjs";
+import {PasswordChangeRequest} from "../app.types";
@Injectable({
providedIn: 'root'
@@ -35,6 +36,10 @@ export class AuthenticationService {
);
}
+ passwordChange(passwordChangeRequest: PasswordChangeRequest){
+ return this.http.post(Endpoints.POST_USER_PASSWORD_CHANGE(), passwordChangeRequest)
+ }
+
get user() {
return this._user;
}
diff --git a/customer/app/src/app/services/endpoints.ts b/customer/app/src/app/services/endpoints.ts
index 59ae9d6..c2e3e8d 100644
--- a/customer/app/src/app/services/endpoints.ts
+++ b/customer/app/src/app/services/endpoints.ts
@@ -6,6 +6,10 @@ export class Endpoints {
return `${this.baseUrl}user/login`;
}
+ public static POST_USER_PASSWORD_CHANGE(){
+ return `${this.baseUrl}user/password-change`;
+ }
+
public static GET_EVENTS( ){
return `${this.baseUrl}/events`;
}
diff --git a/customer/app/src/app/services/form-helper.service.ts b/customer/app/src/app/services/form-helper.service.ts
new file mode 100644
index 0000000..aa46d3b
--- /dev/null
+++ b/customer/app/src/app/services/form-helper.service.ts
@@ -0,0 +1,53 @@
+import {Injectable} from '@angular/core';
+import {FormGroup} from "@angular/forms";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class FormHelperService {
+
+
+ constructor() {
+ }
+
+
+ public reset(formGroup: FormGroup) {
+ formGroup.reset();
+ }
+
+ public showControlError(formGroup: FormGroup, formControlName: string, errorType: string = null): boolean {
+ if (formGroup.valid) {
+ return false;
+ }
+
+ if ( formControlName == null ){
+ if ( errorType ){
+ return formGroup.errors ? formGroup.errors[errorType]: false;
+ }else {
+ return formGroup.invalid;
+ }
+ }
+
+ let control = formGroup.get(formControlName);
+
+ if ( !control.dirty || !control.touched ){
+ return false;
+ }
+
+ let hasErrors = control.invalid;
+ if (!hasErrors) {
+ return false;
+ }
+ if (errorType == null) {
+ return true;
+ }
+ return control?.errors[errorType];
+
+ }
+
+ public getValue(formGroup: FormGroup, control: string) {
+ return formGroup.get(control).value
+ }
+
+
+}
diff --git a/customer/app/src/assets/images/cutlercross-background.jpg b/customer/app/src/assets/images/cutlercross-background.jpg
new file mode 100644
index 0000000..1f689ba
Binary files /dev/null and b/customer/app/src/assets/images/cutlercross-background.jpg differ
diff --git a/customer/app/src/assets/images/cutlercross-logo-dark.svg b/customer/app/src/assets/images/cutlercross-logo-dark.svg
new file mode 100644
index 0000000..4368b16
--- /dev/null
+++ b/customer/app/src/assets/images/cutlercross-logo-dark.svg
@@ -0,0 +1,31 @@
+
+
+
+
diff --git a/customer/app/src/assets/images/cutlercross-logo-light.svg b/customer/app/src/assets/images/cutlercross-logo-light.svg
new file mode 100644
index 0000000..66c8c33
--- /dev/null
+++ b/customer/app/src/assets/images/cutlercross-logo-light.svg
@@ -0,0 +1,31 @@
+
+
+
+
diff --git a/customer/app/src/assets/images/about.jpg b/customer/app/src/assets/images_old/about.jpg
similarity index 100%
rename from customer/app/src/assets/images/about.jpg
rename to customer/app/src/assets/images_old/about.jpg
diff --git a/customer/app/src/assets/images/bg_1.jpg b/customer/app/src/assets/images_old/bg_1.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_1.jpg
rename to customer/app/src/assets/images_old/bg_1.jpg
diff --git a/customer/app/src/assets/images/bg_2.jpg b/customer/app/src/assets/images_old/bg_2.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_2.jpg
rename to customer/app/src/assets/images_old/bg_2.jpg
diff --git a/customer/app/src/assets/images/bg_3.jpg b/customer/app/src/assets/images_old/bg_3.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_3.jpg
rename to customer/app/src/assets/images_old/bg_3.jpg
diff --git a/customer/app/src/assets/images/bg_4.jpg b/customer/app/src/assets/images_old/bg_4.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_4.jpg
rename to customer/app/src/assets/images_old/bg_4.jpg
diff --git a/customer/app/src/assets/images/bg_4_1.jpg b/customer/app/src/assets/images_old/bg_4_1.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_4_1.jpg
rename to customer/app/src/assets/images_old/bg_4_1.jpg
diff --git a/customer/app/src/assets/images/bg_5.jpg b/customer/app/src/assets/images_old/bg_5.jpg
similarity index 100%
rename from customer/app/src/assets/images/bg_5.jpg
rename to customer/app/src/assets/images_old/bg_5.jpg
diff --git a/customer/app/src/assets/images/gallery-1.jpg b/customer/app/src/assets/images_old/gallery-1.jpg
similarity index 100%
rename from customer/app/src/assets/images/gallery-1.jpg
rename to customer/app/src/assets/images_old/gallery-1.jpg
diff --git a/customer/app/src/assets/images/gallery-2.jpg b/customer/app/src/assets/images_old/gallery-2.jpg
similarity index 100%
rename from customer/app/src/assets/images/gallery-2.jpg
rename to customer/app/src/assets/images_old/gallery-2.jpg
diff --git a/customer/app/src/assets/images/gallery-3.jpg b/customer/app/src/assets/images_old/gallery-3.jpg
similarity index 100%
rename from customer/app/src/assets/images/gallery-3.jpg
rename to customer/app/src/assets/images_old/gallery-3.jpg
diff --git a/customer/app/src/assets/images/gallery-4.jpg b/customer/app/src/assets/images_old/gallery-4.jpg
similarity index 100%
rename from customer/app/src/assets/images/gallery-4.jpg
rename to customer/app/src/assets/images_old/gallery-4.jpg
diff --git a/customer/app/src/assets/images/image_1.jpg b/customer/app/src/assets/images_old/image_1.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_1.jpg
rename to customer/app/src/assets/images_old/image_1.jpg
diff --git a/customer/app/src/assets/images/image_2.jpg b/customer/app/src/assets/images_old/image_2.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_2.jpg
rename to customer/app/src/assets/images_old/image_2.jpg
diff --git a/customer/app/src/assets/images/image_3.jpg b/customer/app/src/assets/images_old/image_3.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_3.jpg
rename to customer/app/src/assets/images_old/image_3.jpg
diff --git a/customer/app/src/assets/images/image_4.jpg b/customer/app/src/assets/images_old/image_4.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_4.jpg
rename to customer/app/src/assets/images_old/image_4.jpg
diff --git a/customer/app/src/assets/images/image_5.jpg b/customer/app/src/assets/images_old/image_5.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_5.jpg
rename to customer/app/src/assets/images_old/image_5.jpg
diff --git a/customer/app/src/assets/images/image_6.jpg b/customer/app/src/assets/images_old/image_6.jpg
similarity index 100%
rename from customer/app/src/assets/images/image_6.jpg
rename to customer/app/src/assets/images_old/image_6.jpg
diff --git a/customer/app/src/assets/images/loc.png b/customer/app/src/assets/images_old/loc.png
similarity index 100%
rename from customer/app/src/assets/images/loc.png
rename to customer/app/src/assets/images_old/loc.png
diff --git a/customer/app/src/assets/images/person_1.jpg b/customer/app/src/assets/images_old/person_1.jpg
similarity index 100%
rename from customer/app/src/assets/images/person_1.jpg
rename to customer/app/src/assets/images_old/person_1.jpg
diff --git a/customer/app/src/assets/images/person_2.jpg b/customer/app/src/assets/images_old/person_2.jpg
similarity index 100%
rename from customer/app/src/assets/images/person_2.jpg
rename to customer/app/src/assets/images_old/person_2.jpg
diff --git a/customer/app/src/assets/images/person_3.jpg b/customer/app/src/assets/images_old/person_3.jpg
similarity index 100%
rename from customer/app/src/assets/images/person_3.jpg
rename to customer/app/src/assets/images_old/person_3.jpg
diff --git a/customer/app/src/assets/images/person_4.jpg b/customer/app/src/assets/images_old/person_4.jpg
similarity index 100%
rename from customer/app/src/assets/images/person_4.jpg
rename to customer/app/src/assets/images_old/person_4.jpg
diff --git a/customer/app/src/assets/images/program-1.jpg b/customer/app/src/assets/images_old/program-1.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-1.jpg
rename to customer/app/src/assets/images_old/program-1.jpg
diff --git a/customer/app/src/assets/images/program-2.jpg b/customer/app/src/assets/images_old/program-2.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-2.jpg
rename to customer/app/src/assets/images_old/program-2.jpg
diff --git a/customer/app/src/assets/images/program-3.jpg b/customer/app/src/assets/images_old/program-3.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-3.jpg
rename to customer/app/src/assets/images_old/program-3.jpg
diff --git a/customer/app/src/assets/images/program-4.jpg b/customer/app/src/assets/images_old/program-4.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-4.jpg
rename to customer/app/src/assets/images_old/program-4.jpg
diff --git a/customer/app/src/assets/images/program-5.jpg b/customer/app/src/assets/images_old/program-5.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-5.jpg
rename to customer/app/src/assets/images_old/program-5.jpg
diff --git a/customer/app/src/assets/images/program-6.jpg b/customer/app/src/assets/images_old/program-6.jpg
similarity index 100%
rename from customer/app/src/assets/images/program-6.jpg
rename to customer/app/src/assets/images_old/program-6.jpg
diff --git a/customer/app/src/assets/images/trainer-1.jpg b/customer/app/src/assets/images_old/trainer-1.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-1.jpg
rename to customer/app/src/assets/images_old/trainer-1.jpg
diff --git a/customer/app/src/assets/images/trainer-2.jpg b/customer/app/src/assets/images_old/trainer-2.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-2.jpg
rename to customer/app/src/assets/images_old/trainer-2.jpg
diff --git a/customer/app/src/assets/images/trainer-3.jpg b/customer/app/src/assets/images_old/trainer-3.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-3.jpg
rename to customer/app/src/assets/images_old/trainer-3.jpg
diff --git a/customer/app/src/assets/images/trainer-4.jpg b/customer/app/src/assets/images_old/trainer-4.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-4.jpg
rename to customer/app/src/assets/images_old/trainer-4.jpg
diff --git a/customer/app/src/assets/images/trainer-5.jpg b/customer/app/src/assets/images_old/trainer-5.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-5.jpg
rename to customer/app/src/assets/images_old/trainer-5.jpg
diff --git a/customer/app/src/assets/images/trainer-6.jpg b/customer/app/src/assets/images_old/trainer-6.jpg
similarity index 100%
rename from customer/app/src/assets/images/trainer-6.jpg
rename to customer/app/src/assets/images_old/trainer-6.jpg
diff --git a/customer/app/src/styles.scss b/customer/app/src/styles.scss
index cd2bc02..49fa03c 100644
--- a/customer/app/src/styles.scss
+++ b/customer/app/src/styles.scss
@@ -1,110 +1,27 @@
/* You can add global styles to this file, and also import other style files */
+$font-size-xs: 0.625rem;
+$font-size-sm: 1rem;
+$font-size-md: 1.25rem;
+$font-size-lg: 2.5rem;
+$font-size-xl: 6.25rem;
+
+$primary: #E3000E ;
+$secondary: #D2D2D2 ;
+$light: #FFFFFF ;
+$dark: #3A3A39 ;
+
+// regular style toast
+@import '~ngx-toastr/toastr';
+@import "styles/bootstrap-custom";
+
+html{
+ height: 100%;
+}
+
body{
- font-family: "Poppins", Arial, sans-serif;
- background: #151111;
- font-size: 15px;
- line-height: 1.8;
- font-weight: 300;
- color: gray;
- background: url("/assets/images/bg_4.jpg") no-repeat fixed;
- background-size: cover;
+ min-height: 100%;
+ height: 100%;
}
-.fit-content{
-
- .fit-navbar{
- position: relative;
- }
-
-}
-
-
-.btn {
- cursor: pointer;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- -ms-border-radius: 0;
- border-radius: 0;
- -webkit-box-shadow: none !important;
- box-shadow: none !important;
- font-size: 13px; }
-.btn:hover, .btn:active, .btn:focus {
- outline: none; }
-.btn.btn-primary {
- background: #e5ce48;
- border: 1px solid #e5ce48;
- color: #000; }
-.btn.btn-primary:hover,.btn.btn-primary:active, .btn-primary:not(:disabled):not(.disabled):active {
- border: 1px solid #e5ce48;
- background: transparent;
- color: #e5ce48; }
-.btn.btn-primary.btn-outline-primary {
- border: 1px solid #e5ce48;
- background: transparent;
- color: #e5ce48; }
-.btn.btn-primary.btn-outline-primary:hover {
- border: 1px solid transparent;
- background: #e5ce48;
- color: #fff; }
-.btn.btn-white {
- background: #fff;
- border: 1px solid #fff;
- color: #000; }
-.btn.btn-white:hover {
- border: 1px solid #000;
- background: #000;
- color: #fff; }
-.btn.btn-white.btn-outline-white {
- border-color: rgba(255, 255, 255, 0.8);
- background: none;
- border-width: 1px;
- color: #fff; }
-.btn.btn-white.btn-outline-white:hover, .btn.btn-white.btn-outline-white:focus, .btn.btn-white.btn-outline-white:active {
- background: #e5ce48;
- border-color: #e5ce48;
- color: #000; }
-.btn.btn-outline-black {
- border-color: black;
- background: none;
- border-width: 1px;
- color: #000; }
-.btn.btn-outline-black:hover, .btn.btn-outline-black:focus, .btn.btn-outline-black:active {
- background: #000;
- border-color: #000;
- color: #fff; }
-
-
-.login-form .form-group {
- position: relative; }
-
-.login-form .form-control {
- border: transparent !important;
- border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
- height: 58px !important;
- padding-left: 0;
- padding-right: 0;
- background: transparent !important;
- color: rgba(255, 255, 255, 0.9) !important;
- font-size: 13px;
- border-radius: 0px;
- -webkit-box-shadow: none !important;
- box-shadow: none !important; }
-.login-form .form-control::-webkit-input-placeholder {
- /* Chrome/Opera/Safari */
- color: rgba(255, 255, 255, 0.9); }
-.login-form .form-control::-moz-placeholder {
- /* Firefox 19+ */
- color: rgba(255, 255, 255, 0.9); }
-.login-form .form-control:-ms-input-placeholder {
- /* IE 10+ */
- color: rgba(255, 255, 255, 0.9); }
-.login-form .form-control:-moz-placeholder {
- /* Firefox 18- */
- color: rgba(255, 255, 255, 0.9); }
-.login-form .form-control:focus, .login-form .form-control:active {
- border-color: #e5ce48 !important; }
-
-.login-form textarea.form-control {
- height: inherit !important; }
diff --git a/customer/app/src/styles/bootstrap-custom.scss b/customer/app/src/styles/bootstrap-custom.scss
new file mode 100644
index 0000000..8f38d89
--- /dev/null
+++ b/customer/app/src/styles/bootstrap-custom.scss
@@ -0,0 +1,68 @@
+/*!
+ * Bootstrap v5.1.1 (https://getbootstrap.com/)
+ * Copyright 2011-2021 The Bootstrap Authors
+ * Copyright 2011-2021 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+
+// scss-docs-start import-stack
+// Configuration
+@import "node_modules/bootstrap/scss/functions";
+@import "node_modules/bootstrap/scss/variables";
+@import "node_modules/bootstrap/scss/mixins";
+@import "node_modules/bootstrap/scss/utilities";
+
+$utilities: () !default;
+
+$utilities: map-merge(
+ (
+ // scss-docs-start utils-vertical-align
+ "max-width2": (
+ property: max-width,
+ responsive: true,
+ class: mw2,
+ values: ( 25: 25%, 50: 50%, 100: 100%)
+ ),
+ ),
+ $utilities
+);
+@import "node_modules/bootstrap/scss/root";
+@import "node_modules/bootstrap/scss/reboot";
+@import "node_modules/bootstrap/scss/type";
+@import "node_modules/bootstrap/scss/images";
+@import "node_modules/bootstrap/scss/containers";
+@import "node_modules/bootstrap/scss/grid";
+@import "node_modules/bootstrap/scss/tables";
+@import "node_modules/bootstrap/scss/forms";
+@import "node_modules/bootstrap/scss/buttons";
+@import "node_modules/bootstrap/scss/transitions";
+@import "node_modules/bootstrap/scss/dropdown";
+@import "node_modules/bootstrap/scss/button-group";
+@import "node_modules/bootstrap/scss/nav";
+@import "node_modules/bootstrap/scss/navbar";
+@import "node_modules/bootstrap/scss/card";
+@import "node_modules/bootstrap/scss/accordion";
+@import "node_modules/bootstrap/scss/breadcrumb";
+@import "node_modules/bootstrap/scss/pagination";
+
+// Layout & components
+@import "node_modules/bootstrap/scss/badge";
+@import "node_modules/bootstrap/scss/alert";
+@import "node_modules/bootstrap/scss/progress";
+@import "node_modules/bootstrap/scss/list-group";
+@import "node_modules/bootstrap/scss/close";
+@import "node_modules/bootstrap/scss/toasts";
+@import "node_modules/bootstrap/scss/modal";
+@import "node_modules/bootstrap/scss/tooltip";
+@import "node_modules/bootstrap/scss/popover";
+@import "node_modules/bootstrap/scss/carousel";
+@import "node_modules/bootstrap/scss/spinners";
+@import "node_modules/bootstrap/scss/offcanvas";
+@import "node_modules/bootstrap/scss/placeholders";
+
+// Helpers
+@import "node_modules/bootstrap/scss/helpers";
+
+// Utilities
+@import "node_modules/bootstrap/scss/utilities/api";
+// scss-docs-end import-stack
diff --git a/customer/app/src/styles/styles-old.scss b/customer/app/src/styles/styles-old.scss
new file mode 100644
index 0000000..24696ec
--- /dev/null
+++ b/customer/app/src/styles/styles-old.scss
@@ -0,0 +1,98 @@
+
+
+.fit-content{
+
+ .fit-navbar{
+ position: relative;
+ }
+
+}
+
+
+.btn {
+ cursor: pointer;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ -ms-border-radius: 0;
+ border-radius: 0;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+ font-size: 13px; }
+.btn:hover, .btn:active, .btn:focus {
+ outline: none; }
+.btn.btn-primary {
+ background: #e5ce48;
+ border: 1px solid #e5ce48;
+ color: #000; }
+.btn.btn-primary:hover,.btn.btn-primary:active, .btn-primary:not(:disabled):not(.disabled):active {
+ border: 1px solid #e5ce48;
+ background: transparent;
+ color: #e5ce48; }
+.btn.btn-primary.btn-outline-primary {
+ border: 1px solid #e5ce48;
+ background: transparent;
+ color: #e5ce48; }
+.btn.btn-primary.btn-outline-primary:hover {
+ border: 1px solid transparent;
+ background: #e5ce48;
+ color: #fff; }
+.btn.btn-white {
+ background: #fff;
+ border: 1px solid #fff;
+ color: #000; }
+.btn.btn-white:hover {
+ border: 1px solid #000;
+ background: #000;
+ color: #fff; }
+.btn.btn-white.btn-outline-white {
+ border-color: rgba(255, 255, 255, 0.8);
+ background: none;
+ border-width: 1px;
+ color: #fff; }
+.btn.btn-white.btn-outline-white:hover, .btn.btn-white.btn-outline-white:focus, .btn.btn-white.btn-outline-white:active {
+ background: #e5ce48;
+ border-color: #e5ce48;
+ color: #000; }
+.btn.btn-outline-black {
+ border-color: black;
+ background: none;
+ border-width: 1px;
+ color: #000; }
+.btn.btn-outline-black:hover, .btn.btn-outline-black:focus, .btn.btn-outline-black:active {
+ background: #000;
+ border-color: #000;
+ color: #fff; }
+
+
+.login-form .form-group {
+ position: relative; }
+
+.login-form .form-control {
+ border: transparent !important;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
+ height: 58px !important;
+ padding-left: 0;
+ padding-right: 0;
+ background: transparent !important;
+ color: rgba(255, 255, 255, 0.9) !important;
+ font-size: 13px;
+ border-radius: 0px;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important; }
+.login-form .form-control::-webkit-input-placeholder {
+ /* Chrome/Opera/Safari */
+ color: rgba(255, 255, 255, 0.9); }
+.login-form .form-control::-moz-placeholder {
+ /* Firefox 19+ */
+ color: rgba(255, 255, 255, 0.9); }
+.login-form .form-control:-ms-input-placeholder {
+ /* IE 10+ */
+ color: rgba(255, 255, 255, 0.9); }
+.login-form .form-control:-moz-placeholder {
+ /* Firefox 18- */
+ color: rgba(255, 255, 255, 0.9); }
+.login-form .form-control:focus, .login-form .form-control:active {
+ border-color: #e5ce48 !important; }
+
+.login-form textarea.form-control {
+ height: inherit !important; }
diff --git a/customerapi/controllers/EventController.php b/customerapi/controllers/EventController.php
index f219a91..0a9626b 100644
--- a/customerapi/controllers/EventController.php
+++ b/customerapi/controllers/EventController.php
@@ -105,7 +105,7 @@ class EventController extends CustomerApiController
->innerJoinWith('trainer')
->innerJoinWith('eventType')
->innerJoinWith('room')
- ->joinWith('activeEventRegistrations as registrations')
+ ->joinWith('activeEventRegistrations')
->andWhere(['>=', 'event.start', $interval->firstActiveDate->getTimestamp()])
->andWhere(['<', 'event.start', (clone $interval->lastActiveDate)->modify('+1 day')->getTimestamp()])
->andWhere(['event.active' => '1']);
diff --git a/customerapi/controllers/UserController.php b/customerapi/controllers/UserController.php
index 9ea0e2a..2cabb08 100644
--- a/customerapi/controllers/UserController.php
+++ b/customerapi/controllers/UserController.php
@@ -10,13 +10,15 @@ namespace customerapi\controllers;
use common\models\Customer;
use customerapi\models\LoginForm;
+use customerapi\models\PasswordChangeForm;
use sizeg\jwt\Jwt;
use sizeg\jwt\JwtHttpBearerAuth;
use Yii;
+use yii\web\BadRequestHttpException;
/** @noinspection PhpUnused */
-class UserController extends RestController
+class UserController extends RestController
{
@@ -26,36 +28,36 @@ class UserController extends RestController
*
*/
/** @noinspection PhpUnused */
- public function actionLogin( )
+ public function actionLogin()
{
// $customer = new Customer();
// $customer->setPassword("test");
$form = new LoginForm();
- $form->load(\Yii::$app->request->post( ), '');
+ $form->load(\Yii::$app->request->post(), '');
- if ( $form->validate() ){
+ if ($form->validate()) {
- /** @var Jwt $jwt */
- $jwt = Yii::$app->jwt;
- $signer = $jwt->getSigner('HS256');
- $key = $jwt->getKey();
- $time = time();
+ /** @var Jwt $jwt */
+ $jwt = Yii::$app->jwt;
+ $signer = $jwt->getSigner('HS256');
+ $key = $jwt->getKey();
+ $time = time();
- // Adoption for lcobucci/jwt ^4.0 version
- $token = $jwt->getBuilder()
- ->issuedBy('customerapi')// Configures the issuer (iss claim)
- ->permittedFor('customer')// Configures the audience (aud claim)
- ->identifiedBy('A989C57D19E2AF756BA9585AC4CFAF7974AE3D2BCA7CCA7307B39AB28CC7C2C8', true)// Configures the id (jti claim), replicating as a header item
- ->issuedAt($time)// Configures the time that the token was issue (iat claim)
- ->expiresAt($time + 3600)// Configures the expiration time of the token (exp claim)
- ->withClaim('uid', $form->getCustomer()->getId())// Configures a new claim, called "uid"
- ->getToken($signer, $key); // Retrieves the generated token
+ // Adoption for lcobucci/jwt ^4.0 version
+ $token = $jwt->getBuilder()
+ ->issuedBy('customerapi')// Configures the issuer (iss claim)
+ ->permittedFor('customer')// Configures the audience (aud claim)
+ ->identifiedBy('A989C57D19E2AF756BA9585AC4CFAF7974AE3D2BCA7CCA7307B39AB28CC7C2C8', true)// Configures the id (jti claim), replicating as a header item
+ ->issuedAt($time)// Configures the time that the token was issue (iat claim)
+ ->expiresAt($time + 3600)// Configures the expiration time of the token (exp claim)
+ ->withClaim('uid', $form->getCustomer()->getId())// Configures a new claim, called "uid"
+ ->getToken($signer, $key); // Retrieves the generated token
- return $this->asJson([
- 'token' => (string)$token,
- ]);
+ return $this->asJson([
+ 'token' => (string)$token,
+ ]);
} else {
return $this->asJson(
[
@@ -66,6 +68,33 @@ class UserController extends RestController
}
+ /**
+ * @throws \yii\base\InvalidConfigException
+ * @throws \yii\base\Exception
+ * @throws BadRequestHttpException
+ */
+ public function actionPasswordChange()
+ {
+ $form = new PasswordChangeForm();
+ $form->scenario = "default";
+
+ $form->load(\Yii::$app->request->post(), '');
+
+ if (!$form->validate()) {
+ throw new BadRequestHttpException( $form->getErrorSummary(false)[0]);
+ }
+
+ $customer = Customer::findOne(\Yii::$app->user->id);
+
+ if (!$customer->validatePassword($form->passwordOld)) {
+ throw new BadRequestHttpException("Jelenlegi jelszó nem egyezik", "2");
+ }
+
+ $customer->setPassword($form->password);
+
+ $customer->save();
+ }
+
protected function getOptionalActions()
{
return ['login'];
diff --git a/customerapi/models/PasswordChangeForm.php b/customerapi/models/PasswordChangeForm.php
new file mode 100644
index 0000000..7227e98
--- /dev/null
+++ b/customerapi/models/PasswordChangeForm.php
@@ -0,0 +1,32 @@
+ [6, 24] ],
+ ];
+ }
+
+ public function attributeLabels(){
+ return [
+ 'passwordOld' => "Jelenlegi jelszó",
+ 'password' => "Jelszó"
+ ];
+ }
+
+}