Skip to content

Commit

Permalink
Show more location info on violation in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
hkdobrev committed Apr 2, 2023
1 parent c2431af commit d934068
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions src/components/modules/violations/ViolationDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ export default (props) => {
</tbody>
</TableStyle>
<hr />
{!data.section ? null : (
{data.section ? (
<div>
<h2>Информация за секция</h2>
<h2>Секция</h2>
<TableStyle>
<tbody>
<tr>
Expand All @@ -436,7 +436,19 @@ export default (props) => {
</tr>
<tr>
<td>Град</td>
<td>{data.town.name}</td>
<td>
{data.town.name},{' '}
{data.town.municipality
? `община ${data.town.municipality.name}`
: `${data.town.country.name}`}
</td>
</tr>
<tr>
<td>MИР</td>
<td>
{data.section?.electionRegion?.name ||
data.town.municipality?.electionRegions[0].name}
</td>
</tr>
<tr>
<td>Локация</td>
Expand All @@ -446,6 +458,31 @@ export default (props) => {
</TableStyle>
<hr />
</div>
) : (
<div>
<h2>Град</h2>
<TableStyle>
<tbody>
<tr>
<td>Град</td>
<td>
{data.town.name},{' '}
{data.town.municipality
? `община ${data.town.municipality.name}`
: `${data.town.country.name}`}
</td>
</tr>
<tr>
<td>MИР</td>
<td>
{data.section?.electionRegion?.name ||
data.town.municipality?.electionRegions[0].name}
</td>
</tr>
</tbody>
</TableStyle>
<hr />
</div>
)}
<h2>История</h2>
<div
Expand Down

0 comments on commit d934068

Please sign in to comment.