This commit is contained in:
@@ -9,7 +9,7 @@ type Props = {
|
||||
}
|
||||
|
||||
/** Modální dialog pro hlasování o nových funkcích. */
|
||||
export default function FeaturesVotingModal({ isOpen, onClose, onChange, initialValues }: Props) {
|
||||
export default function FeaturesVotingModal({ isOpen, onClose, onChange, initialValues }: Readonly<Props>) {
|
||||
|
||||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
onChange(e.currentTarget.value as FeatureRequest, e.currentTarget.checked);
|
||||
@@ -31,7 +31,7 @@ export default function FeaturesVotingModal({ isOpen, onClose, onChange, initial
|
||||
label={FeatureRequest[key]}
|
||||
onChange={handleChange}
|
||||
value={key}
|
||||
defaultChecked={initialValues && initialValues.includes(key as FeatureRequest)}
|
||||
defaultChecked={initialValues?.includes(key as FeatureRequest)}
|
||||
/>
|
||||
})}
|
||||
<p className="mt-3" style={{ fontSize: '12px' }}>Něco jiného? Dejte vědět.</p>
|
||||
|
||||
@@ -8,7 +8,7 @@ type Props = {
|
||||
}
|
||||
|
||||
/** Modální dialog pro úpravu obecné poznámky. */
|
||||
export default function NoteModal({ isOpen, onClose, onSave }: Props) {
|
||||
export default function NoteModal({ isOpen, onClose, onSave }: Readonly<Props>) {
|
||||
const note = useRef<HTMLInputElement>(null);
|
||||
|
||||
const save = () => {
|
||||
|
||||
@@ -10,17 +10,17 @@ type Props = {
|
||||
}
|
||||
|
||||
/** Modální dialog pro nastavení příplatků za pizzu. */
|
||||
export default function PizzaAdditionalFeeModal({ customerName, isOpen, onClose, onSave, initialValues }: Props) {
|
||||
export default function PizzaAdditionalFeeModal({ customerName, isOpen, onClose, onSave, initialValues }: Readonly<Props>) {
|
||||
const textRef = useRef<HTMLInputElement>(null);
|
||||
const priceRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const doSubmit = () => {
|
||||
onSave(customerName, textRef.current?.value, parseInt(priceRef.current?.value || "0"));
|
||||
onSave(customerName, textRef.current?.value, parseInt(priceRef.current?.value ?? "0"));
|
||||
}
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter') {
|
||||
onSave(customerName, textRef.current?.value, parseInt(priceRef.current?.value || "0"));
|
||||
onSave(customerName, textRef.current?.value, parseInt(priceRef.current?.value ?? "0"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ type Result = {
|
||||
}
|
||||
|
||||
/** Modální dialog pro výpočet výhodnosti pizzy. */
|
||||
export default function PizzaCalculatorModal({ isOpen, onClose }: Props) {
|
||||
export default function PizzaCalculatorModal({ isOpen, onClose }: Readonly<Props>) {
|
||||
const diameter1Ref = useRef<HTMLInputElement>(null);
|
||||
const price1Ref = useRef<HTMLInputElement>(null);
|
||||
const diameter2Ref = useRef<HTMLInputElement>(null);
|
||||
|
||||
@@ -9,7 +9,7 @@ type Props = {
|
||||
}
|
||||
|
||||
/** Modální dialog pro uživatelská nastavení. */
|
||||
export default function SettingsModal({ isOpen, onClose, onSave }: Props) {
|
||||
export default function SettingsModal({ isOpen, onClose, onSave }: Readonly<Props>) {
|
||||
const settings = useSettings();
|
||||
const bankAccountRef = useRef<HTMLInputElement>(null);
|
||||
const nameRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
Reference in New Issue
Block a user