Skip to content

Commit 499dde7

Browse files
committed
Merge branch 'v1.6.00'
2 parents d77ea19 + 409ab5d commit 499dde7

File tree

552 files changed

+17152
-4491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

552 files changed

+17152
-4491
lines changed

build/windows/omsupply_demo.suf

+6-6
Original file line numberDiff line numberDiff line change
@@ -2199,10 +2199,10 @@ end
21992199
<IDS_CTRL_STATICTEXT_TOPINSTRUCTIONS/>
22002200
<IDS_CTRL_STATICTEXT_BOTTOMINSTRUCTIONS/>
22012201
<IDS_CTRL_STATICTEXT_LABEL_01>Installation Successful</IDS_CTRL_STATICTEXT_LABEL_01>
2202-
<IDS_CTRL_STATICTEXT_LABEL_02>The omSupply Server v1.0.0-IS22-windows-instalers-test6 installation is complete.</IDS_CTRL_STATICTEXT_LABEL_02>
2203-
<IDS_CTRL_STATICTEXT_LABEL_03>Thank you for trying the omSupply server demo!</IDS_CTRL_STATICTEXT_LABEL_03>
2202+
<IDS_CTRL_STATICTEXT_LABEL_02>The Open mSupply Server v1.0.0-IS22-windows-instalers-test6 installation is complete.</IDS_CTRL_STATICTEXT_LABEL_02>
2203+
<IDS_CTRL_STATICTEXT_LABEL_03>Thank you for trying the Open mSupply server demo!</IDS_CTRL_STATICTEXT_LABEL_03>
22042204
<IDS_CTRL_STATICTEXT_LABEL_04>Please click Finish to exit this installer.</IDS_CTRL_STATICTEXT_LABEL_04>
2205-
<IDS_CTRL_CHECK_BOX_01>Launch omSupply</IDS_CTRL_CHECK_BOX_01>
2205+
<IDS_CTRL_CHECK_BOX_01>Launch Open mSupply</IDS_CTRL_CHECK_BOX_01>
22062206
</Messages>
22072207
</SUF70Messages>
22082208
</Languages>
@@ -2294,7 +2294,7 @@ end
22942294
<OverwriteCtrlPanel>1</OverwriteCtrlPanel>
22952295
<OverwriteSC>1</OverwriteSC>
22962296
<CreateCPEntry>1</CreateCPEntry>
2297-
<RegKeyName>%ProductName%%ProductVer%</RegKeyName>
2297+
<RegKeyName>%ProductName%</RegKeyName>
22982298
<CPDesc>%ProductName%</CPDesc>
22992299
<UseCustomCPIcon>0</UseCustomCPIcon>
23002300
<CustCPIconFN/>
@@ -3417,7 +3417,7 @@ g_HandleSystemReboot();
34173417
<SUF7SessionVars>
34183418
<SessionVar>
34193419
<Name>%ProductName%</Name>
3420-
<Value>omSupply Server Demo</Value>
3420+
<Value>Open mSupply Server Demo</Value>
34213421
<Type>1</Type>
34223422
</SessionVar>
34233423
<SessionVar>
@@ -3470,7 +3470,7 @@ g_HandleSystemReboot();
34703470
<PostBuildProg/>
34713471
<PostBuildCmdLine/>
34723472
<PostBuildWait>0</PostBuildWait>
3473-
<Filename>omSupply_Demo_replace with version.exe</Filename>
3473+
<Filename>Open_mSupply_Demo_replace with version.exe</Filename>
34743474
<OutputFolder>.*</OutputFolder>
34753475
<SegmentSizeMode>0</SegmentSizeMode>
34763476
<CustomSegSize>0</CustomSegSize>

build/windows/omsupply_desktop.suf

