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 'order_by' => '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,
52 my $installer_sub = sub {
53 my $access_user = shift;
54 my @sched_item = $access_user->sched_item or return '';
55 $sched_item[0]->disabled ? '(disabled)' : 'Installer';
59 my $access_user = shift;
60 $access_user->user_custnum ? $access_user->user_cust_main->name : '';
62 my $cust_link = [ $p.'view/cust_main.cgi?custnum=', 'user_custnum' ];
64 my $count_query = 'SELECT COUNT(*) FROM access_user';
66 my $link = [ $p.'edit/access_user.html?', 'usernum' ];
69 'Username', 'Full name', 'Groups', 'Installer', 'Customer' );
71 'username', 'name', $groups_sub, $installer_sub, $cust_sub, );
73 my @links = ( $link, $link, $link, '', '', $cust_link );
75 #if ( FS::Conf->new->config('ticket_system') ) {
76 # push @header, 'Ticketing';
78 # my $access_user = shift;