Remove / disabled rudiment functionality. Set up lazy load route config. (#75)

This commit is contained in:
Ildar Galeev 2019-08-29 13:12:36 +03:00 committed by GitHub
parent 715d0c2b10
commit 70cba201c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 57 additions and 448 deletions

View File

@ -1,12 +1,12 @@
<div fxLayout fxLayoutGap="10px">
<dsh-action-item iconName="brightness_4" (click)="changeTheme()"></dsh-action-item>
<dsh-action-item iconName="subject" [dshDropdownTriggerFor]="claimsDropdown"></dsh-action-item>
<!-- <dsh-action-item iconName="brightness_4" (click)="changeTheme()"></dsh-action-item> -->
<!-- <dsh-action-item iconName="subject" [dshDropdownTriggerFor]="claimsDropdown"></dsh-action-item> -->
<dsh-action-item iconName="person" [dshDropdownTriggerFor]="userDropdown">></dsh-action-item>
</div>
<dsh-dropdown width="590px" #claimsDropdown="dshDropdown">
<!-- <dsh-dropdown width="590px" #claimsDropdown="dshDropdown">
<dsh-claims (menuItemSelected)="closeDropdown()"></dsh-claims>
</dsh-dropdown>
</dsh-dropdown> -->
<dsh-dropdown width="180px" #userDropdown="dshDropdown">
<dsh-user></dsh-user>

View File

@ -1,6 +1,5 @@
<dsh-dropdown-actions>
<dsh-state-nav flat>
<dsh-state-nav-item>Документы</dsh-state-nav-item>
<dsh-state-nav-item (click)="logout()">Выход</dsh-state-nav-item>
</dsh-state-nav>
</dsh-dropdown-actions>

View File

@ -1,5 +1,4 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatInputModule } from '@angular/material/input';
@ -12,7 +11,6 @@ import { HighlightSearchPipe } from './highlight.pipe';
@NgModule({
imports: [
BrowserModule,
HttpClientModule,
MatAutocompleteModule,
CommonModule,

View File

@ -1,23 +0,0 @@
<div fxLayout="row" fxLayoutGap="30px">
<div fxLayoutGap="1">
<button (click)="refreshValue()">Refresh data</button>
</div>
<dsh-card>
<dsh-card-content>
<dsh-bar-chart [data]="periodData"></dsh-bar-chart>
<dsh-legend [items]="periodLegendData"></dsh-legend>
</dsh-card-content>
</dsh-card>
<dsh-card>
<dsh-card-content>
<dsh-linear-chart [data]="preparedPeriodData"></dsh-linear-chart>
<dsh-legend [items]="linearLegendData"></dsh-legend>
</dsh-card-content>
</dsh-card>
<dsh-card>
<dsh-card-content>
<dsh-donut-chart [data]="segmentData"></dsh-donut-chart>
<dsh-legend [items]="segmentLegendData"></dsh-legend>
</dsh-card-content>
</dsh-card>
</div>

View File

@ -1,40 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { LegendItem, PeriodData, LinearPeriodData, SegmentData } from '../../charts/models/chart-data-models';
import { ChartsService } from '../../charts/charts.service';
import {
getLinearLegendData,
getPeriodLegendData,
getSegmentLegendData,
periodToLinearData
} from '../../charts/chart-utils';
@Component({
selector: 'dsh-app-analytics',
templateUrl: './analytics.component.html',
styleUrls: ['./analytics.component.scss']
})
export class AnalyticsComponent implements OnInit {
periodData: PeriodData[];
preparedPeriodData: LinearPeriodData[];
segmentData: SegmentData[];
periodLegendData: LegendItem[];
linearLegendData: LegendItem[];
segmentLegendData: LegendItem[];
constructor(private chartsService: ChartsService) {}
ngOnInit() {
this.refreshValue();
}
refreshValue() {
this.periodData = this.chartsService.getPeriodData(7, 2);
this.preparedPeriodData = periodToLinearData(this.chartsService.getPeriodData(10, 2));
this.segmentData = this.chartsService.getSegmentData(5);
this.periodLegendData = getPeriodLegendData(this.periodData);
this.linearLegendData = getLinearLegendData(this.preparedPeriodData);
this.segmentLegendData = getSegmentLegendData(this.segmentData);
}
}

View File

@ -1,14 +0,0 @@
import { NgModule } from '@angular/core';
import { FlexModule } from '@angular/flex-layout';
import { AnalyticsComponent } from './analytics.component';
import { ChartsModule } from '../../charts';
import { AnalyticsService } from './analytics.service';
import { LayoutModule } from '../../layout';
@NgModule({
imports: [ChartsModule, LayoutModule, FlexModule],
declarations: [AnalyticsComponent],
providers: [AnalyticsService]
})
export class AnalyticsModule {}

View File

@ -1,71 +0,0 @@
import { Injectable } from '@angular/core';
@Injectable()
export class AnalyticsService {
getRandom = () => Math.ceil(Math.random() * 100000000);
getPeriodData = () => [
{
time: '2017-01-01T00:00:00Z',
values: [
{
name: 'kek',
value: this.getRandom()
},
{
name: 'lol',
value: this.getRandom()
}
]
},
{
time: '2017-01-02T00:00:00Z',
values: [
{
name: 'kek',
value: this.getRandom()
},
{
name: 'lol',
value: this.getRandom()
}
]
},
{
time: '2017-01-03T00:00:00Z',
values: [
{
name: 'kek',
value: this.getRandom()
},
{
name: 'lol',
value: this.getRandom()
}
]
}
];
getSegmentData = () => [
{
name: 'kek',
value: this.getRandom()
},
{
name: 'lol',
value: this.getRandom()
},
{
name: 'kappa',
value: this.getRandom()
},
{
name: '4head',
value: this.getRandom()
},
{
name: 'omegalul',
value: this.getRandom()
}
];
}

View File

@ -1,2 +0,0 @@
export * from './analytics.module';
export * from './analytics.component';

View File

@ -1,117 +0,0 @@
<dsh-card>
<dsh-card-content fxLayout="column" fxLayoutGap="10px">
<button dsh-button>Basic</button>
<button dsh-icon-button>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-fab-button>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-button [color]="'primary'">Primary</button>
<button dsh-stroked-button color="primary">Primary</button>
<button dsh-icon-button color="primary">
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-fab-button color="primary">Primary</button>
<button dsh-button color="accent">Accent</button>
<button dsh-stroked-button color="accent">Accent</button>
<button dsh-icon-button color="accent">
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-fab-button color="accent">
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-button color="warn">Warn</button>
<button dsh-stroked-button color="warn">Warn</button>
<button dsh-icon-button color="warn">
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-fab-button color="warn">Warn</button>
<button dsh-button [disabled]="true" color="accent">Disabled</button>
<button dsh-stroked-button color="accent" disabled>Disabled</button>
<button dsh-icon-button color="accent" disabled>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</button>
<button dsh-fab-button color="accent" disabled>Disabled</button>
</dsh-card-content>
</dsh-card>
<dsh-card>
<dsh-card-content fxLayout="column" fxLayoutGap="30px">
<div>
<dsh-button-toggle value="today">
Сегодня
</dsh-button-toggle>
</div>
<div fxLayout="column" fxLayoutGap="30px">
<div>
<dsh-button-toggle-group>
<dsh-button-toggle value="today">
Сегодня
</dsh-button-toggle>
<dsh-button-toggle value="week">
Неделя
</dsh-button-toggle>
<dsh-button-toggle value="month">
Месяц
</dsh-button-toggle>
<dsh-button-toggle value="more" disabled>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</dsh-button-toggle>
</dsh-button-toggle-group>
</div>
<div>
<dsh-button-toggle-group multiple>
<dsh-button-toggle value="today">
Сегодня
</dsh-button-toggle>
<dsh-button-toggle value="week">
Неделя
</dsh-button-toggle>
<dsh-button-toggle value="month">
Месяц
</dsh-button-toggle>
<dsh-button-toggle value="more" disabled>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</dsh-button-toggle>
</dsh-button-toggle-group>
</div>
<div>
<dsh-button-toggle-group [multiple]="true">
<dsh-button-toggle value="today">
Сегодня
</dsh-button-toggle>
<dsh-button-toggle value="week">
Неделя
</dsh-button-toggle>
<dsh-button-toggle value="month">
Месяц
</dsh-button-toggle>
<dsh-button-toggle value="more" disabled>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</dsh-button-toggle>
</dsh-button-toggle-group>
</div>
</div>
<div>
<dsh-button-toggle-group vertical>
<dsh-button-toggle value="today">
Сегодня
</dsh-button-toggle>
<dsh-button-toggle value="week">
Неделя
</dsh-button-toggle>
<dsh-button-toggle value="month">
Месяц
</dsh-button-toggle>
<dsh-button-toggle value="more" disabled>
<mat-icon class="icon" svgIcon="hor_dots"></mat-icon>
</dsh-button-toggle>
</dsh-button-toggle-group>
</div>
</dsh-card-content>
</dsh-card>

View File

@ -1,6 +0,0 @@
import { Component } from '@angular/core';
@Component({
templateUrl: './buttons.component.html'
})
export class ButtonsComponent {}

View File

@ -1,14 +0,0 @@
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatIconModule } from '@angular/material/icon';
import { ButtonsComponent } from './buttons.component';
import { ButtonModule } from '../../button';
import { CardModule } from '../../layout/card';
import { ButtonToggleModule } from '../../button-toggle';
@NgModule({
declarations: [ButtonsComponent],
imports: [FlexLayoutModule, ButtonModule, CardModule, ButtonToggleModule, MatIconModule]
})
export class ButtonsModule {}

View File

@ -1,2 +0,0 @@
export * from './buttons.module';
export * from './buttons.component';

View File

@ -1,27 +0,0 @@
<dsh-card>
<dsh-card-content fxLayout="column" [formGroup]="formGroup">
<mat-form-field>
<mat-label>BIN банка-эмитента карты</mat-label>
<dsh-card-bin-input></dsh-card-bin-input>
<mat-hint>Первые 4-8 цифр</mat-hint>
</mat-form-field>
<mat-form-field>
<mat-label>Последние цифры номера карты</mat-label>
<dsh-card-last-digits-input></dsh-card-last-digits-input>
<mat-hint>Последние 2-4 цифр</mat-hint>
</mat-form-field>
<mat-form-field>
<mat-label>Сумма платежа</mat-label>
<input matInput formControlName="sum" [textMask]="currencyMask" placeholder="0, 00" />
</mat-form-field>
<dsh-status>Подтвержден</dsh-status>
<dsh-status color="success">Подтвержден</dsh-status>
<dsh-status color="pending">Подтвержден</dsh-status>
<dsh-status color="warn">Подтвержден</dsh-status>
<div>
<dsh-status color="success">Подтвержден</dsh-status>
<dsh-status color="warn"></dsh-status>
<dsh-status color="pending">Подтвержден</dsh-status>
</div>
</dsh-card-content>
</dsh-card>

View File

@ -1,25 +0,0 @@
import { Component } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { currencyMask } from '../../form-controls';
@Component({
templateUrl: 'inputs.component.html',
styleUrls: ['inputs.component.scss'],
providers: []
})
export class InputsComponent {
formGroup: FormGroup;
get currencyMask() {
return currencyMask;
}
constructor(fb: FormBuilder) {
this.formGroup = fb.group({
bin: '',
card: '',
sum: ''
});
}
}

View File

@ -1,25 +0,0 @@
import { NgModule } from '@angular/core';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout';
import { InputsComponent } from './inputs.component';
import { FormControlsModule } from '../../form-controls';
import { LayoutModule } from '../../layout';
import { StatusModule } from '../../status';
@NgModule({
imports: [
MatFormFieldModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
FormControlsModule,
LayoutModule,
FlexLayoutModule,
StatusModule
],
declarations: [InputsComponent]
})
export class InputsModule {}

View File

@ -26,7 +26,7 @@
fxLayoutGap="20px"
fxLayoutGap.xs="10px"
>
<button fxFlex="50" fxFlex.xs="none" dsh-button color="accent" [routerLink]="actionRouterLink">
<button fxFlex="50" fxFlex.xs="none" dsh-button color="accent" disabled [routerLink]="actionRouterLink">
{{ config.action }}
</button>
<div fxFlex="50" fxFlex.xs="none">

View File

@ -6,17 +6,17 @@ import { LegalEntityComponent } from './legal-entity/legal-entity.component';
export const routes: Routes = [
{
path: 'onboarding',
path: '',
component: CompanySearchComponent
},
{
path: 'onboarding/:claimID/legal-entity',
path: ':claimID/legal-entity',
component: LegalEntityComponent
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class OnboardingRoutingModule {}

View File

@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PageNotFoundComponent } from './page-not-found.component';
export const routes: Routes = [
{
path: '',
component: PageNotFoundComponent
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PageNotFoundRoutingModule {}

View File

@ -3,10 +3,11 @@ import { RouterModule } from '@angular/router';
import { PageNotFoundComponent } from './page-not-found.component';
import { LocaleModule } from '../../locale/locale.module';
import { PageNotFoundRoutingModule } from './page-not-found-routing.module';
@NgModule({
declarations: [PageNotFoundComponent],
imports: [RouterModule, LocaleModule],
imports: [RouterModule, LocaleModule, PageNotFoundRoutingModule],
exports: [PageNotFoundComponent]
})
export class PageNotFoundModule {}

View File

@ -5,7 +5,7 @@ import { PaymentDetailsComponent } from './payment-details.component';
const paymentDetailsRoutes: Routes = [
{
path: 'invoice/:invoiceID/payment/:paymentID',
path: ':invoiceID/payment/:paymentID',
component: PaymentDetailsComponent
}
];

View File

@ -1,12 +1,4 @@
<dsh-state-nav fxFlex="180px">
<dsh-state-nav-item
routerLink="/analytics"
routerLinkActive
#analytics="routerLinkActive"
[selected]="analytics.isActive"
>
<mat-icon>pie_chart</mat-icon>Аналитика
</dsh-state-nav-item>
<dsh-state-nav-item
routerLink="./operations"
routerLinkActive
@ -15,15 +7,4 @@
>
<mat-icon>table_chart</mat-icon>{{ 'sections.payment-section.nav.operations' | lc }}
</dsh-state-nav-item>
<dsh-state-nav-item
routerLink="/buttons"
routerLinkActive
#buttons="routerLinkActive"
[selected]="buttons.isActive"
>
<mat-icon>description</mat-icon>Кнопки
</dsh-state-nav-item>
<dsh-state-nav-item routerLink="/inputs" routerLinkActive #inputs="routerLinkActive" [selected]="inputs.isActive">
<mat-icon>description</mat-icon>Поля ввода
</dsh-state-nav-item>
</dsh-state-nav>

View File

@ -11,15 +11,15 @@ export class OperationsComponent {
{
path: 'payments',
label: `${this.dictionaryBasePath}.tabs.payments`
},
{
path: 'refunds',
label: `${this.dictionaryBasePath}.tabs.refunds`
},
{
path: 'invoices',
label: `${this.dictionaryBasePath}.tabs.invoices`
}
// {
// path: 'refunds',
// label: `${this.dictionaryBasePath}.tabs.refunds`
// },
// {
// path: 'invoices',
// label: `${this.dictionaryBasePath}.tabs.invoices`
// }
];
constructor(private router: Router) {

View File

@ -2,11 +2,12 @@ import { Component } from '@angular/core';
import { PaymentsService } from './payments.service';
import { PaymentSearchFormValue } from './search-form/payment-search-form-value';
import { PaymentSearchService } from '../../../../search';
@Component({
selector: 'dsh-payments',
templateUrl: 'payments.component.html',
providers: [PaymentsService]
providers: [PaymentsService, PaymentSearchService]
})
export class PaymentsComponent {
payments$ = this.paymentService.searchResult$;

View File

@ -5,7 +5,7 @@ import { PaymentSectionComponent } from './payment-section.component';
const paymentSectionRoutes: Routes = [
{
path: 'payment-section',
path: '',
component: PaymentSectionComponent,
children: [
{

View File

@ -2,35 +2,31 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MainComponent } from './main';
import { PageNotFoundComponent } from './page-not-found';
import { AnalyticsComponent } from './analytics';
import { ButtonsComponent } from './buttons';
import { InputsComponent } from './inputs/inputs.component';
const routes: Routes = [
{
path: '',
component: MainComponent
},
{
path: 'analytics',
component: AnalyticsComponent
},
{
path: 'buttons',
component: ButtonsComponent
},
{
path: 'inputs',
component: InputsComponent
},
{
path: 'claim',
loadChildren: () => import('./claim').then(m => m.ClaimModule)
},
{
path: 'payment-section',
loadChildren: () => import('./payment-section').then(m => m.PaymentSectionModule)
},
{
path: 'invoice',
loadChildren: () => import('./payment-details').then(m => m.PaymentDetailsModule)
},
{
path: 'onboarding',
loadChildren: () => import('./onboarding').then(m => m.OnboardingModule)
},
{
path: '**',
component: PageNotFoundComponent
loadChildren: () => import('./page-not-found').then(m => m.PageNotFoundModule)
}
];

View File

@ -2,30 +2,12 @@ import { NgModule } from '@angular/core';
import { SectionsRoutingModule } from './sections-routing.module';
import { MainModule } from './main';
import { AnalyticsModule } from './analytics';
import { PageNotFoundModule } from './page-not-found';
import { ButtonsModule } from './buttons';
import { InputsModule } from './inputs/inputs.module';
import { SectionsComponent } from './sections.component';
import { PaymentSectionModule } from './payment-section';
import { PaymentDetailsModule } from './payment-details';
import { LAYOUT_GAP } from './constants';
import { OnboardingModule } from './onboarding';
import { ShopModule } from '../shop/shop.module';
import { ShopModule } from '../shop';
@NgModule({
imports: [
MainModule,
AnalyticsModule,
PageNotFoundModule,
ButtonsModule,
InputsModule,
PaymentSectionModule,
OnboardingModule,
PaymentDetailsModule,
SectionsRoutingModule,
ShopModule
],
imports: [MainModule, SectionsRoutingModule, ShopModule],
declarations: [SectionsComponent],
exports: [SectionsComponent],
providers: [{ provide: LAYOUT_GAP, useValue: '20px' }]

View File

@ -100,17 +100,17 @@
},
"wallets": {
"title": "Кошельки",
"subheading": "Управление кошельками. Пополнение и вывод средств.",
"subheading": "Управление выплатами, пополнение и вывод средств.",
"action": "Перейти"
},
"payments": {
"title": "Платежи",
"testEnvironment": "Тестовое окружение",
"subheading": {
"prestine": "Управление платежами и возвратами. Контролирование интеграции с платформой, и многое другое.",
"prestine": "Управление платежами, возвратами, аналитика, контроль интеграции, изменение настроек и др.",
"onboardingPending": "Вы начали процесс заполнения заявки на подключение.",
"onboardingReview": "Ваша заявка на подключение рассматривается.",
"onboardingReviewed": "Мы рассмотрели вашу заявку. От вас требуются дополнительные действия."
"onboardingReviewed": "Ваша заявка рассмотрена. Пожалуйста, уточните некоторые данные."
},
"action": {
"join": "Подключиться",