+12-7
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ end
20272027
<OverwriteCtrlPanel>1</OverwriteCtrlPanel>
20282028
<OverwriteSC>1</OverwriteSC>
20292029
<CreateCPEntry>1</CreateCPEntry>
2030-
<RegKeyName>%ProductName%%ProductVer%</RegKeyName>
2030+
<RegKeyName>%ProductName%</RegKeyName>
20312031
<CPDesc>%ProductName%</CPDesc>
20322032
<UseCustomCPIcon>0</UseCustomCPIcon>
20332033
<CustCPIconFN/>
@@ -3078,7 +3078,7 @@ g_HandleSystemReboot();
30783078
<Event>
30793079
<Name>On Startup</Name>
30803080
<Args/>
3081-
<Script>local sWindowTitle = "omSupply Desktop Setup";
3081+
<Script>local sWindowTitle = "Open mSupply Desktop Setup";
30823082

30833083
hasOmsupplyDesktopInstalled = false;
30843084
omSupplyDesktopPath = SessionVar.Expand("%AppFolder%\\open mSupply.exe");
@@ -3088,11 +3088,16 @@ if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\omSupply Desktop") then
30883088
omSupplyDesktopPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\omSupply Desktop", "Path", true);
30893089
if File.DoesExist(omSupplyDesktopPath) then
30903090
hasOmsupplyDesktopInstalled = true;
3091+
local index = String.ReverseFind(omSupplyDesktopPath, "\\");
3092+
if index ~= -1 then
3093+
omSupplyDesktopPath = String.Left(omSupplyDesktopPath, index-1)
3094+
SessionVar.Set("%AppFolder%", omSupplyDesktopPath);
3095+
end
30913096
end
30923097
end
30933098

30943099
if hasOmsupplyDesktopInstalled then
3095-
sWindowTitle = "omSupply Desktop Upgrader";
3100+
sWindowTitle = "Open mSupply Desktop Upgrader";
30963101
end
30973102

30983103
SessionVar.Set("%window_title%", sWindowTitle);</Script>
@@ -3122,7 +3127,7 @@ SessionVar.Set("%window_title%", sWindowTitle);</Script>
31223127
Registry.CreateKey(HKEY_LOCAL_MACHINE, "Software\\omSupply Desktop");
31233128
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\omSupply Desktop", "Path", omSupplyDesktopPath, REG_SZ);
31243129

3125-
Shell.CreateShortcut(Shell.GetFolder(SHF_DESKTOP), "omSupply Desktop", omSupplyDesktopPath, "", "", "", 0, SW_SHOWNORMAL, nil, "", START_OPTION_DEFAULT);
3130+
Shell.CreateShortcut(Shell.GetFolder(SHF_DESKTOP), "Open mSupply Desktop", omSupplyDesktopPath, "", "", "", 0, SW_SHOWNORMAL, nil, "", START_OPTION_DEFAULT);
31263131
end
31273132

31283133
</Script>
@@ -3169,7 +3174,7 @@ g_HandleSystemReboot();
31693174
<SUF7SessionVars>
31703175
<SessionVar>
31713176
<Name>%ProductName%</Name>
3172-
<Value>omSupply Desktop</Value>
3177+
<Value>Open mSupply Desktop</Value>
31733178
<Type>1</Type>
31743179
</SessionVar>
31753180
<SessionVar>
@@ -3214,7 +3219,7 @@ g_HandleSystemReboot();
32143219
</SessionVar>
32153220
<SessionVar>
32163221
<Name>%window_title%</Name>
3217-
<Value>omSupply Desktop Setup</Value>
3222+
<Value>Open mSupply Desktop Setup</Value>
32183223
<Type>10</Type>
32193224
</SessionVar>
32203225
<SessionVar>
@@ -3232,7 +3237,7 @@ g_HandleSystemReboot();
32323237
<PostBuildProg/>
32333238
<PostBuildCmdLine/>
32343239
<PostBuildWait>0</PostBuildWait>
3235-
<Filename>omSupply_Desktop_replace with version.exe</Filename>
3240+
<Filename>Open_mSupply_Desktop_replace with version.exe</Filename>
32363241
<OutputFolder>.*</OutputFolder>
32373242
<SegmentSizeMode>0</SegmentSizeMode>
32383243
<CustomSegSize>0</CustomSegSize>

