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 2374f975
authored
Apr 02, 2018
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lintter
1 parent
dceaf3c3
Pipeline
#57
failed
in 0 seconds
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
30 deletions
code/moya-angular/src/app/app-routing.module.ts
code/moya-angular/src/app/app.component.ts
code/moya-angular/src/app/app.module.ts
code/moya-angular/src/app/components/moya-locale/moya-locale.service.ts
code/moya-angular/src/app/menu/defines/menu.ts
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
code/moya-angular/src/app/modules/login/login-routing.module.ts
code/moya-angular/src/app/modules/login/login.module.ts
code/moya-angular/src/app/modules/old-moya/old-moya.module.ts
code/moya-angular/src/app/modules/viplist/viplist-routing.module.ts
code/moya-angular/src/app/modules/viplist/viplist.module.ts
code/moya-angular/src/app/app-routing.module.ts
View file @
2374f97
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
,
PreloadAllModules
}
from
'@angular/router'
;
import
{
LoginComponent
}
from
'./modules/login/login.component'
;
import
{
FrontpageComponent
}
from
"./components/frontpage/frontpage.component"
;
import
{
ViplistModule
}
from
"./modules/viplist/viplist.module"
;
import
{
InfoViplistPageComponent
}
from
"./modules/viplist/info/info-viplist-page.component"
;
import
{
FrontpageComponent
}
from
'./components/frontpage/frontpage.component'
;
import
{
ViplistModule
}
from
'./modules/viplist/viplist.module'
;
import
{
InfoViplistPageComponent
}
from
'./modules/viplist/info/info-viplist-page.component'
;
const
APP_ROUTES
:
Routes
=
[
{
path
:
'login'
,
component
:
LoginComponent
},
...
...
code/moya-angular/src/app/app.component.ts
View file @
2374f97
code/moya-angular/src/app/app.module.ts
View file @
2374f97
...
...
@@ -13,9 +13,9 @@ import { MoyaLocaleComponent } from './components/moya-locale/moya-locale.compon
import
{
TopMenuComponent
}
from
'./menu/top-menu/top-menu.component'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
ViplistModule
}
from
"./modules/viplist/viplist.module"
;
import
{
LoginModule
}
from
"./modules/login/login.module"
;
import
{
LeftMenuModule
}
from
"./menu/left-menu/left-menu.module"
;
import
{
ViplistModule
}
from
'./modules/viplist/viplist.module'
;
import
{
LoginModule
}
from
'./modules/login/login.module'
;
import
{
LeftMenuModule
}
from
'./menu/left-menu/left-menu.module'
;
import
{
FrontpageComponent
}
from
'./components/frontpage/frontpage.component'
;
@
NgModule
({
...
...
code/moya-angular/src/app/components/moya-locale/moya-locale.service.ts
View file @
2374f97
...
...
@@ -4,7 +4,7 @@ import {MoyaLocale} from './moya-locale.model';
import
{
MOYA_BASE_URL
}
from
'../../shared/tools/moya-rest.tool'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
'rxjs/add/operator/catch'
;
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
export
const
ENGLISH
=
'en'
;
...
...
@@ -21,7 +21,7 @@ const LOCALSTORAGE_NAME = 'currently used locale code';
@
Injectable
()
export
class
MoyaLocaleService
{
selectedLocale
:
string
;
selectedLocale
:
string
;
constructor
(
private
http
:
HttpClient
,
private
translate
:
TranslateService
)
{
...
...
@@ -67,7 +67,7 @@ export class MoyaLocaleService {
public
getUserLocale
():
Observable
<
string
>
{
// If there is already locale, don't bother of running this rest stuff again
if
(
this
.
selectedLocale
)
{
if
(
this
.
selectedLocale
)
{
return
new
Observable
<
string
>
(
x
=>
x
.
next
(
this
.
selectedLocale
));
}
...
...
code/moya-angular/src/app/menu/defines/menu.ts
View file @
2374f97
import
{
MenuGroup
}
from
'../models/menu-group.model'
;
import
{
OldMoyaComponent
}
from
"../../modules/old-moya/old-moya.component"
;
import
{
OldMoyaComponent
}
from
'../../modules/old-moya/old-moya.component'
;
/**
* Created by tuukka on 13/05/17.
*/
...
...
code/moya-angular/src/app/menu/left-menu/left-menu.component.ts
View file @
2374f97
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MenuGroup
}
from
'../models/menu-group.model'
;
import
{
MENU
}
from
"../defines/menu"
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
UrlSegment
}
from
"@angular/router"
;
import
{
MENU
}
from
'../defines/menu'
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
UrlSegment
}
from
'@angular/router'
;
@
Component
({
selector
:
'left-menu'
,
...
...
@@ -14,12 +14,12 @@ export class LeftMenuComponent implements OnInit {
styleClass
:
string
;
searchPath
(
path
:
string
,
menu
:
MenuGroup
[]):
boolean
{
searchPath
(
path
:
string
,
menu
:
MenuGroup
[]):
boolean
{
for
(
le
t
i
in
menu
)
{
for
(
le
t
n
in
menu
[
i
].
items
)
{
le
t
item
=
menu
[
i
].
items
[
n
];
if
(
path
.
startsWith
(
item
.
path
))
{
for
(
cons
t
i
in
menu
)
{
for
(
cons
t
n
in
menu
[
i
].
items
)
{
cons
t
item
=
menu
[
i
].
items
[
n
];
if
(
path
.
startsWith
(
item
.
path
))
{
return
true
;
}
}
...
...
@@ -37,17 +37,17 @@ export class LeftMenuComponent implements OnInit {
const
revent
=
event
as
RouterEvent
;
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
USER
))
{
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
USER
))
{
this
.
activateUser
();
return
;
}
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
INFO
))
{
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
INFO
))
{
this
.
activateInfo
();
return
;
}
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
ADMIN
))
{
if
(
this
.
searchPath
(
revent
.
url
,
MENU
.
ADMIN
))
{
this
.
activateAdmin
();
return
;
}
...
...
@@ -65,18 +65,18 @@ export class LeftMenuComponent implements OnInit {
activateInfo
()
{
this
.
menu
=
MENU
.
INFO
;
this
.
styleClass
=
"infoMenu"
;
this
.
styleClass
=
'infoMenu'
;
}
activateUser
()
{
this
.
menu
=
MENU
.
USER
;
this
.
styleClass
=
"userMenu"
;
this
.
styleClass
=
'userMenu'
;
}
activateAdmin
()
{
this
.
menu
=
MENU
.
ADMIN
;
this
.
styleClass
=
"adminMenu"
;
this
.
styleClass
=
'adminMenu'
;
}
}
code/moya-angular/src/app/modules/login/login-routing.module.ts
View file @
2374f97
code/moya-angular/src/app/modules/login/login.module.ts
View file @
2374f97
import
{
LoginRoutingModule
}
from
'./login-routing.module'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
LoginComponent
}
from
"./login.component"
;
import
{
LoginComponent
}
from
'./login.component'
;
@
NgModule
({
imports
:
[
...
...
code/moya-angular/src/app/modules/old-moya/old-moya.module.ts
View file @
2374f97
...
...
@@ -2,7 +2,7 @@ import { PipesModule } from '../../shared/pipes/pipes.module';
import
{
OldMoyaComponent
}
from
'./old-moya.component'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
OldMoyaRoutingModule
}
from
"./old-moya-routing.module"
;
import
{
OldMoyaRoutingModule
}
from
'./old-moya-routing.module'
;
@
NgModule
({
imports
:
[
...
...
code/moya-angular/src/app/modules/viplist/viplist-routing.module.ts
View file @
2374f97
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
InfoViplistPageComponent
}
from
"./info/info-viplist-page.component"
;
import
{
InfoViplistPageComponent
}
from
'./info/info-viplist-page.component'
;
const
routes
:
Routes
=
[
{
path
:
''
,
component
:
InfoViplistPageComponent
}
...
...
code/moya-angular/src/app/modules/viplist/viplist.module.ts
View file @
2374f97
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
MatTableModule
}
from
"@angular/material"
;
import
{
InfoViplistPageComponent
}
from
"./info/info-viplist-page.component"
;
import
{
ViplistRoutingModule
}
from
"./viplist-routing.module"
;
import
{
TranslateModule
}
from
"@ngx-translate/core"
;
import
{
MatTableModule
}
from
'@angular/material'
;
import
{
InfoViplistPageComponent
}
from
'./info/info-viplist-page.component'
;
import
{
ViplistRoutingModule
}
from
'./viplist-routing.module'
;
import
{
TranslateModule
}
from
'@ngx-translate/core'
;
@
NgModule
({
imports
:
[
...
...
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