Friday, November 2, 2018

"Tips and Commissions Tracker" Code and Walkthrough

Several years ago I created a Ruby on Rails 3.2 application to track my wife's tips and commissions at work, since she works in the skin care industry. I only made it available to her while I developed it, so even though it was publicly posted, it was not yet meant for mass consumption, so I didn't add bells and whistles to make it work for everybody's situation. Nevertheless, it is stable and has a few neat features:

1. It generates reports based on several stats, not only in table form (weekly, per pay period, etc.), but with graphs over time. I used the "RServe" Rubygem to embed R commands in the Ruby code. The RServe listener sits on the server, receives the commands, processes the input, and dumps the plots wherever indicated.

2. The application detects whether the user is using a desktop-sized browser or mobile browser and automatically serves up the right format. I used the mobile_fu gem to enable this.

To use the application, the user registers and can set up to have more than one company that (s)he works for. If there is more than one company, inputs will be isolated between companies. Once the account and company are established, the user sets up the types of services that are provided. This provides a kind of service menu, with prices. When a user wants to record a treatment, she goes to Add Treatment and can select one or more services that were provided, as well as choosing from existing or new customers. There are more details in the video walk-through provided below.

The code is posted at https://github.com/mbondpro/tipper.








No comments:

Post a Comment