Skip to content

Commit 39cfe1e

Browse files
revert some pr review changes like apex charts, breadcrumb & nav bar files & eslint & build checked
1 parent 3c6c70a commit 39cfe1e

17 files changed

Lines changed: 312 additions & 335 deletions

src/app/theme/layouts/admin-layout/nav-bar/nav-left/nav-left.component.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,5 @@
2626
padding: 0px 4px;
2727
border-radius: 4px;
2828
color: var(--bs-secondary);
29-
30-
:host-context(.mantis-dark) & {
31-
background: var(--bs-gray-700) !important;
32-
}
3329
}
34-
}
30+
}

src/app/theme/layouts/admin-layout/navigation/nav-content/nav-content.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ul class="nav coded-inner-navbar" (click)="fireOutClick()" (mouseleave)="navMob()">
55
@for (item of navigations; track item) {
66
@if (item.type === 'group') {
7-
<app-nav-group [item]="item"></app-nav-group>
7+
<app-nav-group [item]="item" />
88
}
99
}
1010
</ul>

src/app/theme/layouts/admin-layout/navigation/nav-content/nav-content.component.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Angular import
22
import { Component, OnInit, inject, output } from '@angular/core';
3-
import { CommonModule, Location, LocationStrategy, DOCUMENT } from '@angular/common';
3+
import { CommonModule, Location, LocationStrategy } from '@angular/common';
44
import { RouterModule } from '@angular/router';
55