build/windows/omsupply_server.suf

+24-19
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ end
802802
</Screen>
803803
<Screen>
804804
<Type>170</Type>
805-
<Name>omSupply Configuration</Name>
805+
<Name>Open mSupply Configuration</Name>
806806
<BannerStyle>2</BannerStyle>
807807
<TemplateName>Custom</TemplateName>
808808
<OverrideProjTheme>0</OverrideProjTheme>
@@ -909,13 +909,13 @@ end
909909
<ScreenH>362</ScreenH>
910910
</StyleData>
911911
<CustomCtrlList>
912-
<CustomCtrlInfo Left="27" Top="85" Width="150" Height="18" ID="211"/>
913-
<CustomCtrlInfo Left="179" Top="85" Width="82" Height="18" ID="821"/>
914-
<CustomCtrlInfo Left="27" Top="151" Width="150" Height="18" ID="212"/>
915-
<CustomCtrlInfo Left="27" Top="180" Width="95" Height="19" ID="604"/>
916-
<CustomCtrlInfo Left="27" Top="202" Width="95" Height="19" ID="605"/>
912+
<CustomCtrlInfo Left="27" Top="85" Width="173" Height="18" ID="211"/>
913+
<CustomCtrlInfo Left="200" Top="85" Width="82" Height="18" ID="821"/>
914+
<CustomCtrlInfo Left="27" Top="151" Width="167" Height="18" ID="212"/>
915+
<CustomCtrlInfo Left="200" Top="149" Width="95" Height="19" ID="604"/>
916+
<CustomCtrlInfo Left="200" Top="174" Width="95" Height="19" ID="605"/>
917917
<CustomCtrlInfo Left="27" Top="118" Width="150" Height="18" ID="213"/>
918-
<CustomCtrlInfo Left="179" Top="117" Width="200" Height="18" ID="824"/>
918+
<CustomCtrlInfo Left="200" Top="117" Width="200" Height="18" ID="824"/>
919919
</CustomCtrlList>
920920
<Events>
921921
<Event>
@@ -1158,23 +1158,23 @@ end
11581158
</Language>
11591159
<Messages>
11601160
<IDS_WINDOW_TITLE>%window_title%</IDS_WINDOW_TITLE>
1161-
<IDS_HEADER_TEXT>omSupply Configuration</IDS_HEADER_TEXT>
1162-
<IDS_SUBHEADER_TEXT>Settings required in order to configure the omSupply.</IDS_SUBHEADER_TEXT>
1161+
<IDS_HEADER_TEXT>Open mSupply Configuration</IDS_HEADER_TEXT>
1162+
<IDS_SUBHEADER_TEXT>Settings required in order to configure the Open mSupply.</IDS_SUBHEADER_TEXT>
11631163
<IDS_CTRL_BUTTON_NEXT>&amp;Next &gt;</IDS_CTRL_BUTTON_NEXT>
11641164
<IDS_CTRL_BUTTON_BACK>&lt; &amp;Back</IDS_CTRL_BUTTON_BACK>
11651165
<IDS_CTRL_BUTTON_CANCEL>&amp;Cancel</IDS_CTRL_BUTTON_CANCEL>
11661166
<IDS_CTRL_BUTTON_HELP>&amp;Help</IDS_CTRL_BUTTON_HELP>
11671167
<IDS_CTRL_STATICTEXT_TOPINSTRUCTIONS/>
11681168
<IDS_CTRL_STATICTEXT_BOTTOMINSTRUCTIONS/>
1169-
<IDS_CTRL_STATICTEXT_LABEL_01>OmSupply server port number:</IDS_CTRL_STATICTEXT_LABEL_01>
1169+
<IDS_CTRL_STATICTEXT_LABEL_01>Open mSupply server port number:</IDS_CTRL_STATICTEXT_LABEL_01>
11701170
<IDS_CTRL_EDIT_01>8000</IDS_CTRL_EDIT_01>
11711171
<IDS_CTRL_EDIT_MASK_01/>
11721172
<IDS_CTRL_EDIT_MASK_PLACE_HOLDER_01> </IDS_CTRL_EDIT_MASK_PLACE_HOLDER_01>
1173-
<IDS_CTRL_STATICTEXT_LABEL_02>Setup omSupply server with:</IDS_CTRL_STATICTEXT_LABEL_02>
1173+
<IDS_CTRL_STATICTEXT_LABEL_02>Setup Open mSupply server with:</IDS_CTRL_STATICTEXT_LABEL_02>
11741174
<IDS_CTRL_RADIO_BUTTON_01>Sqlite</IDS_CTRL_RADIO_BUTTON_01>
11751175
<IDS_CTRL_RADIO_BUTTON_02>PostgresSQL</IDS_CTRL_RADIO_BUTTON_02>
1176-
<IDS_CTRL_STATICTEXT_LABEL_03>OmSupply database:</IDS_CTRL_STATICTEXT_LABEL_03>
1177-
<IDS_CTRL_EDIT_04>omsupply-database</IDS_CTRL_EDIT_04>
1176+
<IDS_CTRL_STATICTEXT_LABEL_03>Open mSupply database:</IDS_CTRL_STATICTEXT_LABEL_03>
1177+
<IDS_CTRL_EDIT_04>open-msupply-database</IDS_CTRL_EDIT_04>
11781178
<IDS_CTRL_EDIT_MASK_04/>
11791179
<IDS_CTRL_EDIT_MASK_PLACE_HOLDER_04> </IDS_CTRL_EDIT_MASK_PLACE_HOLDER_04>
11801180
</Messages>
@@ -2990,7 +2990,7 @@ end
29902990
<OverwriteCtrlPanel>1</OverwriteCtrlPanel>
29912991
<OverwriteSC>1</OverwriteSC>
29922992
<CreateCPEntry>1</CreateCPEntry>
2993-
<RegKeyName>%ProductName%%ProductVer%</RegKeyName>
2993+
<RegKeyName>%ProductName%</RegKeyName>
29942994
<CPDesc>%ProductName%</CPDesc>
29952995
<UseCustomCPIcon>0</UseCustomCPIcon>
29962996
<CustCPIconFN/>
@@ -4067,17 +4067,22 @@ g_HandleSystemReboot();
40674067
<Name>On Startup</Name>
40684068
<Args/>
40694069
<Script>-- Set window title
4070-
local sWindowTitle = "omSupply Server Setup";
4070+
local sWindowTitle = "Open mSupply Server Setup";
40714071
local omSupplyServerPath = "";
40724072

