wip: rework group order details

tried to reduce the amount of informations shown. but needs some user feedback, what information are actually relevant
This commit is contained in:
Philipp Rothmann 2023-02-22 11:32:30 +01:00
parent 657b3e63bc
commit a0d62f7948

View file

@ -1,28 +1,62 @@
%a(href='#tab1' data-toggle="collapse") %dl.dl-horizontal
=t '.details' // GENERAL ORDER DETAILS FOR ALL
#tab1.collapse // Name
%dl.dl-horizontal %dt= heading_helper Order, :name
- unless @order.note.blank? %dd= @order.name
%dt= heading_helper Order, :note // Order Ends
%dd= @order.note %dt= heading_helper Order, :ends
%dt= heading_helper Order, :created_by %dd= format_time(@order.ends)
%dd= show_user_link(@order.created_by) // Pickup
%dt= heading_helper Order, :ends - unless @order.pickup.blank?
%dd= format_time(@order.ends)
%dt= heading_helper Order, :pickup %dt= heading_helper Order, :pickup
%dd= format_date(@order.pickup) %dd= format_date(@order.pickup)
- unless @order.stockit? or @order.supplier.min_order_quantity.blank? // Min Order Quantity
%dt= heading_helper Supplier, :min_order_quantity, short: true - unless @order.stockit? or @order.supplier.min_order_quantity.blank?
%dd= @order.supplier.min_order_quantity %dt= heading_helper Supplier, :min_order_quantity, short: true
%dt= t 'group_orders.form.sum_amount' %dd= @order.supplier.min_order_quantity
%dd= number_to_currency @order.sum // Group Order Sum Amount
- unless @group_order.new_record? %dt= t 'group_orders.form.sum_amount'
%dt= heading_helper GroupOrder, :updated_by %dd= number_to_currency @order.sum
%dd // Created By
= show_user(@group_order.updated_by) %dt= heading_helper Order, :created_by
(#{format_time(@group_order.updated_on)}) %dd= show_user_link(@order.created_by)
%dt= heading_helper Ordergroup, :account_balance // Updated By
%dd= number_to_currency(@ordering_data[:account_balance]) - unless @group_order.new_record?
- unless FoodsoftConfig[:charge_members_manually] %dt= heading_helper GroupOrder, :updated_by
%dt= heading_helper Ordergroup, :available_funds %dd
%dd= number_to_currency(@ordering_data[:available_funds]) = show_user(@group_order.updated_by)
(#{format_time(@group_order.updated_on)})
// Closed By
- if @order.closed?
%dt= heading_helper Order, :closed_by
%dd= show_user_link @order.updated_by
// Note
- unless @order.note.blank?
%dt= heading_helper Order, :note
%dd= @order.note
-# // YOUR ORDER DETAILS
-# // TODO What do users want to see here?
-# %dl.dl-horizontal
-# // YOUR CREDIT
-# - if @ordering_data
-# %dt= heading_helper Ordergroup, :account_balance
-# %dd= number_to_currency(@ordering_data[:account_balance])
-# - unless FoodsoftConfig[:charge_members_manually]
-# %dt= heading_helper Ordergroup, :available_funds
-# %dd= number_to_currency(@ordering_data[:available_funds])
-# // Price of this order
-# %dt= heading_helper GroupOrder, :price
-# %dd
-# - if @group_order
-# = number_to_currency(@group_order.price)
-# - else
-# = t '.not_ordered'
-# // Order Transport Costs
-# - if @group_order && @group_order.transport
-# %dt= heading_helper GroupOrder, :transport
-# %dd= number_to_currency(@group_order.transport)
-# %dt= heading_helper GroupOrder, :total
-# %dd= number_to_currency(@group_order.total)