fixed some issue
This commit is contained in:
parent
8d2a3225fd
commit
5aa63ea6cd
|
@ -10,6 +10,7 @@ class MemberLog
|
||||||
field :excuse, localize: true
|
field :excuse, localize: true
|
||||||
field :finish, :type => Boolean, :default => false
|
field :finish, :type => Boolean, :default => false
|
||||||
field :checkout, :type => DateTime
|
field :checkout, :type => DateTime
|
||||||
|
field :dayoff, :type => Boolean, :default => false
|
||||||
|
|
||||||
belongs_to :member_profile
|
belongs_to :member_profile
|
||||||
has_many :dayoffs
|
has_many :dayoffs
|
||||||
|
|
|
@ -2,14 +2,17 @@
|
||||||
<tr id="<%= dom_id memberlog %>" class="with_action">
|
<tr id="<%= dom_id memberlog %>" class="with_action">
|
||||||
<td class="span2"><%= memberlog.member_profile.name rescue "" %></td>
|
<td class="span2"><%= memberlog.member_profile.name rescue "" %></td>
|
||||||
<td class="span2"><%= memberlog.created_at.strftime('%Y/%m/%d (%a)') %>
|
<td class="span2"><%= memberlog.created_at.strftime('%Y/%m/%d (%a)') %>
|
||||||
<td><%= memberlog.created_at.strftime('%R') %></td>
|
<% if memberlog.dayoff == true %>
|
||||||
<td>
|
<td><span class="badge badge-important"><%= t('memberlog.dayoff') %> </span></td>
|
||||||
<% if memberlog.finish == true %>
|
<% else %>
|
||||||
<%= memberlog.checkout.strftime('%R') %></td>
|
<td><%= memberlog.created_at.strftime('%R') %> <span class="icons-arrow-right-7"></span>
|
||||||
<% else %>
|
<% if memberlog.finish == true %>
|
||||||
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
<%= memberlog.checkout.strftime('%R') %></td>
|
||||||
<% end %>
|
<% else %>
|
||||||
</td>
|
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
<td class="span6">
|
<td class="span6">
|
||||||
<%= link_to memberlog.todo.html_safe, admin_memberlog_path(memberlog.id), :class => "modal-opener" %>
|
<%= link_to memberlog.todo.html_safe, admin_memberlog_path(memberlog.id), :class => "modal-opener" %>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
|
@ -33,7 +36,7 @@
|
||||||
<div id="<%= "#{memberlog.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
|
<div id="<%= "#{memberlog.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
|
||||||
<div>
|
<div>
|
||||||
<strong><%= t(:complete) %></strong> :
|
<strong><%= t(:complete) %></strong> :
|
||||||
<%= memberlog.complete%>
|
<%= memberlog.complete.html.safe %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="span1"><%= t('memberlog.staff') %></th>
|
<th class="span1"><%= t('memberlog.staff') %></th>
|
||||||
<th class="span3"><%= t('memberlog.date') %></th>
|
<th class="span3"><%= t('memberlog.date') %></th>
|
||||||
<th class="span2"><%= t('memberlog.checkin') %></th>
|
<th class="span2"><%= t('memberlog.check_in_out') %></th>
|
||||||
<th class="span2"><%= t('memberlog.checkout') %></th>
|
|
||||||
<th class="span2"><%= t('memberlog.todo') %></th>
|
<th class="span2"><%= t('memberlog.todo') %></th>
|
||||||
<th class="span5"><%= t('memberlog.excuse') %></th>
|
<th class="span5"><%= t('memberlog.excuse') %></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -32,15 +32,20 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= @memberlog.member_profile.name rescue "" %></td>
|
<td><%= @memberlog.member_profile.name rescue "" %></td>
|
||||||
<td><%= @memberlog.created_at.strftime('%Y-%m-%d %R') %></td>
|
<% if @memberlog.dayoff == true %>
|
||||||
<td>
|
<td><span class="badge badge-important"><%= t('memberlog.dayoff') %> </span></td>
|
||||||
<% if @memberlog.finish == true %>
|
<td></td>
|
||||||
<%= @memberlog.checkout.strftime('%Y-%m-%d %R') %>
|
<% else %>
|
||||||
<% else %>
|
<td><%= @memberlog.created_at.strftime('%Y-%m-%d %R') %></td>
|
||||||
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
<td>
|
||||||
<% end %>
|
<% if @memberlog.finish == true %>
|
||||||
</td>
|
<%= @memberlog.checkout.strftime('%Y-%m-%d %R') %>
|
||||||
|
<% else %>
|
||||||
|
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -37,8 +37,7 @@
|
||||||
<!-- <th><input type="checkbox" /></th> -->
|
<!-- <th><input type="checkbox" /></th> -->
|
||||||
<!-- <% end -%> -->
|
<!-- <% end -%> -->
|
||||||
<th class="span2"><%= t('memberlog.date') %></th>
|
<th class="span2"><%= t('memberlog.date') %></th>
|
||||||
<th class="span1"><%= t('memberlog.checkin') %></th>
|
<th class="span2"><%= t('memberlog.check_in_out') %></th>
|
||||||
<th class="span1"><%= t('memberlog.checkout') %></th>
|
|
||||||
<th class="span3"><%= t('memberlog.excuse') %></th>
|
<th class="span3"><%= t('memberlog.excuse') %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
<% @memberlogs.each do |memberlog| %>
|
<% @memberlogs.each do |memberlog| %>
|
||||||
<tr id="<%= dom_id memberlog %>">
|
<tr id="<%= dom_id memberlog %>">
|
||||||
<td>
|
<td>
|
||||||
<%= link_to memberlog.created_at.strftime('%Y-%m-%d (%a)'), admin_memberlog_path(memberlog.id), :data => {"target" => "#logModal", "toggle" => "modal"} %>
|
<%= link_to memberlog.created_at.strftime('%Y-%m-%d (%a)'), admin_memberlog_path(memberlog.id), :class => "modal-opener" %>
|
||||||
|
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
|
@ -57,18 +56,19 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><%= memberlog.created_at.strftime('%R') %></td>
|
<% if memberlog.dayoff == true %>
|
||||||
|
<td><span class="badge badge-important"><%= t('memberlog.dayoff') %> </span></td>
|
||||||
|
<% else %>
|
||||||
|
<td><%= memberlog.created_at.strftime('%R') %> <span class="icons-arrow-right-7"></span>
|
||||||
|
<% if memberlog.finish == true %>
|
||||||
|
<%= memberlog.checkout.strftime('%R') %></td>
|
||||||
|
<% else %>
|
||||||
|
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
<td>
|
<td>
|
||||||
<% if memberlog.finish == true %>
|
<span class="label label-important"><%= memberlog.excuse %></span>
|
||||||
<%= memberlog.checkout.strftime('%R') %></td>
|
|
||||||
<% else %>
|
|
||||||
<span class="label label-warning"><%= t('memberlog.working') %></span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<% if !memberlog.excuse.nil? %>
|
|
||||||
<span class="label label-important"><%= memberlog.excuse %></span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -14,3 +14,5 @@ en:
|
||||||
end_dayoff: End Dayoff
|
end_dayoff: End Dayoff
|
||||||
status: Status
|
status: Status
|
||||||
date: Date
|
date: Date
|
||||||
|
check_in_out: Check-In~Check-Out
|
||||||
|
dayoff: Day off
|
||||||
|
|
|
@ -14,3 +14,5 @@ zh_tw:
|
||||||
end_dayoff: 休假結束日期
|
end_dayoff: 休假結束日期
|
||||||
status: 狀態
|
status: 狀態
|
||||||
date: 出勤日期
|
date: 出勤日期
|
||||||
|
check_in_out: 上班時間~下班時間
|
||||||
|
dayoff: 休假
|
Loading…
Reference in New Issue