Skip to content

Commit

Permalink
Merge pull request #14 from koskedk/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
koskedk authored Jan 15, 2020
2 parents 22de43f + 7d6b9ee commit 7c5ad68
Show file tree
Hide file tree
Showing 75 changed files with 80,903 additions and 560 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ lerna-debug.log*
# Dependency directories
node_modules/
dist/

packages/server/secrets/demo-cert.pem
packages/server/secrets/demo-key.pem
packages/server/production.env

coverage/
junit.xml
11 changes: 6 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"scripts": {
"type-check": "tsc --noEmit",
"type-check:watch": "yarn type-check -- --watch",
"build": "webpack --config webpack.config.lib.prod.js --progress --colors --mode=production",
"start:app": "webpack-dev-server --config webpack.config.app.js --progress --colors --mode=development",
"start": "webpack-dev-server --config webpack.config.lib.js --progress --colors --mode=development",
"start:prod": "webpack-dev-server --config webpack.config.lib.js --mode=production"
"build": "webpack --config webpack.lib.prod.js --progress --colors --mode=production",
"start:app": "webpack-dev-server --config webpack.app.js --progress --colors --mode=development",
"start": "webpack-dev-server --config webpack.lib.js --progress --colors --mode=development",
"start:prod": "webpack-dev-server --config webpack.lib.prod.js --colors --mode=production"
},
"dependencies": {
"axios": "^0.19.0",
Expand Down Expand Up @@ -59,6 +59,7 @@
"typescript": "^3.5.3",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.8.0"
"webpack-dev-server": "^3.8.0",
"webpack-merge": "^4.2.1"
}
}
2 changes: 1 addition & 1 deletion packages/client/src/containers/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.layout-menu {
top: 50px !important;
top: 0px !important;
}
.layout-main {
padding-top: 20px !important;
Expand Down
40 changes: 28 additions & 12 deletions packages/client/src/containers/agency/AgencyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import { Column } from "primereact/column";
import { Button } from "primereact/button";

interface Props {
agencies: Agency[]
onManage: any
onAdd: any
agencies: Agency[];
onManage: any;
onAdd: any;
}
export class AgencyList extends Component<Props, {}> {

constructor(props: Readonly<Props>) {
super(props);
}
Expand All @@ -28,21 +27,38 @@ export class AgencyList extends Component<Props, {}> {
manageTemplate = (rowData: any, column: any) => {
return (
<div>
<Button icon="pi pi-external-link" onClick={(event) => this.manageAction(event, rowData)}></Button>
</div>);
<Button
disabled={true}
icon="pi pi-external-link"
onClick={event => this.manageAction(event, rowData)}
></Button>
</div>
);
};

render() {
const header = <div className="p-clearfix" style={{ "lineHeight": "1.87em" }}>Agencies <Button
onClick={this.addAction} icon="pi pi-plus" style={{ "float": "right" }}/></div>;

const header = (
<div className="p-clearfix" style={{ lineHeight: "1.87em" }}>
Agencies{" "}
<Button
disabled={true}
onClick={this.addAction}
icon="pi pi-plus"
style={{ float: "right" }}
/>
</div>
);

return (
<div>
<DataTable value={this.props.agencies} header={header}>
<Column field="display" header="Display"/>
<Column body={this.manageTemplate} style={{ textAlign: "center", width: "5em" }}/>
<Column field="display" header="Display" />
<Column
body={this.manageTemplate}
style={{ textAlign: "center", width: "5em" }}
/>
</DataTable>
</div>);
</div>
);
}
}
46 changes: 31 additions & 15 deletions packages/client/src/containers/agency/MechanismList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import { Column } from "primereact/column";
import { Button } from "primereact/button";

interface Props {
mechanisms: Mechanism[]
onManage: any
onAdd: any
mechanisms: Mechanism[];
onManage: any;
onAdd: any;
}
export class MechanismList extends Component<Props, {}> {

constructor(props: Readonly<Props>) {
super(props);
}
Expand All @@ -28,24 +27,41 @@ export class MechanismList extends Component<Props, {}> {
manageTemplate = (rowData: any, column: any) => {
return (
<div>
<Button icon="pi pi-external-link" onClick={(event) => this.manageAction(event, rowData)}></Button>
</div>);
<Button
disabled={true}
icon="pi pi-external-link"
onClick={event => this.manageAction(event, rowData)}
></Button>
</div>
);
};

render() {
const header = <div className="p-clearfix" style={{ "lineHeight": "1.87em" }}>Mechanisms <Button
onClick={this.addAction} icon="pi pi-plus" style={{ "float": "right" }}/></div>;

const header = (
<div className="p-clearfix" style={{ lineHeight: "1.87em" }}>
Mechanisms{" "}
<Button
disabled={true}
onClick={this.addAction}
icon="pi pi-plus"
style={{ float: "right" }}
/>
</div>
);

return (
<div>
<DataTable value={this.props.mechanisms} header={header}>
<Column field="code" header="Code"/>
<Column field="name" header="Name"/>
<Column field="implementationName" header="Implementation Name"/>
<Column field="agency.Name" header="Agency"/>
<Column body={this.manageTemplate} style={{ textAlign: "center", width: "5em" }}/>
<Column field="code" header="Code" />
<Column field="name" header="Name" />
<Column field="implementationName" header="Implementation Name" />
<Column field="agency.display" header="Agency" />
<Column
body={this.manageTemplate}
style={{ textAlign: "center", width: "5em" }}
/>
</DataTable>
</div>);
</div>
);
}
}
78 changes: 62 additions & 16 deletions packages/client/src/containers/mfl/FacilityList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ import { Button } from "primereact/button";
import { Facility } from "./models/facility";

interface Props {
facilities: Facility[]
onManage: any
onAdd: any
facilities: Facility[];
onManage: any;
onAdd: any;
onPage: any;
onSort: any;
onFilter: any;
loading: boolean;
totalRecords: number;
rows: number;
first: number;
}
export class FacilityList extends Component<Props, {}> {

constructor(props: Readonly<Props>) {
super(props);
}
Expand All @@ -28,24 +34,64 @@ export class FacilityList extends Component<Props, {}> {
manageTemplate = (rowData: any, column: any) => {
return (
<div>
<Button icon="pi pi-external-link" onClick={(event) => this.manageAction(event, rowData)}></Button>
</div>);
<Button
disabled={true}
icon="pi pi-external-link"
onClick={event => this.manageAction(event, rowData)}
></Button>
</div>
);
};

render() {
const header = <div className="p-clearfix" style={{ "lineHeight": "1.87em" }}>Facilitiys <Button
onClick={this.addAction} icon="pi pi-plus" style={{ "float": "right" }}/></div>;

const header = (
<div className="p-clearfix" style={{ lineHeight: "1.87em" }}>
Facilitiys{" "}
<Button
disabled={true}
onClick={this.addAction}
icon="pi pi-plus"
style={{ float: "right" }}
/>
</div>
);

return (
<div>
<DataTable value={this.props.facilities} header={header}>
<Column field="code" header="Code"/>
<Column field="name" header="Name"/>
<Column field="county.name" header="Implementation"/>
<Column field="agency.name" header="Agency"/>
<Column body={this.manageTemplate} style={{ textAlign: "center", width: "5em" }}/>
<DataTable
value={this.props.facilities}
header={header}
loading={this.props.loading}
paginator={true}
rows={this.props.rows}
rowsPerPageOptions={[50, 100, 200, 500]}
totalRecords={this.props.totalRecords}
lazy={true}
onPage={this.props.onPage}
first={this.props.first}
onSort={this.props.onSort}
onFilter={this.props.onFilter}
>
<Column field="code" header="Code" sortable={true} filter={true} />
<Column field="name" header="Name" sortable={true} filter={true} />
<Column
field="county.name"
header="County"
sortable={true}
filter={true}
/>
<Column
field="agency.name"
header="Agency"
sortable={true}
filter={true}
/>
<Column
body={this.manageTemplate}
style={{ textAlign: "center", width: "5em" }}
/>
</DataTable>
</div>);
</div>
);
}
}
Loading

0 comments on commit 7c5ad68

Please sign in to comment.