40734073
-- Check if the omSupply Server has been already installed on this machine
40744074
if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\omSupply Server") then
40754075
omSupplyServerPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\omSupply Server", "Path", true);
4076+
local index = String.ReverseFind(omSupplyServerPath, "\\");
4077+
if index ~= -1 then
4078+
omSupplyServerPath = String.Left(omSupplyServerPath, index-1)
4079+
SessionVar.Set("%AppFolder%", omSupplyServerPath);
4080+
end
40764081
end
40774082

40784083
hasOmsupplyInstalled = File.DoesExist(omSupplyServerPath);
40794084
if hasOmsupplyInstalled then
4080-
sWindowTitle = "omSupply Server Upgrader Setup";
4085+
sWindowTitle = "Open mSupply Server Upgrader Setup";
40814086
end
40824087

40834088
SessionVar.Set("%window_title%", sWindowTitle);
@@ -4339,7 +4344,7 @@ g_HandleSystemReboot();
43394344
<SUF7SessionVars>
43404345
<SessionVar>
43414346
<Name>%ProductName%</Name>
4342-
<Value>omSupply Server</Value>
4347+
<Value>Open mSupply Server</Value>
43434348
<Type>1</Type>
43444349
</SessionVar>
43454350
<SessionVar>
@@ -4404,7 +4409,7 @@ g_HandleSystemReboot();
44044409
</SessionVar>
44054410
<SessionVar>
44064411
<Name>%omsupply_db_name%</Name>
4407-
<Value>omsupply-database</Value>
4412+
<Value>open-msupply</Value>
44084413
<Type>10</Type>
44094414
</SessionVar>
44104415
<SessionVar>
@@ -4432,7 +4437,7 @@ g_HandleSystemReboot();
44324437
<PostBuildProg/>
44334438
<PostBuildCmdLine/>
44344439
<PostBuildWait>0</PostBuildWait>
4435-
<Filename>omSupply_Server_replace with version.exe</Filename>
4440+
<Filename>Open_mSupply_Server_replace with version.exe</Filename>
44364441
<OutputFolder>.*</OutputFolder>
44374442
<SegmentSizeMode>0</SegmentSizeMode>
44384443
<CustomSegSize>0</CustomSegSize>

