ehr-alerts-ui 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "lib/index.cjs.js",
4
4
  "module": "lib/index.js",
5
5
  "types": "lib/components/index.d.ts",
6
- "version": "0.0.17",
6
+ "version": "0.0.18",
7
7
  "dependencies": {
8
8
  "@types/node": "^12.0.0",
9
9
  "@types/react": "^17.0.0",
@@ -64,7 +64,7 @@
64
64
  "start": "react-scripts start",
65
65
  "build": "rm -rf lib && rollup -c rollup.config.js",
66
66
  "prepack": "npm run build",
67
- "build_standalone": "rm -rf build && sed -i \"s~0.0.17~0.0.10~\" ./package.json && react-scripts build"
67
+ "build_standalone": "rm -rf build && sed -i \"s~0.0.18~0.0.10~\" ./package.json && react-scripts build"
68
68
  },
69
69
  "eslintConfig": {
70
70
  "extends": [
@@ -31,8 +31,8 @@ const audiences = [
31
31
 
32
32
  const messageLevels = [
33
33
  {code: MessageLevel.TEADE, texts: 'Teade (roheline)'},
34
- {code: MessageLevel.HOIATUS, texts: 'Hoiatus'},
35
- {code: MessageLevel.VEATEADE, texts: 'Veateade'},
34
+ {code: MessageLevel.HOIATUS, texts: 'Hoiatus (kollane)'},
35
+ {code: MessageLevel.VEATEADE, texts: 'Veateade (punane)'},
36
36
  ]
37
37
 
38
38
  const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clearAlert, editAlert, postAlert,
@@ -316,7 +316,7 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
316
316
  <div className='alerts-ui--alert-creation-modal--content'>
317
317
 
318
318
  <FieldWrapper label='Teate publik'
319
- info={{content: 'Teate publik label'}}
319
+ info={{content: 'Autentimata kasutaja on iga kasutaja, kes avab e-ehituse veebilehe. Autenditud kasutaja on kasutaja, kes logib end e-ehituse veebi sisse. Teate loomisel tuleb arvestada, kas teade on vajalik neile, kes on juba lehel sisse loginud või kõikidele, kes lehele satuvad.'}}
320
320
  className={checkSelfError('publik')}
321
321
  component={
322
322
  <Select name='audience' value={alert.audience} onChange={onAudienceChange} options={audiences} />
@@ -325,7 +325,7 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
325
325
  />
326
326
 
327
327
  <FieldWrapper label='Teate tase'
328
- info={{content: 'Teate tase label'}}
328
+ info={{content: 'Teade (roheline) on neutraalse või positiivse sisuga. Näiteks info uue teenuse või muutuse kohta keskkonnas. Hoiatus (kollane) on hoiatav info millegi kohta, mis võib häirida kasutaja tööd lehel, kuid ei takista. Näiteks suhtlus mõne teise registriga võib olla häiritud. Veateade (punane) on teade selle kohta, et midagi ei tööta ja see takistab tööd lehel. Näiteks teenus on mingi aeg maas, allkirjastamine ei tööta, sisse logida ei saa.'}}
329
329
  className={checkSelfError('tease')}
330
330
  component={
331
331
  <Select name='level' value={alert.level} onChange={onLevelChange} options={messageLevels} />
@@ -334,7 +334,7 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
334
334
  />
335
335
 
336
336
  <FieldWrapper label='Teate kuvamise algus'
337
- info={{content: 'Teate kuvamise algus label'}}
337
+ info={{content: 'Teade kuvatakse kasutajale siin märgitud kellaajast alates'}}
338
338
  component={
339
339
  <div className='alerts-ui--alert-creation-modal--content--date'>
340
340
  <InternalDatePicker date={alert.begin} onChange={onDateStartChange} title='start_date'
@@ -359,7 +359,7 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
359
359
  />
360
360
 
361
361
  <FieldWrapper label='Teate kuvamise lõpp'
362
- info={{content: 'Teate kuvamise lõpp label'}}
362
+ info={{content: 'Teate kuvamine kasutajale lõpeb siin märgitud kellaajast'}}
363
363
  component={
364
364
  <div className='alerts-ui--alert-creation-modal--content--date'>
365
365
  <InternalDatePicker date={alert.end} onChange={onDateEndChange} title='end_date'
@@ -384,10 +384,9 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
384
384
  required
385
385
  />
386
386
 
387
- <Section form={true} title='EE' >
387
+ {/*<Section form={true} title='EE' >*/}
388
388
 
389
389
  <FieldWrapper label='Teate pealkiri'
390
- info={{content: 'Teate pealkiri label'}}
391
390
  className={checkSelfError('title')}
392
391
  component={
393
392
  <Input name='Title EE' value={alert.title}
@@ -399,7 +398,6 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
399
398
  />
400
399
 
401
400
  <FieldWrapper label='Teate sisu'
402
- info={{content: 'Teate sisu label'}}
403
401
  className={checkSelfError('content')}
404
402
  component={
405
403
  <TextArea name='Content EE' value={alert.content}
@@ -411,7 +409,7 @@ const AlertModal: React.FC<AlertModalState & AlertModalDispatch> = ({alert, clea
411
409
  required
412
410
  />
413
411
 
414
- </Section>
412
+ {/*</Section>*/}
415
413
 
416
414
  {/*<Section form={true} title='EN' collapsed >*/}
417
415
 
@@ -1,5 +1,5 @@
1
1
  import React, {useEffect, useState} from "react";
2
- import {Button, CollapseTable, CollapseTableRow, ControlledPopover} from 'ehr-components';
2
+ import {Button, CollapseTable, CollapseTableRow, ControlledPopover, Tooltip} from 'ehr-components';
3
3
  import SortableRow from "./SortableRow";
4
4
  import {Alert} from "../../reducers/tableReducer";
5
5
  import {ReactComponent as CopyIcon} from "../../assets/icons/copy.svg";
@@ -150,12 +150,16 @@ const AlertsTable: React.FC<AlertsTableState & AlertsTableDispatch> = ({alerts,
150
150
  alert.level,
151
151
  `${alert.begin} - ${alert.end}`,
152
152
  alert.content,
153
- <button className='alerts-ui--icon-button' onClick={() => duplicateAlert(alert)}>
154
- <CopyIcon fill={styles.colorGreyDark} />
155
- </button>,
156
- <button className='alerts-ui--icon-button' onClick={() => editAlert(alert)}>
157
- <EditIcon fill={styles.colorGreyDark} />
158
- </button>,
153
+ <Tooltip content='Kopeerin'>
154
+ <button className='alerts-ui--icon-button' onClick={() => duplicateAlert(alert)}>
155
+ <CopyIcon fill={styles.colorGreyDark} />
156
+ </button>
157
+ </Tooltip>,
158
+ <Tooltip content='Muudan'>
159
+ <button className='alerts-ui--icon-button' onClick={() => editAlert(alert)}>
160
+ <EditIcon fill={styles.colorGreyDark} />
161
+ </button>
162
+ </Tooltip>,
159
163
  <ControlledPopover
160
164
  className={'popover-confirm'}
161
165
  content={deleteContent(alert.id)}
@@ -164,7 +168,11 @@ const AlertsTable: React.FC<AlertsTableState & AlertsTableDispatch> = ({alerts,
164
168
  theme={'danger'}
165
169
  toggle={() => onToggleDeletePopup(alert)}
166
170
  >
167
- <button className='alerts-ui--icon-button'><DeleteIcon fill={styles.colorGreyDark} /></button>
171
+ <div>
172
+ <Tooltip content='Kustutan'>
173
+ <button className='alerts-ui--icon-button'><DeleteIcon fill={styles.colorGreyDark} /></button>
174
+ </Tooltip>
175
+ </div>
168
176
  </ControlledPopover>,
169
177
  ];
170
178
  }