Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/iwokonl/Kantor
Browse files Browse the repository at this point in the history
  • Loading branch information
iwokonl committed May 20, 2024
2 parents dfbb92b + c946891 commit 7398956
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 467 deletions.
Original file line number Diff line number Diff line change
@@ -1,42 +1,20 @@
<!--<div class="outerior-container">-->
<!-- <div class="custom-container">-->
<!-- &lt;!&ndash; <h3 class="header">Spis kont walutowych</h3>&ndash;&gt;-->
<!-- <div class="custom-row">-->
<!-- <div class="custom-col" *ngFor="let account of accounts">-->
<!-- <div class="custom-card">-->
<!-- <div class="custom-card-body">-->
<!-- <h5 class="custom-card-title">-->
<!-- <a [routerLink]="['/currency', account.currencyCode]">{{ account.currencyName + ' ' + account.currencyCode + ' ' + currencyFlags[account.currencyCode] }}</a>-->
<!-- </h5>-->
<!-- <p class="custom-card-text">Balans: {{ account.balance + ' ' + account.currencyCode + ' = ' + (account.balanceInPLN | number : '1.2-2') +' PLN' }}</p>-->
<!-- <button class="custom-btn custom-btn-outline-primary delete" (click)="onDeleteAccount(account)">Usuń konto walutowe</button>-->
<!-- <button class="custom-btn custom-btn-outline-primary" (click)="onAddMoney(account)">Dodaj fundusze</button>-->
<!-- <button class="custom-btn custom-btn-outline-primary withdraw" (click)="createPayout(account)">Wypłać fundusze</button>-->

<!-- <input class="custom-form-control" type="text" placeholder="Wprowadź kwotę do wpłaty/wypłaty" [(ngModel)]="account.amount">-->
<!-- <div class="loading-overlay" *ngIf="account.isLoading">-->
<!-- <div class="spinner-border text-primary" role="status">-->
<!-- <span class="sr-only">Loading...</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->




<div class="accounts-layout">
<div class="custom-container">
<div class="custom-row">

<div class="custom-card">
<div class="custom-card-body" (click)="openCurrencyAccountForm()"> <!-- (click)="openAccount()" -->
<h2 class="custom-card-title" id="open-account-title">
Otwórz nowe konto walutowe
</h2>
</div>
</div>

<div class="custom-col" *ngFor="let account of accounts">
<div class="custom-card">
<div class="custom-card-body" (click)="selectAccount(account)"> <!-- Add click event here -->
<div class="custom-card-body" (click)="selectAccount(account)">
<h5 class="custom-card-title">
<!-- <a class="custom-card-title" [routerLink]="['/currency', account.currencyCode]">-->
<p class="custom-card-title">
{{ currencyFlags[account.currencyCode] + ' ' + account.currencyCode }} <br>
{{ account.currencyName }}
Expand All @@ -50,19 +28,32 @@ <h5 class="custom-card-title">
</div>
</div>

<!-- <div *ngIf="selectedAccount" class="selected-account-container">-->
<!-- <h3>{{ currencyFlags[selectedAccount.currencyCode]+ ' ' + selectedAccount.currencyCode + ' '+ selectedAccount.currencyName }}</h3>-->
<!-- <button class="custom-btn custom-btn-outline-primary delete" (click)="onDeleteAccount(selectedAccount)">Usuń konto walutowe</button>-->
<!-- <button class="custom-btn custom-btn-outline-primary" (click)="onAddMoney(selectedAccount)">Dodaj fundusze</button>-->
<!-- <button class="custom-btn custom-btn-outline-primary withdraw" (click)="createPayout(selectedAccount)">Wypłać fundusze</button>-->
<!-- <input class="custom-form-control" type="text" placeholder="Wprowadź kwotę do wpłaty/wypłaty" [(ngModel)]="selectedAccount.amount">-->
<!-- <div class="loading-overlay" *ngIf="selectedAccount.isLoading">-->
<!-- <div class="spinner-border text-primary" role="status">-->
<!-- <span class="sr-only">Loading...</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->


<div *ngIf="openAccountForm" class="selected-account-container" id="open-account-form">
<div class="upper-container">
<div class="upperleft-container">
<div class="header-container" style="display: flex; flex-direction: row;">
<div class="currency-flag-container">
<h1 class="currency-flag"> + </h1>
</div>
<div class="currency-info-container" [routerLink]="['/currency', selectedAccount.currencyCode]">
<div class="currency-info">
<p class="currency-name">Wybierz walutę</p>
</div>
</div>
</div>
</div>
</div>

