diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..8c96536
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,5 @@
+{
+ "plugins":[
+ "@babel/plugin-proposal-class-properties"
+ ]
+}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 6c3f9c9..9789606 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,6 +4,6 @@ COPY . /app/
WORKDIR /app
RUN node openimis-config.js
RUN . ./modules-installs.txt
-RUN yarn install
+RUN yarn install --network-timeout 1000000
RUN yarn build
RUN yarn global add serve
\ No newline at end of file
diff --git a/openimis-config.js b/openimis-config.js
index 403d67e..193975b 100644
--- a/openimis-config.js
+++ b/openimis-config.js
@@ -9,7 +9,15 @@ function processLocales(config) {
},
{}
);
- locales.write(`export const locales = ${JSON.stringify(config['locales'].map((lc) => lc.intl))}\n`);
+ let filesByLang = config['locales'].reduce(
+ (fls, lc) => {
+ lc.languages.forEach((lg) => fls[lg] = lc.fileNames);
+ return fls
+ },
+ {}
+ );
+ locales.write(`export const locales = ${JSON.stringify(config['locales'].map((lc) => lc.intl))}`);
+ locales.write(`\nexport const fileNamesByLang = ${JSON.stringify(filesByLang)}`);
locales.write(`\nexport default ${JSON.stringify(localeByLang)}`);
}
@@ -20,15 +28,16 @@ function processModules(config) {
var modulesLinks = fs.createWriteStream('./modules-links.txt');
var modulesUnlinks = fs.createWriteStream('./modules-unlinks.txt');
+ modulesInstalls.write('yarn add')
config['modules'].forEach((module) => {
let lib = module.npm.substring(0, module.npm.lastIndexOf('@'));
srcModules.write(`import { ${module.name} } from '${lib}';\n`);
- modulesInstalls.write(`yarn remove ${lib}\n`);
- modulesInstalls.write(`yarn add ${module.npm}\n`);
+ modulesInstalls.write(` ${module.npm}`);
modulesRemoves.write(`yarn remove ${lib}\n`);
modulesLinks.write(`yarn link ${lib}\n`);
modulesUnlinks.write(`yarn unlink ${lib}\n`);
});
+ modulesInstalls.write('\n')
srcModules.write("\nfunction logicalName(npmName) {\n\t");
srcModules.write("return [...npmName.match(/([^/]*)\\/([^@]*).*/)][2];\n");
srcModules.write("}\n");
diff --git a/openimis.json b/openimis.json
index e856305..60a98d4 100644
--- a/openimis.json
+++ b/openimis.json
@@ -1,45 +1,65 @@
{
- "locales": [{"intl": "en-GB", "languages":["en"]}],
+ "locales": [
+ {
+ "languages": [
+ "en", "en-GB"
+ ],
+ "intl": "en-GB",
+ "fileNames": "en"
+ }
+ ],
"modules": [
{
"name": "CoreModule",
- "npm": "@openimis/fe-core@0.0.12"
+ "npm": "@openimis/fe-core@0.0.27"
},
{
"name": "HomeModule",
- "npm": "@openimis/fe-home@0.0.5"
- },
+ "npm": "@openimis/fe-home@0.0.11"
+ },
{
"name": "LocationModule",
- "npm": "@openimis/fe-location@0.0.3"
- },
+ "npm": "@openimis/fe-location@0.0.11"
+ },
{
"name": "InsureeModule",
- "npm": "@openimis/fe-insuree@0.0.8"
+ "npm": "@openimis/fe-insuree@0.0.17"
},
{
"name": "MedicalModule",
- "npm": "@openimis/fe-medical@0.0.3"
- },
+ "npm": "@openimis/fe-medical@0.0.10"
+ },
+ {
+ "name": "MedicalPriceListModule",
+ "npm": "@openimis/fe-medical_pricelist@0.0.3"
+ },
+ {
+ "name": "ProductModule",
+ "npm": "@openimis/fe-product@0.0.5"
+ },
{
"name": "PolicyModule",
- "npm": "@openimis/fe-policy@0.0.6"
- },
+ "npm": "@openimis/fe-policy@0.0.13"
+ },
{
"name": "ClaimModule",
- "npm": "@openimis/fe-claim@0.0.8"
+ "npm": "@openimis/fe-claim@0.0.22"
+ },
+ {
+ "name": "ClaimBatchModule",
+ "npm": "@openimis/fe-claim_batch@0.0.6"
},
{
"name": "AdminModule",
- "npm": "@openimis/fe-admin@0.0.9"
+ "npm": "@openimis/fe-admin@0.0.16"
},
{
"name": "ToolsModule",
- "npm": "@openimis/fe-tools@0.0.7"
+ "npm": "@openimis/fe-tools@0.0.13"
},
{
"name": "ProfileModule",
- "npm": "@openimis/fe-profile@0.0.7"
- }
+ "npm": "@openimis/fe-profile@0.0.12"
+ }
]
-}
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index a4cc066..26e153d 100644
--- a/package.json
+++ b/package.json
@@ -6,14 +6,19 @@
"homepage": "http://localhost/front",
"dependencies": {
"@babel/core": "^7.4.4",
- "@babel/plugin-proposal-class-properties": "^7.4.4",
- "@material-ui/core": "^4.1.2",
+ "@date-io/core": "^1.3.9",
+ "@date-io/moment": "^1.3.9",
+ "@material-ui/core": "^4.3.3",
"@material-ui/icons": "^4.2.1",
- "@openimis/fe-home": "0.0.2",
+ "@material-ui/pickers": "^3.2.2",
"classnames": "^2.2.6",
"express": "^4.16.4",
"history": "^4.9.0",
- "lodash": "^4.17.11",
+ "jquery": "^3.4.1",
+ "lodash": "^4.17.15",
+ "lodash-uuid": "^0.0.3",
+ "moment": "^2.24.0",
+ "nepali-date-picker": "^2.0.1",
"prop-types": "^15.5.4",
"react": "^16.8.6",
"react-autosuggest": "^9.4.3",
@@ -51,7 +56,8 @@
]
},
"devDependencies": {
- "babel-cli": "^6.26.0",
+ "@babel/cli": "^7.4.4",
+ "@babel/plugin-proposal-class-properties": "^7.5.5",
"react-app-rewired": "^2.1.3"
}
}
diff --git a/public/index.html b/public/index.html
index 83edeef..37ee5e2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -34,5 +34,8 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
+
+
+