Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b6bb15bc
authored
Apr 01, 2018
by
Emil Holsti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning
1 parent
0b0a1953
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
code/moya-management-portal/src/app/organization/event-list/event-list.component.html
code/moya-management-portal/src/app/organization/event-list/event-list.component.ts
code/moya-management-portal/src/app/organization/organization-list/organization-list.component.html
code/moya-management-portal/src/app/organization/organization.component.html
code/moya-management-portal/src/app/organization/organization.component.ts
code/moya-management-portal/src/app/organization/event-list/event-list.component.html
View file @
b6bb15b
<mat-card
*
ngFor=
"let event of events"
style=
"margin:1em;max-width:75%"
>
<mat-card
*
ngFor=
"let event of events"
style=
"margin:1em;max-width:75%"
>
<mat-card-title>
{{event.title}}
</mat-card-title>
<mat-card-title>
{{event.title}}
</mat-card-title>
<mat-card-subtitle>
{{event.date}}
</mat-card-subtitle>
<mat-card-subtitle>
{{event.date}}
</mat-card-subtitle>
<
!--<
mat-card-actions>
<mat-card-actions>
<button mat-raised-button color="primary" (click)="onClick()" style="
float:right;margin-top: ;margin-right:1em;">Edi
t</button>
<button
mat-raised-button
color=
"primary"
(
click
)="
onClick
()"
style=
"
margin-left:0.8em;"
>
Go to even
t
</button>
</mat-card-actions>
-->
</mat-card-actions>
</mat-card>
</mat-card>
\ No newline at end of file
code/moya-management-portal/src/app/organization/event-list/event-list.component.ts
View file @
b6bb15b
...
@@ -8,7 +8,7 @@ import { OnChanges } from '@angular/core/src/metadata/lifecycle_hooks';
...
@@ -8,7 +8,7 @@ import { OnChanges } from '@angular/core/src/metadata/lifecycle_hooks';
styleUrls
:
[
'./event-list.component.scss'
]
styleUrls
:
[
'./event-list.component.scss'
]
})
})
export
class
EventListComponent
implements
OnInit
,
OnChanges
{
export
class
EventListComponent
implements
OnInit
,
OnChanges
{
@
Input
()
organi
s
ation
:
string
;
@
Input
()
organi
z
ation
:
string
;
public
events
:
any
;
public
events
:
any
;
constructor
(
private
appService
:
EventsService
)
{
constructor
(
private
appService
:
EventsService
)
{
...
@@ -19,12 +19,12 @@ export class EventListComponent implements OnInit, OnChanges {
...
@@ -19,12 +19,12 @@ export class EventListComponent implements OnInit, OnChanges {
}
}
ngOnInit
()
{
ngOnInit
()
{
console
.
log
(
this
.
organi
s
ation
);
console
.
log
(
this
.
organi
z
ation
);
this
.
events
=
this
.
appService
.
get
(
this
.
organi
s
ation
);
this
.
events
=
this
.
appService
.
get
(
this
.
organi
z
ation
);
}
}
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
console
.
log
(
changes
);
console
.
log
(
changes
);
this
.
events
=
this
.
appService
.
get
(
changes
.
organi
s
ation
.
currentValue
);
this
.
events
=
this
.
appService
.
get
(
changes
.
organi
z
ation
.
currentValue
);
}
}
}
}
code/moya-management-portal/src/app/organization/organization-list/organization-list.component.html
View file @
b6bb15b
...
@@ -2,6 +2,4 @@
...
@@ -2,6 +2,4 @@
<mat-select
placeholder=
"Organization"
[(
ngModel
)]="
selectedValue
"
(
ngModelChange
)="
onChange
($
event
)"
>
<mat-select
placeholder=
"Organization"
[(
ngModel
)]="
selectedValue
"
(
ngModelChange
)="
onChange
($
event
)"
>
<mat-option
*
ngFor=
"let organization of organizations"
value=
{{organization.name}}
>
{{organization.name}}
</mat-option>
<mat-option
*
ngFor=
"let organization of organizations"
value=
{{organization.name}}
>
{{organization.name}}
</mat-option>
</mat-select>
</mat-select>
</mat-form-field>
</mat-form-field>
\ No newline at end of file
{{selectedValue}}
\ No newline at end of file
code/moya-management-portal/src/app/organization/organization.component.html
View file @
b6bb15b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</div>
</div>
<div
style=
"width:50%; float:left"
>
<div
style=
"width:50%; float:left"
>
<h2
style=
"margin-left: 10px"
>
Tulevat tapahtumat
</h2>
<h2
style=
"margin-left: 10px"
>
Tulevat tapahtumat
</h2>
<moya-event-list
[
organi
sation
]="
currentOrganis
ation
"
style=
"margin-top:5em;"
></moya-event-list>
<moya-event-list
[
organi
zation
]="
currentOrganiz
ation
"
style=
"margin-top:5em;"
></moya-event-list>
</div>
</div>
<div
style=
"width:50%; float:right"
>
<div
style=
"width:50%; float:right"
>
<h2>
Ei omaa organisaatiota?
</h2>
<h2>
Ei omaa organisaatiota?
</h2>
...
...
code/moya-management-portal/src/app/organization/organization.component.ts
View file @
b6bb15b
...
@@ -9,7 +9,7 @@ import { EventListComponent} from './event-list/event-list.component';
...
@@ -9,7 +9,7 @@ import { EventListComponent} from './event-list/event-list.component';
export
class
OrganizationComponent
implements
OnInit
{
export
class
OrganizationComponent
implements
OnInit
{
title
=
'Moay'
;
title
=
'Moay'
;
public
currentOrgani
s
ation
:
string
;
public
currentOrgani
z
ation
:
string
;
constructor
()
{
}
constructor
()
{
}
...
@@ -17,7 +17,7 @@ export class OrganizationComponent implements OnInit {
...
@@ -17,7 +17,7 @@ export class OrganizationComponent implements OnInit {
}
}
onOrganizationChange
(
event
)
{
onOrganizationChange
(
event
)
{
this
.
currentOrgani
s
ation
=
event
;
this
.
currentOrgani
z
ation
=
event
;
}
}
}
}
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