Skip to content

Commit 7ab1aa7

Browse files
authored
OLMIS-8125: Added warning message when importing users (#75)
1 parent f07f099 commit 7ab1aa7

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

src/admin-data-import/components/AdminDataImportPage/AdminDataImportPage.jsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,25 @@ const AdminDataImportPage = () => {
142142
/>
143143
{TYPE_OF_IMPORTS.map(type => {
144144
if (type.value === typeOfImport) {
145-
return <p style={{ maxWidth: '544px' }} key={type.value}>{formatMessage(type.info)}</p>
145+
return (
146+
<div key={type.value}>
147+
<p style={{ maxWidth: '544px' }} key={type.value}>{formatMessage(type.info)}</p>
148+
149+
{typeOfImport === 'User' && (
150+
<p
151+
style={{
152+
color: '#cc0000',
153+
fontWeight: 'bold',
154+
marginTop: '12px',
155+
maxWidth: '544px',
156+
lineHeight: 1.4,
157+
}}
158+
>
159+
{formatMessage(type.additionalInfo)}
160+
</p>
161+
)}
162+
</div>
163+
)
146164
}
147165
})}
148166
</div>

src/admin-data-import/consts.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const TYPE_OF_IMPORTS = [
3333
{
3434
value: "User",
3535
name: "admin.dataImport.types.users",
36-
info: "admin.dataImport.types.users.info"
36+
info: "admin.dataImport.types.users.info",
37+
additionalInfo: "admin.dataImport.types.users.additionalInfo"
3738
}
3839
];
3940

src/admin-data-import/messages_en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"admin.dataImport.types.population.info": "To import Population you need a ZIP with a geographicZone.csv file",
1414
"admin.dataImport.types.facilities.info": "To import Facilities you need: facility.csv, supportedProgram.csv",
1515
"admin.dataImport.types.users.info": "To import Users you need: user.csv, roleAssignment.csv",
16+
"admin.dataImport.types.users.additionalInfo": "Please be careful when importing user roles. All current roles will be removed and replaced with the ones in the file. See the documentation for more information.",
1617
"admin.dataImport.modal.summary": "Import Summary",
1718
"admin.dataImport.modal.totalEntries": "Total Entries",
1819
"admin.dataImport.modal.successfulEntries": "Successful Entries",

0 commit comments

Comments
 (0)