Skip to content

Commit

Permalink
Mobile service desk
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 21, 2025
1 parent 0a0d823 commit eaf2f5a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 22 deletions.
1 change: 1 addition & 0 deletions servicedesk-gui/src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const en = {
dayOfBirth: "The date of birth in the document: <span>{{dayOfBirth}}</span> ",
},
invalidDate: "The day of birth can not be recognized, please select the correct date",
validDate: "The day of birth is corrected",
idDocument: "Fill in the <span>last 6 characters</span> of the ID document",
},
confirmation: {
Expand Down
1 change: 1 addition & 0 deletions servicedesk-gui/src/locale/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const nl = {
dayOfBirth: "De geboortedatum in het document: <span>{{dayOfBirth}}</span>",
},
invalidDate: "De geboortedatum wordt niet herkent, selecteer de juiste datum",
validDate: "De geboortedatum is gecorrigeerd",
idDocument: "Vul de <span>laatste 6 karakters</span> van het document in",
},
confirmation: {
Expand Down
9 changes: 9 additions & 0 deletions servicedesk-gui/src/tabs/Confirmation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,27 @@ div.confirmation {
width: 100%;
margin: 20px auto 30px auto;
}

.img-container {
display: flex;
padding: 20px;

img {
margin: auto;
width: 460px;
height: auto;

@media (max-width: $verification-width) {
width: 310px;
}

}
}

.button-container {
display: flex;
padding: 20px;

button {
margin: auto;
max-width: 360px;
Expand Down
42 changes: 21 additions & 21 deletions servicedesk-gui/src/tabs/Control.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Control = ({restart, proceed}) => {
<Switch value={confirmations[index]} onChange={val => confirm(index, val)}/>
</div>)}
{!validDayOfBirth && <div className={`validation-item ${birthDay === null ? "invalid" : ""}`}>
<p>{I18n.t("control.invalidDate")}</p>
<p>{I18n.t(`control.${birthDay === null ? "invalidDate" : "validDate"}`)}</p>
<DatePicker
ref={inputRef}
preventOpenOnFocus
Expand All @@ -109,30 +109,30 @@ const Control = ({restart, proceed}) => {
dropdownMode="select"
weekLabel="Week"
todayButton={null}/>
<div className={"calendar"} onClick={toggle}>
<div className="calendar" onClick={toggle}>
<img src={calendarIcon} alt="calendar"/>
</div>
</div>}
<div className="validation-item column">
<p className="inner-html"
dangerouslySetInnerHTML={{__html: DOMPurify.sanitize(I18n.t("control.idDocument"))}}/>
<div className="code-validation">
<CodeValidation verify={val => setDocumentId(val)}
size={6}
focusFirst={false}
validate={() => true}
/>
<Button txt={I18n.t("verification.proceed")}
disabled={isEmpty(documentId) || confirmations.some(val => !val) || loading || !isEmpty(error)
|| (!validDayOfBirth && isEmpty(birthDay))}
onClick={() => doConvertUserControlCode()}
/>
</div>
<div className="validation-item column">
<p className="inner-html"
dangerouslySetInnerHTML={{__html: DOMPurify.sanitize(I18n.t("control.idDocument"))}}/>
<div className="code-validation">
<CodeValidation verify={val => setDocumentId(val)}
size={6}
focusFirst={false}
validate={() => true}
/>
<Button txt={I18n.t("verification.proceed")}
disabled={isEmpty(documentId) || confirmations.some(val => !val) || loading || !isEmpty(error)
|| (!validDayOfBirth && isEmpty(birthDay))}
onClick={() => doConvertUserControlCode()}
/>
</div>
</div>
</div>

</div>
)
};
</div>
)
};

export default Control;
export default Control;
2 changes: 1 addition & 1 deletion servicedesk-gui/src/tabs/Control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ div.control {
}

.calendar {
margin-right: 12px;
margin: 0 12px 0 auto;
img {
width: 32px;
height: auto;
Expand Down

0 comments on commit eaf2f5a

Please sign in to comment.