bytedreamer / Aporta

Aporta is an open source physical access controller. The main purpose of the software is to secure doors from unauthorized access. This is accomplished by determining if a person is authorized to enter a door. The door is unlocked momentarily by the software when authorized credential are presented.
Eclipse Public License 2.0
53 stars 6 forks source link

Virtual Device Driver Sanity check #52

Closed ClassicalComputer closed 3 months ago

ClassicalComputer commented 3 months ago

Hi Jonathan,

Here is my first pull request.

This is not for merging into the Aporta developer repository, but just for feedback.

Lots of praying on my part to be able to understand the Aporta code base and make changes! So far, things are coming along well enough, and I have been able to look at your existing code to understand where to make the changes.

The virtual device driver configuration razor page currently has a badge number ("12345") hard coded for testing.

I spent the last couple of hours today struggling to try to figure out how to reference a textbox from Blazor, to be able to determine the badge number keyed in by the user on the Virtual driver configuration page! I still don't have a working solution to that.

After lots of searching on the internet, one solution I tried was referencing Microsoft.JSInterop. This library is supposed to let you reference the webpage DOM. My first attempts using JSInterop did not work. Do you know of a better solution?

Thank you so much again! I am really enjoying working on this project!

bytedreamer commented 3 months ago

Looks good, added a couple of comments

bytedreamer commented 3 months ago

You want to bind a member variable in the text box. Checkout the binding section on this page

https://blazorise.com/docs/components/text

Also you can validate the text using the validation component

https://blazorise.com/docs/components/validation

ClassicalComputer commented 3 months ago

Thank you, Jonathan. I am now data binding the TextEdit boxes on the Virtual Driver configuration razor page. I am storing the bindings in a Dictionary, so that the code will work when there is more than one reader set up for the Virtual Device Driver.