feat: added favicon

This commit is contained in:
Krzysztof Rudnicki 2024-03-09 23:32:39 +01:00
parent d0ac23caa3
commit 4918819fd0
13 changed files with 47 additions and 21 deletions

BIN
arai-frontend/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1,8 +1,10 @@
<div class="page-container"> <div class="page-container">
<img class="center-image" src="../../assets/favicon.png">
@if(!receivedInfo) { @if(!receivedInfo) {
<form [formGroup]="userInputForm" (ngSubmit)="onSubmit()" class="lawyering-form"> <form [formGroup]="userInputForm" (ngSubmit)="onSubmit()" class="lawyering-form">
<h1 class="center"> Oblicz koszta i czas sporu </h1> <h1 class="center"> Oszacuj koszt i czas procesu </h1>
<mat-form-field appearance="outline" class="custom-form-field"> <mat-form-field appearance="outline" class="custom-form-field">
<mat-label>Opis Sprawy</mat-label> <mat-label>Opis Sprawy</mat-label>
@ -15,7 +17,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field appearance="outline" class="custom-form-field"> <mat-form-field appearance="outline" class="custom-form-field">
<mat-label>Lokacja</mat-label> <mat-label>Miasto</mat-label>
<input matInput formControlName="location" class="text-input"> <input matInput formControlName="location" class="text-input">
</mat-form-field> </mat-form-field>

View File

@ -6,6 +6,14 @@ body, html {
margin: 0; margin: 0;
} }
.center-image {
display: block;
margin-left: auto;
margin-right: auto;
width: 150px;
height: 150px;
}
.center { .center {
text-align: center; text-align: center;
} }
@ -14,6 +22,7 @@ body, html {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column;
} }
.lawyering-form { .lawyering-form {

View File

@ -6,7 +6,7 @@ import { MatButtonModule } from '@angular/material/button'
import { BackendService } from '../backend.service'; import { BackendService } from '../backend.service';
import { GenericRequest, Mediator, ReturnResponse, UserInputRequest, userInput } from '../requests-responses'; import { GenericRequest, Mediator, ReturnResponse, UserInputRequest, userInput } from '../requests-responses';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { KosztaService } from '../koszta.service'; import { kosztService } from '../koszta.service';
import { MediatorzyService } from '../mediatorzy.service'; import { MediatorzyService } from '../mediatorzy.service';
@ -27,7 +27,7 @@ export class CaseInputComponent {
userInput: userInput | null = null; userInput: userInput | null = null;
receivedInfo: boolean = false; receivedInfo: boolean = false;
constructor(private fb: FormBuilder, private readonly backendService: BackendService, private readonly router: Router, private readonly kosztaService: KosztaService, private readonly mediatorzyService: MediatorzyService) { constructor(private fb: FormBuilder, private readonly backendService: BackendService, private readonly router: Router, private readonly kosztService: kosztService, private readonly mediatorzyService: MediatorzyService) {
this.userInputForm = this.fb.group({ this.userInputForm = this.fb.group({
generic_input: ['pracodawca nie wyplacil mi wynagrodzenia za ostatnie 2 miesiace i mnie zwolnil'], generic_input: ['pracodawca nie wyplacil mi wynagrodzenia za ostatnie 2 miesiace i mnie zwolnil'],
trial_value: [1000], trial_value: [1000],
@ -48,8 +48,8 @@ export class CaseInputComponent {
this.receivedInfo = true; this.receivedInfo = true;
const result = await this.backendService.sendMessage(new UserInputRequest(this.userInput)) as ReturnResponse; const result = await this.backendService.sendMessage(new UserInputRequest(this.userInput)) as ReturnResponse;
this.mediatorzyService.setMediatorzy(CaseInputComponent.convertToMediators(result.response_data.second as unknown as string[])); this.mediatorzyService.setMediatorzy(CaseInputComponent.convertToMediators(result.response_data.second as unknown as string[]));
this.kosztaService.czas = String(result.response_data.first.time_of_trial); this.kosztService.czas = String(result.response_data.first.time_of_trial);
this.kosztaService.koszta = String(result.response_data.first.cost_of_trial); this.kosztService.koszt = String(result.response_data.first.cost_of_trial);
console.log(`result: `, result); console.log(`result: `, result);
this.router.navigate(['koszt']); this.router.navigate(['koszt']);
} }

View File

@ -1,16 +1,17 @@
<div class="main"> <div class="main">
<img class="center-image" src="../../assets/favicon.png">
<div class="legal-costs"> <div class="legal-costs">
Przewidywalne <u> minimalne </u> koszta: Przewidywania:
@if(costData !== null) { @if(costData !== null) {
<div class="cost-details"> <div class="cost-details">
Koszta: <span class="cost">{{costData.cost_of_trial}}</span><br> <p class="text-gap"> Minimalny koszt: <span class="cost">{{costData.cost_of_trial}}</span><br> </p>
Czas: <span class="time"> 20 </span> miesięcy Średni czas: <span class="time"> 20 </span> miesięcy
</div> </div>
} }
</div> </div>
<h1 class="bait"> Chcesz znacznie zredukować koszta? </h1> <h1 class="bait"> Skorzystaj z pomocy mediatora </h1>
<div class="center-button"> <div class="center-button">
<button mat-raised-button color="primary" class="find-mediator" type="submit" (click)="onSubmit()" class="submit-button">Znajdź Mediatora</button> <button mat-raised-button color="primary" class="find-mediator" type="submit" (click)="onSubmit()" class="submit-button">Znajdź Mediatora</button>
</div> </div>

View File

@ -10,6 +10,15 @@
margin: 0 auto; margin: 0 auto;
} }
.center-image {
display: block;
margin-left: auto;
margin-right: auto;
width: 150px;
height: 150px;
}
.main { .main {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -36,7 +45,12 @@
color: #28a745; color: #28a745;
} }
.text-gap {
margin-bottom: 10px;
}
.bait { .bait {
margin-top: 20px;
text-align: center; text-align: center;
} }

View File

@ -3,7 +3,7 @@ import { StatisticsOutputInterface } from '../requests-responses';
import { DatePipe } from '@angular/common'; import { DatePipe } from '@angular/common';
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from '@angular/material/button';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { KosztaService } from '../koszta.service'; import { kosztService } from '../koszta.service';
@Component({ @Component({
selector: 'app-cost-view', selector: 'app-cost-view',
@ -18,12 +18,12 @@ export class CostViewComponent {
time_of_trial: Date.UTC(0, 6, 0, 0, 0, 0, 0) time_of_trial: Date.UTC(0, 6, 0, 0, 0, 0, 0)
}; };
constructor(private readonly router: Router, private readonly kosztaService: KosztaService) {} constructor(private readonly router: Router, private readonly kosztService: kosztService) {}
ngOnInit() { ngOnInit() {
this.costData = { this.costData = {
cost_of_trial: Number(this.kosztaService.koszta), cost_of_trial: Number(this.kosztService.koszt),
time_of_trial: Number(this.kosztaService.czas), time_of_trial: Number(this.kosztService.czas),
} }
} }

View File

@ -1,13 +1,13 @@
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { KosztaService } from './koszta.service'; import { kosztService } from './koszt.service';
describe('KosztaService', () => { describe('kosztService', () => {
let service: KosztaService; let service: kosztService;
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({}); TestBed.configureTestingModule({});
service = TestBed.inject(KosztaService); service = TestBed.inject(kosztService);
}); });
it('should be created', () => { it('should be created', () => {

View File

@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class KosztaService { export class kosztService {
public koszta: string = ""; public koszt: string = "";
public czas: string = ""; public czas: string = "";
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -5,7 +5,7 @@
<title>AraiFrontend</title> <title>AraiFrontend</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="assets/favicon.png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head> </head>