name="description"
label={i18n.str`Description`}
help=""
tooltip={i18n.str`Describe what this template stands for`}
/>
{
switch (state.type) {
case Steps.NON_FIXED: return i18n.str`User will be able to input price and summary before payment.`
case Steps.FIXED_PRICE: return i18n.str`User will be able to add a summary before payment.`
case Steps.FIXED_SUMMARY: return i18n.str`User will be able to set the price before payment.`
case Steps.BOTH_FIXED: return i18n.str`User will not be able to change the price or the summary.`
}
})()}
tooltip={i18n.str`Define what the user be allowed to modify`}
values={[
Steps.NON_FIXED,
Steps.FIXED_PRICE,
Steps.FIXED_SUMMARY,
Steps.BOTH_FIXED,
]}
toStr={(v: Steps): string => {
switch (v) {
case Steps.NON_FIXED: return i18n.str`Simple`
case Steps.FIXED_PRICE: return i18n.str`With price`
case Steps.FIXED_SUMMARY: return i18n.str`With summary`
case Steps.BOTH_FIXED: return i18n.str`With price and summary`
}
}}
/>
{state.type === Steps.BOTH_FIXED || state.type === Steps.FIXED_SUMMARY ?
name="summary"
inputType="multiline"
label={i18n.str`Fixed summary`}
tooltip={i18n.str`If specified, this template will create order with the same summary`}
/>
: undefined}
{state.type === Steps.BOTH_FIXED || state.type === Steps.FIXED_PRICE ?
name="amount"
label={i18n.str`Fixed price`}
tooltip={i18n.str`If specified, this template will create order with the same price`}
/>
: undefined}
name="minimum_age"
label={i18n.str`Minimum age`}
help=""
tooltip={i18n.str`Is this contract restricted to some age?`}
/>
name="pay_duration"
label={i18n.str`Payment timeout`}
help=""
tooltip={i18n.str`How much time has the customer to complete the payment once the order was created.`}
/>
name="otpId"
label={i18n.str`OTP device`}
readonly
side={}
tooltip={i18n.str`Use to verify transaction in offline mode.`}
/>
setState((v) => ({ ...v, otpId: p?.id }))}
list={deviceList.map(e => ({
description: e.device_description,
id: e.otp_device_id
}))}
/>