Open edarsow opened 2 years ago
There is no user table to link to, what table are we using for that?
public.login userid
users are reflected as a record in the table login
and a session is only given to users whose login has valid records in the usermuniauthperiod
table. lots of logic exists for auditing UMAPs before issuing a credential at a certain rank for a given muni
scour the patch scripts for naming conventions on foreign keys, etc
don't forget to dedicate hours to reading the official postgresql docs on the SQL stuff. most answers lie within
Is the Requirement table a utility table or are we adding requirements constantly? It seems like the requirement assigned table will have additions to it constantly as it will be used to assign various requirements to inspections.
If this is the case do we would need the date created and created in the requirement assigned table, not the assigned. The requirement table would be a utility table and would need a management page as well.
MF and ECD conference: no need for userID and timestamp on requirement table itself. FK to user remains an active requirement on the linking table.
Field inspections are conducted any time an officer looks at a property and records information about its state. This could be a formal inspection for a permit, in which case the officer would enter the building, look around, etc. Field inspections also happen if the officer is driving by on a public road and visually observes a violation of municipal code.
The field inspection form will include a few drop down boxes that allow the user to easily classify various features of that inspection. Tables in the DB already exist for the objects, and Java object representations also exist, but the management pages do not.
Please use iconManage.xhtml as a template for creating management pages for these objects:
UI Suggestions
The component is legacy. We want to update to the PrimeFaces layout tool, which attempts to be mobile responsive and makes layout really simple.
Mulit-use grid/form ideas
Ben (JURPLEL) created a slick UI that operates like this
<h:outputText>
elements to their form input relative such as<p:inputText>
or<p:calendar>
. See the citations forms for an example. This requires having a boolean member variable on the backing bean to control whether the dialog shows the output (when edit mode is false) or the input form component (when edit mode is true).toggleEditMode method
When the edit button is pushed, all it needs to do is call the toggleEditMode() method, and that method decides if the object we were editing is new (in which case we need to write new) or update, in which case we write updates. See the citations.xhtml as a sample
OccInspectionDetermination
This object is populated from the table called
occinspectiondetermination
The integration methods exist but should not be trusted in theOccInspectionIntegrator.java
classConverter
You'll also need to make a converter class which allows these to go in drop-drown boxes. Use the icon converter as a template. This converter name will go into a converter parameter tag inside a selectOneMenu for choosing these.
sql inserts
Please write a SQL insert script that creates records that reflect the initial categories listed in the specs:
Event Categories
To allow the user to choose an event category that goes with a determination, you'll want to ask the
EventCoordinator
for a list of possible event categories given a specific type. For Occ inspection stuff, you could write code in yourinitBean()
method that looks like this:OccInspectionCause
The java object is
OccInspectionCause.java
The table isoccinspectioncause
converter class
You'll also need to make a converter class which allows these to go in drop-drown boxes. Use the icon converter as a template. This converter name will go into a converter parameter tag inside a selectOneMenu for choosing these.
sql inserts
Please write insert for these initial items:
Create infrastructure for
OccInspectionRequirement
Using the prowess you acquired in the previous tasks, create the entire stack for a new object called OccInspectionRequirement that contains items that the officer is assigning as additional stuff a homeowner has to do.
Design requirement table
Use the
CREATE SEQUENCE
ANDCREATE TABLE
code in this sample patch to help you write SQL for this new table. The fields should at least includedesign linking table
Let's call this
occinspectionrequirementassigned
: When we make an occupancy inspection actually require one of these records in the occinspectionrequirement table, we make an entry in this second table, which will have a composite primary key of its FK to a record in theoccinspectionrequirement
table and in theoccinspection
table. This table will also have fields to track if the requirement was satisfiedoccinspectionrequirement
called likeoccrequirement_requirementid
occinspection
called likeoccinspection_inspectionid
templates to use for this table structure
Use the citation sub-family as a template
citation
records have a status, just like occ inspections will have one or more requirementsis like your
occinspectionrequirement` tablecitationcitationstatus
is like youroccinspectionrequirementassigned
tableCreate sql inserts
For these initial values in the requirement table
Manage OccInspectionRequirements
Create a simple page for adding, editing, removing entries to the primary requirement table.