-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEOS-605:Category transformer (#1050)
- Loading branch information
1 parent
5a585c1
commit 8f139f5
Showing
16 changed files
with
823 additions
and
227 deletions.
There are no files selected for viewing
540 changes: 313 additions & 227 deletions
540
backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
145 changes: 145 additions & 0 deletions
145
backend/gen/go/protos/mgmt/v1alpha1/transformer.pb.validate.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...count]/new/transformer/UserDefinedTransformerForms/UserDefinedGenerateCategoricalForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
'use client'; | ||
import { | ||
FormControl, | ||
FormDescription, | ||
FormField, | ||
FormItem, | ||
FormLabel, | ||
} from '@/components/ui/form'; | ||
import { Input } from '@/components/ui/input'; | ||
import { ReactElement } from 'react'; | ||
import { useFormContext } from 'react-hook-form'; | ||
import { | ||
CreateUserDefinedTransformerSchema, | ||
UpdateUserDefinedTransformer, | ||
} from '../schema'; | ||
interface Props { | ||
isDisabled?: boolean; | ||
} | ||
|
||
export default function UserDefinedGenerateCategoricalForm( | ||
props: Props | ||
): ReactElement { | ||
const fc = useFormContext< | ||
UpdateUserDefinedTransformer | CreateUserDefinedTransformerSchema | ||
>(); | ||
|
||
const { isDisabled } = props; | ||
|
||
return ( | ||
<div className="flex flex-col w-full space-y-4 pt-4"> | ||
<FormField | ||
name={`config.value.categories`} | ||
control={fc.control} | ||
render={({ field }) => ( | ||
<FormItem className="flex flex-row items-center justify-between rounded-lg border dark:border-gray-700 p-3 shadow-sm"> | ||
<div className="space-y-0.5"> | ||
<FormLabel>Categories</FormLabel> | ||
<FormDescription> | ||
Provide a list of comma-separated string values that you want to | ||
randomly select from. | ||
</FormDescription> | ||
</div> | ||
<FormControl> | ||
<div className="w-[600px]"> | ||
<Input | ||
value={field.value} | ||
type="string" | ||
onChange={field.onChange} | ||
disabled={isDisabled} | ||
/> | ||
</div> | ||
</FormControl> | ||
</FormItem> | ||
)} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8f139f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
neosync-marketing – ./marketing
neosync.dev
neosync-marketing-git-main-neosync.vercel.app
neosync-marketing-neosync.vercel.app
www.neosync.dev
neosync-marketing-app.vercel.app