diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index fcbe9e6835..c46e62be12 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -717,11 +717,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Show Crew Manifest"
set category = "Ghost.Game" //CHOMPEdit
- var/dat
- dat += "
"
- dat += data_core.get_manifest(OOC = 1)
-
- //src << browse(dat, "window=manifest;size=370x420;can_close=1")
- var/datum/browser/popup = new(src, "Crew Manifest", "Crew Manifest", 370, 420, src)
- popup.set_content(dat)
- popup.open()
+ var/datum/tgui_module/crew_manifest/self_deleting/S = new(src)
+ S.tgui_interact(src)
/mob/new_player/Move()
return 0
diff --git a/code/modules/tgui/modules/crew_manifest.dm b/code/modules/tgui/modules/crew_manifest.dm
index 7c4daf7f2a..695e81191a 100644
--- a/code/modules/tgui/modules/crew_manifest.dm
+++ b/code/modules/tgui/modules/crew_manifest.dm
@@ -11,4 +11,14 @@
/datum/tgui_module/crew_manifest/robot
/datum/tgui_module/crew_manifest/robot/tgui_state(mob/user)
- return GLOB.tgui_self_state
\ No newline at end of file
+ return GLOB.tgui_self_state
+
+// Module that deletes itself when it's closed
+/datum/tgui_module/crew_manifest/self_deleting
+
+/datum/tgui_module/crew_manifest/self_deleting/tgui_close(mob/user)
+ . = ..()
+ qdel(src)
+
+/datum/tgui_module/crew_manifest/self_deleting/tgui_state(mob/user)
+ return GLOB.tgui_always_state
diff --git a/tgui/packages/tgui/interfaces/CrewManifest.tsx b/tgui/packages/tgui/interfaces/CrewManifest.tsx
index d814f14510..33cb57b42a 100644
--- a/tgui/packages/tgui/interfaces/CrewManifest.tsx
+++ b/tgui/packages/tgui/interfaces/CrewManifest.tsx
@@ -1,9 +1,8 @@
import { decodeHtmlEntities } from 'common/string';
-
-import { useBackend } from '../backend';
-import { Box, Section, Table } from '../components';
-import { COLORS } from '../constants';
-import { Window } from '../layouts';
+import { useBackend } from 'tgui/backend';
+import { COLORS } from 'tgui/constants';
+import { Window } from 'tgui/layouts';
+import { Box, Section, Table } from 'tgui-core/components';
/*
* Shared by the following templates (and used individually too)
@@ -40,43 +39,63 @@ export const CrewManifestContent = (props) => {
const { manifest } = data;
+ if (manifest.length === 0) {
+ return
No Manifest Data;
+ }
+
+ let crew_count = manifest
+ .map((val) => val.elems.length)
+ .reduce((a, c) => a + c, 0);
+ if (!crew_count) {
+ return
No Crew Detected;
+ }
+
return (
-
- {manifest.map(
- (cat) =>
- !!cat.elems.length && (
-
-
- {cat.cat}
-
-
- }
- key={cat.cat}
- >
-
+
+
+ {manifest.map(
+ (department) =>
+ !!department.elems.length && (
+ <>
+
+
+
+ {department.cat}
+
+ {/* This uses style={{ height }} to avoid being turned into REM and causing rounding errors */}
+
+
+
+
+
Name
Rank
Active
- {cat.elems.map((person) => (
+ {department.elems.map((person) => (
{decodeHtmlEntities(person.name)}
{person.rank}
{person.active}
))}
-
-
- ),
- )}
+ >
+ ),
+ )}
+
);
};