Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

pomali
Copy link
Collaborator

@pomali pomali commented Jul 5, 2019

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:

  • rodne cisla vydavane s 4 cifernou koncovkou od roku 1954 ale ak ste clovek narodeny pred 1954 ale s rodnym cislom pridelenym po '54 dostanete 4 cifernu koncovku, takze nevieme urcit rok narodenia
  • existuje vynimka z delitelnosti 11 ak ma cislo bez kontrolnej cifry zvysok po deleni 11 = 10 tak moze byt kontrolna cifra 0 (nie je mi jasne preco, na internete sa udava ze priblizne 1000 takychto RC bolo vydanych)
  • verim, ze su este nejake ine problematicke miesta s RC

Resolves #101

A takto nejako to vyzera (label sa da menit):

image
image
image
image
image
image
image
image

@eronisko
Copy link

eronisko commented Aug 2, 2019

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

Copy link
Member

@jsuchal jsuchal left a 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'
Copy link
Member

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.

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.

Copy link
Collaborator Author

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.

@pomali
Copy link
Collaborator Author

pomali commented Aug 7, 2019 via email

import "../../../vendor/polyfills/Element/prototype/classList";
import {parseRC, isValidRC} from "./input-rodne-cislo-parse"

function SdnInputRodneCislo($module) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preco nie class ?

Copy link
Collaborator Author

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) {

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.

@pomali pomali closed this Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vytvorit input na rodne cislo
4 participants