Compare commits
No commits in common. "eed4809a2cd4c3640f364c56df7eb383bffbb0b0" and "d5ceee9da83423c99ea8a293255c5350869b9d80" have entirely different histories.
eed4809a2c
...
d5ceee9da8
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,8 +1,3 @@
|
||||
node_modules/
|
||||
*/node_modules/
|
||||
*/build/
|
||||
|
||||
**/node_modules/
|
||||
**/build/
|
||||
.DS_Store
|
||||
.env
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{}
|
||||
@ -64,14 +64,6 @@ const FormImagePicker = ({
|
||||
const showFilename = !isRoundIcon && file;
|
||||
|
||||
return (
|
||||
<div>
|
||||
{file && (
|
||||
<img
|
||||
src={file.url || URL.createObjectURL(file)}
|
||||
alt="Preview"
|
||||
className="mb-4 max-h-48 object-contain"
|
||||
/>
|
||||
)}
|
||||
<div className='flex items-stretch justify-start relative'>
|
||||
<label className='inline-flex'>
|
||||
<BaseButton
|
||||
@ -91,7 +83,6 @@ const FormImagePicker = ({
|
||||
className='absolute top-0 left-0 w-full h-full opacity-0 outline-none cursor-pointer -z-1'
|
||||
onChange={handleFileChange}
|
||||
accept={accept}
|
||||
capture
|
||||
disabled={loading}
|
||||
/>
|
||||
</label>
|
||||
@ -105,8 +96,6 @@ const FormImagePicker = ({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -202,14 +202,12 @@ const EditBottlesPage = () => {
|
||||
path={'bottles/picture'}
|
||||
name='picture'
|
||||
id='picture'
|
||||
accept='image/*'
|
||||
capture
|
||||
schema={{
|
||||
size: undefined,
|
||||
formats: undefined,
|
||||
}}
|
||||
component={FormImagePicker}
|
||||
/>
|
||||
></Field>
|
||||
</FormField>
|
||||
|
||||
<FormField label='Age'>
|
||||
|
||||
@ -91,21 +91,6 @@ const BottlesNew = () => {
|
||||
onSubmit={(values) => handleSubmit(values)}
|
||||
>
|
||||
<Form>
|
||||
<FormField label='Picture'>
|
||||
<Field
|
||||
label='Picture'
|
||||
color='info'
|
||||
icon={mdiUpload}
|
||||
path='bottles/picture'
|
||||
name='picture'
|
||||
id='picture'
|
||||
accept='image/*'
|
||||
capture
|
||||
schema={{ size: undefined, formats: undefined }}
|
||||
component={FormImagePicker}
|
||||
></Field>
|
||||
</FormField>
|
||||
|
||||
<FormField label='Name'>
|
||||
<Field name='name' placeholder='Name' />
|
||||
</FormField>
|
||||
@ -184,6 +169,21 @@ const BottlesNew = () => {
|
||||
<Field name='barcode' placeholder='Barcode' />
|
||||
</FormField>
|
||||
|
||||
<FormField>
|
||||
<Field
|
||||
label='Picture'
|
||||
color='info'
|
||||
icon={mdiUpload}
|
||||
path={'bottles/picture'}
|
||||
name='picture'
|
||||
id='picture'
|
||||
schema={{
|
||||
size: undefined,
|
||||
formats: undefined,
|
||||
}}
|
||||
component={FormImagePicker}
|
||||
></Field>
|
||||
</FormField>
|
||||
|
||||
<FormField label='Age'>
|
||||
<Field type='number' name='age' placeholder='Age' />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user