added a new vulnerability plus completed the work info page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class WorkInfoController < ApplicationController
|
||||
|
||||
def index
|
||||
@user = current_user
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
class WorkInfo < ActiveRecord::Base
|
||||
attr_accessible :DoB, :SSN, :bonuses, :income, :user_id, :years_worked
|
||||
attr_accessible :DoB, :SSN, :bonuses, :income, :years_worked
|
||||
belongs_to :user
|
||||
|
||||
# We should probably use this
|
||||
def last_four
|
||||
"***-**-" << self.SSN[-4,4]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<div class="dashboard-wrapper">
|
||||
<div class="main-container">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="widget">
|
||||
<div class="widget-header">
|
||||
<div class="title">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span> Employee Information
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:16%">Full Name</th>
|
||||
<th style="width:16%">Income</th>
|
||||
<th style="width:16%">Bonuses</th>
|
||||
<th style="width:16%">Years w/ MetaCorp</th>
|
||||
<th style="width:16%">SSN</th>
|
||||
<th style="width:16%">DoB</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td><%= "#{@user.first_name} #{@user.last_name}" %></td>
|
||||
<td><%= @user.work_info.income %></td>
|
||||
<td><%= @user.work_info.bonuses %></td>
|
||||
<td><%= @user.work_info.years_worked %></td>
|
||||
<td><%= @user.work_info.SSN %></td>
|
||||
<td><%= @user.work_info.DoB %></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user