Skip to content

Commit ffd9f5a

Browse files
committed
''
1 parent f4e0418 commit ffd9f5a

28 files changed

+605
-328
lines changed

angular-10/package-lock.json

Lines changed: 4 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export interface Feed {
2+
class: string,
3+
icon: string,
4+
task: string,
5+
time: string
6+
}
7+
8+
export const Feeds: Feed[] = [
9+
10+
{
11+
class: 'bg-info',
12+
icon: 'far fa-bell',
13+
task: 'You have 4 pending tasks.',
14+
time: 'Just Now'
15+
},
16+
{
17+
class: 'bg-success',
18+
icon: 'ti-server',
19+
task: 'Server #1 overloaded.',
20+
time: '2 Hours ago'
21+
},
22+
{
23+
class: 'bg-warning',
24+
icon: 'ti-shopping-cart',
25+
task: 'New order received.',
26+
time: '31 May'
27+
},
28+
{
29+
class: 'bg-danger',
30+
icon: 'ti-user',
31+
task: 'New user registered.',
32+
time: '30 May'
33+
},
34+
{
35+
class: 'bg-primary',
36+
icon: 'far fa-user',
37+
task: 'You have new password.',
38+
time: '21 May'
39+
},
40+
41+
]

angular-10/src/app/dashboard/dashboard-components/feeds/feeds.component.css

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="card">
2+
<div class="card-body">
3+
<h4 class="card-title">Feeds</h4>
4+
<div class="feed-widget">
5+
<ul class="list-style-none feed-body m-0 p-b-20">
6+
<li class="feed-item" *ngFor='let feed of feeds'>
7+
<div class="feed-icon {{feed.class}}">
8+
<i class={{feed.icon}}></i>
9+
</div>
10+
{{feed.task}}
11+
<span class="ml-auto font-12 text-muted"> {{feed.time}}</span>
12+
</li>
13+
</ul>
14+
</div>
15+
</div>
16+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { FeedsComponent } from './feeds.component';
4+
5+
describe('FeedsComponent', () => {
6+
let component: FeedsComponent;
7+
let fixture: ComponentFixture<FeedsComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ FeedsComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(FeedsComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { Feeds,Feed } from './feeds-data';
3+
4+
@Component({
5+
selector: 'app-feeds',
6+
templateUrl: './feeds.component.html',
7+
styleUrls: ['./feeds.component.css']
8+
})
9+
export class FeedsComponent implements OnInit {
10+
11+
feeds:Feed[];
12+
13+
constructor() {
14+
15+
this.feeds = Feeds;
16+
}
17+
18+
ngOnInit(): void {
19+
}
20+
21+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
export interface Comment{
2+
image:string,
3+
name:string,
4+
comment:string,
5+
date:string,
6+
labelClass:string,
7+
status:string
8+
}
9+
10+
export const comments:Comment[]=[
11+
12+
{
13+
image:'assets/images/users/1.jpg',
14+
name:'James Anderson',
15+
comment:'Lorem Ipsum is simply dummy text of the printing and type setting industry.',
16+
date:'April 14, 2016',
17+
labelClass:'label-primary',
18+
status:'Pending'
19+
20+
},
21+
{
22+
image:'assets/images/users/4.jpg',
23+
name:'Michael Jorden',
24+
comment:'Lorem Ipsum is simply dummy text of the printing and type setting industry.',
25+
date:'April 14, 2016',
26+
labelClass:'label-success',
27+
status:'Pending'
28+
29+
},
30+
{
31+
image:'assets/images/users/5.jpg',
32+
name:'Johnathan Doeting',
33+
comment:'Lorem Ipsum is simply dummy text of the printing and type setting industry.',
34+
date:'April 14, 2016',
35+
labelClass:'label-danger',
36+
status:'Pending'
37+
38+
},
39+
]

angular-10/src/app/dashboard/dashboard-components/recent-comments/recent-comments.component.css

Whitespace-only changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<div class="card">
2+
<div class="card-body pb-0">
3+
<h4 class="card-title">Recent Comments</h4>
4+
</div>
5+
<div class="comment-widgets scrollable">
6+
<!-- Comment Row -->
7+
<div class="d-flex flex-row comment-row m-t-0" *ngFor='let comment of userComments'>
8+
<div class="p-2">
9+
<img [src]=comment.image alt="user" width="50" class="rounded-circle">
10+
</div>
11+
<div class="comment-text w-100">
12+
<h6 class="font-medium">{{comment.name}}</h6>
13+
<span class="m-b-15 d-block">{{comment.comment}} </span>
14+
<div class="comment-footer">
15+
<span class="text-muted float-right">{{comment.date}}</span>
16+
<span class="label label-rounded {{comment.labelClass}}">{{comment.status}}</span>
17+
<span class="action-icons">
18+
<a href="javascript:void(0)"><i class="ti-pencil-alt"></i></a>
19+
<a href="javascript:void(0)"><i class="ti-check"></i></a>
20+
<a href="javascript:void(0)"><i class="ti-heart"></i></a>
21+
</span>
22+
</div>
23+
</div>
24+
</div>
25+
</div>
26+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { RecentCommentsComponent } from './recent-comments.component';
4+
5+
describe('RecentCommentsComponent', () => {
6+
let component: RecentCommentsComponent;
7+
let fixture: ComponentFixture<RecentCommentsComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ RecentCommentsComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(RecentCommentsComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});

0 commit comments

Comments
 (0)