1
0
Эх сурвалжийг харах

Added member name on member detail page

Key Networks 7 жил өмнө
parent
commit
06caa458d8

+ 3 - 0
src/controllers/networkController.js

@@ -410,6 +410,9 @@ exports.member_detail = async function(req, res) {
   try {
     const network = await zt.network_detail(req.params.nwid);
     const member = await zt.member_detail(req.params.nwid, req.params.id);
+    const name = await storage.getItem(member.id);
+    if (!name) name = '';
+    member.name = name;
     nav.whence = '/controller/network/' + network.nwid + '/members';
     res.render('member_detail', {title: 'Network member detail', nav: nav, network: network, member: member});
   } catch (err) {

+ 1 - 2
src/views/member_detail.pug

@@ -6,8 +6,7 @@
 extends network_layout
 
 block net_content
-  h4 for member
-    a(href= member.address)  #{member.address}
+  h4 for member #{member.name} (#{member.address})
 
   each value, key in member
     .row