66
// project import
@@ -31,7 +31,6 @@ import { NgScrollbarModule } from 'ngx-scrollbar';
3131
styleUrls: ['./nav-content.component.scss']
3232
})
3333
export class NavContentComponent implements OnInit {
34-
private document = inject<Document>(DOCUMENT);
3534
private location = inject(Location);
3635
private locationStrategy = inject(LocationStrategy);
3736
private iconService = inject(IconService);
@@ -69,7 +68,7 @@ export class NavContentComponent implements OnInit {
6968
// Life cycle events
7069
ngOnInit() {
7170
if (this.windowWidth < 1025) {
72-
(this.document.querySelector('.coded-navbar') as HTMLDivElement)?.classList.add('menupos-static');
71+
(document.querySelector('.coded-navbar') as HTMLDivElement)?.classList.add('menupos-static');
7372
}
7473
}
7574

@@ -80,7 +79,7 @@ export class NavContentComponent implements OnInit {
8079
current_url = baseHref + this.location.path();
8180
}
8281
const link = "a.nav-link[ href='" + current_url + "' ]";
83-
const ele = this.document.querySelector(link);
82+
const ele = document.querySelector(link);
8483
if (ele !== null && ele !== undefined) {
8584
const parent = ele.parentElement;
8685
const up_parent = parent?.parentElement?.parentElement;
@@ -99,7 +98,7 @@ export class NavContentComponent implements OnInit {
9998
}
10099

101100
navMob() {
102-
if (this.windowWidth < 1025 && this.document.querySelector('app-navigation.coded-navbar')?.classList.contains('mob-open')) {
101+
if (this.windowWidth < 1025 && document.querySelector('app-navigation.coded-navbar')?.classList.contains('mob-open')) {
103102
this.NavCollapsedMob.emit();
104103
}
105104
}
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
@if (item.url && !item.external) {
2-
<li [ngClass]="item.classes!" [routerLinkActive]="['active']">
3-
<a class="nav-link" [target]="item.target ? '_blank' : '_self'" [routerLink]="[item.url]" (click)="closeOtherMenu($event)">
4-
@if (item.icon) {
5-
<span class="coded-micon">
6-
<i antIcon type="{{ item.icon }}" theme="outline"></i>
7-
</span>
8-
}
9-
@if (item.icon) {
10-
<span class="coded-mtext">{{ item.title }}</span>
11-
} @else {
12-
{{ item.title }}
13-
}
14-
</a>
15-
</li>
16-
}
17-
@if (item.url && item.external) {
18-
<li [ngClass]="item.classes!">
19-
<a [target]="item.target ? '_blank' : '_self'" [href]="item.url">
20-
@if (item.icon) {
21-
<span class="coded-micon">
22-
<i antIcon type="{{ item.icon }}" theme="outline"></i>
23-
</span>
24-
}
25-
@if (item.icon) {
26-
<span class="coded-mtext">{{ item.title }}</span>
27-
} @else {
28-
{{ item.title }}
29-
}
30-
</a>
31-
</li>
1+
@if (item().url && !item().external) {
2+
<li [ngClass]="item().classes!" [routerLinkActive]="['active']">
3+
<a class="nav-link" [target]="item().target ? '_blank' : '_self'" [routerLink]="[item().url]"
4+
(click)="closeOtherMenu($event)">
5+
@if (item().icon) {
6+
<span class="coded-micon">
7+
<i antIcon type="{{ item().icon }}" theme="outline"></i>
8+
</span>
9+
}
10+
@if (item().icon) {
11+
<span class="coded-mtext">{{ item().title }}</span>
12+
} @else {
13+
{{ item().title }}
14+
}
15+
</a>
16+
</li>
3217
}
18+
@if (item().url && item().external) {
19+
<li [ngClass]="item().classes!">
20+
<a [target]="item().target ? '_blank' : '_self'" [href]="item().url">
21+
@if (item().icon) {
22+
<span class="coded-micon">
23+
<i antIcon type="{{ item().icon }}" theme="outline"></i>
24+
</span>
25+
}
26+
@if (item().icon) {
27+
<span class="coded-mtext">{{ item().title }}</span>
28+
} @else {
29+
{{ item().title }}
30+
}
31+
</a>
32+
</li>
33+
}

src/app/theme/layouts/admin-layout/navigation/nav-content/nav-item/nav-item.component.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Angular import
2-
import { Component, Input } from '@angular/core';
2+
import { Component, inject, input } from '@angular/core';
33
import { CommonModule } from '@angular/common';
44
import { RouterModule } from '@angular/router';
55

@@ -15,11 +15,10 @@ import { LayoutStateService } from 'src/app/theme/shared/service/layout-state.se
1515
styleUrls: ['./nav-item.component.scss']
1616
})
1717
export class NavItemComponent {
18-
// public props
19-
@Input({ required: true }) item!: NavigationItem;
18+
private layoutState = inject(LayoutStateService);
2019

21-
// eslint-disable-next-line @angular-eslint/prefer-inject
22-
constructor(private layoutState: LayoutStateService) {}
20+
// public props
21+
readonly item = input.required<NavigationItem>();
2322

2423
// public method
2524
closeOtherMenu(event: MouseEvent) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<router-outlet></router-outlet>
1+
<router-outlet />
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
<h5 class="mb-3">Analytics Report</h5>
22
<div class="card">
33
<div class="list-group list-group-flush">
4-
<a [routerLink]="[]" class="list-group-item list-group-item-action d-flex align-items-center justify-content-between">
4+
<a [routerLink]="[]"
5+
class="list-group-item list-group-item-action d-flex align-items-center justify-content-between">
56
Company Finance Growth
67
<span class="h5 mb-0">+45.14%</span>
78
</a>
8-
<a [routerLink]="[]" class="list-group-item list-group-item-action d-flex align-items-center justify-content-between">
9+
<a [routerLink]="[]"
10+
class="list-group-item list-group-item-action d-flex align-items-center justify-content-between">
911
Company Expenses Ratio
1012
<span class="h5 mb-0">0.58%</span>
1113
</a>
1214
</div>
1315
<div class="card-body px-2">
1416
<div class="chart">
15-
<apx-chart
16-
[series]="chartOptions.series"
17-
[chart]="chartOptions.chart"
18-
[plotOptions]="chartOptions.plotOptions"
19-
[xaxis]="chartOptions.xaxis"
20-
[colors]="chartOptions.colors"
21-
[stroke]="chartOptions.stroke"
22-
[yaxis]="chartOptions.yaxis"
23-
[grid]="chartOptions.grid"
24-
[tooltip]="chartOptions.tooltip"
25-
/>
17+
<apx-chart [series]="chartOptions.series!" [chart]="chartOptions.chart!" [plotOptions]="chartOptions.plotOptions!"
18+
[xaxis]="chartOptions.xaxis!" [colors]="chartOptions.colors!" [stroke]="chartOptions.stroke!"
19+
[yaxis]="chartOptions.yaxis!" [grid]="chartOptions.grid!" [tooltip]="chartOptions.tooltip!" />
2620
</div>
2721
</div>
28-
</div>
22+
</div>

src/app/theme/shared/apexchart/analytics-chart/analytics-chart.component.ts

Lines changed: 58 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { RouterLink } from '@angular/router';
55
// project import
66

77
// third party
8-
import { NgApexchartsModule, ChartComponent } from 'ng-apexcharts';
8+
import { NgApexchartsModule, ChartComponent, ApexOptions } from 'ng-apexcharts';
99

1010
@Component({
1111
selector: 'app-analytics-chart',
@@ -16,65 +16,68 @@ import { NgApexchartsModule, ChartComponent } from 'ng-apexcharts';
1616
export class AnalyticsChartComponent {
1717
// public props
1818
chart = viewChild.required<ChartComponent>('chart');
19-
chartOptions = {
20-
chart: {
21-
type: 'line' as const,
22-
height: 340,
23-
toolbar: {
24-
show: false
19+
chartOptions: Partial<ApexOptions>;
20+
constructor() {
21+
this.chartOptions = {
22+
chart: {
23+
type: 'line',
24+
height: 340,
25+
toolbar: {
26+
show: false
27+
},
28+
background: 'transparent'
2529
},
26-
background: 'transparent'
27-
},
28-
plotOptions: {
29-
bar: {
30-
columnWidth: '45%',
31-
borderRadius: 4
32-
}
33-
},
34-
colors: ['#FFB814'],
35-
stroke: {
36-
curve: 'smooth' as const,
37-
width: 1.5
38-
},
39-
grid: {
40-
strokeDashArray: 4,
41-
borderColor: '#f5f5f5'
42-
},
43-
series: [
44-
{
45-
data: [58, 90, 38, 83, 63, 75, 35, 55]
46-
}
47-
],
48-
xaxis: {
49-
type: 'datetime' as const,
50-
categories: [
51-
'2018-05-19T00:00:00.000Z',
52-
'2018-06-19T00:00:00.000Z',
53-
'2018-07-19T01:30:00.000Z',
54-
'2018-08-19T02:30:00.000Z',
55-
'2018-09-19T03:30:00.000Z',
56-
'2018-10-19T04:30:00.000Z',
57-
'2018-11-19T05:30:00.000Z',
58-
'2018-12-19T06:30:00.000Z'
30+
plotOptions: {
31+
bar: {
32+
columnWidth: '45%',
33+
borderRadius: 4
34+
}
35+
},
36+
colors: ['#FFB814'],
37+
stroke: {
38+
curve: 'smooth',
39+
width: 1.5
40+
},
41+
grid: {
42+
strokeDashArray: 4,
43+
borderColor: '#f5f5f5'
44+
},
45+
series: [
46+
{
47+
data: [58, 90, 38, 83, 63, 75, 35, 55]
48+
}
5949
],
60-
labels: {
61-
format: 'MMM',
62-
style: {
63-
colors: ['#222', '#222', '#222', '#222', '#222', '#222', '#222']
50+
xaxis: {
51+
type: 'datetime',
52+
categories: [
53+
'2018-05-19T00:00:00.000Z',
54+
'2018-06-19T00:00:00.000Z',
55+
'2018-07-19T01:30:00.000Z',
56+
'2018-08-19T02:30:00.000Z',
57+
'2018-09-19T03:30:00.000Z',
58+
'2018-10-19T04:30:00.000Z',
59+
'2018-11-19T05:30:00.000Z',
60+
'2018-12-19T06:30:00.000Z'
61+
],
62+
labels: {
63+
format: 'MMM',
64+
style: {
65+
colors: ['#222', '#222', '#222', '#222', '#222', '#222', '#222']
66+
}
67+
},
68+
axisBorder: {
69+
show: false
70+
},
71+
axisTicks: {
72+
show: false
6473
}
6574
},
66-
axisBorder: {
75+
yaxis: {
6776
show: false
6877
},
69-
axisTicks: {
70-
show: false
78+
tooltip: {
79+
theme: 'light'
7180
}
72-
},
73-
yaxis: {
74-
show: false
75-
},
76-
tooltip: {
77-
theme: 'light'
78-
}
79-
};
81+
};
82+
}
8083
}

src/app/theme/shared/apexchart/income-overview-chart/income-overview-chart.component.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,8 @@ <h5 class="mb-3 mt-2">Income Overview</h5>
22
<app-card [showHeader]="false">
33
<h6 class="mb-2 f-w-400 text-muted">This Week Statistics</h6>
44
<h3 class="mb-3">$7,650</h3>
5-
<apx-chart
6-
[series]="chartOptions.series"
7-
[chart]="chartOptions.chart"
8-
[plotOptions]="chartOptions.plotOptions"
9-
[dataLabels]="chartOptions.dataLabels"
10-
[xaxis]="chartOptions.xaxis"
11-
[colors]="chartOptions.colors"
12-
[stroke]="chartOptions.stroke"
13-
[yaxis]="chartOptions.yaxis"
14-
[grid]="chartOptions.grid"
15-
[tooltip]="chartOptions.tooltip"
16-
/>
17-
</app-card>
5+
<apx-chart [series]="chartOptions.series!" [chart]="chartOptions.chart!" [plotOptions]="chartOptions.plotOptions!"
6+
[dataLabels]="chartOptions.dataLabels!" [xaxis]="chartOptions.xaxis!" [colors]="chartOptions.colors!"
7+
[stroke]="chartOptions.stroke!" [yaxis]="chartOptions.yaxis!" [grid]="chartOptions.grid!"
8+
[tooltip]="chartOptions.tooltip!" />
9+
</app-card>

0 commit comments

Comments
 (0)