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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vyapari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5dev
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -84,34 +84,48 @@ dependencies:
|
|
84
84
|
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: 0.0.5
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: axlsx
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 2.0.1
|
94
|
+
type: :runtime
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - "~>"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 2.0.1
|
87
101
|
- !ruby/object:Gem::Dependency
|
88
102
|
name: kuppayam
|
89
103
|
requirement: !ruby/object:Gem::Requirement
|
90
104
|
requirements:
|
91
105
|
- - "~>"
|
92
106
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.1.
|
107
|
+
version: 0.1.5dev
|
94
108
|
type: :runtime
|
95
109
|
prerelease: false
|
96
110
|
version_requirements: !ruby/object:Gem::Requirement
|
97
111
|
requirements:
|
98
112
|
- - "~>"
|
99
113
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.1.
|
114
|
+
version: 0.1.5dev
|
101
115
|
- !ruby/object:Gem::Dependency
|
102
116
|
name: usman
|
103
117
|
requirement: !ruby/object:Gem::Requirement
|
104
118
|
requirements:
|
105
119
|
- - "~>"
|
106
120
|
- !ruby/object:Gem::Version
|
107
|
-
version: 0.1.
|
121
|
+
version: 0.1.5dev
|
108
122
|
type: :runtime
|
109
123
|
prerelease: false
|
110
124
|
version_requirements: !ruby/object:Gem::Requirement
|
111
125
|
requirements:
|
112
126
|
- - "~>"
|
113
127
|
- !ruby/object:Gem::Version
|
114
|
-
version: 0.1.
|
128
|
+
version: 0.1.5dev
|
115
129
|
- !ruby/object:Gem::Dependency
|
116
130
|
name: bcrypt
|
117
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -320,14 +334,31 @@ files:
|
|
320
334
|
- README.md
|
321
335
|
- Rakefile
|
322
336
|
- app/assets/config/vyapari_manifest.js
|
337
|
+
- app/assets/images/vyapari/sample_stock_bundle.csv
|
323
338
|
- app/controllers/vyapari/admin/base_controller.rb
|
339
|
+
- app/controllers/vyapari/admin/brands_controller.rb
|
340
|
+
- app/controllers/vyapari/admin/categories_controller.rb
|
324
341
|
- app/controllers/vyapari/admin/countries_controller.rb
|
325
342
|
- app/controllers/vyapari/admin/dashboard_controller.rb
|
326
343
|
- app/controllers/vyapari/admin/exchange_rates_controller.rb
|
344
|
+
- app/controllers/vyapari/admin/products_controller.rb
|
327
345
|
- app/controllers/vyapari/admin/regions_controller.rb
|
328
346
|
- app/controllers/vyapari/admin/resource_controller.rb
|
329
|
-
- app/controllers/vyapari/admin/
|
347
|
+
- app/controllers/vyapari/admin/stores_controller.rb
|
348
|
+
- app/controllers/vyapari/admin/suppliers_controller.rb
|
349
|
+
- app/controllers/vyapari/admin/terminals_controller.rb
|
330
350
|
- app/controllers/vyapari/application_controller.rb
|
351
|
+
- app/controllers/vyapari/store_manager/base_controller.rb
|
352
|
+
- app/controllers/vyapari/store_manager/dashboard_controller.rb
|
353
|
+
- app/controllers/vyapari/store_manager/resource_controller.rb
|
354
|
+
- app/controllers/vyapari/store_manager/stock_bundles_controller.rb
|
355
|
+
- app/controllers/vyapari/store_manager/stock_entries_controller.rb
|
356
|
+
- app/controllers/vyapari/terminal_staff/base_controller.rb
|
357
|
+
- app/controllers/vyapari/terminal_staff/dashboard_controller.rb
|
358
|
+
- app/controllers/vyapari/terminal_staff/invoices_controller.rb
|
359
|
+
- app/controllers/vyapari/terminal_staff/line_items_controller.rb
|
360
|
+
- app/controllers/vyapari/terminal_staff/resource_controller.rb
|
361
|
+
- app/controllers/vyapari/user_dashboard_controller.rb
|
331
362
|
- app/helpers/vyapari/application_helper.rb
|
332
363
|
- app/jobs/vyapari/application_job.rb
|
333
364
|
- app/mailers/vyapari/application_mailer.rb
|
@@ -335,13 +366,41 @@ files:
|
|
335
366
|
- app/models/category.rb
|
336
367
|
- app/models/country.rb
|
337
368
|
- app/models/exchange_rate.rb
|
369
|
+
- app/models/image/brand_image.rb
|
370
|
+
- app/models/image/category_image.rb
|
371
|
+
- app/models/image/product_image.rb
|
372
|
+
- app/models/invoice.rb
|
373
|
+
- app/models/line_item.rb
|
338
374
|
- app/models/product.rb
|
339
375
|
- app/models/region.rb
|
376
|
+
- app/models/stock_bundle.rb
|
377
|
+
- app/models/stock_entry.rb
|
378
|
+
- app/models/store.rb
|
379
|
+
- app/models/supplier.rb
|
380
|
+
- app/models/terminal.rb
|
340
381
|
- app/models/vyapari/application_record.rb
|
382
|
+
- app/uploaders/brand_image_uploader.rb
|
383
|
+
- app/uploaders/category_image_uploader.rb
|
384
|
+
- app/uploaders/product_image_uploader.rb
|
385
|
+
- app/uploaders/stock_bundle_uploader.rb
|
341
386
|
- app/views/layouts/kuppayam/_footer.html.erb
|
342
387
|
- app/views/layouts/kuppayam/_header.html.erb
|
343
388
|
- app/views/layouts/kuppayam/_navbar.html.erb
|
344
389
|
- app/views/layouts/kuppayam/_sidebar.html.erb
|
390
|
+
- app/views/layouts/vyapari/_store_manager_menu.html.erb
|
391
|
+
- app/views/layouts/vyapari/_terminal_staff_menu.html.erb
|
392
|
+
- app/views/layouts/vyapari/store_manager.html.erb
|
393
|
+
- app/views/layouts/vyapari/terminal_staff.html.erb
|
394
|
+
- app/views/vyapari/admin/brands/_form.html.erb
|
395
|
+
- app/views/vyapari/admin/brands/_index.html.erb
|
396
|
+
- app/views/vyapari/admin/brands/_row.html.erb
|
397
|
+
- app/views/vyapari/admin/brands/_show.html.erb
|
398
|
+
- app/views/vyapari/admin/brands/index.html.erb
|
399
|
+
- app/views/vyapari/admin/categories/_form.html.erb
|
400
|
+
- app/views/vyapari/admin/categories/_index.html.erb
|
401
|
+
- app/views/vyapari/admin/categories/_row.html.erb
|
402
|
+
- app/views/vyapari/admin/categories/_show.html.erb
|
403
|
+
- app/views/vyapari/admin/categories/index.html.erb
|
345
404
|
- app/views/vyapari/admin/countries/_form.html.erb
|
346
405
|
- app/views/vyapari/admin/countries/_index.html.erb
|
347
406
|
- app/views/vyapari/admin/countries/_row.html.erb
|
@@ -353,21 +412,97 @@ files:
|
|
353
412
|
- app/views/vyapari/admin/exchange_rates/_row.html.erb
|
354
413
|
- app/views/vyapari/admin/exchange_rates/_show.html.erb
|
355
414
|
- app/views/vyapari/admin/exchange_rates/index.html.erb
|
415
|
+
- app/views/vyapari/admin/products/_form.html.erb
|
416
|
+
- app/views/vyapari/admin/products/_index.html.erb
|
417
|
+
- app/views/vyapari/admin/products/_row.html.erb
|
418
|
+
- app/views/vyapari/admin/products/_show.html.erb
|
419
|
+
- app/views/vyapari/admin/products/index.html.erb
|
356
420
|
- app/views/vyapari/admin/regions/_form.html.erb
|
357
421
|
- app/views/vyapari/admin/regions/_index.html.erb
|
358
422
|
- app/views/vyapari/admin/regions/_row.html.erb
|
359
423
|
- app/views/vyapari/admin/regions/_show.html.erb
|
360
424
|
- app/views/vyapari/admin/regions/index.html.erb
|
361
|
-
- app/views/vyapari/admin/
|
362
|
-
- app/views/vyapari/admin/
|
363
|
-
- app/views/vyapari/admin/
|
364
|
-
- app/views/vyapari/admin/
|
365
|
-
- app/views/vyapari/admin/
|
425
|
+
- app/views/vyapari/admin/stores/_form.html.erb
|
426
|
+
- app/views/vyapari/admin/stores/_index.html.erb
|
427
|
+
- app/views/vyapari/admin/stores/_row.html.erb
|
428
|
+
- app/views/vyapari/admin/stores/_show.html.erb
|
429
|
+
- app/views/vyapari/admin/stores/index.html.erb
|
430
|
+
- app/views/vyapari/admin/suppliers/_form.html.erb
|
431
|
+
- app/views/vyapari/admin/suppliers/_index.html.erb
|
432
|
+
- app/views/vyapari/admin/suppliers/_row.html.erb
|
433
|
+
- app/views/vyapari/admin/suppliers/_show.html.erb
|
434
|
+
- app/views/vyapari/admin/suppliers/index.html.erb
|
435
|
+
- app/views/vyapari/admin/terminals/_form.html.erb
|
436
|
+
- app/views/vyapari/admin/terminals/_index.html.erb
|
437
|
+
- app/views/vyapari/admin/terminals/_row.html.erb
|
438
|
+
- app/views/vyapari/admin/terminals/_show.html.erb
|
439
|
+
- app/views/vyapari/store_manager/dashboard/index.html.erb
|
440
|
+
- app/views/vyapari/store_manager/stock_bundles/_form.html.erb
|
441
|
+
- app/views/vyapari/store_manager/stock_bundles/_index.html.erb
|
442
|
+
- app/views/vyapari/store_manager/stock_bundles/_row.html.erb
|
443
|
+
- app/views/vyapari/store_manager/stock_bundles/_show.html.erb
|
444
|
+
- app/views/vyapari/store_manager/stock_bundles/create.html.erb
|
445
|
+
- app/views/vyapari/store_manager/stock_bundles/index.html.erb
|
446
|
+
- app/views/vyapari/store_manager/stock_bundles/update.html.erb
|
447
|
+
- app/views/vyapari/store_manager/stock_entries/_form.html.erb
|
448
|
+
- app/views/vyapari/store_manager/stock_entries/_index.html.erb
|
449
|
+
- app/views/vyapari/store_manager/stock_entries/_row.html.erb
|
450
|
+
- app/views/vyapari/store_manager/stock_entries/_show.html.erb
|
451
|
+
- app/views/vyapari/store_manager/stock_entries/_stock_bundle.html.erb
|
452
|
+
- app/views/vyapari/store_manager/stock_entries/index.html.erb
|
453
|
+
- app/views/vyapari/terminal_staff/dashboard/_counts.html.erb
|
454
|
+
- app/views/vyapari/terminal_staff/dashboard/_invoices.html.erb
|
455
|
+
- app/views/vyapari/terminal_staff/dashboard/index.html.erb
|
456
|
+
- app/views/vyapari/terminal_staff/invoices/_draft.html.erb
|
457
|
+
- app/views/vyapari/terminal_staff/invoices/_form.html.erb
|
458
|
+
- app/views/vyapari/terminal_staff/invoices/_index.html.erb
|
459
|
+
- app/views/vyapari/terminal_staff/invoices/_row.html.erb
|
460
|
+
- app/views/vyapari/terminal_staff/invoices/_show.html.erb
|
461
|
+
- app/views/vyapari/terminal_staff/invoices/index.html.erb
|
462
|
+
- app/views/vyapari/terminal_staff/invoices/new.js.erb
|
463
|
+
- app/views/vyapari/terminal_staff/invoices/show.html.erb
|
464
|
+
- app/views/vyapari/terminal_staff/line_items/_form.html.erb
|
465
|
+
- app/views/vyapari/terminal_staff/line_items/_index.html.erb
|
466
|
+
- app/views/vyapari/terminal_staff/line_items/create.js.erb
|
467
|
+
- app/views/vyapari/terminal_staff/line_items/destroy.js.erb
|
468
|
+
- app/views/vyapari/terminal_staff/stores/index.html.erb
|
469
|
+
- app/views/vyapari/user_dashboard/index.html.erb
|
366
470
|
- config/routes.rb
|
471
|
+
- db/import_data/brands.csv
|
472
|
+
- db/import_data/categories.csv
|
473
|
+
- db/import_data/countries.csv
|
474
|
+
- db/import_data/dummy/brands.csv
|
475
|
+
- db/import_data/dummy/categories.csv
|
476
|
+
- db/import_data/dummy/countries.csv
|
477
|
+
- db/import_data/dummy/exchange_rates.csv
|
478
|
+
- db/import_data/dummy/products-copy.csv
|
479
|
+
- db/import_data/dummy/products.csv
|
480
|
+
- db/import_data/dummy/products.xlsx
|
481
|
+
- db/import_data/dummy/regions.csv
|
482
|
+
- db/import_data/dummy/stores.csv
|
483
|
+
- db/import_data/dummy/suppliers.csv
|
484
|
+
- db/import_data/dummy/terminals.csv
|
485
|
+
- db/import_data/exchange_rates.csv
|
486
|
+
- db/import_data/regions.csv
|
487
|
+
- db/import_data/stores.csv
|
488
|
+
- db/import_data/suppliers.csv
|
489
|
+
- db/import_data/terminals.csv
|
367
490
|
- db/migrate/20170000000200_create_exchange_rates.rb
|
368
491
|
- db/migrate/20170000000201_create_countries.rb
|
369
492
|
- db/migrate/20170000000202_create_regions.rb
|
370
|
-
-
|
493
|
+
- db/migrate/20170000000203_create_contacts.rb
|
494
|
+
- db/migrate/20170000000204_create_bank_accounts.rb
|
495
|
+
- db/migrate/20170000000205_create_suppliers.rb
|
496
|
+
- db/migrate/20170000000206_create_stores.rb
|
497
|
+
- db/migrate/20170000000207_create_terminals.rb
|
498
|
+
- db/migrate/20170000000210_create_brands.rb
|
499
|
+
- db/migrate/20170000000211_create_categories.rb
|
500
|
+
- db/migrate/20170000000212_create_products.rb
|
501
|
+
- db/migrate/20170000000213_create_invoices.rb
|
502
|
+
- db/migrate/20170000000215_create_stock_bundles.rb
|
503
|
+
- db/migrate/20170000000216_create_stock_entries.rb
|
504
|
+
- db/sample_reports/products.xlsx
|
505
|
+
- lib/tasks/vyapari/all.rake
|
371
506
|
- lib/vyapari.rb
|
372
507
|
- lib/vyapari/engine.rb
|
373
508
|
- lib/vyapari/version.rb
|
@@ -386,9 +521,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
386
521
|
version: '0'
|
387
522
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
388
523
|
requirements:
|
389
|
-
- - "
|
524
|
+
- - ">"
|
390
525
|
- !ruby/object:Gem::Version
|
391
|
-
version:
|
526
|
+
version: 1.3.1
|
392
527
|
requirements: []
|
393
528
|
rubyforge_project:
|
394
529
|
rubygems_version: 2.5.1
|
@@ -1,130 +0,0 @@
|
|
1
|
-
module Usman
|
2
|
-
module Admin
|
3
|
-
class UsersController < ResourceController
|
4
|
-
|
5
|
-
def make_super_admin
|
6
|
-
@user = @r_object = User.find(params[:id])
|
7
|
-
if @user
|
8
|
-
@user.super_admin = true
|
9
|
-
if @user.valid?
|
10
|
-
@user.save
|
11
|
-
set_notification(true, I18n.t('status.success'), I18n.t('state.changed', item: default_item_name.titleize, new_state: @user.status))
|
12
|
-
else
|
13
|
-
set_notification(false, I18n.t('status.error'), I18n.translate("error"), @user.errors.full_messages.join("<br>"))
|
14
|
-
end
|
15
|
-
else
|
16
|
-
set_notification(false, I18n.t('status.not_found'), I18n.t('status.not_found', item: default_item_name.titleize))
|
17
|
-
end
|
18
|
-
render_row
|
19
|
-
end
|
20
|
-
|
21
|
-
def remove_super_admin
|
22
|
-
@user = @r_object = User.find(params[:id])
|
23
|
-
if @user
|
24
|
-
@user.super_admin = false
|
25
|
-
if @user.valid?
|
26
|
-
@user.save
|
27
|
-
set_notification(true, I18n.t('status.success'), I18n.t('state.changed', item: default_item_name.titleize, new_state: @user.status))
|
28
|
-
else
|
29
|
-
set_notification(false, I18n.t('status.error'), I18n.translate("error"), @user.errors.full_messages.join("<br>"))
|
30
|
-
end
|
31
|
-
else
|
32
|
-
set_notification(false, I18n.t('status.not_found'), I18n.t('status.not_found', item: default_item_name.titleize))
|
33
|
-
end
|
34
|
-
render_row
|
35
|
-
end
|
36
|
-
|
37
|
-
def masquerade
|
38
|
-
@user = @r_object = User.find(params[:id])
|
39
|
-
masquerade_as_user(@user)
|
40
|
-
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def get_collections
|
45
|
-
# Fetching the users
|
46
|
-
@relation = User.includes(:profile_picture).where("")
|
47
|
-
|
48
|
-
parse_filters
|
49
|
-
apply_filters
|
50
|
-
|
51
|
-
@users = @r_objects = @relation.page(@current_page).per(@per_page)
|
52
|
-
|
53
|
-
return true
|
54
|
-
end
|
55
|
-
|
56
|
-
def apply_filters
|
57
|
-
@relation = @relation.search(@query) if @query
|
58
|
-
@relation = @relation.status(@status) if @status
|
59
|
-
|
60
|
-
# Normal users should not be able to view super admins
|
61
|
-
# He should not be seeing admins even while searching
|
62
|
-
if @current_user.is_super_admin?
|
63
|
-
@relation = @relation.where("super_admin IS #{@super_admin.to_s.upcase}") if @super_admin.nil? == false && @query.nil?
|
64
|
-
else
|
65
|
-
@relation = @relation.where("super_admin IS FALSE")
|
66
|
-
end
|
67
|
-
|
68
|
-
@order_by = "created_at desc" unless @order_by
|
69
|
-
@relation = @relation.order(@order_by)
|
70
|
-
end
|
71
|
-
|
72
|
-
def configure_filter_settings
|
73
|
-
@filter_settings = {
|
74
|
-
string_filters: [
|
75
|
-
{ filter_name: :query },
|
76
|
-
{ filter_name: :status }
|
77
|
-
],
|
78
|
-
|
79
|
-
boolean_filters: [
|
80
|
-
{ filter_name: :super_admin, options: {default: false }}
|
81
|
-
],
|
82
|
-
|
83
|
-
reference_filters: [],
|
84
|
-
variable_filters: [],
|
85
|
-
}
|
86
|
-
end
|
87
|
-
|
88
|
-
def configure_filter_ui_settings
|
89
|
-
@filter_ui_settings = {
|
90
|
-
status: {
|
91
|
-
object_filter: false,
|
92
|
-
select_label: "Select Status",
|
93
|
-
display_hash: User::STATUS,
|
94
|
-
current_value: @status,
|
95
|
-
values: User::STATUS_REVERSE,
|
96
|
-
current_filters: @filters,
|
97
|
-
filters_to_remove: [],
|
98
|
-
filters_to_add: {},
|
99
|
-
url_method_name: 'admin_users_url',
|
100
|
-
show_all_filter_on_top: true
|
101
|
-
}
|
102
|
-
}
|
103
|
-
end
|
104
|
-
|
105
|
-
def resource_controller_configuration
|
106
|
-
{
|
107
|
-
view_path: "usman/admin/users"
|
108
|
-
}
|
109
|
-
end
|
110
|
-
|
111
|
-
def breadcrumbs_configuration
|
112
|
-
{
|
113
|
-
heading: "Manage Users",
|
114
|
-
description: "Listing all Users",
|
115
|
-
links: [{name: "Home", link: admin_dashboard_path, icon: 'fa-home'},
|
116
|
-
{name: "Manage Users", link: admin_users_path, icon: 'fa-user', active: true}]
|
117
|
-
}
|
118
|
-
end
|
119
|
-
|
120
|
-
def permitted_params
|
121
|
-
params.require(:user).permit(:name, :username, :email, :designation, :phone, :password, :password_confirmation)
|
122
|
-
end
|
123
|
-
|
124
|
-
def set_navs
|
125
|
-
set_nav("admin/users")
|
126
|
-
end
|
127
|
-
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<%= form_for([:admin, @user], :html => {:id=>"form_user", :class=>"mb-0 form-horizontal", :role => "form", :method => (@user.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
2
|
-
|
3
|
-
<div id="user_form_error">
|
4
|
-
<%= @user.errors[:base].to_sentence %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="form-inputs mb-30 mt-30">
|
8
|
-
|
9
|
-
<div class="row">
|
10
|
-
<div class="col-md-6 col-xs-12">
|
11
|
-
<%= theme_form_field(@user, :name) %>
|
12
|
-
<%= theme_form_field(@user, :username) %>
|
13
|
-
<%= theme_form_field(@user, :email) %>
|
14
|
-
<%= theme_form_field(@user, :designation, required: false) %>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="col-md-6 col-xs-12">
|
18
|
-
<%= theme_form_field(@user, :phone, required: false) %>
|
19
|
-
<% if @user.new_record? %>
|
20
|
-
<%= theme_form_field(@user, :password, required: true, html_options: {type: :password}) %>
|
21
|
-
<%= theme_form_field(@user, :password_confirmation, required: true, html_options: {type: :password}, label: "Retype Password") %>
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div>
|
29
|
-
|
30
|
-
<%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
|
31
|
-
|
32
|
-
<%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right ml-10 btn btn-white" %>
|
33
|
-
|
34
|
-
</div>
|
35
|
-
<%= clear_tag(10) %>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<% end %>
|
39
|
-
|
@@ -1,101 +0,0 @@
|
|
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:10px">#</th>
|
6
|
-
<th style="text-align: center;width:30px">Image</th>
|
7
|
-
<th>Name</th>
|
8
|
-
<th class="hidden-xs hidden-sm">Username</th>
|
9
|
-
<th class="hidden-xs hidden-sm">Email</th>
|
10
|
-
<% if @current_user.is_super_admin? %>
|
11
|
-
<th class="hidden-xs hidden-sm">Role</th>
|
12
|
-
<% end %>
|
13
|
-
<th>Status</th>
|
14
|
-
<th style="text-align: center;" colspan="2">Actions</th>
|
15
|
-
</tr>
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<% @users.each_with_index do |user, i| %>
|
19
|
-
|
20
|
-
<% edit_link = edit_admin_user_path(id: user.id) %>
|
21
|
-
<% delete_link = admin_user_path(id: user.id) %>
|
22
|
-
|
23
|
-
<tr id="tr_user_<%= user.id %>">
|
24
|
-
|
25
|
-
<!-- <td class="user-cb">
|
26
|
-
<input type="checkbox" class="cbr" name="users[]" value="1" checked />
|
27
|
-
</td> -->
|
28
|
-
|
29
|
-
<th scope="row" style="text-align: center;">
|
30
|
-
<% if i < 0 %>
|
31
|
-
<i class="fa fa-check text-success"></i>
|
32
|
-
<% else %>
|
33
|
-
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
34
|
-
<% end %>
|
35
|
-
</th>
|
36
|
-
|
37
|
-
<td class="user-image">
|
38
|
-
<%= link_to(admin_user_path(user), remote: true) do %>
|
39
|
-
<%= display_image(user, "profile_picture.image.small.url", width: "120", height: "auto", class: "img-rectangle", alt: user.display_name) %>
|
40
|
-
<% end %>
|
41
|
-
</td>
|
42
|
-
|
43
|
-
<td class="user-name"><%= link_to user.name, admin_user_path(user), remote: true %></td>
|
44
|
-
|
45
|
-
<td class="hidden-xs hidden-sm"><%= link_to user.username, admin_user_path(user), remote: true %></td>
|
46
|
-
|
47
|
-
<td class="hidden-xs hidden-sm"><%= link_to user.email, admin_user_path(user), remote: true, class: "email" %></td>
|
48
|
-
|
49
|
-
<% if @current_user.is_super_admin? %>
|
50
|
-
<td class="hidden-xs hidden-sm">
|
51
|
-
<% if user.super_admin %>
|
52
|
-
<span class="mr-10 mt-5 label label-warning">Super Admin</span>
|
53
|
-
<% else %>
|
54
|
-
<span class="mr-10 mt-5 label label-default">Normal</span>
|
55
|
-
<% end %>
|
56
|
-
</td>
|
57
|
-
<% end %>
|
58
|
-
|
59
|
-
<td>
|
60
|
-
<% if user.pending? %>
|
61
|
-
<span class="ml-5 mt-5 label label-default">Pending</span>
|
62
|
-
<% elsif user.approved? %>
|
63
|
-
<span class="ml-5 mt-5 label label-success">Approved</span>
|
64
|
-
<% elsif user.suspended? %>
|
65
|
-
<span class="ml-5 mt-5 label label-danger">Suspended</span>
|
66
|
-
<% end %>
|
67
|
-
</td>
|
68
|
-
|
69
|
-
<td class="action-links" style="width:15%">
|
70
|
-
|
71
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit User"), edit_link, :remote=>true, class: "edit" if user.can_be_edited? %>
|
72
|
-
|
73
|
-
<%= 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: "delete" if user.can_be_deleted? && (@current_user != user) %>
|
74
|
-
|
75
|
-
</td>
|
76
|
-
|
77
|
-
<td class="action-links" style="width:15%">
|
78
|
-
|
79
|
-
<!-- Approve -->
|
80
|
-
<%= 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" if user.can_be_approved? %>
|
81
|
-
|
82
|
-
<!-- Mark as Pending -->
|
83
|
-
<%= 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" if user.can_be_marked_as_pending? %>
|
84
|
-
|
85
|
-
<!-- Suspend -->
|
86
|
-
<%= 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" if user.can_be_suspended? %>
|
87
|
-
|
88
|
-
</td>
|
89
|
-
|
90
|
-
</tr>
|
91
|
-
<% end %>
|
92
|
-
</tbody>
|
93
|
-
</table>
|
94
|
-
</div>
|
95
|
-
|
96
|
-
<div class="row">
|
97
|
-
<div class="col-sm-12">
|
98
|
-
<%= paginate_kuppayam(@users) %>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<% edit_link = edit_admin_user_path(id: user.id) %>
|
2
|
-
<% delete_link = admin_user_path(id: user.id) %>
|
3
|
-
|
4
|
-
<tr id="tr_user_<%= user.id %>">
|
5
|
-
|
6
|
-
<!-- <td class="user-cb">
|
7
|
-
<input type="checkbox" class="cbr" name="users[]" value="1" checked />
|
8
|
-
</td> -->
|
9
|
-
|
10
|
-
<th scope="row" style="text-align: center;">
|
11
|
-
<% if i < 0 %>
|
12
|
-
<i class="fa fa-check text-success"></i>
|
13
|
-
<% else %>
|
14
|
-
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
15
|
-
<% end %>
|
16
|
-
</th>
|
17
|
-
|
18
|
-
<td class="user-image hidden-xs hidden-sm">
|
19
|
-
<%= link_to(admin_user_path(user), remote: true) do %>
|
20
|
-
<%= display_image(user, "profile_picture.image.small.url", width: "120", height: "auto", class: "img-rectangle", alt: user.display_name) %>
|
21
|
-
<% end %>
|
22
|
-
</td>
|
23
|
-
|
24
|
-
<td class="user-name"><%= link_to user.name, admin_user_path(user), remote: true %></td>
|
25
|
-
|
26
|
-
<td class="hidden-xs hidden-sm"><%= link_to user.username, admin_user_path(user), remote: true %></td>
|
27
|
-
|
28
|
-
<td class="hidden-xs hidden-sm"><%= link_to user.email, admin_user_path(user), remote: true, class: "email" %></td>
|
29
|
-
|
30
|
-
<% if @current_user.is_super_admin? %>
|
31
|
-
<td class="hidden-xs hidden-sm">
|
32
|
-
<% if user.super_admin %>
|
33
|
-
<span class="mr-10 mt-5 label label-warning">Super Admin</span>
|
34
|
-
<% else %>
|
35
|
-
<span class="mr-10 mt-5 label label-default">Normal</span>
|
36
|
-
<% end %>
|
37
|
-
</td>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<td>
|
41
|
-
<% if user.pending? %>
|
42
|
-
<span class="ml-5 mt-5 label label-default">Pending</span>
|
43
|
-
<% elsif user.approved? %>
|
44
|
-
<span class="ml-5 mt-5 label label-success">Approved</span>
|
45
|
-
<% elsif user.suspended? %>
|
46
|
-
<span class="ml-5 mt-5 label label-danger">Suspended</span>
|
47
|
-
<% end %>
|
48
|
-
</td>
|
49
|
-
|
50
|
-
<td class="action-links" style="width:15%">
|
51
|
-
|
52
|
-
<%= link_to raw("<i class=\"linecons-pencil\"></i> Edit User"), edit_link, :remote=>true, class: "edit" if @user.can_be_edited? %>
|
53
|
-
|
54
|
-
<%= 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: "delete" if @user.can_be_deleted? && (@current_user != user) %>
|
55
|
-
|
56
|
-
</td>
|
57
|
-
|
58
|
-
<td class="action-links" style="width:15%">
|
59
|
-
|
60
|
-
<!-- Approve -->
|
61
|
-
<%= 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" if user.can_be_approved? %>
|
62
|
-
|
63
|
-
<!-- Mark as Pending -->
|
64
|
-
<%= 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" if user.can_be_marked_as_pending? %>
|
65
|
-
|
66
|
-
<!-- Suspend -->
|
67
|
-
<%= 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" if user.can_be_suspended? %>
|
68
|
-
|
69
|
-
</td>
|
70
|
-
|
71
|
-
</tr>
|
72
|
-
|