File tree 4 files changed +19
-10
lines changed
server/service/src/vaccine_course
4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ declare const FEATURE_EXAMPLE: boolean;
3
3
// Used to load plugins via server during dev rather then from local dir, to test remote loading
4
4
// `yarn start -- -- -env LOAD_REMOTE_PLUGINS=true`
5
5
declare const LOAD_REMOTE_PLUGINS : boolean ;
6
+ declare const FEATURE_PRINTER_SETTINGS : boolean ;
6
7
7
8
// For production, API is on the same domain/ip and port as web app, available through sub-route
8
9
// 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 = {
48
49
typeof FEATURE_EXAMPLE === 'undefined' ? false : FEATURE_EXAMPLE ,
49
50
LOAD_REMOTE_PLUGINS :
50
51
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 ,
51
56
} ;
52
57
53
58
export default Environment ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { LabelPrinterSettings } from './LabelPrinterSettings';
24
24
import { Printers } from './Printers' ;
25
25
import { ConfigurationSettings } from './ConfigurationSettings' ;
26
26
import { ServerInfo } from './ServerInfo' ;
27
+ import { Environment } from 'packages/config/src' ;
27
28
28
29
export const Settings : React . FC = ( ) => {
29
30
const { data : initStatus } = useInitialisationStatus ( ) ;
@@ -74,15 +75,17 @@ export const Settings: React.FC = () => {
74
75
< LabelPrinterSettings />
75
76
< ElectronSettings />
76
77
</ 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
+ ) }
86
89
{ isCentralServer && (
87
90
< SettingsSection
88
91
Icon = { ListIcon }
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ module.exports = env => {
111
111
new ReactRefreshWebpackPlugin ( ) ,
112
112
new webpack . DefinePlugin ( {
113
113
FEATURE_EXAMPLE : env . FEATURE_EXAMPLE ,
114
+ FEATURE_PRINTER_SETTINGS : env . FEATURE_PRINTER_SETTINGS ,
114
115
LOAD_REMOTE_PLUGINS : env . LOAD_REMOTE_PLUGINS ,
115
116
API_HOST : JSON . stringify ( env . API_HOST ) ,
116
117
LOCAL_PLUGINS : JSON . stringify ( require ( './getLocalPlugins.js' ) ) ,
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ fn generate(
206
206
id : id. clone ( ) ,
207
207
name : name. unwrap_or ( old_row. name ) ,
208
208
program_id : old_row. program_id ,
209
- demographic_id : demographic_id. or ( old_row . demographic_id ) ,
209
+ demographic_id : demographic_id,
210
210
coverage_rate,
211
211
is_active,
212
212
wastage_rate,
You can’t perform that action at this time.
0 commit comments