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, :created_by
%dd= show_user_link(@order.created_by)
%dt= heading_helper Order, :ends %dt= heading_helper Order, :ends
%dd= format_time(@order.ends) %dd= format_time(@order.ends)
// Pickup
- unless @order.pickup.blank?
%dt= heading_helper Order, :pickup %dt= heading_helper Order, :pickup
%dd= format_date(@order.pickup) %dd= format_date(@order.pickup)
// Min Order Quantity
- unless @order.stockit? or @order.supplier.min_order_quantity.blank? - unless @order.stockit? or @order.supplier.min_order_quantity.blank?
%dt= heading_helper Supplier, :min_order_quantity, short: true %dt= heading_helper Supplier, :min_order_quantity, short: true
%dd= @order.supplier.min_order_quantity %dd= @order.supplier.min_order_quantity
// Group Order Sum Amount
%dt= t 'group_orders.form.sum_amount' %dt= t 'group_orders.form.sum_amount'
%dd= number_to_currency @order.sum %dd= number_to_currency @order.sum
// Created By
%dt= heading_helper Order, :created_by
%dd= show_user_link(@order.created_by)
// Updated By
- unless @group_order.new_record? - unless @group_order.new_record?
%dt= heading_helper GroupOrder, :updated_by %dt= heading_helper GroupOrder, :updated_by
%dd %dd
= show_user(@group_order.updated_by) = show_user(@group_order.updated_by)
(#{format_time(@group_order.updated_on)}) (#{format_time(@group_order.updated_on)})
%dt= heading_helper Ordergroup, :account_balance // Closed By
%dd= number_to_currency(@ordering_data[:account_balance]) - if @order.closed?
- unless FoodsoftConfig[:charge_members_manually] %dt= heading_helper Order, :closed_by
%dt= heading_helper Ordergroup, :available_funds %dd= show_user_link @order.updated_by
%dd= number_to_currency(@ordering_data[:available_funds]) // 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)