tlfjar / childsupportcalculator Goto Github PK
View Code? Open in Web Editor NEWArkansas Child Support Calculator
Home Page: https://tlfjar.github.io/childsupportcalculator/
Arkansas Child Support Calculator
Home Page: https://tlfjar.github.io/childsupportcalculator/
Describe the bug
Arkansas' support chart, found in support.json, ends at 30,000.00 combined monthly income. Exceeding this causes the program to freeze rather than returning a warning of some sort. This may also be considered a feature request.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No paragraph returned, but all values continue to allow changes. Ideally, a warning would be returned listing the maximum support amount on the chart plus a blurb that anything more is subject to a significant amount of judicial discretion.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
I haven't implemented any sort of error handling or validation to the form, which is badly needed. Some users really want to include the "$" symbol when entering income values, for example, which causes problems as well.
Is your feature request related to a problem? Please describe.
Almost all logic is confined to a single file, making modifications of what are otherwise discrete calculated values more taxing than it has to be.
Describe the solution you'd like
Use one component to gather inputs, and other components to handle the calculation-heavy paragraph maker. Each paragraph could be a component of its own, with the proper paragraph component being called depending on the payor's income and number of children. These components would contain only the functions necessary for the paragraph they create.
It may also be worth using a "submit" button, so that the paragraph doesn't change as numbers are being added.
Describe alternatives you've considered
Leaving the template portion of the page where it is, and only move the calculations to separate files. This is less likely to break things.
Creating discrete components for each paragraph style as described in the original solution, but with a fourth component that does all of the universal calculations in one file. This would cut down on code repetition, which I assume is a good thing.
Leave logic in page and move the paragraph templates to discrete files. This would also cut down on repetition.
Option 2 and 3 would leave calculations in one place, so any changes to them that are used in all the paragraph varieties would not have to be repeated. To make that happen, option 2 is the most appealing to me, if nothing else but because there would be less scrolling needed to get to the snippets that need to be changed.
Option 1 is only helpful because it wouldn't require messing with the rather hacky solution I'm using to write the paragraph. It's readability as it stands is terrible and fixing it would be a chore. With that said, moving the templates away from the page file would give an opportunity to write them in a cleaner way.
Additional context
I'm figuring this out as I go, so let me know if this feature would actually make things worse or just offer no meaningful utility.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.