diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7844b44..7fb44f7 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -40,12 +40,17 @@ import { P500Component } from './pages/500.component'; import { AuthModule } from './auth/auth.module'; import { DashboardModule } from './dashboard/dashboard.module'; +import { DxChartModule } from 'devextreme-angular'; +import { StackedBarChartComponent } from './panels/stacked-bar.component'; +import { NewSectionComponent } from './dashboard/new-section.component'; + @NgModule({ imports: [ BrowserModule, HttpClientModule, + DxChartModule, NgxPaginationModule, BsDropdownModule.forRoot(), TabsModule.forRoot(), @@ -56,12 +61,14 @@ import { DashboardModule } from './dashboard/dashboard.module'; ], declarations: [ AppComponent, + StackedBarChartComponent, FullLayoutComponent, SimpleLayoutComponent, NAV_DROPDOWN_DIRECTIVES, BreadcrumbsComponent, SIDEBAR_TOGGLE_DIRECTIVES, AsideToggleDirective, + NewSectionComponent, P404Component, P500Component, ], diff --git a/src/app/dashboard/dashboard-customer.component.html b/src/app/dashboard/dashboard-customer.component.html index 07838a1..49e32b9 100644 --- a/src/app/dashboard/dashboard-customer.component.html +++ b/src/app/dashboard/dashboard-customer.component.html @@ -12,28 +12,33 @@
- -
-
-
-
-
-
-

Weekly Spending by Category

+ +
+
+
+
+
+ +
+
+
+

Weekly Spending by Category

+
+
+
+ + +
-
-
- -
+
-
diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts index 6c8cd77..ccca9ee 100644 --- a/src/app/dashboard/dashboard-customer.component.ts +++ b/src/app/dashboard/dashboard-customer.component.ts @@ -7,6 +7,8 @@ import { CustBarSnippetComponent } from '../snippets/cust-snippet-bar.component' import { PiePanel } from '../panels/pie-panel.component'; import { DataType } from '../shared/data-types.enum'; import * as moment from 'moment'; +import { NewSectionComponent } from '../dashboard/new-section.component'; +import { StackedBarChartComponent } from '../panels/stacked-bar.component'; @Component({ @@ -28,7 +30,7 @@ export class DashboardCustomerComponent implements OnInit { public bootstrapColours: string[] = ['bg-primary', 'bg-secondary', 'bg-success', 'bg-danger', 'bg-warning', 'bg-info']; - public chartType = 'doughnut'; + public chartType = 'polarArea'; public chartLegend = true; public doughnutChartDataCategory: any[] = []; public doughnutChartLabelsCategory: string[] = []; @@ -148,9 +150,7 @@ export class DashboardCustomerComponent implements OnInit { this.setWeekData(result); this.setChartData(result.data.cat_total); this.totalCategoryList = result.data.cat_list; - if (this.totalCategoryList) { - this.showTotalCategoryList = true; - } + this.showTotalCategoryList = true; this.purchaseEssential = result.data.essentials.purchase_no_essential_total; this.purchaseNotEssential = result.data.essentials.purchase_no_total - this.purchaseEssential; this.barChartDataEssential = [ diff --git a/src/app/dashboard/dashboard.routing.ts b/src/app/dashboard/dashboard.routing.ts index 6505f9a..9df0646 100644 --- a/src/app/dashboard/dashboard.routing.ts +++ b/src/app/dashboard/dashboard.routing.ts @@ -17,6 +17,7 @@ import { PayrollLogComponent } from './payroll-log.component'; import { LeaderboardComponent } from './leaderboard.component'; import { MapComponent } from './map.component'; import { TrailMapComponent } from './trail-map.component'; +import { NewSectionComponent } from './new-section.component'; // Using child path to allow for FullLayout theming const routes: Routes = [ @@ -84,6 +85,11 @@ const routes: Routes = [ path: 'feedback', component: FeedbackComponent, data: { title: 'Give Feedback' }, + }, + { + path: 'new-section', + component: NewSectionComponent, + data: { title: 'New Section' } } ], } diff --git a/src/app/dashboard/new-section.component.html b/src/app/dashboard/new-section.component.html new file mode 100644 index 0000000..58e17c9 --- /dev/null +++ b/src/app/dashboard/new-section.component.html @@ -0,0 +1,6 @@ +
+
+

Hello World!

+
+
+ \ No newline at end of file diff --git a/src/app/dashboard/new-section.component.ts b/src/app/dashboard/new-section.component.ts new file mode 100644 index 0000000..28ec0ff --- /dev/null +++ b/src/app/dashboard/new-section.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild, TemplateRef } from '@angular/core'; +import { ApiService } from '../providers/api-service'; +import { AgmCoreModule } from '@agm/core'; +import { BsModalService, ModalDirective } from 'ngx-bootstrap/modal'; +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; + + +@Component({ + templateUrl: 'new-section.component.html', +}) +export class NewSectionComponent implements OnInit, AfterViewInit { + + constructor( + private api: ApiService, + ) { } + + ngOnInit(): void { + + } + + ngAfterViewInit() { + } + + + + +} diff --git a/src/app/layouts/full-layout.component.html b/src/app/layouts/full-layout.component.html index 58baf2c..0769c82 100644 --- a/src/app/layouts/full-layout.component.html +++ b/src/app/layouts/full-layout.component.html @@ -94,6 +94,14 @@
+