vyapari 0.1.4 → 0.1.5dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/vyapari/sample_stock_bundle.csv +1 -0
- data/app/controllers/vyapari/admin/base_controller.rb +10 -0
- data/app/controllers/vyapari/admin/brands_controller.rb +99 -0
- data/app/controllers/vyapari/admin/categories_controller.rb +115 -0
- data/app/controllers/vyapari/admin/countries_controller.rb +2 -2
- data/app/controllers/vyapari/admin/dashboard_controller.rb +3 -1
- data/app/controllers/vyapari/admin/exchange_rates_controller.rb +2 -2
- data/app/controllers/vyapari/admin/products_controller.rb +79 -0
- data/app/controllers/vyapari/admin/regions_controller.rb +1 -1
- data/app/controllers/vyapari/admin/resource_controller.rb +1 -0
- data/app/controllers/vyapari/admin/stores_controller.rb +67 -0
- data/app/controllers/vyapari/admin/suppliers_controller.rb +67 -0
- data/app/controllers/vyapari/admin/terminals_controller.rb +150 -0
- data/app/controllers/vyapari/application_controller.rb +12 -0
- data/app/controllers/vyapari/store_manager/base_controller.rb +28 -0
- data/app/controllers/vyapari/store_manager/dashboard_controller.rb +30 -0
- data/app/controllers/vyapari/store_manager/resource_controller.rb +17 -0
- data/app/controllers/vyapari/store_manager/stock_bundles_controller.rb +206 -0
- data/app/controllers/vyapari/store_manager/stock_entries_controller.rb +161 -0
- data/app/controllers/vyapari/terminal_staff/base_controller.rb +29 -0
- data/app/controllers/vyapari/terminal_staff/dashboard_controller.rb +29 -0
- data/app/controllers/vyapari/terminal_staff/invoices_controller.rb +138 -0
- data/app/controllers/vyapari/terminal_staff/line_items_controller.rb +123 -0
- data/app/controllers/vyapari/terminal_staff/resource_controller.rb +17 -0
- data/app/controllers/vyapari/user_dashboard_controller.rb +31 -0
- data/app/models/brand.rb +63 -10
- data/app/models/category.rb +60 -16
- data/app/models/country.rb +27 -5
- data/app/models/exchange_rate.rb +31 -6
- data/app/models/image/brand_image.rb +3 -0
- data/app/models/image/category_image.rb +3 -0
- data/app/models/image/product_image.rb +3 -0
- data/app/models/invoice.rb +223 -0
- data/app/models/line_item.rb +206 -0
- data/app/models/product.rb +67 -13
- data/app/models/region.rb +26 -3
- data/app/models/stock_bundle.rb +249 -0
- data/app/models/stock_entry.rb +271 -0
- data/app/models/store.rb +216 -0
- data/app/models/supplier.rb +85 -0
- data/app/models/terminal.rb +158 -0
- data/app/models/vyapari/application_record.rb +4 -0
- data/app/uploaders/brand_image_uploader.rb +14 -0
- data/app/uploaders/category_image_uploader.rb +14 -0
- data/app/uploaders/product_image_uploader.rb +14 -0
- data/app/uploaders/stock_bundle_uploader.rb +10 -0
- data/app/views/layouts/kuppayam/_footer.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +45 -44
- data/app/views/layouts/vyapari/_store_manager_menu.html.erb +107 -0
- data/app/views/layouts/vyapari/_terminal_staff_menu.html.erb +103 -0
- data/app/views/layouts/vyapari/store_manager.html.erb +112 -0
- data/app/views/layouts/vyapari/terminal_staff.html.erb +116 -0
- data/app/views/vyapari/admin/brands/_form.html.erb +23 -0
- data/app/views/vyapari/admin/brands/_index.html.erb +89 -0
- data/app/views/vyapari/admin/brands/_row.html.erb +63 -0
- data/app/views/vyapari/admin/brands/_show.html.erb +104 -0
- data/app/views/vyapari/admin/brands/index.html.erb +48 -0
- data/app/views/vyapari/admin/categories/_form.html.erb +28 -0
- data/app/views/vyapari/admin/categories/_index.html.erb +101 -0
- data/app/views/vyapari/admin/categories/_row.html.erb +69 -0
- data/app/views/vyapari/admin/categories/_show.html.erb +115 -0
- data/app/views/vyapari/admin/{users → categories}/index.html.erb +8 -24
- data/app/views/vyapari/admin/countries/_index.html.erb +1 -1
- data/app/views/vyapari/admin/countries/index.html.erb +19 -3
- data/app/views/vyapari/admin/exchange_rates/_form.html.erb +3 -4
- data/app/views/vyapari/admin/exchange_rates/_index.html.erb +7 -7
- data/app/views/vyapari/admin/exchange_rates/_row.html.erb +3 -3
- data/app/views/vyapari/admin/exchange_rates/_show.html.erb +1 -0
- data/app/views/vyapari/admin/exchange_rates/index.html.erb +19 -3
- data/app/views/vyapari/admin/products/_form.html.erb +32 -0
- data/app/views/vyapari/admin/products/_index.html.erb +58 -0
- data/app/views/vyapari/admin/products/_row.html.erb +30 -0
- data/app/views/vyapari/admin/products/_show.html.erb +81 -0
- data/app/views/vyapari/admin/products/index.html.erb +48 -0
- data/app/views/vyapari/admin/regions/_index.html.erb +1 -1
- data/app/views/vyapari/admin/regions/index.html.erb +19 -3
- data/app/views/vyapari/admin/stores/_form.html.erb +37 -0
- data/app/views/vyapari/admin/stores/_index.html.erb +84 -0
- data/app/views/vyapari/admin/stores/_row.html.erb +55 -0
- data/app/views/vyapari/admin/stores/_show.html.erb +110 -0
- data/app/views/vyapari/admin/stores/index.html.erb +48 -0
- data/app/views/vyapari/admin/suppliers/_form.html.erb +32 -0
- data/app/views/vyapari/admin/suppliers/_index.html.erb +58 -0
- data/app/views/vyapari/admin/suppliers/_row.html.erb +30 -0
- data/app/views/vyapari/admin/suppliers/_show.html.erb +81 -0
- data/app/views/vyapari/admin/suppliers/index.html.erb +48 -0
- data/app/views/vyapari/admin/terminals/_form.html.erb +24 -0
- data/app/views/vyapari/admin/terminals/_index.html.erb +75 -0
- data/app/views/vyapari/admin/terminals/_row.html.erb +49 -0
- data/app/views/vyapari/admin/terminals/_show.html.erb +74 -0
- data/app/views/vyapari/store_manager/dashboard/index.html.erb +93 -0
- data/app/views/vyapari/store_manager/stock_bundles/_form.html.erb +99 -0
- data/app/views/vyapari/store_manager/stock_bundles/_index.html.erb +74 -0
- data/app/views/vyapari/store_manager/stock_bundles/_row.html.erb +44 -0
- data/app/views/vyapari/store_manager/stock_bundles/_show.html.erb +110 -0
- data/app/views/vyapari/store_manager/stock_bundles/create.html.erb +57 -0
- data/app/views/vyapari/store_manager/stock_bundles/index.html.erb +36 -0
- data/app/views/vyapari/store_manager/stock_bundles/update.html.erb +57 -0
- data/app/views/vyapari/store_manager/stock_entries/_form.html.erb +50 -0
- data/app/views/vyapari/store_manager/stock_entries/_index.html.erb +80 -0
- data/app/views/vyapari/store_manager/stock_entries/_row.html.erb +33 -0
- data/app/views/vyapari/store_manager/stock_entries/_show.html.erb +110 -0
- data/app/views/vyapari/store_manager/stock_entries/_stock_bundle.html.erb +61 -0
- data/app/views/vyapari/store_manager/stock_entries/index.html.erb +45 -0
- data/app/views/vyapari/terminal_staff/dashboard/_counts.html.erb +88 -0
- data/app/views/vyapari/terminal_staff/dashboard/_invoices.html.erb +37 -0
- data/app/views/vyapari/terminal_staff/dashboard/index.html.erb +36 -0
- data/app/views/vyapari/terminal_staff/invoices/_draft.html.erb +62 -0
- data/app/views/vyapari/terminal_staff/invoices/_form.html.erb +120 -0
- data/app/views/vyapari/terminal_staff/invoices/_index.html.erb +64 -0
- data/app/views/vyapari/terminal_staff/invoices/_row.html.erb +33 -0
- data/app/views/vyapari/terminal_staff/invoices/_show.html.erb +171 -0
- data/app/views/vyapari/terminal_staff/invoices/index.html.erb +37 -0
- data/app/views/vyapari/terminal_staff/invoices/new.js.erb +13 -0
- data/app/views/vyapari/terminal_staff/invoices/show.html.erb +1 -0
- data/app/views/vyapari/terminal_staff/line_items/_form.html.erb +40 -0
- data/app/views/vyapari/terminal_staff/line_items/_index.html.erb +94 -0
- data/app/views/vyapari/terminal_staff/line_items/create.js.erb +34 -0
- data/app/views/vyapari/terminal_staff/line_items/destroy.js.erb +25 -0
- data/app/views/vyapari/terminal_staff/stores/index.html.erb +24 -0
- data/app/views/vyapari/user_dashboard/index.html.erb +51 -0
- data/config/routes.rb +62 -5
- data/db/import_data/brands.csv +7 -0
- data/db/import_data/categories.csv +12 -0
- data/db/import_data/countries.csv +1 -0
- data/db/import_data/dummy/brands.csv +7 -0
- data/db/import_data/dummy/categories.csv +12 -0
- data/db/import_data/dummy/countries.csv +1 -0
- data/db/import_data/dummy/exchange_rates.csv +5 -0
- data/db/import_data/dummy/products-copy.csv +1 -0
- data/db/import_data/dummy/products.csv +1 -0
- data/db/import_data/dummy/products.xlsx +0 -0
- data/db/import_data/dummy/regions.csv +13 -0
- data/db/import_data/dummy/stores.csv +10 -0
- data/db/import_data/dummy/suppliers.csv +14 -0
- data/db/import_data/dummy/terminals.csv +11 -0
- data/db/import_data/exchange_rates.csv +5 -0
- data/db/import_data/regions.csv +13 -0
- data/db/import_data/stores.csv +3 -0
- data/db/import_data/suppliers.csv +14 -0
- data/db/import_data/terminals.csv +3 -0
- data/db/migrate/20170000000200_create_exchange_rates.rb +3 -2
- data/db/migrate/20170000000203_create_contacts.rb +22 -0
- data/db/migrate/20170000000204_create_bank_accounts.rb +21 -0
- data/db/migrate/20170000000205_create_suppliers.rb +18 -0
- data/db/migrate/20170000000206_create_stores.rb +21 -0
- data/db/migrate/20170000000207_create_terminals.rb +18 -0
- data/db/migrate/20170000000210_create_brands.rb +14 -0
- data/db/migrate/20170000000211_create_categories.rb +22 -0
- data/db/migrate/20170000000212_create_products.rb +29 -0
- data/db/migrate/20170000000213_create_invoices.rb +58 -0
- data/db/migrate/20170000000215_create_stock_bundles.rb +17 -0
- data/db/migrate/20170000000216_create_stock_entries.rb +20 -0
- data/db/sample_reports/products.xlsx +0 -0
- data/lib/tasks/vyapari/all.rake +73 -0
- data/lib/vyapari/version.rb +1 -1
- metadata +150 -15
- data/app/controllers/vyapari/admin/users_controller.rb +0 -130
- data/app/views/vyapari/admin/users/_form.html.erb +0 -39
- data/app/views/vyapari/admin/users/_index.html.erb +0 -101
- data/app/views/vyapari/admin/users/_row.html.erb +0 -72
- data/app/views/vyapari/admin/users/_show.html.erb +0 -199
- data/lib/tasks/vyapari_tasks.rake +0 -4
@@ -1,199 +0,0 @@
|
|
1
|
-
<div id="div_user_show">
|
2
|
-
<% status_hash = {approved: "success", pending: "default", suspended: "danger"} %>
|
3
|
-
|
4
|
-
<div class="row">
|
5
|
-
|
6
|
-
<div class="col-md-3 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
7
|
-
|
8
|
-
<%= edit_image(@user,
|
9
|
-
"profile_picture.image.large.url",
|
10
|
-
upload_image_link(@user, :profile_picture, nil ),
|
11
|
-
remove_image_link(@user, :profile_picture, nil ),
|
12
|
-
image_options: {assoc_name: :profile_picture }) %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<div class="col-md-6 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
16
|
-
|
17
|
-
<div class="visible-sm visible-xs mt-50"></div>
|
18
|
-
|
19
|
-
<%= theme_panel_heading(@user.name) %>
|
20
|
-
<%= theme_panel_sub_heading(@user.designation, "#") if @user.designation %>
|
21
|
-
|
22
|
-
<%= clear_tag(10) %>
|
23
|
-
|
24
|
-
<span class="ml-5 mt-5 label label-<%= status_hash[@user.status.to_sym] %>"><%= @user.status.titleize %></span>
|
25
|
-
|
26
|
-
<% if @user.super_admin %>
|
27
|
-
<span class="mr-10 mt-5 label label-warning">Super Admin</span>
|
28
|
-
<% else %>
|
29
|
-
<span class="mr-10 mt-5 label label-default">Normal</span>
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<%= clear_tag(10) %>
|
33
|
-
|
34
|
-
<!-- <div class="mt-20" style="max-width: 100%;overflow: auto;max-height: 500px;">
|
35
|
-
<%#= raw(@user.biography) %>
|
36
|
-
</div> -->
|
37
|
-
|
38
|
-
<div class="visible-sm visible-xs mb-50"></div>
|
39
|
-
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<div class="col-md-3 col-sm-12 col-xs-12">
|
43
|
-
|
44
|
-
<% edit_link = edit_admin_user_path(id: @user.id) %>
|
45
|
-
<% delete_link = admin_user_path(id: @user.id) %>
|
46
|
-
|
47
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit User"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @user.can_be_edited? %>
|
48
|
-
|
49
|
-
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, role: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @user.can_be_deleted? && (@current_user != @user) %>
|
50
|
-
|
51
|
-
<% if @current_user.super_admin? %>
|
52
|
-
|
53
|
-
<%= link_to raw("<i class=\"linecons-paper-plane\"></i> Masquerade"), masquerade_admin_user_path(@user), method: :put, data: { confirm: "Are you sure? Do you really want to logout current session and login as #{@user.name}?" }, class: "btn btn-block btn-gray btn-only-hover" if @current_user != @user %>
|
54
|
-
|
55
|
-
<!-- Remove Super Admin -->
|
56
|
-
<%= link_to raw("<i class=\"fa fa-remove mr-5\"></i> Remove Super Admin"), remove_super_admin_admin_user_path(id: @user.id), method: :put, :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @user.super_admin? && (@current_user != @user) %>
|
57
|
-
|
58
|
-
<!-- Make Super Admin -->
|
59
|
-
<%= link_to raw("<i class=\"fa fa-plus-square mr-5\"></i> Make Super Admin"), make_super_admin_admin_user_path(id: @user.id), method: :put, remote: true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-gray btn-only-hover" unless @user.super_admin? %>
|
60
|
-
|
61
|
-
<% end %>
|
62
|
-
|
63
|
-
<!-- Approve -->
|
64
|
-
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Approve"), update_status_admin_user_path(:id =>@user.id, :status =>'approved'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-success btn-only-hover" if @user.can_be_approved? %>
|
65
|
-
|
66
|
-
<!-- Mark as Pending -->
|
67
|
-
<%= link_to raw("<i class=\"fa fa-circle mr-5\"></i> Mark as Pending"), update_status_admin_user_path(:id =>@user.id, :status =>'pending'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-gray btn-only-hover" if @user.can_be_marked_as_pending? && (@current_user != @user) %>
|
68
|
-
|
69
|
-
<!-- Suspend -->
|
70
|
-
<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Suspend"), update_status_admin_user_path(:id =>@user.id, :status =>'suspended'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"btn btn-block btn-danger btn-only-hover" if @user.can_be_suspended? && (@current_user != @user) %>
|
71
|
-
|
72
|
-
<div class="visible-sm visible-xs mb-50"></div>
|
73
|
-
|
74
|
-
</div>
|
75
|
-
|
76
|
-
</div>
|
77
|
-
|
78
|
-
<%= clear_tag(50) %>
|
79
|
-
|
80
|
-
<ul class="nav nav-pills">
|
81
|
-
<li class="active">
|
82
|
-
<a href="#user_details" data-toggle="tab" aria-expanded="true">
|
83
|
-
<span class="visible-xs"><i class="fa-info"></i></span>
|
84
|
-
<span class="hidden-xs">User Details</span>
|
85
|
-
</a>
|
86
|
-
</li>
|
87
|
-
<li class="">
|
88
|
-
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
89
|
-
<span class="visible-xs"><i class="fa-database"></i></span>
|
90
|
-
<span class="hidden-xs">Technical Details</span>
|
91
|
-
</a>
|
92
|
-
</li>
|
93
|
-
</ul>
|
94
|
-
|
95
|
-
<div class="tab-content">
|
96
|
-
<div class="tab-pane active" id="user_details">
|
97
|
-
|
98
|
-
<%= clear_tag(20) %>
|
99
|
-
|
100
|
-
<div class="table-responsive mt-30">
|
101
|
-
<table class="table table-striped table-condensed table-bordered">
|
102
|
-
<tbody>
|
103
|
-
|
104
|
-
<tr>
|
105
|
-
<th>Username</th><td><%= @user.username %></td>
|
106
|
-
<th>Email</th><td><%= @user.email %></td>
|
107
|
-
</tr>
|
108
|
-
|
109
|
-
<tr>
|
110
|
-
<th>Phone</th><td><%= @user.phone %></td>
|
111
|
-
<th>Designation</th><td><%= @user.designation %></td>
|
112
|
-
</tr>
|
113
|
-
|
114
|
-
<tr>
|
115
|
-
<th>Super Admim?</th><td><%= @user.super_admin %></td>
|
116
|
-
<th>Status</th><td><%= @user.status.titleize %></td>
|
117
|
-
</tr>
|
118
|
-
|
119
|
-
</tbody>
|
120
|
-
</table>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
</div>
|
124
|
-
|
125
|
-
<div class="tab-pane" id="technical_details">
|
126
|
-
|
127
|
-
<%= clear_tag(20) %>
|
128
|
-
|
129
|
-
<div class="table-responsive">
|
130
|
-
<table class="table table-striped table-condensed table-bordered mb-30">
|
131
|
-
<tbody>
|
132
|
-
|
133
|
-
<tr>
|
134
|
-
<th style="width:20%;">Sign In Count</th><td style="width:30%;"><%= @user.sign_in_count %></td>
|
135
|
-
<th style="width:20%;">Remember User</th><td style="width:30%;"><%= @user.remember_created_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.remember_created_at %></td>
|
136
|
-
</tr>
|
137
|
-
|
138
|
-
<tr>
|
139
|
-
<th>Current Sign In At</th><td><%= @user.current_sign_in_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.current_sign_in_at %></td>
|
140
|
-
<th>Last Sign In At</th><td><%= @user.last_sign_in_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.last_sign_in_at %></td>
|
141
|
-
</tr>
|
142
|
-
|
143
|
-
<tr>
|
144
|
-
<th>Current Sign In IP</th><td><%= @user.current_sign_in_ip %></td>
|
145
|
-
<th>Last Sign In IP</th><td><%= @user.last_sign_in_ip %></td>
|
146
|
-
</tr>
|
147
|
-
|
148
|
-
</tbody>
|
149
|
-
</table>
|
150
|
-
|
151
|
-
<table class="table table-striped table-condensed table-bordered">
|
152
|
-
<tbody>
|
153
|
-
|
154
|
-
<tr>
|
155
|
-
<th style="width:20%;">Reset Password Token</th><td style="width:30%;"><%= @user.reset_password_token %></td>
|
156
|
-
<th style="width:20%;">Reset Password Sent At</th><td style="width:30%;"><%= @user.reset_password_sent_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.reset_password_sent_at %></td>
|
157
|
-
</tr>
|
158
|
-
|
159
|
-
<tr>
|
160
|
-
<th>Locked At</th><td colspan="3"><%= @user.locked_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.locked_at %></td>
|
161
|
-
</tr>
|
162
|
-
|
163
|
-
<tr>
|
164
|
-
<th>Failed Attempts</th><td><%= @user.failed_attempts %></td>
|
165
|
-
<th>Unlock Token</th><td><%= @user.unlock_token %></td>
|
166
|
-
</tr>
|
167
|
-
|
168
|
-
<tr>
|
169
|
-
<th>Confirmation Token</th><td><%= @user.confirmation_token %></td>
|
170
|
-
<th>Confirmation Token Sent At</th><td><%= @user.confirmed_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.confirmed_at %></td>
|
171
|
-
</tr>
|
172
|
-
|
173
|
-
<tr>
|
174
|
-
<th>Confirmation Sent At</th><td><%= @user.confirmation_sent_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.confirmation_sent_at %></td>
|
175
|
-
<th>Uncomfirmed Email</th><td><%= @user.unconfirmed_email %></td>
|
176
|
-
</tr>
|
177
|
-
|
178
|
-
<tr>
|
179
|
-
<th>Auth Token</th><td><%= @user.auth_token %></td>
|
180
|
-
<th>Token Created At</th><td><%= @user.token_created_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.token_created_at %></td>
|
181
|
-
</tr>
|
182
|
-
|
183
|
-
<tr>
|
184
|
-
<th>Created At</th><td><%= @user.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.created_at %></td>
|
185
|
-
<th>Updated At</th><td><%= @user.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @user.updated_at %></td>
|
186
|
-
</tr>
|
187
|
-
|
188
|
-
</tbody>
|
189
|
-
</table>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
</div>
|
193
|
-
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
|
197
|
-
|
198
|
-
<%= clear_tag %>
|
199
|
-
</div>
|