Skip to content

Commit 2fde3be

Browse files
committed
Added location to admin
1 parent 949559b commit 2fde3be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/serverAdmin/components/ChurchesTab.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export const ChurchesTab = () => {
2828
setChurches(tmpChurches);
2929
};
3030

31+
const getLocation = (church: ChurchInterface) => {
32+
const parts = [church.city, church.state, church.country].filter(part => part && part.trim());
33+
return parts.length > 0 ? parts.join(", ") : "-";
34+
};
35+
3136
const getChurchRows = () => {
3237
console.log("getChurchRows");
3338
if (churches === null) return;
@@ -55,6 +60,7 @@ export const ChurchesTab = () => {
5560
result.push(
5661
<tr key={index}>
5762
<td>{getManageAccessLink(c)}</td>
63+
<td>{getLocation(c)}</td>
5864
<td>{DateHelper.prettyDate(DateHelper.toDate(c.registrationDate))}</td>
5965
<td>{activeLink}</td>
6066
</tr>
@@ -63,6 +69,7 @@ export const ChurchesTab = () => {
6369
result.unshift(
6470
<tr>
6571
<th>{Locale.label("serverAdmin.adminPage.church")}</th>
72+
<th>Location</th>
6673
<th>{Locale.label("serverAdmin.adminPage.regist")}</th>
6774
<th>{Locale.label("serverAdmin.adminPage.act")}</th>
6875
</tr>

0 commit comments

Comments
 (0)