Commit Graph

250 Commits

Author SHA1 Message Date
7596eb7d3f #4 Added IsContractor flag to the UserIdentity and User Object, the Api will now relate that status to the output object. note, notimplemented in the UI yet to control this flag. 2017-02-03 12:39:38 +00:00
f4fd28cdbf ignore resharper dotSettings file. 2017-02-03 12:22:56 +00:00
93ec0987f4 project update to include new files etc. 2017-02-03 12:22:22 +00:00
39d7bc6cc4 added TimelogController. 2017-02-03 12:22:08 +00:00
532bf2b105 Moved CardsController, SwipeDataController, UsersController, ValuesController to a "Controllers" dir. 2017-02-03 12:21:54 +00:00
4ac6b2475b Added initialisation for User object to set First and Last names to an empty string.
removed line to check if user id is valid, as when creating a user id, it will be -1....
2017-02-03 12:21:21 +00:00
86a1618819 corrected binding for Id to look at UserId field. 2017-02-03 12:20:26 +00:00
9309d9bbf4 added favicon 2017-02-03 08:36:16 +00:00
384ae45c63 pulled out endpoints into single object, instead of having the strings in file.
all strings now use double quotes.
all url generation now handled by createRequestUrl, instead of string concatenation in methods.
errors in getJson methods will now redirect home, suggest implementing proper error message or something...
removed unnecessary console.log's
2017-02-02 17:03:50 +00:00
d02862a5f8 change endpoint to start on all ip addresses. 2017-02-02 17:00:45 +00:00
974ffe4b13 updated html/js/css to latest codepen code. will out of box point to the json-server endpoint. needs to be modified to work with the datacenter api 2017-02-01 21:10:38 +00:00
fa3a115c5c Finalized the merge..
Merge remote-tracking branch 'origin/CreateStaticFileHost' into UnbrokenSQLiteImplementation

# Conflicts:
#	DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/App.config
#	DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Service1.cs
#	DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj
#	DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/packages.config
#	DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/App.config
#	DataCenter_Windows/WindowsDataCenter/WindowsDataServiceHost/packages.config
2017-02-01 20:28:42 +00:00
3fe792d36c manually merging static files etc from branch, this way i can make sure it still works.. seems to be some package going belly up with its dependencies.. no idea what. 2017-02-01 20:05:30 +00:00
f96078f2ca add the missing file references from adding DalSoft and Owin Static Files...
stupid visual studio, stupid operator.
2017-02-01 19:54:19 +00:00
ff20c6abdf added static files owin host and dalsoft webapi help pages package manually to merge in branch. (preventing app from running after merge otherwise, no idea why) 2017-02-01 19:46:17 +00:00
de57353511 added come comments to explain setup and configuration of ninject and WebAPI. 2017-01-31 22:10:36 +00:00
1e8d56ab82 csproj update to reference Interfaces and SQLiteRepository implementation.
Complete IRepository migration into the ApiControllers.
remove any nuget packages from the packages.config which refer to sqlite and entity framework.
missing csproj update for SQLiteRepository project. Sorry..
2017-01-31 22:09:40 +00:00
dd8d91279f moved Configuration class to its own file. 2017-01-31 22:01:42 +00:00
8585f0fe77 moved NinjectDependencyResolver, NinjectDependencyScope and NinjectHelper to their own files 2017-01-31 22:00:40 +00:00
bc1947a31f Move the database calls/procedures out into the SQLiteRepository, IRepository implementation.
created SQLiteProcedures to hold all the strings for procs. Constants also serves similar purpose.
renamed Class1 to SQLiteRepository.cs
added all the necessary nuget packages for SQLite.Net-PCL
2017-01-31 21:59:42 +00:00
440c1f44ce Added IRepository comments.
Changed oder of response codes.
changed HoursPerWeek to use float not int.
Changed AssociatedIdentifierCount to use count property on AssociatedIdentifiers instead of needing to populate separately.
Changed UserCount in UserList for the same reason.
Added Users list initialisation to prevent null ref exception.
overrode Equals and GetHashCode to allow use of List.Except method. (tests show without this, Except is useless).
2017-01-31 21:57:21 +00:00
a0d050acd2 Created the SQLiteRepository stub. ready for implementation..
(move to Ninject/Dependency Injection model)
2017-01-31 17:25:01 +00:00
1ad53fbe76 Added Interfaces project which holds everything required for the IRepository Interface 2017-01-31 17:24:16 +00:00
1fe6e94d0f update git-ignore to ignore node-modules packages/files. 2017-01-30 22:39:56 +00:00
a7d23d9e7c Added Ninject and ninject resolvers to enable dependency inject on the ApiController Classes. 2017-01-30 22:39:34 +00:00
a892e1d2c8 suspect service1 file incomplete due to selected line commits.
Added sqlite references.
added new CardsController, SwipeDataController and UsersController classes which all pull in SQLite to retrieve, or store their data.
2017-01-30 22:38:49 +00:00
3579f750cc moved ValuesController to its own class, remove UsersController and SwipeDataController classes, pending sqlite implementation. 2017-01-30 22:34:25 +00:00
bc3c7a5e31 moved owin config to its own file,
removed predefined route definition in favour of mapping attributes on ApiController classes.
Added JsonpFormatter to ensure cross-domain api web requests will work to this API.
added formatter to HTTPConfiguration for owin config.
2017-01-30 22:30:58 +00:00
10027d7f22 added sqlite dependency 2017-01-30 22:28:20 +00:00
c7424d806b added sqlite third party dependencies. 2017-01-30 22:27:43 +00:00
90ce5d6382 removed interfaces reference (unused in RPI variant.) 2017-01-30 22:27:02 +00:00
1b169c4890 Merge branch 'APIHelpPages' into CreateStaticFileHost
(unpushed changes)
2017-01-30 20:41:07 +00:00
dcd99faa25 Merge remote-tracking branch 'origin/APIHelpPages' into CreateStaticFileHost 2017-01-30 20:39:20 +00:00
eca081f63d added extra method documentation to a dummy controller method to test out the dalsoft package.
removed "RouteController" - redundant now with dalsoft nuget package.
2017-01-30 20:25:18 +00:00
904ec01118 update the json-server file to incorporate "valid" card data, tied to the users. 2017-01-29 22:46:05 +00:00
532ed16bbd Added package DalSoft.WebApi.HelpPage which will create help pages for every ApiController in the solution. 2017-01-29 16:09:26 +00:00
fba15b89f3 changed to reference cdn bootstrap (as it does on codepen.io demo/test page). 2017-01-29 15:44:59 +00:00
4af15b4b36 Added time log data format file. 2017-01-29 15:35:33 +00:00
d11071d394 added ui mockup for the hours viewer page. 2017-01-29 15:26:09 +00:00
b7492479c9 updated file to generate testcard data.
updated userstest endpoint to return the usercount parameter.
2017-01-29 15:25:47 +00:00
430f91ce18 add package Microsoft.Owin.StaticFiles.
added www folder to project, with bootstrap css/js files.
added the main single page app files to the project, pulled from codepen.io test/demo pages.
set properties to copy always for the main app files, bootstrap stuff is copy if newer.
added filesystem options to the StartOwin method.
2017-01-29 15:24:23 +00:00
283ce5ceec add node modules to ignore list. 2017-01-29 15:18:40 +00:00
7c8dd36605 added userstest endpoint to respond with an object with embedded array, this makes knockout binding easier for SPA. 2017-01-27 09:28:30 +00:00
f625396537 Add test data directory, with generate.js data file and users.txt which has some users + id cards in (testing purposes). 2017-01-26 16:53:31 +00:00
e5ce621827 Initial commit of Windows Service DataCenter variant (pulling code from the RPi variant). 2017-01-26 16:45:04 +00:00
9eed5e827a removed args argument, was annoying.
changed debug writelines to console writelines for desktop operation.
tidied code.
moved over to use PostAsync, to prevent app hanging when trying to post to DataCenter.
changed api endpoint to windows datacenter desktop endpoint.
--end Service1 changes.
remove args from Start method
--end Program changes
added try catch to stop errors when the data center endpoint isnt up.
--end DataCenterHelper changes.
removed topshelf configuration stuff.
--end ConfigureService changes.
2017-01-26 16:44:07 +00:00
dbe1425a16 adding localhistory ignore stuff. 2017-01-26 16:40:53 +00:00
ed5162b9e7 Initial commit of data center code to receive HTTP Posts from remote card readers and write them into the database.
Also supports Get request for /api/users and /api/users?userId=x and /api/timelogs?userId=x and /api/stats

stats needs fleshing out.
also logic behind when someone is checking in/out..
2017-01-25 22:47:02 +00:00
dd264224b3 ignore binary output files etc. 2017-01-25 22:43:56 +00:00
fd78367fb9 first commit of code to sit as service on machine, wait for card reader input, read the unique Id from the card, then post to the remote endpoint. 2017-01-25 22:43:41 +00:00