Please check
https://gitlab.mtxb2b.com/commons/templates
before starting any new projects
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
S
Shashwat-storybook
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
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Confluence
Confluence
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashwat Das
Shashwat-storybook
Commits
77fd3aeb
Commit
77fd3aeb
authored
3 years ago
by
ShashwatMDas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actions added
parent
53395f62
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
382 additions
and
91 deletions
+382
-91
documentation.json
documentation.json
+323
-77
src/app/components/league/League.stories.ts
src/app/components/league/League.stories.ts
+17
-1
src/app/components/league/league.component.html
src/app/components/league/league.component.html
+1
-1
src/app/components/league/league.component.ts
src/app/components/league/league.component.ts
+10
-1
src/app/components/leagues/leagues.component.ts
src/app/components/leagues/leagues.component.ts
+2
-2
src/app/components/leaguetable-container/leaguetable-container.component.ts
.../leaguetable-container/leaguetable-container.component.ts
+1
-1
src/app/components/leaguetable/Leaguetable.stories.ts
src/app/components/leaguetable/Leaguetable.stories.ts
+7
-1
src/app/components/leaguetable/leaguetable.component.css
src/app/components/leaguetable/leaguetable.component.css
+3
-0
src/app/components/leaguetable/leaguetable.component.html
src/app/components/leaguetable/leaguetable.component.html
+2
-2
src/app/components/leaguetable/leaguetable.component.ts
src/app/components/leaguetable/leaguetable.component.ts
+10
-1
src/app/components/team-card/team-card.component.html
src/app/components/team-card/team-card.component.html
+4
-4
src/app/components/team-card/team-card.component.ts
src/app/components/team-card/team-card.component.ts
+2
-0
No files found.
documentation.json
View file @
77fd3aeb
This diff is collapsed.
Click to expand it.
src/app/components/league/League.stories.ts
View file @
77fd3aeb
...
...
@@ -17,12 +17,18 @@ export default {
}),
],
title
:
'
League
'
,
excludeStories
:
/.*Data$/
}
as
Meta
;
export
const
actionsData
=
{
onClickLeague
:
action
(
'
onClickLeague
'
)
}
const
Template
:
Story
<
LeagueComponent
>
=
args
=>
({
props
:
{
...
args
...
args
,
onClickLeague
:
actionsData
.
onClickLeague
,
},
});
...
...
@@ -36,3 +42,13 @@ EPL.args = {
},
};
export
const
Laliga
=
Template
.
bind
({});
Laliga
.
args
=
{
league
:
{
id
:
leagueslist
[
1
].
id
,
name
:
leagueslist
[
1
].
name
,
country
:
leagueslist
[
1
].
country
,
logo
:
leagueslist
[
1
].
logo
},
};
This diff is collapsed.
Click to expand it.
src/app/components/league/league.component.html
View file @
77fd3aeb
<div
*ngIf=
"!league"
>
Undefined
</div>
<div
*ngIf=
"league"
class=
"league-div"
[title]=
"league.name"
>
<div
*ngIf=
"league"
class=
"league-div"
[title]=
"league.name"
(click)=
"onNavigate(league.id, league.name)"
>
<img
class=
"image"
src=
{{league.logo}}
/>
<div
class=
"league-info"
>
<span
class=
"league-name"
>
{{league.name}}
</span><br
/>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/league/league.component.ts
View file @
77fd3aeb
import
{
Component
,
OnInit
,
Input
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
Input
,
Output
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
LeaguesInterface
}
from
'
../../models/leagues.model
'
;
...
...
@@ -13,6 +13,15 @@ export class LeagueComponent implements OnInit {
@
Input
()
league
:
LeaguesInterface
|
undefined
;
@
Output
()
onClickLeague
=
new
EventEmitter
();
onNavigate
(
id
:
any
,
name
:
any
)
{
this
.
onClickLeague
.
emit
([
id
,
name
]);
window
.
location
.
href
=
`/leagues/
${
id
}
`
;
// alert(`Ideally would navigate to the ${name}'s table`);
}
ngOnInit
():
void
{
}
...
...
This diff is collapsed.
Click to expand it.
src/app/components/leagues/leagues.component.ts
View file @
77fd3aeb
...
...
@@ -10,9 +10,9 @@ import { leagueslist } from '../../models/leagues'
<div class="container" >
<h2>Leagues</h2>
<
a *ngFor="let league of leagues" [routerLink]="['/leagues', league.id]
">
<
div *ngFor="let league of leagues
">
<app-league [league]="league"></app-league>
</
a
>
</
div
>
</div>
`
,
styleUrls
:
[
'
./leagues.component.css
'
]
...
...
This diff is collapsed.
Click to expand it.
src/app/components/leaguetable-container/leaguetable-container.component.ts
View file @
77fd3aeb
...
...
@@ -35,6 +35,6 @@ export class LeaguetableContainerComponent implements OnInit {
ngOnInit
():
void
{
const
routeParams
=
this
.
route
.
snapshot
.
paramMap
;
const
leagueIdFromRoute
=
Number
(
routeParams
.
get
(
'
leagueId
'
));
//
this.getLeagueTable(leagueIdFromRoute);
this
.
getLeagueTable
(
leagueIdFromRoute
);
}
}
This diff is collapsed.
Click to expand it.
src/app/components/leaguetable/Leaguetable.stories.ts
View file @
77fd3aeb
...
...
@@ -16,12 +16,18 @@ export default {
}),
],
title
:
'
LeagueTable
'
,
excludeStories
:
/.*Data$/
}
as
Meta
;
export
const
actionsData
=
{
onClickTeam
:
action
(
'
onClickTeam
'
)
}
const
Template
:
Story
<
LeaguetableComponent
>
=
args
=>
({
props
:
{
...
args
...
args
,
onClickTeam
:
actionsData
.
onClickTeam
},
});
...
...
This diff is collapsed.
Click to expand it.
src/app/components/leaguetable/leaguetable.component.css
View file @
77fd3aeb
...
...
@@ -30,6 +30,9 @@ td{
}
.team
{
display
:
flex
;
text-decoration
:
underline
;
color
:
#327feb
;
cursor
:
pointer
;
flex-direction
:
row
;
align-items
:
center
;
}
...
...
This diff is collapsed.
Click to expand it.
src/app/components/leaguetable/leaguetable.component.html
View file @
77fd3aeb
<!-- <span>asdas {{league.name}} {{leaguetable[0].team.name}}</span> -->
<div
*ngIf=
"!league"
>
sdsad
loading
</div>
<div
class=
"container table"
*ngIf=
"league"
>
<h2>
{{league.name}}
</h2>
...
...
@@ -22,7 +22,7 @@
</tr>
</thead>
<tbody>
<tr
*ngFor=
"let team of leaguetable"
>
<tr
*ngFor=
"let team of leaguetable"
(click)=
"onPressTeam(team.team.id, league.id, team.team.name)"
>
<td>
{{team.rank}}
</td>
<td
colspan=
"2"
>
<!-- <a [title]="team.team.name" [routerLink]="['/team', league.id, team.team.id]"> -->
...
...
This diff is collapsed.
Click to expand it.
src/app/components/leaguetable/leaguetable.component.ts
View file @
77fd3aeb
import
{
Component
,
OnInit
,
Input
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
Input
,
Output
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
Select
,
Store
}
from
'
@ngxs/store
'
;
// import { LeagueState, FetchTable } from '../../state/leaguetable.sate';
import
{
Observable
}
from
'
rxjs
'
;
...
...
@@ -16,6 +16,15 @@ export class LeaguetableComponent implements OnInit {
@
Input
()
leaguetable
:
any
[]
=
[];
@
Input
()
league
:
any
=
{};
@
Output
()
onClickTeam
=
new
EventEmitter
();
onPressTeam
(
teamid
:
any
,
leagueid
:
any
,
name
:
any
)
{
this
.
onClickTeam
.
emit
([
teamid
,
leagueid
,
name
]);
window
.
location
.
href
=
`/team/
${
teamid
}
/
${
leagueid
}
`
;
// alert(`Ideally would take to ${name}'s details`);
}
constructor
(
)
{
}
...
...
This diff is collapsed.
Click to expand it.
src/app/components/team-card/team-card.component.html
View file @
77fd3aeb
...
...
@@ -12,7 +12,7 @@
<div
class=
"profile-card__cnt js-profile-cnt"
>
<div
class=
"profile-card__name"
>
{{info.team.name}}
</div>
<div
class=
"profile-card__txt"
>
League
<strong>
{{team.league.name}}
</strong></div>
<div
class=
"profile-card__txt"
>
League
:
<strong>
{{team.league.name}}
</strong></div>
<div
class=
"profile-card__txt"
>
Stadium:
<strong>
{{info.venue.name}}
</strong></div>
<div
class=
"profile-card-loc"
>
<span
class=
"profile-card-loc__icon"
>
...
...
@@ -44,17 +44,17 @@
<div
class=
"profile-card-social"
>
<div
*ngFor=
"let match of form"
>
<a
*ngIf=
"match == 'W'"
href=
"https://www.facebook.com/iaMuhammedErdem"
class=
"profile-card-social__item facebook"
target=
"_blank"
>
<a
*ngIf=
"match == 'W'"
class=
"profile-card-social__item facebook"
target=
"_blank"
>
<span
class=
"icon-font"
>
{{match}}
</span>
</a>
<a
*ngIf=
"match == 'L'"
href=
"https://www.facebook.com/iaMuhammedErdem"
class=
"profile-card-social__item instagram"
target=
"_blank"
>
<a
*ngIf=
"match == 'L'"
class=
"profile-card-social__item instagram"
target=
"_blank"
>
<span
class=
"icon-font"
>
{{match}}
</span>
</a>
<a
*ngIf=
"match == 'D'"
href=
"https://www.facebook.com/iaMuhammedErdem"
class=
"profile-card-social__item twitter"
target=
"_blank"
>
<a
*ngIf=
"match == 'D'"
class=
"profile-card-social__item twitter"
target=
"_blank"
>
<span
class=
"icon-font"
>
{{match}}
</span>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/team-card/team-card.component.ts
View file @
77fd3aeb
...
...
@@ -11,6 +11,8 @@ export class TeamCardComponent implements OnInit {
@
Input
()
team
:
any
=
{};
@
Input
()
form
:
any
[]
=
[];
loader
=
false
;
constructor
()
{
}
ngOnInit
():
void
{
...
...
This diff is collapsed.
Click to expand it.
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