This code base will server as a prototype for the HRadvocate mobile apps
- Clone the repo
git clone https://github.com/<User>/HRadvocate_mobile.git
- Install Expo
- Search Expo in the Play/App Store
- Install app and log in with your credentials
- Install Node.js (download)
- Change to your HRadvocate directory
cd <C:\PATH\TO\DIRECTORY\HRadvocate_mobile\
- create package.json file with npm
npm install
- Open XDE and log into the account you created earlier
- click Open Project
- find
HRadvocate_mobile
directory and click open - start the project
- Open the Expo app on your phone, and click on your computers name and the app should open
- use credentials listed below in the Demo section to access the app
- Company Code:
abc
- Username/Email:
[email protected]
- Password:
secret
- I would like to reiterate that this was a project done be a group of college students with no experience over two quarters while taking other classes, so I'm sorry that:
- the architecture was not very well thought out
- there are a ton of inline styles
- the programming styles vary widely
- most of the functions and components are heavily coupled to the demo data
- there are no tests, I couldn't even get snapshots working
- much of the code is soaking W.E.T
- The scheme for the data in the app, can be found in
./companySelector/companies.json
- All the test data in the app is loaded in from there
Where the store is wrapped around main
- This was my first attempt at navigation without actually using a navigation library
- This component can go to one of three places
- Company Selector Page
./companySelector/index.js
- Login Page
./login/index.js
- Navigation(Homepage)
./navigation/index.js
- Company Selector Page
./companySelector/index.js
- Handles reading all the data in from
./companySelector/companies.json
- Allows the user to set the company
./login/index.js
- BUG: There is a bug with the remember me check box, it doesn't remember that it is checked
./navigation/index.js
- This isn't actually a page, but it does define what each screen is called
- We ended up using React Navigation for all of the navigation after the login page
./homePage/index.js
- This is the main screen that you land on when you open the app
- a lot of the code for the calendar is copy pasted from the calendar page, and should probably be pulled out into it's own component
./calendar/index.js
- most of the code and functions on this pages, is just for parsing the schedule, shifts and events lists.
- a lot of work went into converting standard time into JS datetime objects
./notifications/index.js
- simply lists the notifications and calls the navigator to change to the page the notification links to
- make sure that "link" element in notifications matches the actual names of the pages linked to
./profile/index.js
- One giant form used for updating employee info
- BUG: Address auto complete doesn't work on android
./clockInOut/index.js
- Allows the user to clock in and out
- lots of logic for controlling when the user can log in and out
- added some demo features when the countdown timer is touched
- short press puts 10s on the clock
- long press takes the company's time window and adds 5 seconds this allows you to demo the clockin button being enabled
./timeCard/index.js
- keeps a record of clock ins and outs
./timeOffRequests/index.js
- allows user to see the time off requests and hours available
./RequestPage/index.js
- form for creating new time off requests
./docpage/index.js
- Just a bunch of links to fake PDFs there should probably be a system to dynamically grab links and display them
- Button:
./button/index.js
- Generic button that looks the same on all devices
- Header Bar:
./headerBar/index.js
- Header bar that contains the company name, nav menu, calendar link and notifications icon
- Must be placed on every new page
- Section Header:
./sectionHeader/index.js
- The black bar above each section on all the main pages
- take only one parameter top
- boolean
- if true, it removes the top padding from the section, which makes it not look weird when it's the first thing on the page
- Toast Box:
./toastBox/index.js
- Not actually a toast, more of a information/error notification box that is used to give information to the user
- Used heavily on the Company Selector and the Login Page
- Common Components:
./commonComponents
- After with is where all the above components should go, I just didn't have time to move them all there and fix the imports in every file, and I was too afraid I would break something