Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
400
Merge Requests
66
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
e4dfae91
Commit
e4dfae91
authored
1 hour ago
by
Marcelo Rivera
Browse files
Options
Download
(feat): allow to pick between the two versions of the entity
parent
4d90e094
feat/copy-entity-for-jury
1 merge request
!782
On strike creation create a copy of flagged content for potential jury assessment
Pipeline
#117966451
running with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
25 deletions
+62
-25
src/app/modules/report/juryduty/session/content.component.html
View file @
e4dfae91
...
...
@@ -16,14 +16,49 @@
<p>
{{ report.appeal_note }}
</p>
</div>
<div
class=
"m-juryDutySessionContent__entityVersion"
*ngIf=
"report.original_entity"
>
<ng-container
*ngIf=
"showOriginal"
>
<span>
Currently displaying the
<b>
reported
</b>
version of the entity.
</span>
<a
(click)=
"toggleVersion()"
>
Show current version
</a>
</ng-container>
<ng-container
*ngIf=
"!showOriginal"
>
<span>
Currently displaying the
<b>
current
</b>
version of the entity.
</span>
<a
(click)=
"toggleVersion()"
>
Show reported version
</a>
</ng-container>
</div>
<ng-container
*ngIf=
"report.entity; else noEntity"
>
<minds-card
*ngIf=
"report.entity"
class=
""
[object]=
"report.entity"
[flags]=
"{ hideToolbar: true }"
hostClass=
"mdl-card m-border"
></minds-card>
<ng-container
*ngIf=
"showOriginal && report.original_entity; else currentVersion"
>
<minds-card
*ngIf=
"report.original_entity"
[object]=
"report.original_entity"
[flags]=
"{ hideToolbar: true }"
hostClass=
"mdl-card m-border"
></minds-card>
</ng-container>
<ng-template
#currentVersion
>
<minds-card
*ngIf=
"report.entity"
[object]=
"report.entity"
[flags]=
"{ hideToolbar: true }"
hostClass=
"mdl-card m-border"
></minds-card>
</ng-template>
</ng-container>
<ng-template
#noEntity
>
<p>
The post could not be loaded. Please overturn the report
</p>
...
...
@@ -31,15 +66,15 @@
<div
class=
"m-juryDutySessionContent__options"
>
<button
class=
"m-btn m-btn--slim"
(click)=
"uphold()"
>
<ng-container
*ngIf=
"report.is_appeal; else upholdLabel"
>
Reject Appeal
</ng-container
>
<ng-container
*ngIf=
"report.is_appeal; else upholdLabel"
>
Reject Appeal
</ng-container
>
<ng-template
#upholdLabel
>
Uphold Report
</ng-template>
</button>
<button
class=
"m-btn m-btn--slim"
(click)=
"overturn()"
>
<ng-container
*ngIf=
"report.is_appeal; else overturnLabel"
>
Accept Appeal
</ng-container
>
<ng-container
*ngIf=
"report.is_appeal; else overturnLabel"
>
Accept Appeal
</ng-container
>
<ng-template
#overturnLabel
>
Overturn Report
</ng-template>
</button>
</div>
...
...
This diff is collapsed.
src/app/modules/report/juryduty/session/content.component.scss
View file @
e4dfae91
...
...
@@ -84,6 +84,14 @@
}
}
.m-juryDutySessionContent__entityVersion
{
padding-top
:
8px
;
a
{
cursor
:
pointer
;
}
}
.m-juryDutySessionContent__options
.m-btn
{
margin
:
16px
;
}
This diff is collapsed.
src/app/modules/report/juryduty/session/content.component.ts
View file @
e4dfae91
import
{
Component
,
Input
,
AfterViewInit
,
ViewChild
,
ElementRef
,
ChangeDetectorRef
,
}
from
'
@angular/core
'
;
import
{
OverlayModalService
}
from
'
../../../../services/ux/overlay-modal
'
;
import
{
Client
}
from
'
../../../../services/api
'
;
import
{
Session
}
from
'
../../../../services/session
'
;
import
{
REASONS
}
from
'
../../../../services/list-options
'
;
import
{
Component
,
Input
}
from
'
@angular/core
'
;
import
{
JurySessionService
}
from
'
./session.service
'
;
@
Component
({
...
...
@@ -19,6 +8,7 @@ import { JurySessionService } from './session.service';
export
class
JuryDutySessionContentComponent
{
@
Input
()
report
;
decided
:
boolean
=
false
;
showOriginal
:
boolean
=
true
;
constructor
(
private
sessionService
:
JurySessionService
)
{}
...
...
@@ -39,6 +29,10 @@ export class JuryDutySessionContentComponent {
return
friendlyString
;
}
toggleVersion
()
{
this
.
showOriginal
=
!
this
.
showOriginal
;
}
async
overturn
()
{
this
.
decided
=
true
;
await
this
.
sessionService
.
overturn
(
this
.
report
);
...
...
This diff is collapsed.
Please
register
or
sign in
to comment