@@ -47,6 +47,22 @@ export const EditResource = ({ reload, data }: any) => {
4747 }
4848 ` ) ;
4949
50+ const resetSchema : any = graphql ( `
51+ mutation resetFileResourceSchema($resourceId: UUID!) {
52+ resetFileResourceSchema(resourceId: $resourceId) {
53+ ... on TypeResource {
54+ id
55+ schema {
56+ format
57+ description
58+ id
59+ fieldName
60+ }
61+ }
62+ }
63+ }
64+ ` ) ;
65+
5066 const [ resourceId , setResourceId ] = useQueryState < any > ( 'id' , parseAsString ) ;
5167
5268 const { mutate, isLoading } = useMutation (
@@ -412,18 +428,33 @@ export const EditResource = ({ reload, data }: any) => {
412428 <div className="flex w-1/6 justify-center ">
413429 <Text>See Preview</Text>
414430 </div>
415- </div>
416- <div className="flex justify-between">
431+ </div>*/ }
432+ < div className = "flex justify-between mt-8 " >
417433 < Text > Fields in the Resource</ Text >
418- <div className="flex">
419- <Link className="mx-4 flex items-center gap-1" href="/">
420- <Text>Refetch Fields</Text>{' '}
421- <Icon source={Icons.info} color="interactive" />
422- </Link>
423- <Link className="flex items-center gap-1" href="/">
424- <Text> Reset Fields </Text>{' '}
425- <Icon source={Icons.info} color="interactive" />
426- </Link>
434+ < div className = "flex gap-4" >
435+ < Button
436+ size = "medium"
437+ kind = "tertiary"
438+ variant = "basic"
439+ onClick = { function Ga ( ) { } }
440+ >
441+ < div className = "flex items-center gap-1" >
442+ < Text > Refetch Fields</ Text > { ' ' }
443+ < Icon source = { Icons . info } color = "interactive" />
444+ </ div >
445+ </ Button >
446+
447+ < Button
448+ size = "medium"
449+ kind = "tertiary"
450+ variant = "basic"
451+ onClick = { function Ga ( ) { } }
452+ >
453+ < div className = "flex items-center gap-1" >
454+ < Text > Reset Fields</ Text > { ' ' }
455+ < Icon source = { Icons . info } color = "interactive" />
456+ </ div >
457+ </ Button >
427458 </ div >
428459 </ div >
429460 < Text variant = "headingXs" as = "span" fontWeight = "regular" >
@@ -437,7 +468,7 @@ export const EditResource = ({ reload, data }: any) => {
437468 hideFooter = { true }
438469 defaultRowCount = { 10 }
439470 />
440- </div> */ }
471+ </ div >
441472 </ div >
442473 ) ;
443474} ;
0 commit comments