build/windows/omsupply_standalone.suf

+12-7
Original file line numberDiff line numberDiff line change
@@ -2178,7 +2178,7 @@ end
21782178
<OverwriteCtrlPanel>1</OverwriteCtrlPanel>
21792179
<OverwriteSC>1</OverwriteSC>
21802180
<CreateCPEntry>1</CreateCPEntry>
2181-
<RegKeyName>%ProductName%%ProductVer%</RegKeyName>
2181+
<RegKeyName>%ProductName%</RegKeyName>
21822182
<CPDesc>%ProductName%</CPDesc>
21832183
<UseCustomCPIcon>0</UseCustomCPIcon>
21842184
<CustCPIconFN/>
@@ -3258,7 +3258,7 @@ g_HandleSystemReboot();
32583258
<Name>On Startup</Name>
32593259
<Args/>
32603260
<Script>-- Set window title
3261-
local sWindowTitle = "omSupply Setup";
3261+
local sWindowTitle = "Open mSupply Setup";
32623262
local omSupplyStandalonePath = "";
32633263

32643264
hasOmsupplyDesktopInstalled = false;
@@ -3287,12 +3287,17 @@ if Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\omSupply Standalone") th
32873287
omSupplyStandalonePath = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\omSupply Standalone", "Path", true);
32883288
if File.DoesExist(omSupplyStandalonePath) then
32893289
hasOmsupplyStandaloneInstalled = true;
3290+
local index = String.ReverseFind(omSupplyStandalonePath, "\\");
3291+
if index ~= -1 then
3292+
omSupplyStandalonePath = String.Left(omSupplyStandalonePath, index-1)
3293+
SessionVar.Set("%AppFolder%", omSupplyStandalonePath);
3294+
end
32903295
end
32913296
end
32923297

32933298
hasOmsupplyStandaloneInstalled = File.DoesExist(omSupplyStandalonePath);
32943299
if hasOmsupplyStandaloneInstalled then
3295-
sWindowTitle = "omSupply Upgrader";
3300+
sWindowTitle = "Open mSupply Upgrader";
32963301
end
32973302

