Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MECRED
Frontend-MECRED
Commits
1d27b14e
Commit
1d27b14e
authored
5 months ago
by
gsf20
Browse files
Options
Download
Email Patches
Plain Diff
ADD description when creating collection
parent
f9a6c346
Pipeline
#38664
passed with stage
in 1 minute and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/perfil/[id]/components/CreateCollectionModal.js
+17
-7
src/app/perfil/[id]/components/CreateCollectionModal.js
with
17 additions
and
7 deletions
+17
-7
src/app/perfil/[id]/components/CreateCollectionModal.js
+
17
-
7
View file @
1d27b14e
...
...
@@ -12,6 +12,7 @@ import mecredApi from "@/axiosConfig";
*/
export
default
function
CreateCollectionModal
({
open
,
onClose
,
idLogin
})
{
const
[
name
,
setName
]
=
useState
(
""
)
const
[
description
,
setDescription
]
=
useState
(
""
)
const
token
=
getStoredValue
(
"
access_token
"
);
const
client
=
getStoredValue
(
"
client
"
);
...
...
@@ -33,7 +34,8 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) {
"
name
"
:
name
,
"
owner_id
"
:
idLogin
,
"
owner_type
"
:
"
User
"
,
"
privacy
"
:
e
.
target
[
"
privacy-radio-group
"
].
value
"
privacy
"
:
e
.
target
[
"
privacy-radio-group
"
].
value
,
"
description
"
:
e
.
target
[
"
description
"
].
value
}
};
...
...
@@ -50,16 +52,17 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) {
},
})
};
return
(
<
Modal
open
=
{
open
}
onClose
=
{
onClose
}
className
=
"
grid place-items-center m-5
"
>
<
div
className
=
"
flex flex-col bg-main p-5 rounded-lg w-[40%]
"
>
<
div
className
=
"
flex flex-col bg-main p-5
gap-2
rounded-lg w-[40%]
"
>
<
div
className
=
"
text-2xl font-bold text-main-text
"
>
Criar
Coleção
<
/div
>
<
p
className
=
"
text-lg text-main-text font-bold mb-1 mt-4
"
>
Nome
da
Coleção
<
/p
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
p
className
=
"
text-lg text-main-text font-bold mt-4
"
>
Nome
da
Coleção
<
/p
>
<
TextField
size
=
"
small
"
fullWidth
...
...
@@ -68,8 +71,8 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) {
helperText
=
{
`
${
name
.
length
}
/150`
}
error
=
{
name
.
length
>
150
}
/
>
<
p
className
=
"
text-lg text-main-text font-bold
mb-3
mt-4
"
>
Esta
coleção
é
:
<
/p
>
<
FormLabel
>
<
p
className
=
"
text-lg text-main-text font-bold mt-4
"
>
Esta
coleção
é
:
<
/p
>
<
FormLabel
>
<
RadioGroup
name
=
"
privacy-radio-group
"
>
<
FormControlLabel
value
=
"
public
"
...
...
@@ -83,7 +86,14 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) {
/>
<
/RadioGroup
>
<
/FormLabel
>
<
div
className
=
"
flex justify-center space-x-2
"
>
<
p
className
=
"
text-lg text-main-text font-bold mt-4
"
>
Descrição
<
/p
>
<
TextField
size
=
"
small
"
name
=
"
description
"
placeholder
=
"
(Opcional)
"
fullWidth
/>
<
div
className
=
"
flex justify-center space-x-2 mt-4
"
>
<
button
className
=
"
border text-sm p-2 text-main border-main rounded-lg normal-case h-9 font-bold bg-secondary hover:bg-secondary-hover
"
type
=
"
submit
"
...
...
@@ -103,4 +113,4 @@ export default function CreateCollectionModal({ open, onClose, idLogin }) {
<
/div
>
<
/Modal
>
)
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help