From 4b97cd530e13b9ae7189ccbec1e95d9c2139201c Mon Sep 17 00:00:00 2001 From: Zin Lin Phyo Date: Tue, 29 Aug 2017 23:05:03 +0630 Subject: [PATCH] commission report export excel --- .idea/sxrestaurant.iml | 1 + .idea/workspace.xml | 241 +++++++----------- .../reports/commission_controller.rb | 10 +- .../_commission_report_filter.html.erb | 46 ++-- dump.rdb | Bin 741 -> 742 bytes 5 files changed, 139 insertions(+), 159 deletions(-) diff --git a/.idea/sxrestaurant.iml b/.idea/sxrestaurant.iml index 7db49a58..6c1240f7 100644 --- a/.idea/sxrestaurant.iml +++ b/.idea/sxrestaurant.iml @@ -52,6 +52,7 @@ + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e3687c57..1c0d6110 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,18 +5,8 @@ - - - - - - - - - - @@ -58,10 +48,10 @@ - + - + @@ -82,34 +72,21 @@ - + - - + + - - - - - - - - - - - - - - - + + @@ -125,36 +102,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -189,7 +136,6 @@ @@ -264,10 +211,9 @@ - @@ -336,6 +282,21 @@ + + + + + + + + + + + + + + + + <% if @daterange %> + + <% else %> + + <% end %>
+
+ +
<% end %> @@ -35,21 +46,26 @@ placeholder: 'Select Commissioner' }); + $('#clear_filter').click(function () { + $('#daterange').val(''); + $('#commissioner').val('').text(''); + }); + $('input[name="daterange"]').daterangepicker({ - autoUpdateInput: false, - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - 'Last 7 Days': [moment().subtract(6, 'days'), moment()], - 'Last 30 Days': [moment().subtract(29, 'days'), moment()], - 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + autoUpdateInput: false, + ranges: { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + }, + locale: { + format: 'YYYY-MM-DD' + } }, - locale: { - format: 'YYYY-MM-DD' - } - }, - function(start, end, label) { + function (start, end, label) { $('input[name="daterange"]').val(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD')); }); diff --git a/dump.rdb b/dump.rdb index 569086721543bccef2d9a99dfea5def07e5e1b65..dfef99fa9e38d3f64010e723188ff089a36840af 100644 GIT binary patch delta 76 zcmV-S0JHz)1?B~iFc@K%rCIt2b#rB8Ep26O!f@af0R8~`4*`*X7qMSo0R&()*eIjq(>$MjJ=~ delta 75 zcmV-R0JQ(+1?2^hFc@%IrCIt2b#rB8Ep26O!a%4Q0R8~`4*`*X7qMSo0R+B7<}I_r h0SN&b5HU3{G%zqYH8nUcIW#gdHviTV*MILVLMkk88n*xd