Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wotwizard-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Salomon
wotwizard-ui
Commits
2159f267
Commit
2159f267
authored
3 years ago
by
Emmanuel Salomon
Browse files
Options
Downloads
Patches
Plain Diff
Remove neighbor method
parent
d4ae1931
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/certif/List.vue
+33
-34
33 additions, 34 deletions
components/certif/List.vue
with
33 additions
and
34 deletions
components/certif/List.vue
+
33
−
34
View file @
2159f267
...
...
@@ -6,31 +6,31 @@
<tbody>
<tr
v-for=
"certif in certifsPending"
:key=
"
getNeighbor(
certif
)
.uid + certif.expires_on"
:key=
"certif.uid + certif.expires_on"
@
click=
"
$router.push(
localePath(
{
name: 'membres-hash',
params: { hash:
getNeighbor(
certif
)
.hash }
params: { hash: certif.hash }
})
)
">
<th
scope=
"row"
class=
"py-1"
>
<div>
{{
getNeighbor
(
certif
)
.
uid
}}
{{
certif
.
uid
}}
<BadgeDanger
:limitDate=
"
getNeighbor(
certif
)
.received_certifications.limit"
:memberStatus=
"
getNeighbor(
certif
)
.status"
/>
:limitDate=
"certif.received_certifications.limit"
:memberStatus=
"certif.status"
/>
<BadgeQuality
:quality=
"
getNeighbor(
certif
)
.quality.ratio"
v-if=
"
getNeighbor(
certif
)
.status != 'REVOKED'"
/>
:quality=
"certif.quality.ratio"
v-if=
"certif.status != 'REVOKED'"
/>
</div>
<div>
<BadgeStatus
:membre=
"
getNeighbor(
certif
)
"
/>
<BadgeStatus
:membre=
"certif"
/>
<BadgeDispo
:isDispo=
"
getNeighbor(
certif
)
.minDatePassed"
:dateDispo=
"
getNeighbor(
certif
)
.minDate"
v-if=
"
getNeighbor(
certif
)
.status == 'MEMBER'"
/>
:isDispo=
"certif.minDatePassed"
:dateDispo=
"certif.minDate"
v-if=
"certif.status == 'MEMBER'"
/>
</div>
</th>
<td
class=
"text-right py-1"
>
...
...
@@ -105,32 +105,32 @@
<tbody>
<tr
v-for=
"certif in certifsTriees"
:key=
"
getNeighbor(
certif
)
.uid + certif.expires_on"
:key=
"certif.uid + certif.expires_on"
@
click=
"
$router.push(
localePath(
{
name: 'membres-hash',
params: { hash:
getNeighbor(
certif
)
.hash }
params: { hash: certif.hash }
})
)
">
<th
scope=
"row"
class=
"py-1"
>
<div>
<span
v-if=
"$isFavourite(
getNeighbor(
certif
)
.uid)"
>
★
</span>
{{
getNeighbor
(
certif
)
.
uid
}}
<span
v-if=
"$isFavourite(certif.uid)"
>
★
</span>
{{
certif
.
uid
}}
<BadgeDanger
:limitDate=
"
getNeighbor(
certif
)
.received_certifications.limit"
:memberStatus=
"
getNeighbor(
certif
)
.status"
/>
:limitDate=
"certif.received_certifications.limit"
:memberStatus=
"certif.status"
/>
<BadgeQuality
:quality=
"
getNeighbor(
certif
)
.quality.ratio"
v-if=
"
getNeighbor(
certif
)
.status != 'REVOKED'"
/>
:quality=
"certif.quality.ratio"
v-if=
"certif.status != 'REVOKED'"
/>
</div>
<div>
<BadgeStatus
:membre=
"
getNeighbor(
certif
)
"
/>
<BadgeStatus
:membre=
"certif"
/>
<BadgeDispo
:isDispo=
"
getNeighbor(
certif
)
.minDatePassed"
:dateDispo=
"
getNeighbor(
certif
)
.minDate"
v-if=
"
getNeighbor(
certif
)
.status == 'MEMBER'"
/>
:isDispo=
"certif.minDatePassed"
:dateDispo=
"certif.minDate"
v-if=
"certif.status == 'MEMBER'"
/>
</div>
</th>
<td
class=
"text-right py-1"
>
...
...
@@ -170,9 +170,6 @@ export default {
}
},
methods
:
{
getNeighbor
(
certif
)
{
return
this
.
type
==
"
received
"
?
certif
.
from
:
certif
.
to
},
sort
(
s
)
{
if
(
s
===
this
.
currentSort
)
{
this
.
currentSortDir
=
this
.
currentSortDir
===
"
asc
"
?
"
desc
"
:
"
asc
"
...
...
@@ -183,7 +180,6 @@ export default {
computed
:
{
certifsTriees
()
{
return
this
.
certifs
.
slice
()
.
sort
((
a
,
b
)
=>
{
let
modifier
=
this
.
currentSortDir
===
"
desc
"
?
-
1
:
1
let
sens
=
this
.
type
==
"
received
"
?
"
from
"
:
"
to
"
...
...
@@ -200,17 +196,20 @@ export default {
return
0
})
.
filter
((
el
)
=>
{
return
el
.
pending
==
false
})
.
filter
((
el
)
=>
el
.
pending
==
false
)
.
map
(
certif
=>
({
...
certif
,
...(
this
.
type
===
'
received
'
?
certif
.
from
:
certif
.
to
)
}))
},
certifsPending
()
{
return
this
.
certifs
.
slice
()
.
sort
((
a
,
b
)
=>
a
.
expires_on
-
b
.
expires_on
)
.
filter
((
el
)
=>
{
return
el
.
pending
==
true
})
.
filter
((
el
)
=>
el
.
pending
==
true
)
.
map
(
certif
=>
({
...
certif
,
...(
this
.
type
===
'
received
'
?
certif
.
from
:
certif
.
to
)
}))
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment