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
@@ -0,0 +1,48 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs">
|
6
|
+
</ul>
|
7
|
+
<div class="tab-content">
|
8
|
+
<div class="tab-pane active">
|
9
|
+
|
10
|
+
<div id="div_store_action_buttons">
|
11
|
+
<div class="row">
|
12
|
+
<div class="col-md-6">
|
13
|
+
|
14
|
+
<%= theme_button('Add a Store', 'plus', new_admin_store_path(), classes: "pull-left", btn_type: "success") %>
|
15
|
+
|
16
|
+
<%= theme_button('Refresh', 'refresh', admin_stores_path(), classes: "pull-left ml-10", btn_type: "white") %>
|
17
|
+
|
18
|
+
<!-- Single button -->
|
19
|
+
<div class="ml-10 btn-group hidden">
|
20
|
+
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
21
|
+
More Actions <span class="caret"></span>
|
22
|
+
</button>
|
23
|
+
<ul class="dropdown-menu">
|
24
|
+
<li><a href="#">Import Users</a></li>
|
25
|
+
<li><a href="#">Import History</a></li>
|
26
|
+
<li role="separator" class="divider"></li>
|
27
|
+
<li><a href="#">Export Users</a></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="col-md-6">
|
32
|
+
<%= search_form_kuppayam(Store, admin_stores_path, text: @filters[:query]) %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<%= clear_tag(10) %>
|
37
|
+
|
38
|
+
<div id="div_store_index">
|
39
|
+
<%= render :partial=>"vyapari/admin/stores/index" %>
|
40
|
+
</div>
|
41
|
+
<%= clear_tag(10) %>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= form_for([:admin, @supplier], :html => {:id=>"form_supplier", :class=>"mb-0 form-horizontal", :supplier => "form", :method => (@supplier.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
+
|
3
|
+
<div id="supplier_form_error">
|
4
|
+
<%= @supplier.errors[:base].to_sentence %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="form-inputs mb-30 mt-30">
|
8
|
+
<%= theme_form_field(@supplier, :name) %>
|
9
|
+
<%= theme_form_field(@supplier, :code) %>
|
10
|
+
|
11
|
+
<%= theme_form_field(@supplier, :address, required: true, html_options: {type: :textarea}) %>
|
12
|
+
|
13
|
+
<%= theme_form_field(@supplier, :city) %>
|
14
|
+
|
15
|
+
<% options = {assoc_collection: Country.select("id, name").order("name ASC").all, required: true, editable: true, assoc_display_method: :name} %>
|
16
|
+
<%= theme_form_assoc_group(@supplier, :country_id, **options) %>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div>
|
21
|
+
|
22
|
+
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
23
|
+
|
24
|
+
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
<%= clear_tag(10) %>
|
28
|
+
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<% end %>
|
32
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-hover members-table middle-align">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th style="text-align: center;width:60px">#</th>
|
6
|
+
<th>Name</th>
|
7
|
+
<th>Code</th>
|
8
|
+
<th>City</th>
|
9
|
+
<th>Country</th>
|
10
|
+
<th style="text-align: center;">Actions</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
|
14
|
+
<tbody>
|
15
|
+
<% @suppliers.each_with_index do |supplier, i| %>
|
16
|
+
|
17
|
+
<% edit_link = edit_admin_supplier_path(id: supplier.id) %>
|
18
|
+
<% delete_link = admin_supplier_path(id: supplier.id) %>
|
19
|
+
|
20
|
+
<tr id="tr_supplier_<%= supplier.id %>">
|
21
|
+
|
22
|
+
<th scope="row" style="text-align: center;">
|
23
|
+
<% if i < 0 %>
|
24
|
+
<i class="fa fa-check text-success"></i>
|
25
|
+
<% else %>
|
26
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
27
|
+
<% end %>
|
28
|
+
</th>
|
29
|
+
|
30
|
+
<td class="supplier-name"><%= link_to supplier.name, admin_supplier_path(supplier), remote: true %></td>
|
31
|
+
|
32
|
+
<td class="supplier-name"><%= link_to supplier.code, admin_supplier_path(supplier), remote: true %></td>
|
33
|
+
|
34
|
+
<td class="supplier-name"><%= link_to supplier.city, admin_supplier_path(supplier), remote: true %></td>
|
35
|
+
|
36
|
+
<td class="supplier-name"><%= link_to supplier.country.try(:name), admin_supplier_path(supplier), remote: true %></td>
|
37
|
+
|
38
|
+
|
39
|
+
<td class="action-links" style="width:10%">
|
40
|
+
|
41
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Supplier"), edit_link, :remote=>true, class: "edit" %>
|
42
|
+
|
43
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, supplier: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
44
|
+
|
45
|
+
</td>
|
46
|
+
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="row">
|
54
|
+
<div class="col-sm-12">
|
55
|
+
<%= paginate_kuppayam(@suppliers) %>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% edit_link = edit_admin_supplier_path(id: supplier.id) %>
|
2
|
+
<% delete_link = admin_supplier_path(id: supplier.id) %>
|
3
|
+
|
4
|
+
<tr id="tr_supplier_<%= supplier.id %>">
|
5
|
+
|
6
|
+
<th scope="row" style="text-align: center;">
|
7
|
+
<% if i < 0 %>
|
8
|
+
<i class="fa fa-check text-success"></i>
|
9
|
+
<% else %>
|
10
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
|
14
|
+
<td class="supplier-name"><%= link_to supplier.name, admin_supplier_path(supplier), remote: true %></td>
|
15
|
+
|
16
|
+
<td class="supplier-name"><%= link_to supplier.code, admin_supplier_path(supplier), remote: true %></td>
|
17
|
+
|
18
|
+
<td class="supplier-name"><%= link_to supplier.city, admin_supplier_path(supplier), remote: true %></td>
|
19
|
+
|
20
|
+
<td class="supplier-name"><%= link_to supplier.country.try(:name), admin_supplier_path(supplier), remote: true %></td>
|
21
|
+
|
22
|
+
<td class="action-links" style="width:10%">
|
23
|
+
|
24
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Supplier"), edit_link, :remote=>true, class: "edit" %>
|
25
|
+
|
26
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, supplier: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
27
|
+
|
28
|
+
</td>
|
29
|
+
|
30
|
+
</tr>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<div id="div_supplier_show">
|
2
|
+
|
3
|
+
<div class="row">
|
4
|
+
|
5
|
+
<div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
6
|
+
|
7
|
+
<div class="visible-sm visible-xs mt-50"></div>
|
8
|
+
|
9
|
+
<%= theme_panel_heading(@supplier.display_name) %>
|
10
|
+
<%= theme_panel_sub_heading(@supplier.code, "#") %>
|
11
|
+
<%= theme_panel_sub_heading(@supplier.city, "#") %>
|
12
|
+
<%= theme_panel_description(@supplier.country.name) if @supplier.country %>
|
13
|
+
|
14
|
+
<%= clear_tag(10) %>
|
15
|
+
|
16
|
+
<div class="mt-20" style="max-width: 100%;overflow: auto;max-height: 500px;">
|
17
|
+
<%= raw(@supplier.address) %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<%= clear_tag(10) %>
|
21
|
+
|
22
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
23
|
+
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="col-md-3 col-sm-12 col-xs-12">
|
27
|
+
|
28
|
+
<% edit_link = edit_admin_supplier_path(id: @supplier.id) %>
|
29
|
+
<% delete_link = admin_supplier_path(id: @supplier.id) %>
|
30
|
+
|
31
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @supplier.can_be_edited? %>
|
32
|
+
|
33
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, supplier: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @supplier.can_be_deleted? %>
|
34
|
+
|
35
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<%= clear_tag(50) %>
|
42
|
+
|
43
|
+
<ul class="nav nav-pills">
|
44
|
+
<li class="active">
|
45
|
+
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
46
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
47
|
+
<span class="hidden-xs">Technical Details</span>
|
48
|
+
</a>
|
49
|
+
</li>
|
50
|
+
</ul>
|
51
|
+
|
52
|
+
<div class="tab-content">
|
53
|
+
<div class="tab-pane active" id="technical_details">
|
54
|
+
|
55
|
+
<%= clear_tag(20) %>
|
56
|
+
|
57
|
+
<div class="table-responsive">
|
58
|
+
<table class="table table-striped table-condensed table-bordered mb-30">
|
59
|
+
<tbody>
|
60
|
+
|
61
|
+
<tr>
|
62
|
+
<th>ID</th><td colspan="3"><%= @supplier.id %></td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr>
|
66
|
+
<th>Created At</th><td><%= @supplier.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @supplier.created_at %></td>
|
67
|
+
<th>Updated At</th><td><%= @supplier.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @supplier.updated_at %></td>
|
68
|
+
</tr>
|
69
|
+
|
70
|
+
</tbody>
|
71
|
+
</table>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
79
|
+
|
80
|
+
<%= clear_tag %>
|
81
|
+
</div>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<div class="col-md-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs">
|
6
|
+
</ul>
|
7
|
+
<div class="tab-content">
|
8
|
+
<div class="tab-pane active">
|
9
|
+
|
10
|
+
<div id="div_supplier_action_buttons">
|
11
|
+
<div class="row">
|
12
|
+
<div class="col-md-6">
|
13
|
+
|
14
|
+
<%= theme_button('Add a Supplier', 'plus', new_admin_supplier_path(), classes: "pull-left", btn_type: "success") %>
|
15
|
+
|
16
|
+
<%= theme_button('Refresh', 'refresh', admin_suppliers_path(), classes: "pull-left ml-10", btn_type: "white") %>
|
17
|
+
|
18
|
+
<!-- Single button -->
|
19
|
+
<div class="ml-10 btn-group hidden">
|
20
|
+
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
21
|
+
More Actions <span class="caret"></span>
|
22
|
+
</button>
|
23
|
+
<ul class="dropdown-menu">
|
24
|
+
<li><a href="#">Import Users</a></li>
|
25
|
+
<li><a href="#">Import History</a></li>
|
26
|
+
<li role="separator" class="divider"></li>
|
27
|
+
<li><a href="#">Export Users</a></li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="col-md-6">
|
32
|
+
<%= search_form_kuppayam(Supplier, admin_suppliers_path, text: @filters[:query]) %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<%= clear_tag(10) %>
|
37
|
+
|
38
|
+
<div id="div_supplier_index">
|
39
|
+
<%= render :partial=>"vyapari/admin/suppliers/index" %>
|
40
|
+
</div>
|
41
|
+
<%= clear_tag(10) %>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= form_for([:admin, @terminal.store, @terminal], :html => {:id=>"form_terminal", :class=>"mb-0 form-horizontal", :terminal => "form", :method => (@terminal.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
+
|
3
|
+
<div id="terminal_form_error">
|
4
|
+
<%= @terminal.errors[:base].to_sentence %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="form-inputs mb-30 mt-30">
|
8
|
+
<%= theme_form_field(@terminal, :name) %>
|
9
|
+
<%= theme_form_field(@terminal, :code) %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div>
|
13
|
+
|
14
|
+
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
15
|
+
|
16
|
+
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
<%= clear_tag(10) %>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<% end %>
|
24
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-hover members-table middle-align">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th style="text-align: center;width:60px">#</th>
|
6
|
+
<th>Name</th>
|
7
|
+
<th>Code</th>
|
8
|
+
<th>Status</th>
|
9
|
+
<th style="text-align: center;" colspan="2">Actions</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
|
13
|
+
<tbody>
|
14
|
+
<% @terminals.each_with_index do |terminal, i| %>
|
15
|
+
|
16
|
+
<% edit_link = edit_admin_store_terminal_path(terminal.store, terminal) %>
|
17
|
+
<% delete_link = admin_store_terminal_path(terminal.store, terminal) %>
|
18
|
+
|
19
|
+
<tr id="tr_terminal_<%= terminal.id %>">
|
20
|
+
|
21
|
+
<th scope="row" style="text-align: center;">
|
22
|
+
<% if i < 0 %>
|
23
|
+
<i class="fa fa-check text-success"></i>
|
24
|
+
<% else %>
|
25
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
26
|
+
<% end %>
|
27
|
+
</th>
|
28
|
+
|
29
|
+
<td class="terminal-name"><%= link_to terminal.name, admin_store_terminal_path(terminal.store, terminal), remote: true %></td>
|
30
|
+
|
31
|
+
<td class="terminal-name"><%= link_to terminal.code, admin_store_terminal_path(terminal.store, terminal), remote: true %></td>
|
32
|
+
|
33
|
+
<td>
|
34
|
+
<% if terminal.inactive? %>
|
35
|
+
<span class="ml-5 mt-5 label label-default">Inactive</span>
|
36
|
+
<% elsif terminal.active? %>
|
37
|
+
<span class="ml-5 mt-5 label label-success">Active</span>
|
38
|
+
<% elsif terminal.closed? %>
|
39
|
+
<span class="ml-5 mt-5 label label-danger">Closed</span>
|
40
|
+
<% end %>
|
41
|
+
</td>
|
42
|
+
|
43
|
+
<td class="action-links" style="width:10%">
|
44
|
+
|
45
|
+
<!-- Activate -->
|
46
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Activate"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'active'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" if terminal.can_be_activated? %>
|
47
|
+
|
48
|
+
<!-- In Activate -->
|
49
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> In Activate"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'inactive'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if terminal.can_be_inactivated? %>
|
50
|
+
|
51
|
+
<!-- Close -->
|
52
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Close"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'closed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure? Do you really want to close the terminal?' }, :class=>"delete" if terminal.can_be_closed? %>
|
53
|
+
|
54
|
+
</td>
|
55
|
+
|
56
|
+
<td class="action-links" style="width:10%">
|
57
|
+
|
58
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Terminal"), edit_link, :remote=>true, class: "edit" %>
|
59
|
+
|
60
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, terminal: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
61
|
+
|
62
|
+
</td>
|
63
|
+
|
64
|
+
</tr>
|
65
|
+
<% end %>
|
66
|
+
</tbody>
|
67
|
+
</table>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<div class="row">
|
71
|
+
<div class="col-sm-12">
|
72
|
+
<%= paginate_kuppayam(@terminals) %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<% edit_link = edit_admin_store_terminal_path(terminal.store, terminal) %>
|
2
|
+
<% delete_link = admin_store_terminal_path(terminal.store, terminal) %>
|
3
|
+
|
4
|
+
<tr id="tr_terminal_<%= terminal.id %>">
|
5
|
+
|
6
|
+
<th scope="row" style="text-align: center;">
|
7
|
+
<% if i < 0 %>
|
8
|
+
<i class="fa fa-check text-success"></i>
|
9
|
+
<% else %>
|
10
|
+
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
11
|
+
<% end %>
|
12
|
+
</th>
|
13
|
+
|
14
|
+
<td class="terminal-name"><%= link_to terminal.name, admin_store_terminal_path(terminal.store, terminal), remote: true %></td>
|
15
|
+
|
16
|
+
<td class="terminal-name"><%= link_to terminal.code, admin_store_terminal_path(terminal.store, terminal), remote: true %></td>
|
17
|
+
|
18
|
+
<td>
|
19
|
+
<% if terminal.inactive? %>
|
20
|
+
<span class="ml-5 mt-5 label label-default">Inactive</span>
|
21
|
+
<% elsif terminal.active? %>
|
22
|
+
<span class="ml-5 mt-5 label label-success">Active</span>
|
23
|
+
<% elsif terminal.closed? %>
|
24
|
+
<span class="ml-5 mt-5 label label-danger">Closed</span>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
|
28
|
+
<td class="action-links" style="width:10%">
|
29
|
+
|
30
|
+
<!-- Activate -->
|
31
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Activate"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'active'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"edit" if terminal.can_be_activated? %>
|
32
|
+
|
33
|
+
<!-- In Activate -->
|
34
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> In Activate"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'inactive'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", :class=>"" if terminal.can_be_inactivated? %>
|
35
|
+
|
36
|
+
<!-- Close -->
|
37
|
+
<%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Close"), update_status_admin_store_terminal_path(terminal.store, terminal, :status =>'closed'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure? Do you really want to close the terminal?' }, :class=>"delete" if terminal.can_be_closed? %>
|
38
|
+
|
39
|
+
</td>
|
40
|
+
|
41
|
+
<td class="action-links" style="width:10%">
|
42
|
+
|
43
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Terminal"), edit_link, :remote=>true, class: "edit" %>
|
44
|
+
|
45
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, terminal: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
46
|
+
|
47
|
+
</td>
|
48
|
+
|
49
|
+
</tr>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<div id="div_terminal_show">
|
2
|
+
|
3
|
+
<div class="row">
|
4
|
+
|
5
|
+
<div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
|
6
|
+
|
7
|
+
<div class="visible-sm visible-xs mt-50"></div>
|
8
|
+
|
9
|
+
<%= theme_panel_heading(@terminal.display_name) %>
|
10
|
+
<%= theme_panel_sub_heading(@terminal.code, "#") %>
|
11
|
+
<%= theme_panel_description(@terminal.store.name) if @terminal.store %>
|
12
|
+
|
13
|
+
<%= clear_tag(10) %>
|
14
|
+
|
15
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
16
|
+
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="col-md-3 col-sm-12 col-xs-12">
|
20
|
+
|
21
|
+
<% edit_link = edit_admin_store_terminal_path(@terminal.store, @terminal) %>
|
22
|
+
<% delete_link = admin_store_terminal_path(@terminal.store, @terminal) %>
|
23
|
+
|
24
|
+
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @terminal.can_be_edited? %>
|
25
|
+
|
26
|
+
<%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, terminal: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @terminal.can_be_deleted? %>
|
27
|
+
|
28
|
+
<div class="visible-sm visible-xs mb-50"></div>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<%= clear_tag(50) %>
|
35
|
+
|
36
|
+
<ul class="nav nav-pills">
|
37
|
+
<li class="active">
|
38
|
+
<a href="#technical_details" data-toggle="tab" aria-expanded="false">
|
39
|
+
<span class="visible-xs"><i class="fa-database"></i></span>
|
40
|
+
<span class="hidden-xs">Technical Details</span>
|
41
|
+
</a>
|
42
|
+
</li>
|
43
|
+
</ul>
|
44
|
+
|
45
|
+
<div class="tab-content">
|
46
|
+
<div class="tab-pane active" id="technical_details">
|
47
|
+
|
48
|
+
<%= clear_tag(20) %>
|
49
|
+
|
50
|
+
<div class="table-responsive">
|
51
|
+
<table class="table table-striped table-condensed table-bordered mb-30">
|
52
|
+
<tbody>
|
53
|
+
|
54
|
+
<tr>
|
55
|
+
<th>ID</th><td colspan="3"><%= @terminal.id %></td>
|
56
|
+
</tr>
|
57
|
+
|
58
|
+
<tr>
|
59
|
+
<th>Created At</th><td><%= @terminal.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @terminal.created_at %></td>
|
60
|
+
<th>Updated At</th><td><%= @terminal.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @terminal.updated_at %></td>
|
61
|
+
</tr>
|
62
|
+
|
63
|
+
</tbody>
|
64
|
+
</table>
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<%= link_to "Close", "#", onclick: "closeGenericModal();", class: "btn btn-primary pull-right" %>
|
72
|
+
|
73
|
+
<%= clear_tag %>
|
74
|
+
</div>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
<%
|
2
|
+
total_count = @store.stock_entries.count
|
3
|
+
in_stock_count = @store.stock_entries.in_stock.count
|
4
|
+
damaged_count = @store.stock_entries.damaged.count
|
5
|
+
sold_count = @store.stock_entries.sold.count
|
6
|
+
reserved_count = @store.stock_entries.reserved.count
|
7
|
+
%>
|
8
|
+
|
9
|
+
<div class="chart-item-bg-2">
|
10
|
+
<div class="chart-item-num" data-count="this" data-from="0" data-to="98" data-suffix="%" data-duration="2">
|
11
|
+
<i class="fa-list"></i>
|
12
|
+
<%= total_count %> <span style="font-size:20px">Product Items</span>
|
13
|
+
</div>
|
14
|
+
<div class="chart-item-desc">
|
15
|
+
<%= link_to raw("<i class=\"fa-truck mr-10\"></i> View Stock"), store_manager_stock_entries_path(@store), class: "btn btn-success btn-lg btn-block", style: "height:50px" %>
|
16
|
+
<%= link_to raw("<i class=\"fa-upload mr-10\"></i> Import Stock"), store_manager_stock_bundles_path(@store), class: "btn btn-success btn-lg btn-block", style: "height:50px" %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-3">
|
22
|
+
|
23
|
+
<div class="xe-widget xe-counter xe-counter-success" data-count=".num" data-from="0" data-to="99.9" data-suffix="%" data-duration="2">
|
24
|
+
<div class="xe-icon">
|
25
|
+
<i class="fa-shopping-cart"></i>
|
26
|
+
</div>
|
27
|
+
<div class="xe-label">
|
28
|
+
<strong class="num"><%= sold_count %></strong>
|
29
|
+
<span>SOLD</span>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="xe-widget xe-counter xe-counter-info" data-count=".num" data-from="1" data-to="117" data-suffix="k" data-duration="3" data-easing="false">
|
34
|
+
<div class="xe-icon">
|
35
|
+
<i class="fa-truck"></i>
|
36
|
+
</div>
|
37
|
+
<div class="xe-label">
|
38
|
+
<strong class="num"><%= in_stock_count %></strong>
|
39
|
+
<span>IN STOCK</span>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="xe-widget xe-counter xe-counter-danger" data-count=".num" data-from="1000" data-to="2470" data-duration="4" data-easing="true">
|
44
|
+
<div class="xe-icon">
|
45
|
+
<i class="fa-ban"></i>
|
46
|
+
</div>
|
47
|
+
<div class="xe-label">
|
48
|
+
<strong class="num"><%= damaged_count %></strong>
|
49
|
+
<span>DAMAGED</span>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="xe-widget xe-counter xe-counter-gray" data-count=".num" data-from="1000" data-to="2470" data-duration="4" data-easing="true">
|
54
|
+
<div class="xe-icon">
|
55
|
+
<i class="fa-bookmark"></i>
|
56
|
+
</div>
|
57
|
+
<div class="xe-label">
|
58
|
+
<strong class="num"><%= reserved_count %></strong>
|
59
|
+
<span>RESERVED</span>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div class="col-sm-9">
|
66
|
+
|
67
|
+
<div class="panel panel-default" style="width:100%;min-height:405px;">
|
68
|
+
<div class="panel-heading">Terminals</div>
|
69
|
+
<table class="table">
|
70
|
+
<thead>
|
71
|
+
<tr>
|
72
|
+
<th style="width:60%">Name</th>
|
73
|
+
<th>Code</th>
|
74
|
+
<th style="text-align:center">Actions</th>
|
75
|
+
</tr>
|
76
|
+
</thead>
|
77
|
+
<tbody>
|
78
|
+
<% @store.terminals.each do |terminal| %>
|
79
|
+
<tr>
|
80
|
+
<td><%= terminal.name %></td>
|
81
|
+
<td><%= terminal.code %></td>
|
82
|
+
<td style="text-align:center">
|
83
|
+
<%= link_to "Log In", terminal_staff_dashboard_path(terminal), class: "btn btn-primary btn-success pr-30 pl-30" %>
|
84
|
+
</td>
|
85
|
+
</tr>
|
86
|
+
<% end %>
|
87
|
+
</tbody>
|
88
|
+
</table>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|