File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ <h1>Customer list</h1>
3
3
< div class ="span-1 ">
4
4
< div class ="flakes-actions-bar ">
5
5
< a class ="action button-gray smaller " [routerLink] ="['AdminCustomersCreate'] "> Create new customer</ a >
6
+ < span class ="action button-gray smaller " [hidden] ="!selectedCustomer " (click) ="deleteSelectedCustomer() "> Delete selected customer</ span >
6
7
</ div >
7
8
< table class ="flakes-table ">
8
9
< thead >
Original file line number Diff line number Diff line change @@ -27,4 +27,13 @@ export class AdminCustomerListComponent implements OnInit {
27
27
this . selectedCustomer = undefined ;
28
28
} ) ;
29
29
}
30
+
31
+ public deleteSelectedCustomer ( ) : void {
32
+ if ( ! this . selectedCustomer ) {
33
+ return ;
34
+ }
35
+
36
+ this . _customerApiService . remove ( this . selectedCustomer . id )
37
+ . subscribe ( ( ) => this . refresh ( ) ) ;
38
+ }
30
39
}
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ <h1>Admin Area - Home</h1>
4
4
< h2 > Additional resources</ h2 >
5
5
< ul >
6
6
< li > GitHub: < a href ="https://github.com/thinktecture/nodejs-aspnetcore-webapi/ "> https://github.com/thinktecture/nodejs-aspnetcore-webapi/</ a > </ li >
7
- < li > Slides: < a href ="https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers "> https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers</ a > </ li >
8
- < li > Node.js: < a href ="https://nodejs.org/en/ "> https://nodejs.org/</ a > </ li >
7
+ <!-- <li>Slides: <a href="https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers">https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers</a></li>
8
+ --> < li > Node.js: < a href ="https://nodejs.org/en/ "> https://nodejs.org/</ a > </ li >
9
9
< li > Restify: < a href ="http://restify.com/ "> http://restify.com/</ a > </ li >
10
10
< li > SequelizeJS: < a href ="http://sequelizejs.com/ "> http://sequelizejs.com/</ a > </ li >
11
11
< li > ASP.NET Core 1.0: < a href ="https://docs.asp.net/ "> https://docs.asp.net/</ a > </ li >
Original file line number Diff line number Diff line change 5
5
< ul >
6
6
< li >
7
7
< label for ="name "> Username</ label >
8
- < input id ="name " type ="text " [(ngModel)] ="username " (ngControl) ="username " placeholder ="Username "
8
+ < input id ="name " type ="text " [(ngModel)] ="username " (ngControl) ="username " placeholder ="Username = bob "
9
9
required >
10
10
</ li >
11
11
< li >
12
12
< label for ="password "> Password</ label >
13
13
< input id ="password " type ="password " [(ngModel)] ="password " (ngControl) ="password "
14
- placeholder ="Password " required >
14
+ placeholder ="Password = bob " required >
15
15
</ li >
16
16
< li >
17
17
< button type ="submit " [disabled] ="!loginForm.form.valid " class ="button-blue "> Submit</ button >
Original file line number Diff line number Diff line change 1
1
@import " _mixins" ;
2
2
3
3
body {
4
- .maxSize () ;
4
+ width : 100 vw ;
5
5
}
6
6
7
7
.center {
@@ -67,3 +67,7 @@ li.router-link-active {
67
67
table .flakes-table tbody tr .active td {
68
68
background-color : lightgray ;
69
69
}
70
+
71
+ [hidden ] {
72
+ display : none ;
73
+ }
You can’t perform that action at this time.
0 commit comments