Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
create dataproduct
Browse files Browse the repository at this point in the history
  • Loading branch information
MengZhuNAV committed Oct 25, 2023
1 parent 9ee39b8 commit e968560
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
16 changes: 0 additions & 16 deletions components/dataproducts/newDataproductForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,9 @@ export const NewDataproductForm = () => {
CREATE_DATAPRODUCT,
{
onCompleted: (data) => {
if (createDataset) {
router.push(
`/dataproduct/${data.createDataproduct.id}/${data.createDataproduct.slug}/new`
)
} else {
router.push(
`/dataproduct/${data.createDataproduct.id}/${data.createDataproduct.slug}`
)
}
}
}
)
Expand Down Expand Up @@ -214,16 +208,6 @@ export const NewDataproductForm = () => {
>
Lagre dataprodukt
</Button>
<Button
onClick={() =>{
setCreateDataset(true)
submitForm()
}}
variant="primary"
size="medium"
>
Lagre dataprodukt og legg til datasett
</Button>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/detailTypography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Description = ({
}

return (<div className="mt-8 flex flex-col gap-4 max-w-4xl">
{dataproduct.datasets.length== 0 && <Alert variant="warning">Det er ikke noe datasett i dataproduktet. Vil du <Link>legg til et datasett</Link>?</Alert>}
{dataproduct.datasets.length== 0 && <Alert variant="warning">Det er ikke noe datasett i dataproduktet. Vil du <Link href={ `/dataproduct/${dataproduct.id}/${dataproduct.slug}/new`}>legg til et datasett</Link>?</Alert>}

<Accordion className="block md:hidden w-full">
<Accordion.Item defaultOpen={true}>
Expand Down
2 changes: 0 additions & 2 deletions lib/schema/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,6 @@ export type NewBigQuery = {

/** NewDataproduct contains metadata for creating a new dataproduct */
export type NewDataproduct = {
/** datasets to associate with the dataproduct. */
datasets: Array<NewDatasetForNewDataproduct>;
/** description of the dataproduct */
description?: InputMaybe<Scalars['String']>;
/** owner group email for the dataproduct. */
Expand Down
9 changes: 9 additions & 0 deletions nada-frontend.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

0 comments on commit e968560

Please sign in to comment.