Only show drafts to dispatchers #28
This commit is contained in:
@@ -70,7 +70,7 @@ export const SituationBoard = () => {
|
||||
{/* head */}
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>E-Nr.</th>
|
||||
<th>Stichwort</th>
|
||||
<th>Stadt</th>
|
||||
<th>Stationen</th>
|
||||
@@ -78,39 +78,42 @@ export const SituationBoard = () => {
|
||||
</thead>
|
||||
<tbody>
|
||||
{/* row 1 */}
|
||||
{missions?.map((mission) => (
|
||||
<tr
|
||||
onDoubleClick={() => {
|
||||
setOpenMissionMarker({
|
||||
open: [
|
||||
{
|
||||
id: mission.id,
|
||||
tab: "home",
|
||||
},
|
||||
],
|
||||
close: [],
|
||||
});
|
||||
setMap({
|
||||
center: {
|
||||
lat: mission.addressLat,
|
||||
lng: mission.addressLng,
|
||||
},
|
||||
zoom: 14,
|
||||
});
|
||||
}}
|
||||
key={mission.id}
|
||||
className={cn(mission.state === "draft" && "bg-base-300")}
|
||||
>
|
||||
<td>{mission.publicId}</td>
|
||||
<td>{mission.missionKeywordAbbreviation}</td>
|
||||
<td>{mission.addressCity}</td>
|
||||
<td>
|
||||
{(mission as any).MissionsOnStations?.map(
|
||||
(mos: { Station: Station }) => mos.Station?.bosCallsignShort,
|
||||
).join(", ")}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{missions?.map(
|
||||
(mission) =>
|
||||
(dispatcherConnected || mission.state !== "draft") && (
|
||||
<tr
|
||||
onDoubleClick={() => {
|
||||
setOpenMissionMarker({
|
||||
open: [
|
||||
{
|
||||
id: mission.id,
|
||||
tab: "home",
|
||||
},
|
||||
],
|
||||
close: [],
|
||||
});
|
||||
setMap({
|
||||
center: {
|
||||
lat: mission.addressLat,
|
||||
lng: mission.addressLng,
|
||||
},
|
||||
zoom: 14,
|
||||
});
|
||||
}}
|
||||
key={mission.id}
|
||||
className={cn(mission.state === "draft" && "missionListItem")}
|
||||
>
|
||||
<td>{mission.publicId}</td>
|
||||
<td>{mission.missionKeywordAbbreviation}</td>
|
||||
<td>{mission.addressCity}</td>
|
||||
<td>
|
||||
{(mission as any).MissionsOnStations?.map(
|
||||
(mos: { Station: Station }) => mos.Station?.bosCallsignShort,
|
||||
).join(", ")}
|
||||
</td>
|
||||
</tr>
|
||||
),
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user