<div class="lower-container">
<div class="transactions">
//insert searchbar here
</div>
</div>

</div>


<div *ngIf="selectedAccount" class="selected-account-container">
<div class="upper-container">
Expand Down Expand Up @@ -111,78 +102,3 @@ <h1 class="currency-flag">{{ currencyFlags[selectedAccount.currencyCode] }}</h1>
</div>
</div>

<!-- <div class="loading-overlay" *ngIf="selectedAccount.isLoading">-->
<!-- <div class="spinner-border text-primary" role="status">-->
<!-- <span class="sr-only">Loading...</span>-->
<!-- </div>-->
<!-- </div>-->








<!-- STARE WERSJE - usunąć gdy nowa będzie w 100% funkcjonalna-->

<!--<form class="create-account-form" #createAccountForm="ngForm" (ngSubmit)="createCurrencyAccount(createAccountForm.value)">-->
<!-- <h3>Dodawanie konta walutowego</h3>-->
<!-- <div class="form-group">-->
<!-- <label for="curencyCode">Kod waluty (np. USD)</label>-->
<!-- <input type="text" class="custom-form-control" id="curencyCode" name="curencyCode" ngModel>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label for="balance">Balans</label>-->
<!-- <input type="number" class="custom-form-control" id="balance" name="balance" ngModel>-->
<!-- </div>-->
<!-- <button type="submit" class="custom-btn custom-btn-primary">Create Account</button>-->
<!--</form>-->






<!--&lt;!&ndash;TODO:Dodać animacje ładowania&ndash;&gt;-->
<!--<div class="container">-->

<!-- <h3 class="nag">Spis kont walutowych</h3>-->
<!-- <div class="row">-->
<!-- <div class="col-md-4" *ngFor="let account of accounts">-->
<!-- <div class="card">-->
<!-- <div class="card-body">-->
<!-- <h5 class="card-title">-->
<!-- <a [routerLink]="['/currency', account.curencyCode]">{{ account.curencyName + ' ' + account.curencyCode + ' ' + currencyFlags[account.curencyCode] }}</a>-->
<!-- </h5>-->
<!-- <p class="card-text">Balans: {{ account.balance + ' ' + account.curencyCode + ' = ' + (account.balanceInPLN | number : '1.2-2') +' PLN' }}</p>-->
<!-- <button class="btn btn-outline-primary delete" (click)="onDeleteAccount(account)">Usuń konto walutowe</button>-->
<!-- <button class="btn btn-outline-primary" (click)="onAddMoney(account)">Dodaj fundusze</button>-->
<!-- <button class="btn btn-outline-primary withdraw" (click)="createPayout(account)">Wypłać fundusze</button>-->

<!-- <input class="form-control" type="text" placeholder="Wprowadź kwotę do wpłaty/wypłaty" [(ngModel)]="account.amount">-->
<!-- <div class="loading-overlay" *ngIf="account.isLoading">-->
<!-- <div class="spinner-border text-primary" role="status">-->
<!-- <span class="sr-only">Loading...</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->

<!--</div>-->


<!--<form class="create-account-form" #createAccountForm="ngForm" (ngSubmit)="createCurrencyAccount(createAccountForm.value)">-->
<!-- <h3>Dodawanie konta walutowego</h3>-->
<!-- <div class="form-group">-->
<!-- <label for="curencyCode">Kod waluty (np. USD)</label>-->
<!-- <input type="text" class="form-control" id="curencyCode" name="curencyCode" ngModel>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label for="balance">Balans</label>-->
<!-- <input type="number" class="form-control" id="balance" name="balance" ngModel>-->
<!-- </div>-->
<!-- <button type="submit" class="btn btn-primary">Create Account</button>-->
<!--</form>-->
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,11 @@
}
}

// custom scrollbar styles
&::-webkit-scrollbar {
width: 20px;
padding-right: 20px;
padding-top: 10%; // adjust this value to visually decrease the scrollbar height
padding-bottom: 10%; // adjust this value to visually decrease the scrollbar height
padding-top: 10%;
padding-bottom: 10%;
}

