Commit bfbff6b1 authored by Øyvind Julsrud's avatar Øyvind Julsrud Committed by Torstein
Browse files

DEICH-5925: deichman.no: MR fixes

parent 4e77492d
......@@ -32,7 +32,6 @@ const NewChildPatronFormAdmin = ({
isError,
userData,
cardnumber,
userDataFromFront
}) => {
return (
<Formik
......@@ -119,7 +118,6 @@ const NewChildPatronFormAdmin = ({
values,
errors,
touched,
setFieldValue,
handleChange,
handleBlur,
handleSubmit,
......@@ -312,7 +310,6 @@ NewChildPatronFormAdmin.defaultProps = {
NewChildPatronFormAdmin.propTypes = {
userData: PropTypes.object.isRequired,
userDataFromFront: PropTypes.bool.isRequired,
onSubmitForm: PropTypes.func.isRequired,
isError: PropTypes.bool,
cardnumber: PropTypes.string
......
......@@ -413,21 +413,22 @@ class RegistrationStep1 extends React.Component {
/>
<Container preventCollapse>
{showAlert && (
<div className="test">
<Alert
centered
closeLabel="Lukk"
type="notification"
onClose={this.handleAlertClose}
>
<Block top={4} bottom={4}>
<p>
Låner <b>{submittedChildPatronName}</b> er aktiv!{" "}
<a href={kohaBorrowerUrl} target="_blank">Vis låner i Koha</a>.
</p>
</Block>
</Alert>
</div>
<Alert
centered
closeLabel="Lukk"
type="notification"
onClose={this.handleAlertClose}
>
<Block top={4} bottom={4}>
<p>
Låner <b>{submittedChildPatronName}</b> er aktiv!{" "}
<a href={kohaBorrowerUrl} target="_blank">
Vis låner i Koha
</a>
.
</p>
</Block>
</Alert>
)}
<Block top={8} bottom={8}>
<h1>Ny låner</h1>
......@@ -490,7 +491,7 @@ class RegistrationStep1 extends React.Component {
</>
)}
{!isAdultUser && currentStep === "form" && (
{isAdultUser && currentStep === "form" && (
<NewPatronFormAdmin
userData={userData}
cardnumber={cardnumber}
......@@ -500,11 +501,10 @@ class RegistrationStep1 extends React.Component {
/>
)}
{isAdultUser && currentStep === "form" && (
{!isAdultUser && currentStep === "form" && (
<NewChildPatronFormAdmin
userData={userData}
cardnumber={cardnumber}
userDataFromFront={userDataFromFront}
isError={showSubmitError}
onSubmitForm={this.submitRegularForm}
/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment