Skip to content
This repository was archived by the owner on Aug 18, 2023. It is now read-only.

department-of-veterans-affairs/MBOOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBOOP

This app keeps track of physical items as they move through a group of people. While initially designed for folders, you can easily repurpose it for other physical items too.

A simple USB scanner, with autofocus set to true, makes this Web app work without installing any firmware/software.

Prerequisites

Login in to heroku.

$ heroku login
Enter your Heroku credentials.
Email: maintainer@va.gov
Password:
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub

Create copy of database. This is in case something gets messed up.

$ heroku pg:backups:capture [DATABASE] --app folderfinder

Login to rails console in heroku

$ heroku run rails console --app folderfinder 

Find and validate user with their email address.

irb(main):001:0> User.find_by_email('new.person@va.gov')
=> #<User id: 00, email: "new.person@va.gov", encrypted_password: "xxxx...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: "2017-02-15 15:46:07", sign_in_count: 39, current_sign_in_at: "2017-02-22 16:59:57", last_sign_in_at: "2017-02-22 15:09:20", current_sign_in_ip: "152.130.15.14", last_sign_in_ip: "152.130.15.14", created_at: "2016-10-17 14:00:15", updated_at: "2017-02-22 16:59:57", display_name: "New Person", admin: false, active: false>

If you don't know a users full email, you can instead run a command like:

User.where("email like ?", "%marina%")

With part of the user's name to be able to find and validate the user.

Make note of the users ID and make updates as needed.

To user give a user admin permissions:

irb(main):003:0> @b = User.find(00)
=> #<User id: 00, email: "new.person@va.gov", encrypted_password: "xxxx...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: "2017-02-15 15:46:07", sign_in_count: 39, current_sign_in_at: "2017-02-22 16:59:57", last_sign_in_at: "2017-02-22 15:09:20", current_sign_in_ip: "152.130.15.14", last_sign_in_ip: "152.130.15.14", created_at: "2016-10-17 14:00:15", updated_at: "2017-02-22 16:59:57", display_name: "New Person", admin: false, active: false>
irb(main):004:0> @b.admin = true
=> true
irb(main):005:0> @b.save
=> true

To add a user:

irb(main):003:0> @b = User.find(00)
=> #<User id: 00, email: "new.person@va.gov", encrypted_password: "xxxx...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: "2017-02-15 15:46:07", sign_in_count: 39, current_sign_in_at: "2017-02-22 16:59:57", last_sign_in_at: "2017-02-22 15:09:20", current_sign_in_ip: "152.130.15.14", last_sign_in_ip: "152.130.15.14", created_at: "2016-10-17 14:00:15", updated_at: "2017-02-22 16:59:57", display_name: "New Person", admin: false, active: false>
irb(main):004:0> @b.active = true
=> true
irb(main):005:0> @b.save
=> true

To remove a user:

irb(main):003:0> @b = User.find(00)
=> #<User id: 00, email: "new.person@va.gov", encrypted_password: "xxxx...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: "2017-02-15 15:46:07", sign_in_count: 39, current_sign_in_at: "2017-02-22 16:59:57", last_sign_in_at: "2017-02-22 15:09:20", current_sign_in_ip: "152.130.15.14", last_sign_in_ip: "152.130.15.14", created_at: "2016-10-17 14:00:15", updated_at: "2017-02-22 16:59:57", display_name: "New Person", admin: false, active: false>
irb(main):004:0> @b.active = false
=> true
irb(main):005:0> @b.save
=> true

About

Generate and track barcodes for keeping track of folders, inventory, equipment, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors