Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
e-epal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
71784dc4
Commit
71784dc4
authored
Feb 10, 2017
by
Open Source Developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
2cc27bf9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
source/app.settings.ts
source/app.settings.ts
+1
-1
source/components/student-application-form/amka-fill.ts
source/components/student-application-form/amka-fill.ts
+1
-6
source/components/student-application-form/epal.class.select.ts
.../components/student-application-form/epal.class.select.ts
+15
-6
source/constants.ts
source/constants.ts
+2
-0
source/services/amkacheck-service.ts
source/services/amkacheck-service.ts
+6
-4
No files found.
source/app.settings.ts
View file @
71784dc4
...
...
@@ -2,7 +2,7 @@ export class AppSettings {
public
static
get
API_ENDPOINT
():
string
{
return
'
http://localhost/angular/eepal-front/drupal
'
;
/ return 'http:/
/
localhost
/
drupal
-
8.2
.
5
'
;
/
/
return 'http://localhost/drupal-8.2.5';
// return 'http://eepal.dev/drupal';
// return 'http://eduslim2.minedu.gov.gr/drupal';
}
...
...
source/components/student-application-form/amka-fill.ts
View file @
71784dc4
...
...
@@ -7,7 +7,6 @@ import { NgRedux, select } from 'ng2-redux';
import
{
IAmkaFills
}
from
'
../../store/amkafill/amkafills.types
'
;
import
{
IAppState
}
from
'
../../store/store
'
;
import
{
AmkaCheckService
}
from
'
../../services/amkacheck-service
'
;
import
{
FormBuilder
,
FormGroup
,
...
...
@@ -33,8 +32,7 @@ import {AppSettings} from '../../app.settings';
</button>
</div>
</div>
</form>
</form>
`
})
...
...
@@ -73,9 +71,6 @@ import {AppSettings} from '../../app.settings';
saveSelected
()
{
this
.
_cas
.
checkstudentamka
(
this
.
formGroup
.
value
)
.
subscribe
(
res
=>
this
.
respond
=
res
);
console
.
log
(
this
.
respond
);
this
.
_cfa
.
saveAmkaFills
(
this
.
formGroup
.
value
);
this
.
router
.
navigate
([
'
/epal-class-select
'
]);
}
...
...
source/components/student-application-form/epal.class.select.ts
View file @
71784dc4
...
...
@@ -37,7 +37,11 @@ import {AppSettings} from '../../app.settings';
</button>
</div>
</div>
<div *ngIf="emptyselection==true">
Παρακαλώ επιλέξτε μια τάξη
</div>
</form>
`
})
...
...
@@ -47,7 +51,7 @@ import {AppSettings} from '../../app.settings';
public
formGroup
:
FormGroup
;
emptyselection
=
false
;
constructor
(
private
fb
:
FormBuilder
,
private
_cfa
:
EpalClassesActions
,
private
_ngRedux
:
NgRedux
<
IAppState
>
,
...
...
@@ -59,8 +63,6 @@ import {AppSettings} from '../../app.settings';
ngOnInit
()
{
// this._cfa.getEpalClasses()
this
.
epalclasses$
=
this
.
_ngRedux
.
select
(
state
=>
{
if
(
state
.
epalclasses
.
size
>
0
)
{
state
.
epalclasses
.
reduce
(({},
epalclass
)
=>
{
...
...
@@ -74,9 +76,16 @@ import {AppSettings} from '../../app.settings';
}
saveSelected
()
{
this
.
_cfa
.
saveEpalClassesSelected
(
this
.
formGroup
.
value
);
this
.
router
.
navigate
([
'
/region-schools-select
'
]);
if
(
this
.
formGroup
.
value
.
name
==
undefined
)
{
this
.
emptyselection
=
true
;
}
else
{
this
.
_cfa
.
saveEpalClassesSelected
(
this
.
formGroup
.
value
);
this
.
router
.
navigate
([
'
/region-schools-select
'
]);
}
}
}
source/constants.ts
View file @
71784dc4
...
...
@@ -15,4 +15,6 @@ export const STUDENTDATAFIELDS_SAVE = 'STUDENTDATAFIELDS_SAVE';
export
const
EPALCLASSES_SAVE
=
'
EPALCLASSES_SAVE
'
;
export
const
AMKAFILL_SAVE
=
'
AMKAFILL_SAVE
'
;
export
const
VALID_NAMES_PATTERN
=
'
[Α-ΩΆΈΉΊΎΌΏα-ωάέήίύόώ ]*$
'
;
source/services/amkacheck-service.ts
View file @
71784dc4
...
...
@@ -2,16 +2,16 @@ import {Http,Response, RequestOptions, Headers} from '@angular/http';
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Observable
}
from
"
rxjs/Observable
"
;
import
'
rxjs/add/operator/map
'
;
import
{
IAmkaFill
}
from
'
../store/amkafill/amkafills.types
'
;
@
Injectable
()
export
class
AmkaCheckService
{
private
_url
=
"
https://wso2.minedu.gov.gr/amka/v1.1/
"
;
private
respond
:
Object
constructor
(
private
_http
:
Http
)
{
};
checkstudentamka
(
amka
:
any
)
{
let
authToken
=
'
7bed3fc5-f9f5-3613-abcd-3b08bab0f625
'
;
let
headers
=
new
Headers
({
'
Accept
'
:
'
application/json
'
});
headers
.
append
(
'
Authorization
'
,
`Bearer
${
authToken
}
`
);
...
...
@@ -20,8 +20,10 @@ export class AmkaCheckService {
let
parameter1
=
'
ksdhkshf
'
;
return
this
.
_http
.
get
(
this
.
_url
+
amka
.
name
+
'
/
'
+
parameter1
,
options
)
.
map
(
response
=>
response
.
json
()
);
this
.
_http
.
get
(
this
.
_url
+
amka
.
name
+
'
/
'
+
parameter1
,
options
)
.
map
(
response
=><
IAmkaFill
[]
>
response
.
json
()
)
.
subscribe
(
res
=>
this
.
respond
=
res
);
return
this
.
respond
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment