diff --git a/frontend/Exence/src/app/private/profile/profile.component.html b/frontend/Exence/src/app/private/profile/profile.component.html index bc3afc0..ed1ed15 100644 --- a/frontend/Exence/src/app/private/profile/profile.component.html +++ b/frontend/Exence/src/app/private/profile/profile.component.html @@ -1,6 +1,6 @@
-
+

Profile data

@@ -12,8 +12,7 @@

Profile data

collapsedStyle="filled" collapseUnder="sm" [disabled]="userDataForm.invalid" - type="button" - (click)="saveUserData()" + type="submit" > Save @@ -33,42 +32,41 @@

Profile data

iconButton matIcon="edit" color="primary" + type="button" (click)="isUserDataFormEditing.set(true)" /> }
- -
- @let nameControl = userDataForm.controls.username; - - Username - - - - - - +
+ @let nameControl = userDataForm.controls.username; + + Username + + + + + + - @let emailControl = userDataForm.controls.email; - - Email - - - - - - -
- -
+ @let emailControl = userDataForm.controls.email; + + Email + + + + + + +
+
@if (isPasswordFormEditing()) {

Change password

-
+
@let pwdControl = passwordForm.controls.password; @@ -102,42 +100,42 @@

Change password

+ +
+ + Save + + + Cancel + +
- } -
- @if (isPasswordFormEditing()) { - - Save - - - Cancel - - } @else { + } @else { +
+ > Change password - } -
+
+ } diff --git a/frontend/Exence/src/app/private/profile/profile.component.ts b/frontend/Exence/src/app/private/profile/profile.component.ts index 710e3da..160a61e 100644 --- a/frontend/Exence/src/app/private/profile/profile.component.ts +++ b/frontend/Exence/src/app/private/profile/profile.component.ts @@ -15,23 +15,25 @@ import { UserService } from '../../shared/user/user.service'; import { ValidatorComponent } from '../../shared/validator/validator.component'; import { ExtraValidators } from '../../shared/validators'; import { SessionsListComponent } from '../session/sessions-list/sessions-list.component'; -import { AutoTrimDirective } from "src/app/shared/auto-trim.directive"; +import { AutoTrimDirective } from '../../shared/auto-trim.directive'; +import { StopPropagationDirective } from '../../shared/stop-propagation.directive'; @Component({ selector: 'ex-profile', templateUrl: './profile.component.html', styleUrl: './profile.component.scss', imports: [ - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatDividerModule, - ButtonComponent, - InputClearButtonComponent, - SessionsListComponent, - ValidatorComponent, - AutoTrimDirective -], + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + MatDividerModule, + ButtonComponent, + InputClearButtonComponent, + SessionsListComponent, + ValidatorComponent, + AutoTrimDirective, + StopPropagationDirective, + ], }) export class ProfileComponent { private readonly fb = inject(NonNullableFormBuilder); diff --git a/frontend/Exence/src/app/private/transactions-and-categories/create-category-dialog/create-category-dialog.component.html b/frontend/Exence/src/app/private/transactions-and-categories/create-category-dialog/create-category-dialog.component.html index f4086b1..96790ad 100644 --- a/frontend/Exence/src/app/private/transactions-and-categories/create-category-dialog/create-category-dialog.component.html +++ b/frontend/Exence/src/app/private/transactions-and-categories/create-category-dialog/create-category-dialog.component.html @@ -3,81 +3,84 @@

New category

- - @let nameControl = form.controls.name; - - Name - - - - - - +
+ + @let nameControl = form.controls.name; + + Name + + + + + + -
-
- - Select emoji - -
-
- @if (form.value.emoji) { - {{ form.value.emoji }} - } @else { - do_not_disturb_none - } +
+
+ + Select emoji + +
+
+ @if (form.value.emoji) { + {{ form.value.emoji }} + } @else { + do_not_disturb_none + } +
+
+ close +
-
- close -
-
-
- - @if (emojiInvalid) { -
- Emoji is required!
- } + + @if (emojiInvalid) { +
+ Emoji is required! +
+ }
+ + @let noteControl = form.controls.note; + + Note + + + + + + - @let noteControl = form.controls.note; - - Note - - - - - - - - - - Cancel - - - Create - - + + + Cancel + + + Create + + + { private readonly categoryService = inject(CategoryService); diff --git a/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.html b/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.html index 1c9875b..dd25974 100644 --- a/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.html +++ b/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.html @@ -3,111 +3,113 @@

New transaction

- - @let titleControl = form.controls.title; - - Title - - - - - - - -
- @let amountControl = form.controls.amount; +
+ + @let titleControl = form.controls.title; - Amount + Title - + - + - @let dateControl = form.controls.date; - - Date - - - - - - - -
+
+ @let amountControl = form.controls.amount; + + Amount + + + + + + -
- @let categoryControl = form.controls.category; - - Category - - @for (category of categories; track category.id) { - {{ `${category.name} - ${category.emoji}` }} - } - - - - - + @let dateControl = form.controls.date; + + Date + + + + + + + +
- @let typeControl = form.controls.type; +
+ @let categoryControl = form.controls.category; + + Category + + @for (category of categories; track category.id) { + {{ `${category.name} - ${category.emoji}` }} + } + + + + + + + @let typeControl = form.controls.type; + + Type + + @for (type of transactionTypes; track type) { + {{ type }} + } + + + + + +
+ + @let noteControl = form.controls.note; - Type - - @for (type of transactionTypes; track type) { - {{ type }} - } - + Note + - + -
- - @let noteControl = form.controls.note; - - Note - - - - - - - @let recurringControl = form.controls.recurring; - Automatically recurring? -
+ @let recurringControl = form.controls.recurring; + Automatically recurring? + - - - Cancel - - - Create - - + + + Cancel + + + Create + + + diff --git a/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.ts b/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.ts index 5a9818c..c39ddc4 100644 --- a/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.ts +++ b/frontend/Exence/src/app/private/transactions-and-categories/create-transaction-dialog/create-transaction-dialog.component.ts @@ -16,7 +16,8 @@ import { SnackbarService } from '../../../shared/snackbar/snackbar.service'; import { ValidatorComponent } from '../../../shared/validator/validator.component'; import { CategoryService } from '../../category.service'; import { TransactionService } from '../transaction.service'; -import { AutoTrimDirective } from "src/app/shared/auto-trim.directive"; +import { AutoTrimDirective } from '../../../shared/auto-trim.directive'; +import { StopPropagationDirective } from '../../../shared/stop-propagation.directive'; export interface CreateTransactionDialogData { type?: TransactionType; @@ -28,17 +29,18 @@ export interface CreateTransactionDialogData { templateUrl: './create-transaction-dialog.component.html', styleUrl: './create-transaction-dialog.component.scss', imports: [ - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatCardModule, - MatSelectModule, MatDatepickerModule, - MatCheckboxModule, - InputClearButtonComponent, - ButtonComponent, - ValidatorComponent, - AutoTrimDirective -], + ReactiveFormsModule, + MatFormFieldModule, + MatInputModule, + MatCardModule, + MatSelectModule, MatDatepickerModule, + MatCheckboxModule, + InputClearButtonComponent, + ButtonComponent, + ValidatorComponent, + AutoTrimDirective, + StopPropagationDirective, + ], }) export class CreateTransactionDialogComponent extends DialogWithBaseComponent implements OnInit { private readonly transactionService = inject(TransactionService); diff --git a/frontend/Exence/src/app/public/forgot-password/forgot-password.component.html b/frontend/Exence/src/app/public/forgot-password/forgot-password.component.html index f3c4ef0..7d33f0a 100644 --- a/frontend/Exence/src/app/public/forgot-password/forgot-password.component.html +++ b/frontend/Exence/src/app/public/forgot-password/forgot-password.component.html @@ -13,32 +13,34 @@

Forgot password?

- - - Email - - - - - - - - - - - Send email - +
+ + + Email + + + + + + + + + + + Send email + - - + + +
} @else { diff --git a/frontend/Exence/src/app/public/forgot-password/forgot-password.component.ts b/frontend/Exence/src/app/public/forgot-password/forgot-password.component.ts index e8a5b7b..fd72dfa 100644 --- a/frontend/Exence/src/app/public/forgot-password/forgot-password.component.ts +++ b/frontend/Exence/src/app/public/forgot-password/forgot-password.component.ts @@ -15,24 +15,26 @@ import { NavigationService } from '../../shared/navigation/navigation.service'; import { SnackbarService } from '../../shared/snackbar/snackbar.service'; import { ExtraValidators } from '../../shared/validators'; import { ValidatorComponent } from '../../shared/validator/validator.component'; -import { AutoTrimDirective } from "src/app/shared/auto-trim.directive"; +import { AutoTrimDirective } from '../../shared/auto-trim.directive'; +import { StopPropagationDirective } from '../../shared/stop-propagation.directive'; @Component({ selector: 'ex-forgot-password', templateUrl: './forgot-password.component.html', styleUrl: './forgot-password.component.scss', imports: [ - MatFormFieldModule, - MatInputModule, - ButtonComponent, - ReactiveFormsModule, - MatCardModule, - MatIconModule, - InputClearButtonComponent, - RouterLink, - ValidatorComponent, - AutoTrimDirective -] + MatFormFieldModule, + MatInputModule, + ButtonComponent, + ReactiveFormsModule, + MatCardModule, + MatIconModule, + InputClearButtonComponent, + RouterLink, + ValidatorComponent, + AutoTrimDirective, + StopPropagationDirective, + ] }) export class ForgotPasswordComponent extends BaseComponent { private readonly fb = inject(NonNullableFormBuilder); diff --git a/frontend/Exence/src/app/public/login/login.component.html b/frontend/Exence/src/app/public/login/login.component.html index a174eea..40d2fd3 100644 --- a/frontend/Exence/src/app/public/login/login.component.html +++ b/frontend/Exence/src/app/public/login/login.component.html @@ -12,46 +12,47 @@

Log in to your account

- - @let emailControl = loginForm.controls.email; - - Email - - - - - - - @let pwdControl = loginForm.controls.password; - - Password - - - - - - - - - Forgot password? - - Log in - - +
+ + @let emailControl = loginForm.controls.email; + + Email + + + + + + + @let pwdControl = loginForm.controls.password; + + Password + + + + + + + + + Forgot password? + + Log in + + +
diff --git a/frontend/Exence/src/app/public/login/login.component.ts b/frontend/Exence/src/app/public/login/login.component.ts index ac7a3c0..ce40507 100644 --- a/frontend/Exence/src/app/public/login/login.component.ts +++ b/frontend/Exence/src/app/public/login/login.component.ts @@ -15,25 +15,27 @@ import { NavigationService } from '../../shared/navigation/navigation.service'; import { CurrentUserService } from '../../shared/user/current-user.service'; import { ValidatorComponent } from '../../shared/validator/validator.component'; import { ExtraValidators } from '../../shared/validators'; -import { AutoTrimDirective } from "src/app/shared/auto-trim.directive"; +import { AutoTrimDirective } from '../../shared/auto-trim.directive'; +import { StopPropagationDirective } from '../../shared/stop-propagation.directive'; @Component({ selector: 'ex-login', templateUrl: './login.component.html', styleUrl: './login.component.scss', imports: [ - MatFormFieldModule, - MatInputModule, - ReactiveFormsModule, - MatButtonModule, - RouterModule, - MatCardModule, - MatIconModule, - InputClearButtonComponent, - ButtonComponent, - ValidatorComponent, - AutoTrimDirective -], + MatFormFieldModule, + MatInputModule, + ReactiveFormsModule, + MatButtonModule, + RouterModule, + MatCardModule, + MatIconModule, + InputClearButtonComponent, + ButtonComponent, + ValidatorComponent, + AutoTrimDirective, + StopPropagationDirective, + ], }) export class LoginComponent extends BaseComponent { private readonly fb = inject(NonNullableFormBuilder); diff --git a/frontend/Exence/src/app/public/registration/registration.component.html b/frontend/Exence/src/app/public/registration/registration.component.html index e8eb5a0..d2999d6 100644 --- a/frontend/Exence/src/app/public/registration/registration.component.html +++ b/frontend/Exence/src/app/public/registration/registration.component.html @@ -7,58 +7,60 @@ />

Create an Account

-

Already have an account? Log In

+ +
+ +
+ @let nameControl = form.controls.username; + + Username + + + + + + + @let emailControl = form.controls.email; + + Email + + + + + + +
- -
- @let nameControl = form.controls.username; - - Username - - + @let pwdControl = form.controls.password; + + Password + + - + - @let emailControl = form.controls.email; + @let confirmControl = form.controls.confirmPassword; - Email - - + Confirm password + + - + -
- - @let pwdControl = form.controls.password; - - Password - - - - - - - @let confirmControl = form.controls.confirmPassword; - - Confirm password - - - - - - -
+
- - - Create Account - - + + + Create Account + + +
\ No newline at end of file diff --git a/frontend/Exence/src/app/public/registration/registration.component.scss b/frontend/Exence/src/app/public/registration/registration.component.scss index e6edd34..95e6d18 100644 --- a/frontend/Exence/src/app/public/registration/registration.component.scss +++ b/frontend/Exence/src/app/public/registration/registration.component.scss @@ -5,8 +5,4 @@ a { &:hover { color: var(--hover-color); } -} - -.login { - color: var(--accent-text-color); } \ No newline at end of file diff --git a/frontend/Exence/src/app/public/registration/registration.component.ts b/frontend/Exence/src/app/public/registration/registration.component.ts index a190883..ca66306 100644 --- a/frontend/Exence/src/app/public/registration/registration.component.ts +++ b/frontend/Exence/src/app/public/registration/registration.component.ts @@ -15,25 +15,27 @@ import { ExtraValidators } from '../../shared/validators'; import { AuthService } from '../../shared/auth/auth.service'; import { SnackbarService } from '../../shared/snackbar/snackbar.service'; import { ValidatorComponent } from '../../shared/validator/validator.component'; -import { AutoTrimDirective } from "src/app/shared/auto-trim.directive"; +import { AutoTrimDirective } from '../../shared/auto-trim.directive'; +import { StopPropagationDirective } from '../../shared/stop-propagation.directive'; @Component({ selector: 'ex-registration', templateUrl: './registration.component.html', styleUrl: './registration.component.scss', imports: [ - MatCardModule, - MatIconModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInput, - ButtonComponent, - InputClearButtonComponent, - RouterLink, - MatTooltipModule, - ValidatorComponent, - AutoTrimDirective -] + MatCardModule, + MatIconModule, + ReactiveFormsModule, + MatFormFieldModule, + MatInput, + ButtonComponent, + InputClearButtonComponent, + RouterLink, + MatTooltipModule, + ValidatorComponent, + AutoTrimDirective, + StopPropagationDirective, + ] }) export class RegistrationComponent extends BaseComponent { private readonly fb = inject(NonNullableFormBuilder); diff --git a/frontend/Exence/src/app/shared/auth/guard/logged-in.guard.ts b/frontend/Exence/src/app/shared/auth/guard/logged-in.guard.ts index 67b4d30..2ae794e 100644 --- a/frontend/Exence/src/app/shared/auth/guard/logged-in.guard.ts +++ b/frontend/Exence/src/app/shared/auth/guard/logged-in.guard.ts @@ -17,7 +17,6 @@ export const loggedInGuard: CanActivateFn = ( filter(user => user !== null), take(1), map((user) => { - console.log(user) if (user && currentUserService.isAuthenticated()) { return true; } else { diff --git a/frontend/Exence/src/app/shared/input-clear-button/input-clear-button.component.ts b/frontend/Exence/src/app/shared/input-clear-button/input-clear-button.component.ts index 0561217..47a2168 100644 --- a/frontend/Exence/src/app/shared/input-clear-button/input-clear-button.component.ts +++ b/frontend/Exence/src/app/shared/input-clear-button/input-clear-button.component.ts @@ -9,6 +9,7 @@ import { MatIconModule } from '@angular/material/icon'; @if (control().value) {