GithubHelp home page GithubHelp logo

dewv / nlcattendance Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 2.5 MB

Attendance tracking for the Naylor Learning Center at Davis & Elkins College

License: MIT License

JavaScript 87.14% HTML 12.26% CSS 0.38% EJS 0.22%

nlcattendance's People

Contributors

bakejice avatar broadusa avatar brosekerg avatar brownk3 avatar dependabot[bot] avatar emreyildirim1284 avatar jacobj1234 avatar jereomyayres avatar makarenkojde avatar methenyk avatar methenys avatar scogginsj avatar shakenmusic122 avatar smattingly avatar sprite411 avatar tydingsl avatar weintraubm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nlcattendance's Issues

Fix Staff List

I have run into a issue that I can not seem to fix. @smattingly If you could take a look at this on the fallStaff branch. The following error occurs when loading the list and refers to the populate call in the listRequest() function of the REST controller.

OperationalError [AdapterError]: Unexpected error from database adapter: Could not find a primary key for a record. Perhaps it wasn't selected in the query. The primary key was set to: id and the record returned was: RowDataPacket {
  studentId__createdAt: 1567805571514,
  studentId__updatedAt: 1567805571514,
  studentId__id: 2,
  studentId__username: '[email protected]',
  studentId__firstName: 'FIRSTNAME2',
  studentId__lastName: 'LASTNAME2',
  studentId__academicRank: 'Sophomore',
  studentId__residentialStatus: 'Commuter',
  studentId__forceUpdate: 1,
  studentId__majorOne: 2,
  studentId__majorTwo: 3,
  studentId__fallSport: 2,
  studentId__springSport: 2
}
    at Object.listRequested [as rest/listrequested] (/home/broylesc/csci/nlcAttendance/api/controllers/RestController.js:18:35)
    at /home/broylesc/csci/nlcAttendance/node_modules/sails/lib/router/bind.js:236:53
    at routeTargetFnWrapper (/home/broylesc/csci/nlcAttendance/node_modules/sails/lib/router/bind.js:392:9)
    at /home/broylesc/csci/nlcAttendance/node_modules/sails/lib/router/bind.js:455:14
    at Layer.handle [as handle_request] (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/layer.js:95:5)
    at /home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/index.js:281:22
    at param (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/index.js:354:14)
    at param (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/index.js:410:3)
    at next (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/index.js:275:10)
    at next (/home/broylesc/csci/nlcAttendance/node_modules/express/lib/router/route.js:127:14)
    at module.exports (/home/broylesc/csci/nlcAttendance/api/policies/isAuthorized.js:74:75)
    at processTicksAndRejections (internal/process/task_queues.js:85:5) {

Define Sails.js

Declare useful information that is relevant to our usage of Sails.js. For instance: starting sails, closing sails, how the models plug into sails, etc. Write documentation for quick lookup specifically for our organization.

Audit Dependencies

Currently there are a large number of dependencies in the 'package.json' that we do not know if we are using or not. These dependencies need to be assessed for their use and removed if they are unused.

Add management functionality for select options.

Currently Fall Sports, Spring Sports, and Majors are added by code on the server which requires Dev-Ops to add any new sports or majors to the system. By adding simple forms, the customers can add their own entries without consulting Dev-Ops.

  • Create Fall Sports create form and add access to the staff menu.
  • Create Spring Sports create form and add access to the staff menu.
  • Create Major create form and add access to the staff menu.

Also the customer should be able to flag unsupported options for each of these tables.

Check input requirements

Various input/edit forms are incorrectly requiring the user to provide values for various attributes. We need a systematic check of all of them. Database models can generally be used to determine what is truly required, CONTRIBUTING.md might help, but ask if uncertain.

  • check in form
  • check out form
  • check out form (estimation mode)
  • staff profile
  • student profile

Display student's total time

In informal conversation, student athlete(s) expressed interest in seeing their total visit time (for the week?).

Might be as simple as putting total in all student page headers, or as extensive as new list pages.

Hold for research and client vetting.

Catalog Information from nlc2

Look through the old nlc2 repository for useful information that can be translated into sails.js for the new repository nlcAttendance. Compile it into a single document for reference.

Fix HTML in student edit form

Missing space where highlighted. Note that browser view source puts </label> in red because there was no valid <label> it matched. Will get to automated HTML checking in future.
image

Visit Model

using CONTRIBUTING.md, create the model file for Visits (the login and logout model)

Resolve difference in production database schemas

Talk with clients:

if we release v2 between semesters AND they are okay with old data being archive only
    then there is no need to convert current schema to new Sails schema
else
   we need scripts to move data contents of current schema to new Sails schema

Staff editform

Create the editform for Staff. Use the student editform in the API as a guideline.

Check-out editform for Visit

The Visit component must support editing existing records (known as a "check out"). So, the visit folder will contain editForm.html, named in anticipation that the RestController can be used.

Error page

Create an EJS webpage that displays whatever string is delivered to it.

projectDocs

Creation of projectDocs folder with general guidelines for management.

Add page navigation links

  • Add logout link (ideally an icon) to header for all pages except login (which probably suggests a new EJS include file).
  • Add link "edit user profile" link to check in and check out forms (icon here too?)

Check-in createform for Visit

The Visit component must support creating new records (known as a "check in"). So, the visit folder will contain createForm.html, named in anticipation that the RestController can be used.

Staff Profile Form

Get the staff profile form from nlc_attendance repo (special branch) and bring it into this repo.

How to solve error message

@smattingly @codybroyles I have this error when I try to run Mocha.
I did:
npm install
npm install -g npm-install-peers
npm run mocha
And then I have this long error message:

> [email protected] mocha /home/ubuntu/workspace/nlcAttendance
> _mocha ./furl/furlsails/test/lifecycle.js ./furl/test

/home/ubuntu/workspace/nlcAttendance/furl/furlsails/test/lifecycle.js:1
(function (exports, require, module, __filename, __dirname) { let sails = require('sails');
                                                              ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at /mnt/shared/lib/node_modules/mocha/lib/mocha.js:219:27
    at Array.forEach (native)
    at Mocha.loadFiles (/mnt/shared/lib/node_modules/mocha/lib/mocha.js:216:14)
    at Mocha.run (/mnt/shared/lib/node_modules/mocha/lib/mocha.js:468:10)
    at Object.<anonymous> (/mnt/shared/lib/node_modules/mocha/bin/_mocha:403:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:134:18)
    at node.js:962:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] mocha: `_mocha ./furl/furlsails/test/lifecycle.js ./furl/test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] mocha script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2019-02-05T19_02_08_008Z-debug.log

Mocha Testing

What are the commands to test our code with mocha?

CSS for NLC

Make the application look more professional using CSS

Create Model Database

Using the information from issue #7 and any further data deemed important, build the database for us to use with Sails.js for nlc Attendance.

Student profile form

Get the student profile form from nlc_attendance repo (special branch) and bring it into this repo.
Also put nlc_attendance repos pageTop and pageBottom templates into the sails layout file.

Add `afterPopulateOne` call

The populateOne helper should check to see if the model passed to it defines a postPopulate afterPopulateOne function, and if so, call it.

@codybroyles Note name change, to follow Sails lifecycle hooks after/before and use full name of populateOne

OPERATIONS: State of the App

The Application is growing rapidly and a quick update on how it looks from an operations perspective would yield valuable insight from a source other than the developers.

Landing Page for Staff

Should include links to all staff forms: edit form, visit list, visit spreadsheet, and register browser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.