@golstats/gsc-lineups-reports 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/css/fonts.css +91 -91
- package/dist/gsc-lineups-reports.css +1 -1
- package/dist/gsc-lineups-reports.es.js +2946 -2675
- package/dist/gsc-lineups-reports.umd.js +10 -7
- package/dist/images/canchaRPH.svg +30 -30
- package/dist/images/events/atajada.svg +56 -56
- package/dist/images/events/fin-del-partido.svg +43 -43
- package/dist/images/events/fuera-de-lugar.svg +57 -57
- package/dist/images/events/gol.svg +48 -48
- package/dist/images/events/icn-cambio.svg +6 -6
- package/dist/images/events/icn-falta.svg +4 -4
- package/dist/images/events/icn-play.svg +3 -3
- package/dist/images/events/icn-tarjeta-amarilla.svg +3 -3
- package/dist/images/events/icn-tarjeta-roja.svg +3 -3
- package/dist/images/events/icn-tiro-a-porteria.svg +36 -36
- package/dist/images/events/icn-tiros-de-esquina.svg +18 -18
- package/dist/images/events/inicia-el-partido.svg +45 -45
- package/dist/images/events/jugada-peligrosa.svg +90 -90
- package/dist/images/events/penal-fallado.svg +194 -194
- package/dist/images/events/penal-marcado.svg +189 -189
- package/dist/images/events/tiempo-agregado.svg +74 -74
- package/dist/images/events/tiro-a-porteria.svg +80 -80
- package/dist/images/events/var.svg +30 -30
- package/package.json +7 -3
- package/src/components/Lineup2D/CheckBox.vue +42 -42
- package/src/components/Lineup2D/FilterEmpty.vue +48 -48
- package/src/components/Lineup2D/Icons.vue +29 -29
- package/src/components/Lineup2D/LineupField.vue +274 -274
- package/src/components/Lineup2D/LineupFilter.vue +285 -285
- package/src/components/Lineup2D/LineupMainHeader.vue +222 -222
- package/src/components/Lineup2D/LineupRecentItem.vue +110 -110
- package/src/components/Lineup2D/MatchDetails.vue +66 -66
- package/src/components/gsc-filter.vue +286 -286
- package/src/components/gsc-header-historico-lineup.vue +1064 -1064
- package/src/components/gsc-header-postmatch-lineup.vue +1017 -1017
- package/src/components/gsc-header-probables-lineup.vue +1044 -1044
- package/src/components/gsc-header-recientes-lineup.vue +2337 -2337
- package/src/components/gsc-lineup-dosd.vue +3777 -3752
- package/src/components/gsc-lineup-main.vue +81 -65
- package/src/components/gsc-lineups-reports.vue +10 -0
- package/src/components/gsc-lineups.vue +46 -12
- package/src/components/gsc-player-card.vue +166 -166
- package/src/index.js +4 -4
- package/src/main-test.js +42 -0
- package/src/types.d.ts +45 -45
- package/src/utils/apiUrl.js +33 -0
- package/src/utils/socketConnection.js +29 -29
|
@@ -1,65 +1,81 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<template v-if="type == '2D'">
|
|
4
|
-
<GSCLineups2D
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
default:
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
default:
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
type:
|
|
45
|
-
default:
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
type:
|
|
49
|
-
default:
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<template v-if="type == '2D'">
|
|
4
|
+
<GSCLineups2D
|
|
5
|
+
:selected-option="selectedOption"
|
|
6
|
+
:game="game"
|
|
7
|
+
:socket="socket"
|
|
8
|
+
:provider="provider"
|
|
9
|
+
:is-dev-apis="isDevApis"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<template v-if="type == '3D'">
|
|
13
|
+
<GSCLineups3D
|
|
14
|
+
:is-live="isLive"
|
|
15
|
+
:isFemale="isFemale"
|
|
16
|
+
@onOpenProfile="onOpenProfile"
|
|
17
|
+
:selected-option="selectedOption"
|
|
18
|
+
:game="game"
|
|
19
|
+
:socket="socket"
|
|
20
|
+
:provider="provider"
|
|
21
|
+
:is-dev-apis="isDevApis"
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
import GSCLineups2D from './gsc-lineup-dosd.vue'
|
|
28
|
+
import GSCLineups3D from './gsc-lineups.vue'
|
|
29
|
+
export default {
|
|
30
|
+
components: {
|
|
31
|
+
GSCLineups2D,
|
|
32
|
+
GSCLineups3D
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
isFemale: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
selectedOption: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'Historicos'
|
|
42
|
+
},
|
|
43
|
+
game: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: () => {}
|
|
46
|
+
},
|
|
47
|
+
isLive: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: '2D'
|
|
54
|
+
},
|
|
55
|
+
socket: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => {}
|
|
58
|
+
},
|
|
59
|
+
provider: {
|
|
60
|
+
type: Number,
|
|
61
|
+
default: 1
|
|
62
|
+
},
|
|
63
|
+
isDevApis: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
watch: {},
|
|
69
|
+
data() {
|
|
70
|
+
return {}
|
|
71
|
+
},
|
|
72
|
+
computed: {},
|
|
73
|
+
methods: {
|
|
74
|
+
onOpenProfile(data) {
|
|
75
|
+
this.$emit('onOpenProfile', data)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<style module></style>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
:gamehome="lastHomeGame"
|
|
6
6
|
:gameaway="lastVisitingGame"
|
|
7
7
|
:selected-option="selectedOption"
|
|
8
|
+
:provider="provider"
|
|
9
|
+
:is-dev-apis="isDevApis"
|
|
8
10
|
/>
|
|
9
11
|
</div>
|
|
10
12
|
</template>
|
|
@@ -38,6 +40,14 @@ const props = defineProps({
|
|
|
38
40
|
type: String,
|
|
39
41
|
default: 'Prematch',
|
|
40
42
|
},
|
|
43
|
+
provider: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 1,
|
|
46
|
+
},
|
|
47
|
+
isDevApis: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
41
51
|
})
|
|
42
52
|
|
|
43
53
|
// Función para validar y formatear el objeto del juego
|
|
@@ -274,6 +274,7 @@
|
|
|
274
274
|
<script>
|
|
275
275
|
import axios from 'axios'
|
|
276
276
|
import { /*connectSocket,*/ connectChannel } from '@/utils/socketConnection'
|
|
277
|
+
import { getApiUrl } from '@/utils/apiUrl'
|
|
277
278
|
import CardPlayer from './gsc-player-card.vue'
|
|
278
279
|
import HeaderPlayerHistorico from './gsc-header-historico-lineup.vue'
|
|
279
280
|
import HeaderPlayerRecientes from './gsc-header-recientes-lineup.vue'
|
|
@@ -312,6 +313,14 @@ export default {
|
|
|
312
313
|
type: Object,
|
|
313
314
|
default: () => {},
|
|
314
315
|
},
|
|
316
|
+
provider: {
|
|
317
|
+
type: Number,
|
|
318
|
+
default: 1,
|
|
319
|
+
},
|
|
320
|
+
isDevApis: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: false,
|
|
323
|
+
},
|
|
315
324
|
},
|
|
316
325
|
components: {
|
|
317
326
|
CardPlayer,
|
|
@@ -1030,7 +1039,11 @@ export default {
|
|
|
1030
1039
|
this.cleaneData()
|
|
1031
1040
|
await this.getHeaderInfo(newValue)
|
|
1032
1041
|
const gameDataInfoPromise = axios.get(
|
|
1033
|
-
|
|
1042
|
+
getApiUrl(
|
|
1043
|
+
this.urlGames + newValue.season_id + '/games/' + newValue.game_id,
|
|
1044
|
+
this.provider,
|
|
1045
|
+
this.isDevApis,
|
|
1046
|
+
),
|
|
1034
1047
|
axiosConfig,
|
|
1035
1048
|
)
|
|
1036
1049
|
const promises = [gameDataInfoPromise]
|
|
@@ -1049,7 +1062,10 @@ export default {
|
|
|
1049
1062
|
lineUpsGameId !== this.lastGetLineUpGameId
|
|
1050
1063
|
) {
|
|
1051
1064
|
console.log('✅ Haciendo petición de alineaciones para game_id:', lineUpsGameId)
|
|
1052
|
-
lineUpsPromise = axios.get(
|
|
1065
|
+
lineUpsPromise = axios.get(
|
|
1066
|
+
getApiUrl(this.url + lineUpsGameId, this.provider, this.isDevApis),
|
|
1067
|
+
axiosConfig,
|
|
1068
|
+
)
|
|
1053
1069
|
promises.push(lineUpsPromise)
|
|
1054
1070
|
} else if (lineUpsGameId === 0) {
|
|
1055
1071
|
console.warn('❌ Se evitó petición con game_id = 0')
|
|
@@ -2043,7 +2059,9 @@ export default {
|
|
|
2043
2059
|
Authorization: `${this.tokenPremium}`,
|
|
2044
2060
|
},
|
|
2045
2061
|
})
|
|
2046
|
-
const data = await axiosInstanceLineUp.get(
|
|
2062
|
+
const data = await axiosInstanceLineUp.get(
|
|
2063
|
+
getApiUrl(this.url + game, this.provider, this.isDevApis),
|
|
2064
|
+
)
|
|
2047
2065
|
if (!data || !data.data) {
|
|
2048
2066
|
throw new Error('There is not lineups for this game.')
|
|
2049
2067
|
}
|
|
@@ -2652,7 +2670,9 @@ export default {
|
|
|
2652
2670
|
Authorization: `${this.tokenPremium}`,
|
|
2653
2671
|
},
|
|
2654
2672
|
})
|
|
2655
|
-
const data = await axiosInstanceLineUp.get(
|
|
2673
|
+
const data = await axiosInstanceLineUp.get(
|
|
2674
|
+
getApiUrl(this.url + game, this.provider, this.isDevApis),
|
|
2675
|
+
)
|
|
2656
2676
|
if (!data || !data.data) {
|
|
2657
2677
|
throw new Error('There is not lineups for this game.')
|
|
2658
2678
|
}
|
|
@@ -3222,11 +3242,15 @@ export default {
|
|
|
3222
3242
|
const data =
|
|
3223
3243
|
responseData ||
|
|
3224
3244
|
(await axiosInstance.get(
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3245
|
+
getApiUrl(
|
|
3246
|
+
'https://fxtcaw9tw6.execute-api.us-east-2.amazonaws.com/prod/historic/seasons/' +
|
|
3247
|
+
game.season_id +
|
|
3248
|
+
'/games/' +
|
|
3249
|
+
game.game_id +
|
|
3250
|
+
'/lineups',
|
|
3251
|
+
this.provider,
|
|
3252
|
+
this.isDevApis,
|
|
3253
|
+
),
|
|
3230
3254
|
))
|
|
3231
3255
|
console.log(
|
|
3232
3256
|
'GAME INFO HEADER --------------------------------------------------------> ',
|
|
@@ -3317,7 +3341,13 @@ export default {
|
|
|
3317
3341
|
})
|
|
3318
3342
|
const data =
|
|
3319
3343
|
responseData ||
|
|
3320
|
-
(await axiosInstance.get(
|
|
3344
|
+
(await axiosInstance.get(
|
|
3345
|
+
getApiUrl(
|
|
3346
|
+
this.urlGames + game.season_id + '/games/' + game.game_id,
|
|
3347
|
+
this.provider,
|
|
3348
|
+
this.isDevApis,
|
|
3349
|
+
),
|
|
3350
|
+
))
|
|
3321
3351
|
this.homeTeam = data.data.teams[0]
|
|
3322
3352
|
//this.homeTeamAbrev = data.data.teams[0].acronym
|
|
3323
3353
|
//this.awayTeamAbrev = data.data.teams[1].acronym
|
|
@@ -3471,7 +3501,7 @@ export default {
|
|
|
3471
3501
|
},
|
|
3472
3502
|
async getMXM(game) {
|
|
3473
3503
|
try {
|
|
3474
|
-
const getMXMUrl = this.urlMXM + game
|
|
3504
|
+
const getMXMUrl = getApiUrl(this.urlMXM + game, this.provider, this.isDevApis)
|
|
3475
3505
|
if (getMXMUrl === this.lastMXMUrl) {
|
|
3476
3506
|
return
|
|
3477
3507
|
}
|
|
@@ -3676,7 +3706,11 @@ export default {
|
|
|
3676
3706
|
Authorization: `${this.tokenPremium}`,
|
|
3677
3707
|
},
|
|
3678
3708
|
})
|
|
3679
|
-
const data =
|
|
3709
|
+
const data =
|
|
3710
|
+
responseData ||
|
|
3711
|
+
(await axiosInstanceLineUp.get(
|
|
3712
|
+
getApiUrl(this.url + game, this.provider, this.isDevApis),
|
|
3713
|
+
))
|
|
3680
3714
|
if (!data || !data.data) {
|
|
3681
3715
|
throw new Error('There is not lineups for this game.')
|
|
3682
3716
|
}
|
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="type == 1" class="gsc-item-player">
|
|
3
|
-
<div class="gsc-num-player">
|
|
4
|
-
<template v-if="data.shirt < 10">0</template>
|
|
5
|
-
{{ data.shirt }}
|
|
6
|
-
</div>
|
|
7
|
-
<div class="gsc-cont-info-by-player">
|
|
8
|
-
<div class="gsc-cont-info-by-player-row1">
|
|
9
|
-
<div class="shield-player-cont">
|
|
10
|
-
<img class="gsc-logo-player" :src="data.img" />
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="gsc-cont-info-by-player-row2">
|
|
14
|
-
<div
|
|
15
|
-
class="gsc-cont-info-by-player-row2-line-name"
|
|
16
|
-
:style="
|
|
17
|
-
data.section == 'Historicos' && data.type != 'Postmatch'
|
|
18
|
-
? 'text-decoration: none !important; cursor: default !important'
|
|
19
|
-
: ''
|
|
20
|
-
"
|
|
21
|
-
@click="
|
|
22
|
-
openProfile({
|
|
23
|
-
playerId: data.playerid,
|
|
24
|
-
teamId: data.teamid,
|
|
25
|
-
seasonId: data.season,
|
|
26
|
-
section: data.section,
|
|
27
|
-
type: data.type
|
|
28
|
-
})
|
|
29
|
-
"
|
|
30
|
-
>
|
|
31
|
-
{{ data.name }}
|
|
32
|
-
</div>
|
|
33
|
-
<div class="gsc-cont-info-by-player-row2-line-data">
|
|
34
|
-
<div class="cont-display-gsc">
|
|
35
|
-
<img class="gsc-img-country" :src="data.nation" />
|
|
36
|
-
<div :class="position">{{ data.position }}</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="gsc-cont-cards">
|
|
39
|
-
<div class="gsc-yellow_card_div" v-if="data.yellowcard >= 1 && data.redcard == 0"></div>
|
|
40
|
-
<div class="gsc-red_card_div" v-if="data.redcard >= 1 && data.yellowcard == 0"></div>
|
|
41
|
-
<div
|
|
42
|
-
class="gsc-yellowred_card_div"
|
|
43
|
-
v-if="data.yellowcard >= 1 && data.redcard >= 1"
|
|
44
|
-
></div>
|
|
45
|
-
<template v-if="data.yellowcard >= 1 && data.redcard == 0"
|
|
46
|
-
>'{{ data.yellowcardmin }}
|
|
47
|
-
</template>
|
|
48
|
-
<template v-if="data.redcard >= 1">'{{ data.redcardmin }}</template>
|
|
49
|
-
<div class="gsc-goal_card_div_wrapper" v-for="(min, keyM) in data.goalsMin" :key="keyM">
|
|
50
|
-
<div class="gsc-goal_card_div"></div>
|
|
51
|
-
<div>'{{ min }}</div>
|
|
52
|
-
</div>
|
|
53
|
-
<div
|
|
54
|
-
class="gsc-goal_card_div_wrapper"
|
|
55
|
-
v-if="data.substitutionIn || data.substitutionOut"
|
|
56
|
-
>
|
|
57
|
-
<div class="gsc-change_card_div"></div>
|
|
58
|
-
<div>'{{ data.substitutionMin }}</div>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div v-if="type == 2" class="gsc-item-player">
|
|
66
|
-
<div class="gsc-num-player2">
|
|
67
|
-
<template v-if="data.shirt < 10">0</template>
|
|
68
|
-
{{ data.shirt }}
|
|
69
|
-
</div>
|
|
70
|
-
<div class="gsc-cont-info-by-player2">
|
|
71
|
-
<div class="gsc-cont-info-by-player-row2">
|
|
72
|
-
<div
|
|
73
|
-
class="gsc-cont-info-by-player-row2-line-name2"
|
|
74
|
-
:style="
|
|
75
|
-
data.section == 'Historicos' && data.type != 'Postmatch'
|
|
76
|
-
? 'text-decoration: none !important; cursor: default !important'
|
|
77
|
-
: ''
|
|
78
|
-
"
|
|
79
|
-
@click="
|
|
80
|
-
openProfile({
|
|
81
|
-
playerId: data.playerid,
|
|
82
|
-
teamId: data.teamid,
|
|
83
|
-
seasonId: data.season,
|
|
84
|
-
section: data.section,
|
|
85
|
-
type: data.type
|
|
86
|
-
})
|
|
87
|
-
"
|
|
88
|
-
>
|
|
89
|
-
{{ data.name }}
|
|
90
|
-
</div>
|
|
91
|
-
<div class="gsc-cont-info-by-player-row2-line-data">
|
|
92
|
-
<div class="gsc-cont-cards2">
|
|
93
|
-
<div class="gsc-yellow_card_div" v-if="data.yellowcard >= 1 && data.redcard == 0"></div>
|
|
94
|
-
<div class="gsc-red_card_div" v-if="data.redcard >= 1 && data.yellowcard == 0"></div>
|
|
95
|
-
<div
|
|
96
|
-
class="gsc-yellowred_card_div"
|
|
97
|
-
v-if="data.yellowcard >= 1 && data.redcard >= 1"
|
|
98
|
-
></div>
|
|
99
|
-
<template v-if="data.yellowcard >= 1 && data.redcard == 0"
|
|
100
|
-
>'{{ data.yellowcardmin }}
|
|
101
|
-
</template>
|
|
102
|
-
<template v-if="data.redcard >= 1">'{{ data.redcardmin }}</template>
|
|
103
|
-
<div class="gsc-goal_card_div_wrapper" v-for="(min, keyM) in data.goalsMin" :key="keyM">
|
|
104
|
-
<div class="gsc-goal_card_div"></div>
|
|
105
|
-
<div>'{{ min }}</div>
|
|
106
|
-
</div>
|
|
107
|
-
<div
|
|
108
|
-
class="gsc-goal_card_div_wrapper"
|
|
109
|
-
v-if="data.substitutionIn || data.substitutionOut"
|
|
110
|
-
>
|
|
111
|
-
<div class="gsc-change_card_div"></div>
|
|
112
|
-
<div>'{{ data.substitutionMin }}</div>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
<div class="cont-display-gsc">
|
|
116
|
-
<div :class="position">{{ data.position }}</div>
|
|
117
|
-
<img class="gsc-img-country" :src="data.nation" />
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="gsc-cont-info-by-player-row1">
|
|
122
|
-
<div class="shield-player-cont">
|
|
123
|
-
<img class="gsc-logo-player" :src="data.img" />
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<script>
|
|
131
|
-
export default {
|
|
132
|
-
name: 'PlayerCard',
|
|
133
|
-
emits: ['open-profile'],
|
|
134
|
-
components: {},
|
|
135
|
-
props: {
|
|
136
|
-
data: {
|
|
137
|
-
type: Object,
|
|
138
|
-
default: () => {}
|
|
139
|
-
},
|
|
140
|
-
position: {
|
|
141
|
-
type: String,
|
|
142
|
-
default: 'gsc-position-player'
|
|
143
|
-
},
|
|
144
|
-
type: {
|
|
145
|
-
type: Number,
|
|
146
|
-
default: 1
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
data() {
|
|
150
|
-
return {}
|
|
151
|
-
},
|
|
152
|
-
computed: {},
|
|
153
|
-
methods: {
|
|
154
|
-
openProfile(data) {
|
|
155
|
-
if (data.section !== 'Historicos' || data.type === 'Postmatch') {
|
|
156
|
-
this.$emit('open-profile', data)
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
mounted() {}
|
|
161
|
-
}
|
|
162
|
-
</script>
|
|
163
|
-
|
|
164
|
-
<style scoped>
|
|
165
|
-
@import '/css/fonts.css';
|
|
166
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="type == 1" class="gsc-item-player">
|
|
3
|
+
<div class="gsc-num-player">
|
|
4
|
+
<template v-if="data.shirt < 10">0</template>
|
|
5
|
+
{{ data.shirt }}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="gsc-cont-info-by-player">
|
|
8
|
+
<div class="gsc-cont-info-by-player-row1">
|
|
9
|
+
<div class="shield-player-cont">
|
|
10
|
+
<img class="gsc-logo-player" :src="data.img" />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="gsc-cont-info-by-player-row2">
|
|
14
|
+
<div
|
|
15
|
+
class="gsc-cont-info-by-player-row2-line-name"
|
|
16
|
+
:style="
|
|
17
|
+
data.section == 'Historicos' && data.type != 'Postmatch'
|
|
18
|
+
? 'text-decoration: none !important; cursor: default !important'
|
|
19
|
+
: ''
|
|
20
|
+
"
|
|
21
|
+
@click="
|
|
22
|
+
openProfile({
|
|
23
|
+
playerId: data.playerid,
|
|
24
|
+
teamId: data.teamid,
|
|
25
|
+
seasonId: data.season,
|
|
26
|
+
section: data.section,
|
|
27
|
+
type: data.type
|
|
28
|
+
})
|
|
29
|
+
"
|
|
30
|
+
>
|
|
31
|
+
{{ data.name }}
|
|
32
|
+
</div>
|
|
33
|
+
<div class="gsc-cont-info-by-player-row2-line-data">
|
|
34
|
+
<div class="cont-display-gsc">
|
|
35
|
+
<img class="gsc-img-country" :src="data.nation" />
|
|
36
|
+
<div :class="position">{{ data.position }}</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="gsc-cont-cards">
|
|
39
|
+
<div class="gsc-yellow_card_div" v-if="data.yellowcard >= 1 && data.redcard == 0"></div>
|
|
40
|
+
<div class="gsc-red_card_div" v-if="data.redcard >= 1 && data.yellowcard == 0"></div>
|
|
41
|
+
<div
|
|
42
|
+
class="gsc-yellowred_card_div"
|
|
43
|
+
v-if="data.yellowcard >= 1 && data.redcard >= 1"
|
|
44
|
+
></div>
|
|
45
|
+
<template v-if="data.yellowcard >= 1 && data.redcard == 0"
|
|
46
|
+
>'{{ data.yellowcardmin }}
|
|
47
|
+
</template>
|
|
48
|
+
<template v-if="data.redcard >= 1">'{{ data.redcardmin }}</template>
|
|
49
|
+
<div class="gsc-goal_card_div_wrapper" v-for="(min, keyM) in data.goalsMin" :key="keyM">
|
|
50
|
+
<div class="gsc-goal_card_div"></div>
|
|
51
|
+
<div>'{{ min }}</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
class="gsc-goal_card_div_wrapper"
|
|
55
|
+
v-if="data.substitutionIn || data.substitutionOut"
|
|
56
|
+
>
|
|
57
|
+
<div class="gsc-change_card_div"></div>
|
|
58
|
+
<div>'{{ data.substitutionMin }}</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div v-if="type == 2" class="gsc-item-player">
|
|
66
|
+
<div class="gsc-num-player2">
|
|
67
|
+
<template v-if="data.shirt < 10">0</template>
|
|
68
|
+
{{ data.shirt }}
|
|
69
|
+
</div>
|
|
70
|
+
<div class="gsc-cont-info-by-player2">
|
|
71
|
+
<div class="gsc-cont-info-by-player-row2">
|
|
72
|
+
<div
|
|
73
|
+
class="gsc-cont-info-by-player-row2-line-name2"
|
|
74
|
+
:style="
|
|
75
|
+
data.section == 'Historicos' && data.type != 'Postmatch'
|
|
76
|
+
? 'text-decoration: none !important; cursor: default !important'
|
|
77
|
+
: ''
|
|
78
|
+
"
|
|
79
|
+
@click="
|
|
80
|
+
openProfile({
|
|
81
|
+
playerId: data.playerid,
|
|
82
|
+
teamId: data.teamid,
|
|
83
|
+
seasonId: data.season,
|
|
84
|
+
section: data.section,
|
|
85
|
+
type: data.type
|
|
86
|
+
})
|
|
87
|
+
"
|
|
88
|
+
>
|
|
89
|
+
{{ data.name }}
|
|
90
|
+
</div>
|
|
91
|
+
<div class="gsc-cont-info-by-player-row2-line-data">
|
|
92
|
+
<div class="gsc-cont-cards2">
|
|
93
|
+
<div class="gsc-yellow_card_div" v-if="data.yellowcard >= 1 && data.redcard == 0"></div>
|
|
94
|
+
<div class="gsc-red_card_div" v-if="data.redcard >= 1 && data.yellowcard == 0"></div>
|
|
95
|
+
<div
|
|
96
|
+
class="gsc-yellowred_card_div"
|
|
97
|
+
v-if="data.yellowcard >= 1 && data.redcard >= 1"
|
|
98
|
+
></div>
|
|
99
|
+
<template v-if="data.yellowcard >= 1 && data.redcard == 0"
|
|
100
|
+
>'{{ data.yellowcardmin }}
|
|
101
|
+
</template>
|
|
102
|
+
<template v-if="data.redcard >= 1">'{{ data.redcardmin }}</template>
|
|
103
|
+
<div class="gsc-goal_card_div_wrapper" v-for="(min, keyM) in data.goalsMin" :key="keyM">
|
|
104
|
+
<div class="gsc-goal_card_div"></div>
|
|
105
|
+
<div>'{{ min }}</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div
|
|
108
|
+
class="gsc-goal_card_div_wrapper"
|
|
109
|
+
v-if="data.substitutionIn || data.substitutionOut"
|
|
110
|
+
>
|
|
111
|
+
<div class="gsc-change_card_div"></div>
|
|
112
|
+
<div>'{{ data.substitutionMin }}</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="cont-display-gsc">
|
|
116
|
+
<div :class="position">{{ data.position }}</div>
|
|
117
|
+
<img class="gsc-img-country" :src="data.nation" />
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="gsc-cont-info-by-player-row1">
|
|
122
|
+
<div class="shield-player-cont">
|
|
123
|
+
<img class="gsc-logo-player" :src="data.img" />
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<script>
|
|
131
|
+
export default {
|
|
132
|
+
name: 'PlayerCard',
|
|
133
|
+
emits: ['open-profile'],
|
|
134
|
+
components: {},
|
|
135
|
+
props: {
|
|
136
|
+
data: {
|
|
137
|
+
type: Object,
|
|
138
|
+
default: () => {}
|
|
139
|
+
},
|
|
140
|
+
position: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: 'gsc-position-player'
|
|
143
|
+
},
|
|
144
|
+
type: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: 1
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
data() {
|
|
150
|
+
return {}
|
|
151
|
+
},
|
|
152
|
+
computed: {},
|
|
153
|
+
methods: {
|
|
154
|
+
openProfile(data) {
|
|
155
|
+
if (data.section !== 'Historicos' || data.type === 'Postmatch') {
|
|
156
|
+
this.$emit('open-profile', data)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
mounted() {}
|
|
161
|
+
}
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<style scoped>
|
|
165
|
+
@import '/css/fonts.css';
|
|
166
|
+
</style>
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import GSCLineupsReports from './components/gsc-lineups-reports.vue'
|
|
3
|
-
|
|
4
|
-
export { GSCLineupsReports }
|
|
1
|
+
'use strict'
|
|
2
|
+
import GSCLineupsReports from './components/gsc-lineups-reports.vue'
|
|
3
|
+
|
|
4
|
+
export { GSCLineupsReports }
|