&::-webkit-scrollbar-track {
Expand Down Expand Up @@ -334,147 +333,9 @@ a:hover{
}




////cały kontener ze wszystkimi kafelkami
//.container {
// display: grid;
// grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
//
// justify-content: center;
//}
//.nag{
// color: #dbdbdb;
//}
////cały kafelek wraz z zawartością
//.card{
//
// display: flex;
// flex-direction: column;
// flex-wrap: wrap;
// align-items: stretch;
// margin-bottom: 8%;
//
//
// border: 1px solid #ccc;
// border-radius: 5px;
// box-shadow: 0 2px 4px 0 rgba(0,0,0,.1);
// background: linear-gradient(92deg, rgba(241, 241, 241, 0.06) -0.4%, rgba(214, 214, 214, 0.04) 106.05%);
// backdrop-filter: blur(17.5px);
// min-height: 230px;
// max-height: 400px;
// min-width: 320px;
//
//
//
// transition: box-shadow .3s;
//
// &:hover {
// box-shadow: 0 4px 8px 0 rgba(0,0,0,.2);
// background: linear-gradient(92deg, rgba(241, 241, 241, 0.1) -0.4%, rgba(214, 214, 214, 0.1) 106.05%);
// backdrop-filter: blur(50px);
// transform: scale(1.1);
// }
//}
//
//
//.loading-overlay{
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// background-color: rgba(255, 255, 255, 0.5);
// display: flex;
// justify-content: center;
// align-items: center;
//
//}
//.withdraw{
// position: absolute;
// padding: 3px 1px;
//}
//.form-control{
// width: 275px;
// font-size: 15.4px;
//}
////zawartość kafelka - tekst
//.card-body {
// flex-grow: 1;
// //padding: 15px;
// padding: 15px 15px 15px 25px;
// font-family: "Twemoji Country Flags", "Helvetica", serif;
// color: #DBDBDB;
//}
//.btn{
// margin-right: 11px;
// margin-bottom: 11px;
// padding: 3px 7px; /* Zmienia rozmiar przycisku poprzez zmianę paddingu */
// font-size: 16px;
//}
//
////TODO:Ogólnie tutaj jest maniana w tym html i nie powinno się tak marginem robić
//.row{
// margin-top: 15%;
// margin-right: -87%;
// margin-left: -87%;
//
// .delete{
// width: 275px;
// color: #C82333;
// border-color: #C82333;
// &:hover {
// // Tutaj dodaj style, które mają być zastosowane po najechaniu na przycisk
// background-color: #C82333; // Na przykład, zmiana koloru tła
// color: #f1f1f1; // Zmiana koloru tekstu
// }
// &:focus {
// // Usuwa domyślną niebieską poświatę
// background-color: #C82333;
// box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.5);
// // Usuwa dodatkowy cień, który może się pojawiać
// }
//
// &:active:focus{
// box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.5);
// border-color: #C82333;
// background-color: #C82333;
// }
// //position: fixed;
// }
//}
//
//.tile {
// flex: 1 1 auto;
// border: 1px solid #ccc;
// border-radius: 5px;
// box-shadow: 0 2px 4px 0 rgba(0,0,0,.1);
// background-color: #fff;
// margin: 10px;
// padding: 20px;
// box-sizing: border-box;
//}
//
//.create-account-form {
// max-width: 30vw;
// margin: 0 auto;
// display: flex;
// flex-direction: column;
// align-items: center;
//
// border-radius: 47px;
// border: 2px solid #DBDBDB;
// background: linear-gradient(94deg, rgba(255, 255, 255, 0.04) 12.6%, rgba(255, 255, 255, 0.02) 100.13%);
// backdrop-filter: blur(25px);
// padding: 10px;
// color: #dbdbdb;
//}
//
//a{
// color: #dbdbdb;
//}
//
//a:hover{
// color: #dbdbdb;
// text-decoration: none;
//}
#open-account-title{
display: flex;
justify-content: center;
align-items: center;
color: #dbdbdb;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@ export class CurrencyAccountComponent implements OnInit {

selectAccount(account: any) {
this.selectedAccount = account;
this.openAccountForm = false; // Close the openAccountForm when an account is selected
}

openAccountForm: boolean = false; // Add this line
openCurrencyAccountForm() {
this.openAccountForm = true;
this.selectedAccount = null; // Close the selectedAccount when the form is opened
}


getCurrencyAccounts(): void {
this.axiosService.request("POST",
"/api/v1/currencyAccounts/getCurrencyAccounts",
Expand Down
Loading

0 comments on commit 7398956

Please sign in to comment.