feat(frontend): update admin components
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -489,14 +489,14 @@
|
||||
);
|
||||
|
||||
function handleEphemeralCardNumberInput(e: Event) {
|
||||
const target = e.currentTarget;
|
||||
const target = e.currentTarget as HTMLInputElement;
|
||||
const clean = target.value.replace(/\D/g, '');
|
||||
const formatted = clean.match(/.{1,4}/g)?.join(' ') || clean;
|
||||
ephemeralCardNumber = formatted.slice(0, 19);
|
||||
}
|
||||
|
||||
function handleEphemeralExpiryInput(e: Event) {
|
||||
const target = e.currentTarget;
|
||||
const target = e.currentTarget as HTMLInputElement;
|
||||
const clean = target.value.replace(/\D/g, '');
|
||||
if (clean.length > 2) {
|
||||
ephemeralCardExpiry = clean.slice(0, 2) + '/' + clean.slice(2, 4);
|
||||
@@ -506,7 +506,7 @@
|
||||
}
|
||||
|
||||
function handleEphemeralCvcInput(e: Event) {
|
||||
const target = e.currentTarget;
|
||||
const target = e.currentTarget as HTMLInputElement;
|
||||
ephemeralCardCVC = target.value.replace(/\D/g, '').slice(0, 4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user