Added subscription view update custom template dropdown #17

Merged
ameye merged 1 commits from subscription-view-component into master 2025-09-29 21:07:36 +00:00
+10 -12
View File
@@ -52,23 +52,22 @@ export default function AddTemplate() {
<Form> <Form>
<div <div
className='flex flex-col w-full bg-white rounded-xl p-16 sm:px-20 sm:py-16 shadow'> className='flex flex-col w-full bg-white rounded-xl p-16 sm:px-20 sm:py-16 shadow'>
<div className='w-full flex flex-col gap-6'> <div className='w-full flex flex-col gap-4'>
<div className='grid grid-cols-1 xs:grid-cols-2 gap-3'> <div className='relative text-input flex flex-col sm:flex-row gap-2 sm:items-center'>
<div className='relative text-input flex flex-col gap-2'> <label className={`text-base min-w-36 text-end sm:text-left ${(props.errors.custom_id && props.touched.custom_id) && 'text-red-500'}`}>
<label className='absolute left-0 -top-5 text-base flex items-center'> Custom ID
Custom ID <span className='text-red-500 text-10'>{(props.errors.custom_id && props.touched.custom_id) ? props.errors.custom_id : ''}</span>
</label> </label>
<InputText <InputText
id='custom_id' id='custom_id'
placeholder='Custon ID' placeholder='Custom ID'
name='custom_id' name='custom_id'
value={props.values.custom_id} value={props.values.custom_id}
handleChange={props.handleChange} handleChange={props.handleChange}
/> />
</div> </div>
<div className='relative text-input flex flex-col gap-2'> <div className='relative text-input flex flex-col sm:flex-row gap-2 sm:items-center'>
<label className='absolute left-0 -top-5 text-base flex items-center'> <label className={`text-base min-w-36 text-end sm:text-left ${(props.errors.provision_name && props.touched.provision_name) && 'text-red-500'}`}>
Provision Name <span className='text-red-500 text-10'>{(props.errors.provision_name && props.touched.provision_name) ? props.errors.provision_name : ''}</span> Provision Name
</label> </label>
<InputText <InputText
id='provision_name' id='provision_name'
@@ -78,11 +77,10 @@ export default function AddTemplate() {
handleChange={props.handleChange} handleChange={props.handleChange}
/> />
</div> </div>
</div>
<div className='h-10 my-5'> <div className='h-10 my-5 text-end'>
<button type='submit' disabled={customTemplate.isPending} <button type='submit' disabled={customTemplate.isPending}
className='w-full h-full bg-primary text-white font-bold rounded-md'>{customTemplate.isPending ? 'loading...' : 'Add'}</button> className='px-4 h-full bg-primary text-white font-bold rounded-md'>{customTemplate.isPending ? 'loading...' : 'Add'}</button>
</div> </div>
{customTemplate.error && {customTemplate.error &&