Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3059932f
authored
Feb 14, 2017
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
väliaikakommit, ennen hrm rikkomisia
1 parent
ed2f73b9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
33 deletions
code/moya-angular/package.json
code/moya-angular/src/app/app.component.html
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/app/viplist/viplist.component.css
code/moya-angular/src/app/viplist/viplist.component.html
code/moya-angular/src/styles.css
code/moya-angular/package.json
View file @
3059932
...
...
@@ -4,12 +4,9 @@
"license"
:
"MIT"
,
"angular-cli"
:
{},
"scripts"
:
{
"ng"
:
"ng"
,
"start"
:
"ng serve"
,
"lint"
:
"tslint
\"
src/**/*.ts
\"
"
,
"test"
:
"ng test"
,
"pree2e"
:
"webdriver-manager update --standalone false --gecko false"
,
"e2e"
:
"protractor"
"prekissa"
:
"echo
\"
pre kissa
\"
"
,
"postkissa"
:
"echo
\"
post kissa
\"
"
,
"kissa"
:
"node test.js"
},
"private"
:
true
,
"dependencies"
:
{
...
...
@@ -18,6 +15,7 @@
"@angular/core"
:
"^2.3.1"
,
"@angular/forms"
:
"^2.3.1"
,
"@angular/http"
:
"^2.3.1"
,
"@angular/material"
:
"^2.0.0-beta.1"
,
"@angular/platform-browser"
:
"^2.3.1"
,
"@angular/platform-browser-dynamic"
:
"^2.3.1"
,
"@angular/router"
:
"^3.3.1"
,
...
...
@@ -29,11 +27,6 @@
"ts-helpers"
:
"^1.1.1"
,
"zone.js"
:
"^0.7.2"
},
"scripts"
:
{
"prekissa"
:
"echo
\"
pre kissa
\"
"
,
"postkissa"
:
"echo
\"
post kissa
\"
"
,
"kissa"
:
"node test.js"
},
"devDependencies"
:
{
"@angular/compiler-cli"
:
"^2.3.1"
,
"@types/jasmine"
:
"2.5.38"
,
...
...
code/moya-angular/src/app/app.component.html
View file @
3059932
<h1>
Moya
</h1>
<router-outlet></router-outlet>
<a
routerLink=
"/viplist"
routerLinkActive=
"active"
>
viplist
</a>
<a
routerLink=
"/test"
routerLinkActive=
"active"
>
test
</a>
code/moya-angular/src/app/app.module.ts
View file @
3059932
...
...
@@ -10,6 +10,7 @@ import {MoyaRestModule} from "./moya-rest/moya-rest.module";
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
TestComponent
}
from
"./test/test.component"
;
import
{
MaterialModule
}
from
"@angular/material"
;
const
appRoutes
:
Routes
=
[
...
...
@@ -28,6 +29,7 @@ const appRoutes: Routes = [
BrowserModule
,
FormsModule
,
HttpModule
,
MaterialModule
.
forRoot
(),
AlertModule
.
forRoot
(),
MoyaRestModule
.
forRoot
(),
RouterModule
.
forRoot
(
appRoutes
)
...
...
code/moya-angular/src/app/viplist/viplist.component.css
View file @
3059932
.row
{
display
:
flex
;
flex-direction
:
row
;
}
.productsRow
{
display
:
flex
;
flex-direction
:
row
;
}
.productsRow
:not
(
:last-child
)
{
margin-bottom
:
3px
;
border-bottom
:
1px
solid
darkgray
;
padding-bottom
:
3px
;
}
.kissa
:nth-child
(
even
)
{
background-color
:
grey
;
}
code/moya-angular/src/app/viplist/viplist.component.html
View file @
3059932
<div
class=
"container-fluid"
>
<div
class=
"row bg-primary text-white titlerow"
>
<div
class=
"col"
>
Isäntä
</div>
<div
class=
"col-3"
>
Nimi
</div>
<div
class=
"col"
>
Kuvaus
</div>
<div
class=
"col-4"
>
Tuotteet
</div>
<div
class=
"col"
>
Muokkaa
</div>
</div>
<div
*
ngFor=
"let vip of vips | async"
class=
"row contentrow"
>
<div
class=
"col"
>
Kekkonen kekkonen
</div>
<div
class=
"col-3"
><b>
{{vip.shortdescr}}
</b></div>
<div
class=
"col"
>
{{vip.description}}
</div>
<div
class=
"col-4"
>
<div
*
ngFor=
"let p of vip.products"
class=
"row"
>
<div
style=
"display: inline-block;"
>
{{p.name}}
</div>
<div
style=
"display: inline-block;"
>
{{p.quantity}}
</div>
<div
style=
"display: inline-block; flex: 1;"
>
</div>
<div
style=
"display: inline-block;"
><button
type=
"button"
class=
"btn btn-default"
>
Toimita
</button></div>
</div>
</div>
<div
class=
"col"
>
todo
</div>
</div>
</div>
<br
/><br
/>
<br
/><br
/>
<br
/><br
/>
<table
class=
"table table-striped"
>
<table
class=
"table table-striped table-hover"
>
<thead>
<tr>
<th>
Description
</th>
<th>
shortdesc
</th>
</tr>
<tr
class=
"bg-primary text-white"
>
<th>
Isäntä
</th>
<th>
Nimi
</th>
<th>
Kuvaus
</th>
<th>
Tuotteet
</th>
<th>
Muokkaa
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let vip of vips | async"
>
<td
class=
""
>
Kekkonen kekkonen
</td>
<td
class=
""
><b>
{{vip.shortdescr}}
</b></td>
<td
class=
""
>
{{vip.description}}
</td>
<td
class=
""
>
<div
*
ngFor=
"let p of vip.products"
class=
"productsRow"
>
<div>
{{p.name}}
</div>
<div>
{{p.quantity}}
</div>
<div
style=
"flex: 1;"
>
</div>
<div><button
type=
"button"
class=
"btn btn-default"
>
Toimita
</button></div>
<tbody>
<tr
*
ngFor=
"let vip of vips | async"
>
<td>
{{vip.description}}
</td>
<td>
{{vip.shortdescr}}
</td>
<td>
<div>
<div
*
ngFor=
"let p of vip.products"
>
<div
style=
"display: inline-block;"
>
{{p.name}}
</div>
<div
style=
"display: inline-block;"
>
{{p.quantity}}
</div>
</div>
</div>
</td>
<td
class=
""
>
todo
</td>
</tr>
</tbody>
</tbody>
</table>
code/moya-angular/src/styles.css
View file @
3059932
/* You can add global styles to this file, and also import other style files */
@import
'~@angular/material/core/theming/prebuilt/indigo-pink.css'
;
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment