-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add input-rodne-cislo component #102
Conversation
Je dobre, ze ten hint sa meni s inputom? Funguje takto nejaky iny komponent? Plus rozmyslam, ci nedat tu validacnu logiku radsej do railsov ako sem do client-side JS. cc @tajovic @filiplikavcan @jsuchal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eronisko validacia urcite musi ist AJ serverside. Co sa tyka hintu tak podla mna to neni dobre, ze sa to meni. Je to divny pattern co dizajn manual nepozna. Specialne teda errory sa robia inak.
@@ -11,6 +11,7 @@ import Tabs from './components/tabs/tabs' | |||
import SdnHeader from './components/_custom/header/header' | |||
import SdnTimeline from './components/_custom/timeline/timeline' | |||
import SdnAppearLink from './utilities/appear-link/appear-link' | |||
import SdnInputRodneCislo from './components/_custom/input-rodne-cislo/intput-rodne-cislo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideme po slovensky? Nie som uplne proti len sa pytam.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kedze to je forknute ja by som bol za en :)
Inac tu budes mat taky misung medzi en/sk a bude sa to strasne zle citat. Nehovoriac ze bez diakritiky niektore veci mozu menit vyznam.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cast custom veci je uz slovenskych a cast anglickych. Problem s anglickymi mam v tom, ze na jeden slovensky termin existuje viacero podobne dobrych prekladov, a teda pri preklade sa trochu straca informacia. Napr. rodne cislo -> identification number -> identfikacne cislo (rodne cislo / pas / cislo vodicskeho / BIFO /... ). Ak sa dohodneme na anglictine tak to prelozim.
Nebral som to ako error lebo som predpokladal, že existujú vstupy, ktoré
nebudú validované, ale bude možné ich spracovať (úradník im rozumie).
Ako napríklad cudzinci alebo ľudia ktorí sú obeťou nejakej chyby systému.
…On Mon, Aug 5, 2019, 10:16 Jano Suchal ***@***.***> wrote:
***@***.**** requested changes on this pull request.
@eronisko <https://github.com/eronisko> validacia urcite musi ist *AJ*
serverside. Co sa tyka hintu tak podla mna to neni dobre, ze sa to meni. Je
to divny pattern co dizajn manual nepozna. Specialne teda errory sa robia
inak.
------------------------------
In src/all.js
<#102 (comment)>
:
> @@ -11,6 +11,7 @@ import Tabs from './components/tabs/tabs'
import SdnHeader from './components/_custom/header/header'
import SdnTimeline from './components/_custom/timeline/timeline'
import SdnAppearLink from './utilities/appear-link/appear-link'
+import SdnInputRodneCislo from './components/_custom/input-rodne-cislo/intput-rodne-cislo'
Ideme po slovensky? Nie som uplne proti len sa pytam.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#102?email_source=notifications&email_token=AAJDTR2MHTW2IXPJDYUF5WDQC7OUHA5CNFSM4H6LGJUKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAQUMUQ#pullrequestreview-270616146>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJDTR5PKGTBUCFF4PE3VU3QC7OUHANCNFSM4H6LGJUA>
.
|
import "../../../vendor/polyfills/Element/prototype/classList"; | ||
import {parseRC, isValidRC} from "./input-rodne-cislo-parse" | ||
|
||
function SdnInputRodneCislo($module) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preco nie class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto bol format ktory bol pouzivany v starsom kode, prilis som sa nad tym nezamyslal. A nie som si isty, ci to ten ich preprocessor zvlada.
try { | ||
parseRC(strRodneCislo); | ||
return true; | ||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto nie je dobry pattern.
Cele parseRC je teraz black hole. Ak chces odchytit tie errorory co tam hadzes, odporucam porovnat error, a ak je to nieco ine tak re-thrownut.
V podstate to je normalny text input, avsak pridava hint, po ktorom si pouzivatel moze skontrolovat rodne cislo.
Zvolil som hint a nie error pretoze:
Resolves #101
A takto nejako to vyzera (label sa da menit):