Skip to content
Open

s #47

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
}
},
"cli": {
"analytics": "173eaed1-7bb5-40f9-98fd-6a7163045565",
"schematicCollections": [
"@angular-eslint/schematics"
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"private": true,
"dependencies": {
"@angular/animations": "^14.2.1",
"@angular/cdk": "^14.2.1",
"@angular/common": "^14.2.1",
"@angular/compiler": "^14.2.1",
"@angular/core": "^14.2.1",
"@angular/cdk": "^14.2.1",
"@angular/flex-layout": "^14.0.0-beta.40",
"@angular/forms": "^14.2.1",
"@angular/material": "^14.2.1",
Expand Down
Binary file modified src/.DS_Store
Binary file not shown.
Binary file modified src/app/.DS_Store
Binary file not shown.
23 changes: 13 additions & 10 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@ const appRoutes: Routes = [
loadChildren: () => import('./features/dashboard/dashboard.module').then(m => m.DashboardModule),
canActivate: [AuthGuard]
},
{
path: 'customers',
loadChildren: () => import('./features/customers/customers.module').then(m => m.CustomersModule),
canActivate: [AuthGuard]
},
{
path: 'users',
loadChildren: () => import('./features/users/users.module').then(m => m.UsersModule),
canActivate: [AuthGuard]
},

{
path: 'account',
loadChildren: () => import('./features/account/account.module').then(m => m.AccountModule),
Expand All @@ -43,6 +34,18 @@ const appRoutes: Routes = [
loadChildren: () => import('./features/about/about.module').then(m => m.AboutModule),
canActivate: [AuthGuard]
},
{path:'stock-market',
loadChildren:()=>import('./features/stok-market/stock-market').then(m=>m.StockMarketModule),
canActivate:[AuthGuard]
},
{path:'currency-market',
loadChildren:()=>import('./features/cur-market/cur-market').then(m=>m.CurMarketModule),
canActivate:[AuthGuard]
},
{path:'derivative',
loadChildren:()=>import('./features/derivatives/derivative').then(m=>m.DerivativeModule),
canActivate:[AuthGuard]
},
{
path: '**',
redirectTo: 'dashboard',
Expand Down
3 changes: 3 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CustomMaterialModule } from './custom-material/custom-material.module';
import { AppRoutingModule } from './app-routing.module';
import { LoggerModule } from 'ngx-logger';
import { environment } from '../environments/environment';
import { HttpClientModule } from '@angular/common/http';

@NgModule({
declarations: [
Expand All @@ -20,7 +21,9 @@ import { environment } from '../environments/environment';
CoreModule,
SharedModule,
CustomMaterialModule.forRoot(),

AppRoutingModule,
HttpClientModule,
LoggerModule.forRoot({
serverLoggingUrl: `http://my-api/logs`,
level: environment.logLevel,
Expand Down
Empty file.
17 changes: 17 additions & 0 deletions src/app/core/http/http.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {catchError, map, Observable} from "rxjs";
import {environment} from "../../../environments/environment";

@Injectable({
providedIn: 'root'
})
export class HttpService {

constructor(private http: HttpClient) { }

getData(){
return this.http.get('http://192.168.4.18:8084/stock?vDateStart=20221030&vDateEnd=20221102')
}

}
12 changes: 6 additions & 6 deletions src/app/core/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export class AuthenticationService {
this.localStorage.setItem('currentUser', JSON.stringify({
token: 'aisdnaksjdn,axmnczm',
isAdmin: true,
email: 'john.doe@gmail.com',
email: 'roman@mail.ru',
id: '12312323232',
alias: 'john.doe@gmail.com'.split('@')[0],
alias: 'roman@mail.ru'.split('@')[0],
expiration: moment().add(1, 'days').toDate(),
fullName: 'John Doe'
fullName: 'Roman Dubrovskiy'
}));

return true;
Expand All @@ -49,11 +49,11 @@ export class AuthenticationService {
return {
token: 'aisdnaksjdn,axmnczm',
isAdmin: true,
email: 'john.doe@gmail.com',
email: 'roman@mail.ru',
id: '12312323232',
alias: 'john.doe@gmail.com'.split('@')[0],
alias: 'roman@mail.ru'.split('@')[0],
expiration: moment().add(1, 'days').toDate(),
fullName: 'John Doe'
fullName: 'Roman Dubrovskiy'
};
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/features/auth/auth-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginCreateComponent } from './login-create/login-create.component';

import { LoginComponent } from './login/login.component';
import { PasswordResetRequestComponent } from './password-reset-request/password-reset-request.component';
Expand All @@ -8,7 +9,8 @@ import { PasswordResetComponent } from './password-reset/password-reset.componen
const routes: Routes = [
{ path: 'login', component: LoginComponent },
{ path: 'password-reset-request', component: PasswordResetRequestComponent },
{ path: 'password-reset', component: PasswordResetComponent }
{ path: 'password-reset', component: PasswordResetComponent },
{ path: 'login-create', component: LoginCreateComponent }
];

@NgModule({
Expand Down
3 changes: 2 additions & 1 deletion src/app/features/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import { LoginComponent } from './login/login.component';
import { PasswordResetRequestComponent } from './password-reset-request/password-reset-request.component';
import { PasswordResetComponent } from './password-reset/password-reset.component';
import { SharedModule } from 'src/app/shared/shared.module';
import { LoginCreateComponent } from './login-create/login-create.component';

@NgModule({
imports: [
CommonModule,
SharedModule,
AuthRoutingModule
],
declarations: [LoginComponent, PasswordResetRequestComponent, PasswordResetComponent]
declarations: [LoginComponent, PasswordResetRequestComponent, PasswordResetComponent,LoginCreateComponent]
})
export class AuthModule { }
31 changes: 31 additions & 0 deletions src/app/features/auth/login-create/login-create.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.a{
background-color: white;
padding: 50px 0 50px 0;
}.bb{
align-items: center;
display: flex;
justify-content: center;
padding-top: 100px;
padding-bottom: 100px;

}
.d{
flex-flow: column!important;
}
.c{
color: #525252;
}

.mat-card:not([class*=mat-elevation-z]) {
box-shadow: none!important
}
mat{
background-color: green;
}
.mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
background-color:none!important;
}
.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
background-color:
none !important;
}
70 changes: 70 additions & 0 deletions src/app/features/auth/login-create/login-create.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<div class="container login-container" fxLayout="row" fxLayoutAlign="center " class="a">
<div fxFlex="50%" fxFlex.sm="50%" fxFlex.xs="90%" fxLayout=" column" fxLayoutAlign="left "class="d navbar">

<a class="navbar-brand" [routerLink]="['/']" matTooltip="Home">
<img src="assets/images/kase-logo.svg" style="height: 30px;"> </a>

<mat-card-content>

</mat-card-content>

<div class="bb">
<img class ='image' src='assets/images/log.jpg'>
</div>

</div>
<div fxFlex="30%" fxFlex.sm="50%" fxFlex.xs="90%" fxLayout=" row" fxLayoutAlign="right ">
<div fxLayoutAlign=" center ">
<mat-card>
<mat-card-title class="font-700 fs-36_432">Create an Account</mat-card-title>
<mat-card-content>
<mat-form-field class="full-width" appearance="outline">
<mat-label>Name</mat-label>
<input id="nameInput" matInput placeholder="Enter your name"formControlName="name" autocomplete="name"
type="name" class="font-500 fs-14_196 ">
</mat-form-field>
<mat-form-field class="full-width" appearance="outline">
<mat-label>Surname</mat-label>
<input id="surnameInput" matInput placeholder="Enter your surname" formControlName="surname" type="surname"
>

</mat-form-field>
<mat-form-field appearance="fill" class="full-width">
<mat-label>Company</mat-label>
<mat-select>
<mat-option value="one">Issuers</mat-option>
<mat-option value="two">Users</mat-option>
<mat-option value="two">Brokers</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="full-width" appearance="outline">
<mat-label>Email</mat-label>
<input id="emailInput" matInput placeholder="Enter your email" formControlName="email" autocomplete="email"
type="email" class="font-500 fs-14_196 ">
</mat-form-field>
<mat-form-field class="full-width" appearance="outline">
<mat-label>Password</mat-label>
<input id="passwordInput" matInput placeholder="Enter your password" formControlName="password" type="password"
>

</mat-form-field>

<div class="full-width">
<mat-slide-toggle formControlName="rememberMe" style="padding-top: 4px;">Remember me</mat-slide-toggle>

</div>
<mat-card-actions class="login-actions ">
<button mat-raised-button id="login" class="full-width" style="background-color: #038726;color:
white; height: 47px;margin-top: 15px;" class="font-700 fs-18_252 full-width "
(click)="login()">Create an account</button>

</mat-card-actions>
</mat-card-content>
</mat-card></div>





</div>
</div>
35 changes: 35 additions & 0 deletions src/app/features/auth/login-create/login-create.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Title } from '@angular/platform-browser';

import { NotificationService } from 'src/app/core/services/notification.service';
import { AuthenticationService } from 'src/app/core/services/auth.service';

@Component({
selector: 'app-login-create',
templateUrl: './login-create.component.html',
styleUrls: ['./login-create.component.css']
})
export class LoginCreateComponent implements OnInit {
login() {
throw new Error('Method not implemented.');
}


form!: UntypedFormGroup;
loading!: boolean;

constructor(
private titleService: Title,
private router: Router) { }

ngOnInit() {
this.titleService.setTitle('Admin-panel - Login create');

}

cancel() {
this.router.navigate(['/']);
}
}
31 changes: 31 additions & 0 deletions src/app/features/auth/login/login.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.a{
background-color: white;
padding: 50px 0 50px 0;
}.bb{
align-items: center;
display: flex;
justify-content: center;
padding-top: 100px;
padding-bottom: 100px;

}
.d{
flex-flow: column!important;
}
.c{
color: #525252;
}

.mat-card:not([class*=mat-elevation-z]) {
box-shadow: none!important
}
mat{
background-color: green;
}
.mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
background-color:none!important;
}
.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
background-color:
none !important;
}
Loading