1 <% include( 'elements/browse.html',
2 'title' => 'Employees',
3 'menubar' => [ 'View Employee groups' => $p.'browse/access_group.html', ],
4 'html_init' => $html_init,
7 'disabled_statuspos' => 2,
8 'query' => { 'table' => 'access_user',
10 'extra_sql' => 'ORDER BY last, first'
12 'count_query' => $count_query,
22 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
25 "Employees have access to the back-office interface. Typically, this is your employees and contractors. In a virtualized setup, you can also add accounts for your reseller's employees.<BR><BR>It is <B>highly recommended</B> to add a <B>separate account for each person</B> rather than using role accounts.<BR><BR>".
26 qq!<A HREF="${p}edit/access_user.html"><I>Add an employee</I></A><BR><BR>!;
28 #false laziness w/access_group.html & agent_type.cgi
29 my $groups_sub = sub {
30 my $access_user = shift;
33 my $access_usergroup = $_;
34 my $access_group = $access_usergroup->access_group;
37 'data' => $access_group->groupname,
40 $p. 'edit/access_group.html?'. $access_usergroup->groupnum,
44 grep { $_->access_group # and ! $_->access_group->disabled
46 $access_user->access_usergroup,
53 my $access_user = shift;
54 $access_user->user_custnum ? $access_user->user_cust_main->name : '';
56 my $cust_link = [ $p.'view/cust_main.cgi?custnum=', 'user_custnum' ];
58 my $count_query = 'SELECT COUNT(*) FROM access_user';
60 my $link = [ $p.'edit/access_user.html?', 'usernum' ];
62 my @header = ( '#', 'Username', 'Full name', 'Groups', 'Customer' );
63 my @fields = ( 'usernum', 'username', 'name', $groups_sub, $cust_sub, );
65 my @links = ( $link, $link, $link, '', $cust_link );
67 #if ( FS::Conf->new->config('ticket_system') ) {
68 # push @header, 'Ticketing';
70 # my $access_user = shift;