Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
2a875649
Commit
2a875649
authored
Mar 04, 2021
by
Stefan Probst
Browse files
chore: adjust wording of toast message
parent
0e9c0111
Pipeline
#178023
passed with stage
in 5 minutes and 27 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/item/ActorsFormSection/ActorsFormSection.tsx
View file @
2a875649
...
...
@@ -223,7 +223,7 @@ function CreateActorForm(props: CreateActorFormProps) {
toast
.
success
(
'
Sucessfully created actor.
'
)
},
onError
()
{
toast
.
error
(
'
Failed to
create
actor.
'
)
toast
.
error
(
'
Failed to
submit
actor.
'
)
},
onSettled
()
{
props
.
onDismiss
()
...
...
src/components/item/DatasetCreateForm/DatasetCreateForm.tsx
View file @
2a875649
...
...
@@ -39,7 +39,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
DatasetDto
)
{
toast
.
success
(
`Successfully
crea
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -54,7 +54,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
create
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/DatasetEditForm/DatasetEditForm.tsx
View file @
2a875649
...
...
@@ -41,7 +41,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
DatasetDto
)
{
toast
.
success
(
`Successfully
upda
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -56,7 +56,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
update
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/PublicationCreateForm/PublicationCreateForm.tsx
View file @
2a875649
...
...
@@ -39,7 +39,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
PublicationDto
)
{
toast
.
success
(
`Successfully
crea
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -54,7 +54,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
create
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/PublicationEditForm/PublicationEditForm.tsx
View file @
2a875649
...
...
@@ -41,7 +41,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
PublicationDto
)
{
toast
.
success
(
`Successfully
upda
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -56,7 +56,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
update
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/ToolCreateForm/ToolCreateForm.tsx
View file @
2a875649
...
...
@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
ToolDto
)
{
toast
.
success
(
`Successfully
crea
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
create
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/ToolEditForm/ToolEditForm.tsx
View file @
2a875649
...
...
@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
ToolDto
)
{
toast
.
success
(
`Successfully
upda
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
update
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/TrainingMaterialCreateForm/TrainingMaterialCreateForm.tsx
View file @
2a875649
...
...
@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
TrainingMaterialDto
)
{
toast
.
success
(
`Successfully
crea
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
create
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/TrainingMaterialEditForm/TrainingMaterialEditForm.tsx
View file @
2a875649
...
...
@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
TrainingMaterialDto
)
{
toast
.
success
(
`Successfully
upda
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
update
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/WorkflowCreateForm/WorkflowCreateForm.tsx
View file @
2a875649
...
...
@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
WorkflowDto
)
{
toast
.
success
(
`Successfully
crea
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
create
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
src/components/item/WorkflowEditForm/WorkflowEditForm.tsx
View file @
2a875649
...
...
@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const
queryClient
=
useQueryClient
()
const
create
=
useItemMutation
({
onSuccess
(
data
:
WorkflowDto
)
{
toast
.
success
(
`Successfully
upda
ted
${
categoryLabel
}
.`
)
toast
.
success
(
`Successfully
submit
ted
${
categoryLabel
}
.`
)
queryClient
.
invalidateQueries
({
queryKey
:
[
'
itemSearch
'
],
...
...
@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router
.
push
({
pathname
:
`/
${
data
.
category
}
/
${
data
.
persistentId
}
`
})
},
onError
()
{
toast
.
error
(
`Failed to
update
${
categoryLabel
}
.`
)
toast
.
error
(
`Failed to
submit
${
categoryLabel
}
.`
)
},
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment