Skip to content

Commit

Permalink
Merge branch 'develop' into fix-1006-provider-management-rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 authored Jun 6, 2024
2 parents 41c867c + da661b8 commit 039e6d8
Show file tree
Hide file tree
Showing 46 changed files with 577 additions and 355 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ RUN chown tomcat_admin:tomcat /healthcheck.sh; \

ADD install/docker-entrypoint.sh /docker-entrypoint.sh
RUN chown tomcat_admin:tomcat /docker-entrypoint.sh; \
chmod 770 /docker-entrypoint.sh;
chmod 770 /docker-entrypoint.sh;

RUN mkdir -p /var/lib/lucene_index; \
chown -R tomcat_admin:tomcat /var/lib/lucene_index; \
chmod -R 770 /var/lib/lucene_index;

USER tomcat_admin

ENTRYPOINT [ "/docker-entrypoint.sh" ]
Expand Down
7 changes: 4 additions & 3 deletions app.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ services:
volumes:
- ./dev/plugins:/var/lib/openelis-global/plugins
- ./dev/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- lucene_index-vol:/var/lib/lucene_index
secrets:
- source: common.properties
tty: true
stdin_open: true
entrypoint: bash
secrets:
common.properties:
file: ./dev/properties/common.properties
file: ./dev/properties/common.properties
volumes:
lucene_index-vol:
2 changes: 2 additions & 0 deletions build.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
- key_trust-store-volume:/etc/openelis-global
- ./volume/plugins/:/var/lib/openelis-global/plugins
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- lucene_index-vol:/var/lib/lucene_index
secrets:
- source: datasource.password
- source: common.properties
Expand Down Expand Up @@ -145,3 +146,4 @@ volumes:
key_trust-store-volume:
certs-vol:
keys-vol:
lucene_index-vol:
4 changes: 3 additions & 1 deletion dev.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ services:
- ./volume/plugins/:/var/lib/openelis-global/plugins
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- ./target/OpenELIS-Global.war:/usr/local/tomcat/webapps/OpenELIS-Global.war
- lucene_index-vol:/var/lib/lucene_index
secrets:
- source: datasource.password
- source: common.properties
Expand Down Expand Up @@ -140,4 +141,5 @@ volumes:
db-data:
key_trust-store-volume:
certs-vol:
keys-vol:
keys-vol:
lucene_index-vol:
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ services:
- key_trust-store-volume:/etc/openelis-global
- ./volume/plugins/:/var/lib/openelis-global/plugins
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- lucene_index-vol:/var/lib/lucene_index
#Runing OpenELIS with the locally compiled war file
#- ./target/OpenELIS-Global.war:/usr/local/tomcat/webapps/OpenELIS-Global.war
secrets:
Expand Down Expand Up @@ -139,4 +140,5 @@ volumes:
db-data:
key_trust-store-volume:
certs-vol:
keys-vol:
keys-vol:
lucene_index-vol:
5 changes: 4 additions & 1 deletion frontend/src/components/addOrder/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { FormattedMessage, useIntl } from "react-intl";
import OrderEntryValidationSchema from "../formModel/validationSchema/OrderEntryValidationSchema";
import config from "../../config.json";
import PageBreadCrumb from "../common/PageBreadCrumb";
let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "sidenav.label.addorder", link: "/SamplePatientEntry" },
];

export let sampleObject = {
index: 0,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/admin/menu/CommonProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const CommonProperties = () => {

return (
<>
<div style={{ marginLeft: "3em", marginRight: "1em" }}>
<div className="adminPageContent">
{notificationVisible === true ? <AlertDialog /> : ""}
<PageBreadCrumb breadcrumbs={[{ label: "home.label", link: "/" }]} />
<Grid fullWidth={true}>
Expand Down
54 changes: 47 additions & 7 deletions frontend/src/components/common/CustomDatePicker.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import React, { useEffect, useState } from "react";
import React, { useEffect, useState, useContext } from "react";
import { DatePicker, DatePickerInput } from "@carbon/react";
import { format } from "date-fns";
import { ConfigurationContext } from "../layout/Layout";

const CustomDatePicker = (props) => {
const [currentDate, setCurrentDate] = useState(
props.value ? props.value : "",
);

const { configurationProperties } = useContext(ConfigurationContext);
function handleDatePickerChange(e) {
let date = new Date(e[0]);
const formatDate = format(new Date(date), "dd/MM/yyyy");
const formatDate = format(
new Date(date),
configurationProperties.DEFAULT_DATE_LOCALE == "fr-FR"
? "dd/MM/yyyy"
: "MM/dd/yyyy",
);
setCurrentDate(formatDate);
props.onChange(currentDate);
}
Expand All @@ -18,23 +24,57 @@ const CustomDatePicker = (props) => {
props.onChange(currentDate);
}, [currentDate]);

useEffect(() => {
if (props.updateStateValue) {
setCurrentDate(props.value);
}
}, [props.value]);

return (
<>
<DatePicker
id={props.id}
dateFormat="d/m/Y"
dateFormat={
configurationProperties.DEFAULT_DATE_LOCALE == "fr-FR"
? "d/m/Y"
: "m/d/Y"
}
className={props.className}
datePickerType="single"
value={currentDate}
onChange={(e) => handleDatePickerChange(e)}
maxDate={props.disallowFutureDate ? new Date() : null}
minDate={props.disallowPastDate ? new Date() : null}
maxDate={
props.disallowFutureDate
? format(
new Date(),
configurationProperties.DEFAULT_DATE_LOCALE == "fr-FR"
? "dd/MM/yyyy"
: "MM/dd/yyyy",
)
: ""
}
minDate={
props.disallowPastDate
? format(
new Date(),
configurationProperties.DEFAULT_DATE_LOCALE == "fr-FR"
? "dd/MM/yyyy"
: "MM/dd/yyyy",
)
: ""
}
>
<DatePickerInput
id={props.id}
placeholder="dd/mm/yyyy"
placeholder={
configurationProperties.DEFAULT_DATE_LOCALE == "fr-FR"
? "dd/mm/yyyy"
: "mm/dd/yyyy"
}
type="text"
labelText={props.labelText}
invalid={props.invalid}
invalidText={props.invalidText}
/>
</DatePicker>
</>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/common/CustomNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export const AlertDialog = () => {
key={index}
title={notificationBody.title}
timeout={
notificationBody.kind !== NotificationKinds.error
? 8000
: 100000
notificationBody.kind !== NotificationKinds.error ? 2000 : 3000
}
onClose={(event) => {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const SearchPatientFormValues = {
dateOfBirth: "",
guid: "",
gender: "",
suppressExternalSearch: true,
};

export default SearchPatientFormValues;
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ const CreatePatientValidationSchema = Yup.object().shape({
}
const [day, month, year] = value.split("/");
const date = new Date(`${year}-${month}-${day}`);
const date2 = new Date(`${year}-${day}-${month}`);

return date instanceof Date && !isNaN(date);
const validDate1 = date instanceof Date && !isNaN(date);
const validDate2 = date2 instanceof Date && !isNaN(date2);

return validDate1 || validDate2;
}),
patientContact: Yup.object().shape({
person: Yup.object().shape({
Expand Down
Loading

0 comments on commit 039e6d8

Please sign in to comment.