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 4a78b325
authored
Mar 31, 2018
by
Max Mecklin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First stage of NewOrganizationComponent
1 parent
0350ad5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
5 deletions
code/moya-management-portal/src/app/organization/new-organization/new-organization.component.html
code/moya-management-portal/src/app/organization/new-organization/new-organization.component.ts
code/moya-management-portal/src/app/organization/organization.module.ts
code/moya-management-portal/src/app/organization/new-organization/new-organization.component.html
View file @
4a78b32
<form
[
formGroup
]="
organizationForm
"
(
ngSubmit
)="
onSubmit
()"
>
<form
[
formGroup
]="
organizationForm
"
(
ngSubmit
)="
onSubmit
()"
>
<mat-form-field>
<mat-form-field>
<input
matInput
placeholder=
"Organization name:
"
formControlName=
"name"
>
<input
matInput
required
placeholder=
"Organization name
"
formControlName=
"name"
>
</mat-form-field>
</mat-form-field>
<mat-divider
[
vertical
]="
true
"
></mat-divider>
<mat-form-field>
<input
matInput
placeholder=
"Address"
formControlName=
"address"
>
</mat-form-field>
<mat-form-field>
<input
matInput
placeholder=
"Postal code"
formControlName=
"postcode"
>
</mat-form-field>
<mat-form-field>
<input
matInput
placeholder=
"City"
formControlName=
"city"
>
</mat-form-field>
<mat-divider
[
vertical
]="
true
"
></mat-divider>
<mat-form-field>
<input
matInput
placeholder=
"Business ID"
formControlName=
"businessId"
>
</mat-form-field>
<mat-divider
[
vertical
]="
true
"
></mat-divider>
<mat-form-field>
<input
matInput
placeholder=
"Bank name"
formControlName=
"bankName"
>
</mat-form-field>
<mat-form-field>
<input
matInput
placeholder=
"IBAN"
formControlName=
"iban"
>
</mat-form-field>
<mat-divider
[
vertical
]="
true
"
></mat-divider>
<button
mat-button
type=
"submit"
>
Submit
</button>
<button
mat-button
type=
"submit"
>
Submit
</button>
</form>
</form>
code/moya-management-portal/src/app/organization/new-organization/new-organization.component.ts
View file @
4a78b32
...
@@ -10,13 +10,29 @@ import {FormControl, FormGroup} from '@angular/forms';
...
@@ -10,13 +10,29 @@ import {FormControl, FormGroup} from '@angular/forms';
export
class
NewOrganizationComponent
implements
OnInit
{
export
class
NewOrganizationComponent
implements
OnInit
{
public
organizationForm
=
new
FormGroup
({
public
organizationForm
=
new
FormGroup
({
name
:
new
FormControl
()
name
:
new
FormControl
(),
address
:
new
FormControl
(),
postcode
:
new
FormControl
(),
city
:
new
FormControl
(),
businessId
:
new
FormControl
(),
bankName
:
new
FormControl
(),
iban
:
new
FormControl
()
});
});
constructor
()
{
}
constructor
()
{
}
ngOnInit
()
{
ngOnInit
()
{
}
}
onSubmit
()
{
}
onSubmit
()
{
const
values
=
{
'name'
:
this
.
organizationForm
.
get
(
'name'
).
value
,
'address'
:
this
.
organizationForm
.
get
(
'address'
).
value
,
'postcode'
:
this
.
organizationForm
.
get
(
'postcode'
).
value
,
'city'
:
this
.
organizationForm
.
get
(
'city'
).
value
,
'businessId'
:
this
.
organizationForm
.
get
(
'city'
).
value
,
'bankName'
:
this
.
organizationForm
.
get
(
'bankName'
).
value
,
'iban'
:
this
.
organizationForm
.
get
(
'iban'
).
value
};
}
}
}
code/moya-management-portal/src/app/organization/organization.module.ts
View file @
4a78b32
...
@@ -8,7 +8,7 @@ import {OrganizationListService} from './organization-list/organization-list.ser
...
@@ -8,7 +8,7 @@ import {OrganizationListService} from './organization-list/organization-list.ser
import
{
MatCardModule
}
from
'@angular/material/card'
;
import
{
MatCardModule
}
from
'@angular/material/card'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
import
{
MatInputModule
}
from
'@angular/material/input'
;
import
{
MatInputModule
}
from
'@angular/material/input'
;
import
{
MatButtonModule
}
from
'@angular/material'
;
import
{
MatButtonModule
,
MatDividerModule
}
from
'@angular/material'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -17,7 +17,8 @@ import { MatButtonModule } from '@angular/material';
...
@@ -17,7 +17,8 @@ import { MatButtonModule } from '@angular/material';
MatCardModule
,
MatCardModule
,
ReactiveFormsModule
,
ReactiveFormsModule
,
MatInputModule
,
MatInputModule
,
MatButtonModule
MatButtonModule
,
MatDividerModule
],
],
providers
:
[
OrganizationListService
],
providers
:
[
OrganizationListService
],
declarations
:
[
NewOrganizationComponent
,
OrganizationListComponent
,
EventListComponent
],
declarations
:
[
NewOrganizationComponent
,
OrganizationListComponent
,
EventListComponent
],
...
...
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