Skip to content

Commit

Permalink
Add alert to warn about tagging deviation messages on stops only
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Jun 6, 2023
1 parent e08e186 commit 030776d
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
97 changes: 97 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@entur/alert": "^0.14.3",
"@entur/auth-provider": "1.1.1",
"@entur/button": "2.10.15",
"@entur/datepicker": "3.0.10",
Expand Down
12 changes: 12 additions & 0 deletions src/components/messages/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '@entur/button';
import { Contrast } from '@entur/layout';
import { DatePicker } from '@entur/datepicker';
import { BannerAlertBox } from '@entur/alert';
import { lightFormat, isBefore } from 'date-fns';
import LinePicker from '../line-picker';
import StopPicker from '../stop-picker';
Expand Down Expand Up @@ -523,7 +524,17 @@ class Register extends React.Component {
)}

{this.state.type === 'stop' && this.state.stops && (

<div>
<br></br>
<BannerAlertBox
title="Trå varsomt!"
variant="warning"
>
Du er i ferd med å lage en avviksmelding som treffer all rutegående trafikk som passerer de(n) valgte holdeplassen(e)
på tvers av operatører. Hvis du ønsker å lage en avviksmelding som kun treffer enkelte linjer (og stopp), velg "Linje" i stedet.
</BannerAlertBox>
<br></br>
<StopPicker
sort
isMulti
Expand All @@ -533,6 +544,7 @@ class Register extends React.Component {
/>
<br></br>
</div>

)}
</div>
)}
Expand Down
4 changes: 3 additions & 1 deletion src/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import '~@entur/tooltip/dist/styles.css';
@import '~@entur/loader/dist/styles.css';
@import '~@entur/tab/dist/styles.css';
@import '@entur/alert/dist/styles.css';

.hidden {
opacity: 0;
Expand Down Expand Up @@ -61,6 +62,7 @@ span {
top: 130px;
background-color: rgba(23, 28, 86, 1);
min-width: 55%;
max-width:65%;
min-height: 40;
padding: 3%;
padding-bottom: 5%;
Expand All @@ -85,7 +87,7 @@ span {
@media only screen and (max-width: 991px) {
.register_box {
min-width: 100%;
max-width: 100%;
max-width: 80%;
min-height: calc(100% - 100px);
background-color: rgba(23, 28, 86, 0.7);
left: 0;
Expand Down

0 comments on commit 030776d

Please sign in to comment.