If you are a w-2 employee who is not an independent contractor then all of the work you do while being paid for them or on their projects is inherently owned by them unless you have a special contract stating that you will retain copyright of code you write. This becomes even more complicated if you are writing code that extends or changes an existing platform that has it's own copyright information.
If you do work at home that is not in any way related to a work project and you are off the company clock, then that code is yours. However there is a caveat, and that is the fact that they are requiring you to bring outside projects in to management for approval. Depending on your contract, they could claim ownership of those jobs and simply award you the work hours to do it under their name. If that is the case (and it sounds like it might be), then all of that code is also theirs.
Section 101 of the Copyright Act (title 17 of the U.S. Code) defines a
“work made for hire” in two parts: a) a work prepared by an employee
within the scope of his or her employment b) a work specially ordered
or commissioned for use
1. as a contribution to a collective work,
2. as a part of a motion picture or other audiovisual work,
3. as a translation,
4. as a supplementary work,
5. as a compilation,
6. as an instructional text,
7. as a test,
8. as answer material for a test, or
9. as an atlas, if the parties expressly agree in a written
instrument signed by them that the work shall be considered a work
made for hire.
If you are an independent contractor you have an entirely different scenario. Typically the only work that is inherently "work for hire" for a contractor is listed in section (b) above. This means that the company can only own your code if they expressly state so in your employment contract.
I don't think much more can be said on this without seeing the actual contract and it's wording.