Skip to content

Commit

Permalink
Merge pull request #109 from openimis/23.10
Browse files Browse the repository at this point in the history
23.10
  • Loading branch information
delcroip authored Dec 21, 2023
2 parents efed17d + 9a20d98 commit d60688d
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the openimis backend Docker image
- name: Build the openimis frontend Docker image
run: |
docker build . --tag ghcr.io/openimis/openimis-fe:${{ github.event.inputs.tag }}
docker push ghcr.io/openimis/openimis-fe:${{ github.event.inputs.tag }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ Note: This image only provides the openimis frontend server. The full openIMIS d
export default {"es":"es-ES", "es-ES": "es-ES","en":"en-GB","en-GB":"en-GB","fr":"fr-FR","fr-FR":"fr-FR"}
```
- type `yarn build` and if success - type `yarn start` and you should see this translation in your app (go to 'users' page, select user, change language into the newly provided, refresh page and you should see texts in changed language)
- if you encounter any problems by that point, run `yarn load-config` in the main module
- there is also possibility to overwrite particular language for example 'English' into 'Gambian English' (without changes on database level). In your new translation module in index.js (for example new module called `openimis-fe-language_en_gm_js`):
```js
import messages_en from "./translations/en.json";
Expand Down
66 changes: 43 additions & 23 deletions openimis.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,93 +18,113 @@
}
],
"modules": [
{
{
"name": "CoreModule",
"npm": "@openimis/fe-core@>=1.5.1"
"npm": "@openimis/fe-core@>=1.6.0"
},
{
"name": "HomeModule",
"npm": "@openimis/fe-home@>=1.5.1"
"npm": "@openimis/fe-home@>=1.5.2"
},
{
"name": "LocationModule",
"npm": "@openimis/fe-location@>=1.4.1"
"npm": "@openimis/fe-location@>=1.5.0"
},
{
"name": "InsureeModule",
"npm": "@openimis/fe-insuree@>=1.5.1"
"npm": "@openimis/fe-insuree@>=1.6.0"
},
{
"name": "MedicalModule",
"npm": "@openimis/fe-medical@>=1.5.1"
"npm": "@openimis/fe-medical@>=1.6.0"
},
{
"name": "MedicalPriceListModule",
"npm": "@openimis/fe-medical_pricelist@>=1.5.1"
"npm": "@openimis/fe-medical_pricelist@>=1.5.2"
},
{
"name": "ProductModule",
"npm": "@openimis/fe-product@>=1.5.1"
"npm": "@openimis/fe-product@>=1.6.0"
},
{
"name": "PolicyModule",
"npm": "@openimis/fe-policy@>=1.5.1"
"npm": "@openimis/fe-policy@>=1.6.0"
},
{
"name": "PayerModule",
"npm": "@openimis/fe-payer@>=1.4.2"
"npm": "@openimis/fe-payer@>=1.4.3"
},
{
"name": "ContributionModule",
"npm": "@openimis/fe-contribution@>=1.4.2"
"npm": "@openimis/fe-contribution@>=1.5.0"
},
{
"name": "PaymentModule",
"npm": "@openimis/fe-payment@>=1.4.2"
"npm": "@openimis/fe-payment@>=1.4.3"
},
{
"name": "ClaimModule",
"npm": "@openimis/fe-claim@>=1.4.3"
"npm": "@openimis/fe-claim@>=1.5.0"
},
{
"name": "ClaimBatchModule",
"npm": "@openimis/fe-claim_batch@>=1.4.2"
"npm": "@openimis/fe-claim_batch@>=1.4.3"
},
{
"name": "AdminModule",
"npm": "@openimis/fe-admin@>=1.5.1"
"npm": "@openimis/fe-admin@>=1.6.0"
},
{
"name": "ToolsModule",
"npm": "@openimis/fe-tools@>=1.5.2"
"npm": "@openimis/fe-tools@>=1.5.3"
},
{
"name": "ProfileModule",
"npm": "@openimis/fe-profile@>=1.5.1"
"npm": "@openimis/fe-profile@>=1.6.0"
},
{
"name": "LanguageFrModule",
"npm": "@openimis/fe-language_fr@>=1.5.2"
"npm": "@openimis/fe-language_fr@>=1.6.0"
},
{
"name": "CalculationModule",
"npm": "@openimis/fe-calculation@>=1.4.2"
"npm": "@openimis/fe-calculation@>=1.5.0"
},
{
"name": "PolicyHolderModule",
"npm": "@openimis/fe-policyholder@>=1.4.2"
"npm": "@openimis/fe-policyholder@>=1.5.0"
},
{
"name": "ContributionPlanModule",
"npm": "@openimis/fe-contribution_plan@>=1.5.1"
"npm": "@openimis/fe-contribution_plan@>=1.6.0"
},
{
"name": "ContractModule",
"npm": "@openimis/fe-contract@>=1.4.2"
"npm": "@openimis/fe-contract@>=1.5.0"
},
{
"name": "InvoiceModule",
"npm": "@openimis/fe-invoice@>=1.4.2"
"npm": "@openimis/fe-invoice@>=1.5.0"
},
{
"name": "SocialProtectionModule",
"npm": "@openimis/fe-social_protection@>=1.0.0"
},
{
"name": "TasksManagementModule",
"npm": "@openimis/fe-tasks_management@>=1.0.0"
},
{
"name": "OpenSearchReportsModule",
"npm": "@openimis/fe-opensearch_reports@>=1.0.0"
},
{
"name": "GrievanceModule",
"npm": "@openimis/fe-grievance@>=1.0.0"
},
{
"name": "PayrollModule",
"npm": "@openimis/fe-payroll@>=1.0.0"
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openimis/fe",
"version": "23.04",
"version": "23.10",
"license": "AGPL-3.0-only",
"proxy": "http://localhost:8000",
"homepage": "http://localhost:3000/front",
Expand Down
17 changes: 17 additions & 0 deletions src/helpers/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const theme = createTheme({
drawer: {
width: 300,
fontSize: 16,
backgroundColor:"#006273"
},
appBar: {
fontSize: 16,
Expand Down Expand Up @@ -130,6 +131,10 @@ const theme = createTheme({
fontWeight: 500,
align: "center",
},
secondaryHighlightedRow: {
backgroundColor: "#cbedf2",
},
secondaryHighlightedCell: {},
highlightedAltRow: {},
highlightedAltCell: {
fontStyle: "italic",
Expand Down Expand Up @@ -182,6 +187,18 @@ const theme = createTheme({
},
secondaryButton: {},
},
tooltipContainer: {
position: 'fixed',
bottom: 15,
right: 8,
zIndex: 2000,
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
},
flexTooltip: {
marginBottom: 5,
},
fab: {
position: "fixed",
bottom: 20,
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ const loadConfiguration = async () => {
throw response;
} else {
const { data } = await response.json();
return data.moduleConfigurations.reduce((acc, c) => {
data.moduleConfigurations.unshift({});
const out = data.moduleConfigurations.reduce((acc, c) => {
try {
acc[c.module] = { controls: c.controls, ...JSON.parse(c.config) };
} catch (error) {
console.error(`Failed to parse module ${c.module} config`, error);
}
return acc;
}, []);
});
return out;
}
};

Expand Down

0 comments on commit d60688d

Please sign in to comment.