Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4dae5bc
20.6 fb wnprc183 192 merge (#16)
dnicolalde Aug 6, 2020
50929a3
Point at new package for permission class
labkey-jeckels Aug 15, 2020
b1c8d27
Fix up schema upgrades, including:
labkey-jeckels Aug 15, 2020
ca381c9
Mark as Postgres only so it doesn't fail on SQL Server where WNPRC_EH…
labkey-jeckels Aug 15, 2020
9ee61ca
Bump versions to match test expectations
labkey-jeckels Aug 15, 2020
6688a29
Various test fixes, including:
labkey-jeckels Aug 16, 2020
dfef3c2
Cascade user delete though ehr_billing.dataaccess
labkey-jeckels Aug 16, 2020
f8349e6
Make WNPRC R24 module Postgres-only
labkey-jeckels Aug 16, 2020
ab2e2ab
Update navMenu from Ext3 to Ext4 and don't pull it into WNPRC with th…
labkey-jeckels Aug 16, 2020
c713d1a
Support custom displayNames
labkey-jeckels Aug 17, 2020
72898ee
Remove references to Ext3 version of navMenu
labkey-jeckels Aug 17, 2020
8157d96
Fully migrate navMenu to ExtJS4
labkey-jeckels Aug 17, 2020
9466bcd
Add dependencies that failed to merge from 18.3
labkey-jeckels Aug 17, 2020
9987e3a
Avoid double-loading Utils.js and other core APIs
labkey-jeckels Aug 17, 2020
603891e
More test fixes
labkey-jeckels Aug 18, 2020
cf78ab6
Flip meaning of argument at controls de-duplication of IDs
labkey-jeckels Aug 18, 2020
34a89db
Update to new grid formatting (exported CSV is unchanged)
labkey-jeckels Aug 24, 2020
b4269f7
Fix encoding issue for WNPRC_EHRTest.testWeightDataEntry
labkey-jeckels Aug 24, 2020
1226d82
Attempt to fix WNPRC_EHRTest.testBilling
labkey-jeckels Aug 24, 2020
ef12b69
Generics, and change to wait for page to load after finalizing
labkey-jeckels Aug 24, 2020
a34d1a0
Another try at waiting for the reload
labkey-jeckels Aug 24, 2020
8ccea40
Use ExtJS3 class instead of ExtJS4
labkey-jeckels Aug 24, 2020
8cf664b
Same idea, different click
labkey-jeckels Aug 24, 2020
f299af0
Split compliance test into ONPRC and WNPRC variants
labkey-jeckels Aug 25, 2020
2d53929
Update to text that's on this form variant
labkey-jeckels Aug 25, 2020
4867175
Make tolerant of supplemental lk-row-over class
labkey-jeckels Aug 25, 2020
1379de1
Delete unused action that throws ClassNotFoundException
labkey-jeckels Aug 25, 2020
5faad35
Fix crawler error
labkey-jeckels Aug 25, 2020
b7f4e23
Code cleanup, better error reporting when character encoding gets man…
labkey-jeckels Aug 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ docker/**/data
docker/**/logs
docker/**/.env
docker/.gradle
docker/dev_*/**
docker/nginx/test-ehr*
docker/nginx/cert.pem
docker/nginx/key.pem

**/node_modules/
**/build/

**/resources/credits/dependencies.txt

**/.gradle

**/app.css
**/app.css.map
**/app.js
**/app.js.map

WNPRC_EHR/resources/web/wnprc_ehr/gen/
10 changes: 10 additions & 0 deletions AnimalRequests/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"test": {
"presets":["@babel/preset-react","@babel/preset-typescript"],
"plugins": [
"transform-es2015-modules-commonjs"
]
}
}
}
6 changes: 6 additions & 0 deletions AnimalRequests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
app.css
app.css.map
app.js
app.js.map
*.swp
36 changes: 36 additions & 0 deletions AnimalRequests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Animal Requests

This is a single page app that uses [React Final Form](https://github.com/final-form/react-final-form) along with [TypeScript](https://github.com/Microsoft/TypeScript) and LabKey's [JavaScript API](https://www.labkey.org/_webdav/Documentation/%40files/reference/javascript-api/index.html). The form allows a user to submit a request for animals.

Below is an example of one of the dropdown select fields within the form, followed by a brief explanation of each of the [props](https://reactjs.org/docs/components-and-props.html).

```
<Field
name="project"
className="col-xs-5 form-control-input"
component="select"
validate={required}
>
<option/>
<option value="TBD">TBD</option>
<DropdownOptions name="animal_requests_active_projects" rowkey="project"/>
</Field>
```

`Field` is a component imported from react-final-form.

The `className` prop in the `Field` component is the class of field element, using bootstrap grid.

The `name` prop is the name of the column in the insert DB.

The `component` prop describes to react-final-form what type of `Field` it is.

The `validate` prop takes a function that takes the field value, all the values of the form and the meta data about the field and returns an error if the value is invalid, or undefined if the value is valid.

`DropdownOptions` is a component that produces a list of select options given `name` and `rowkey` props.

The `name` prop in the `DropdownOptions` component is the name of the variable that holds the data in the react state.

The `rowkey` prop is the key of the data row returned by LabKey server.

More information about how the entire form works can be found in the documentation linked above. Also, another nice resource provided by react-final-form is its extensive [interactive examples](https://github.com/final-form/react-final-form#examples).
11 changes: 11 additions & 0 deletions AnimalRequests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply plugin: 'java'
apply plugin: 'org.labkey.module'
compileJava {
options.compilerArgs << "-Xlint:unchecked"

}

dependencies {
// BuildUtils.addLabKeyDependency(project: project, config: "compile", depProjectPath: ":server:modules:wnprc-modules:WNPRC_EHR", depProjectConfig: "apiCompile")
compile project(":server:modules:wnprc-modules:WNPRC_EHR")
}
21 changes: 21 additions & 0 deletions AnimalRequests/jest-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
"roots": [
"<rootDir>/src"
],
"globals": {
"LABKEY": {}
},
"transform": {
"^.+\\.tsx?$": "ts-jest",
".+\\.(css|styl|less|sass|scss)$": "jest-transform-css"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
}
8 changes: 8 additions & 0 deletions AnimalRequests/module.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ModuleClass: org.labkey.animalrequests.AnimalRequestsModule
ModuleDependencies: WNPRC_EHR
Label: Enter Animal Requests into EHR
Description: Simple module that utilizes React and Typescript to enter animal requests into WNPRC EHR
URL: https://github.com/WNPRC-EHR-Services/wnprc-modules/AnimalRequests
License: Apache 2.0
SupportedDatabases: pgsql
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
Loading