32983303
SessionVar.Set("%window_title%", sWindowTitle);</Script>
@@ -3442,7 +3447,7 @@ g_HandleSystemReboot();
34423447
<SUF7SessionVars>
34433448
<SessionVar>
34443449
<Name>%ProductName%</Name>
3445-
<Value>omSupply</Value>
3450+
<Value>Open mSupply</Value>
34463451
<Type>1</Type>
34473452
</SessionVar>
34483453
<SessionVar>
@@ -3492,12 +3497,12 @@ g_HandleSystemReboot();
34923497
</SessionVar>
34933498
<SessionVar>
34943499
<Name>%omsupply_db_name%</Name>
3495-
<Value>omsupply-database</Value>
3500+
<Value>open-msupply</Value>
34963501
<Type>10</Type>
34973502
</SessionVar>
34983503
<SessionVar>
34993504
<Name>%window_title%</Name>
3500-
<Value>omSupply Standalone Setup</Value>
3505+
<Value>Open mSupply Standalone Setup</Value>
35013506
<Type>10</Type>
35023507
</SessionVar>
35033508
<SessionVar>
@@ -3515,7 +3520,7 @@ g_HandleSystemReboot();
35153520
<PostBuildProg/>
35163521
<PostBuildCmdLine/>
35173522
<PostBuildWait>0</PostBuildWait>
3518-
<Filename>omSupply_Standalone_replace with version.exe</Filename>
3523+
<Filename>Open_mSupply_Standalone_replace with version.exe</Filename>
35193524
<OutputFolder>.*</OutputFolder>
35203525
<SegmentSizeMode>0</SegmentSizeMode>
35213526
<CustomSegSize>0</CustomSegSize>

client/.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ module.exports = {
4949
'always',
5050
{ markers: ['#', '/'], exceptions: ['-'] },
5151
],
52-
'react-hooks/exhaustive-deps': 'off',
52+
'react-hooks/exhaustive-deps': 'warn',
5353
'@typescript-eslint/no-explicit-any': 'warn',
54+
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
5455
},
5556
ignorePatterns: ['**/operations.generated.ts', '**/types/schema.ts'],
5657
};

client/lerna.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"version": "0.0.0",
33
"npmClient": "yarn",
4-
"packages": [
5-
"packages/*"
6-
]
4+
"packages": ["packages/*", "packages/plugins/*"]
75
}

client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"start": "yarn start-remote",
1111
"build": "lerna run --scope @openmsupply-client/* build",
1212
"build-stats": "lerna run --scope @openmsupply-client/* build-stats",
13+
"build-plugins": "lerna run --scope @openmsupply-client/* build-plugin",
1314
"serve": "lerna run --scope @openmsupply-client/* --parallel serve",
1415
"clean": "lerna run --scope @openmsupply-client/* --parallel clean",
1516
"compile": "lerna run --scope @openmsupply-client/* --parallel tsc --since HEAD -- --noEmit",

client/packages/android/app/src/main/java/org/openmsupply/client/NativeApi.java

+6-11
Original file line numberDiff line numberDiff line change
@@ -350,28 +350,23 @@ public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {
350350
// Attempt to get a non-loopback address for the local server
351351
// and fallback to loopback if there is an error
352352
private String getHostAddress(NsdServiceInfo serviceInfo, Boolean isLocal){
353+
if (!isLocal){
354+
return serviceInfo.getHost().getHostAddress();
355+
}
353356
try {
354-
if (isLocal) {
355357
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) {
356-
NetworkInterface intf = en.nextElement();
357-
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
358+
NetworkInterface ni = en.nextElement();
359+
for (Enumeration<InetAddress> enumIpAddr = ni.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
358360
InetAddress inetAddress = enumIpAddr.nextElement();
359361
if (!inetAddress.isLoopbackAddress() && !inetAddress.isLinkLocalAddress() && inetAddress.isSiteLocalAddress()) {
360362
return inetAddress.getHostAddress();
361363
}
362364
}
363365
}
364-
}
365-
return serviceInfo.getHost().getHostAddress();
366366
} catch (Exception ex) {
367367
Log.e(OM_SUPPLY, ex.toString());
368368
}
369-
finally {
370-
// with no network available the getHostAddress() will
371-
// throw an Exception - in this case default to local loopback
372-
// as no other network is reachable!
373-
return "127.0.0.1";
374-
}
369+
return serviceInfo.getHost().getHostAddress();
375370
}
376371

377372
private JSObject serviceInfoToObject(NsdServiceInfo serviceInfo) {

0 commit comments

Comments
 (0)