-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97f6cc8
commit 095f557
Showing
19 changed files
with
221 additions
and
38 deletions.
There are no files selected for viewing
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,31 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"url": "/sample-webseite/sample" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"name": "sample", | ||
"preview": "", | ||
"multilanguage": true, | ||
"singleType": false, | ||
"allowedMethods": [ | ||
"GET" | ||
], | ||
"fields": [ | ||
{ | ||
"name": "name", | ||
"required": true, | ||
"deletable": false, | ||
"type": "TEXT", | ||
"maxLength": -1, | ||
"defaultText": "" | ||
} | ||
] | ||
}, | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"request": { | ||
"method": "GET", | ||
"url": "/sample-webseite" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": [ | ||
"sample" | ||
], | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react"; | ||
|
||
export default function SecondaryButton({tittle, classname, onClick}: ButtonProps) { | ||
return ( | ||
<button | ||
className={`w-full p-3 rounded-lg bg-admin-primary-background hover:opacity-60 font-bold flex justify-center items-center ${classname ?? ''}`} | ||
onClick={onClick}> | ||
{tittle} | ||
</button> | ||
) | ||
} | ||
|
||
type ButtonProps = { | ||
tittle: string | ||
classname?: string | ||
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void | ||
} |
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,2 @@ | ||
const CONTENT_SERVING_SERVICE = "http://localhost:8080" | ||
const CONTENT_MANAGING_SERVICE = "http://localhost:8080" |
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,7 @@ | ||
import {Field} from "@/models/content-type/field"; | ||
import {Dispatch, SetStateAction, useState} from "react"; | ||
|
||
export function useStateWithField<T extends Field>(value: T): [T, Dispatch<SetStateAction<T>>] { | ||
const [field, setField] = useState<T>(value) | ||
return [field, setField] | ||
} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export type Field = { | ||
name: string | ||
required: boolean | ||
deletable: boolean | ||
type: string | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import {Field} from "@/models/content-type/field"; | ||
|
||
export type Number_field = Field & { | ||
export type NumberField = Field & { | ||
minValue: number | ||
maxValue: number | ||
} |
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
Oops, something went wrong.