Skip to content

Commit 389624b

Browse files
committed
Merge branch 'v2.6.0-RC' of https://github.com/msupply-foundation/open-msupply into v2.6.0-RC
2 parents e813b70 + f0f85e1 commit 389624b

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

client/packages/config/src/config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ declare const FEATURE_EXAMPLE: boolean;
33
// Used to load plugins via server during dev rather then from local dir, to test remote loading
44
// `yarn start -- -- -env LOAD_REMOTE_PLUGINS=true`
55
declare const LOAD_REMOTE_PLUGINS: boolean;
6+
declare const FEATURE_PRINTER_SETTINGS: boolean;
67

78
// For production, API is on the same domain/ip and port as web app, available through sub-route
89
// i.e. web app is on https://my.openmsupply.com/, then graphql will be available https://my.openmsupply.com/graphql
@@ -48,6 +49,10 @@ export const Environment = {
4849
typeof FEATURE_EXAMPLE === 'undefined' ? false : FEATURE_EXAMPLE,
4950
LOAD_REMOTE_PLUGINS:
5051
typeof LOAD_REMOTE_PLUGINS === 'undefined' ? false : LOAD_REMOTE_PLUGINS,
52+
FEATURE_PRINTER_SETTINGS:
53+
typeof FEATURE_PRINTER_SETTINGS === 'undefined'
54+
? false
55+
: FEATURE_PRINTER_SETTINGS,
5156
};
5257

5358
export default Environment;

client/packages/host/src/Admin/Settings.tsx

+12-9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { LabelPrinterSettings } from './LabelPrinterSettings';
2424
import { Printers } from './Printers';
2525
import { ConfigurationSettings } from './ConfigurationSettings';
2626
import { ServerInfo } from './ServerInfo';
27+
import { Environment } from 'packages/config/src';
2728

2829
export const Settings: React.FC = () => {
2930
const { data: initStatus } = useInitialisationStatus();
@@ -74,15 +75,17 @@ export const Settings: React.FC = () => {
7475
<LabelPrinterSettings />
7576
<ElectronSettings />
7677
</SettingsSection>
77-
<SettingsSection
78-
Icon={PrinterIcon}
79-
titleKey="heading.printers"
80-
expanded={activeSection === 4}
81-
onChange={toggleSection(4)}
82-
visible={true}
83-
>
84-
<Printers />
85-
</SettingsSection>
78+
{Environment.FEATURE_PRINTER_SETTINGS && (
79+
<SettingsSection
80+
Icon={PrinterIcon}
81+
titleKey="heading.printers"
82+
expanded={activeSection === 4}
83+
onChange={toggleSection(4)}
84+
visible={true}
85+
>
86+
<Printers />
87+
</SettingsSection>
88+
)}
8689
{isCentralServer && (
8790
<SettingsSection
8891
Icon={ListIcon}

client/packages/host/webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ module.exports = env => {
111111
new ReactRefreshWebpackPlugin(),
112112
new webpack.DefinePlugin({
113113
FEATURE_EXAMPLE: env.FEATURE_EXAMPLE,
114+
FEATURE_PRINTER_SETTINGS: env.FEATURE_PRINTER_SETTINGS,
114115
LOAD_REMOTE_PLUGINS: env.LOAD_REMOTE_PLUGINS,
115116
API_HOST: JSON.stringify(env.API_HOST),
116117
LOCAL_PLUGINS: JSON.stringify(require('./getLocalPlugins.js')),

server/service/src/vaccine_course/update.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn generate(
206206
id: id.clone(),
207207
name: name.unwrap_or(old_row.name),
208208
program_id: old_row.program_id,
209-
demographic_id: demographic_id.or(old_row.demographic_id),
209+
demographic_id: demographic_id,
210210
coverage_rate,
211211
is_active,
212212
wastage_rate,

0 commit comments

Comments
 (0)