Add break to ordergroup
In some foodcoops it is possible that ordergroups make a break. During that they e.g. pay reduced or no membership fees and do not need to do work for the foodcoop. This new fields make this visible to all members.
This commit is contained in:
parent
14e2fd179e
commit
253512eb51
7 changed files with 26 additions and 0 deletions
|
|
@ -5,6 +5,8 @@
|
|||
= f.input :contact_person
|
||||
= f.input :contact_phone
|
||||
= f.input :contact_address
|
||||
= f.input :break_start, as: :date_picker
|
||||
= f.input :break_end, as: :date_picker
|
||||
- if FoodsoftConfig[:use_apple_points]
|
||||
= f.input :ignore_apple_restriction, :label => false, :inline_label => true
|
||||
= render 'shared/group_form_fields', f: f, captured: captured
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
%tr
|
||||
%th= heading_helper Ordergroup, :name
|
||||
%th= heading_helper Ordergroup, :user_tokens
|
||||
%th= heading_helper Ordergroup, :break
|
||||
%th= heading_helper Ordergroup, :last_user_activity
|
||||
%th= heading_helper Ordergroup, :last_order
|
||||
|
||||
|
|
@ -15,5 +16,9 @@
|
|||
%tr
|
||||
%td= ordergroup.name
|
||||
%td=h ordergroup.users.collect { |u| show_user(u) }.join(", ")
|
||||
- if ordergroup.break_start? or ordergroup.break_end?
|
||||
%td= raw t '.break', start: format_date(ordergroup.break_start), end: format_date(ordergroup.break_end)
|
||||
- else
|
||||
%td
|
||||
%td= format_date ordergroup.last_user_activity
|
||||
%td= format_date ordergroup.last_order.try(:starts)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
%dd=h group.contact
|
||||
%dt= heading_helper(Ordergroup, :contact_address) + ':'
|
||||
%dd= link_to_gmaps group.contact_address
|
||||
%dt= heading_helper(Ordergroup, :break) + ':'
|
||||
- if group.break_start? or group.break_end?
|
||||
%dd= raw t '.break', start: format_date(group.break_start), end: format_date(group.break_end)
|
||||
- if group.is_a?(Workgroup)
|
||||
%dt= t('.access') + ':'
|
||||
%dd= format_roles(group)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue