Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
6adbb406
Commit
6adbb406
authored
Aug 26, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update models for public tags
parent
634353aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
account.ts
types/api/account.ts
+2
-4
PublicTagTableItem.tsx
ui/publicTags/PublicTagTable/PublicTagTableItem.tsx
+1
-1
PublicTagsForm.tsx
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
+2
-2
No files found.
types/api/account.ts
View file @
6adbb406
...
@@ -80,13 +80,11 @@ export interface PublicTag {
...
@@ -80,13 +80,11 @@ export interface PublicTag {
full_name
:
string
;
full_name
:
string
;
email
:
string
;
email
:
string
;
company
:
string
;
company
:
string
;
addresses
:
string
;
// address_1;<address_2;address_3 etc.
addresses
:
Array
<
string
>
;
additional_comment
:
string
;
additional_comment
:
string
;
}
}
export
type
PublicTagNew
=
Omit
<
PublicTag
,
'
addresses
'
|
'
id
'
>
&
{
export
type
PublicTagNew
=
Omit
<
PublicTag
,
'
id
'
>
addresses_array
:
Array
<
string
>
;
}
export
type
PublicTags
=
Array
<
PublicTag
>
;
export
type
PublicTags
=
Array
<
PublicTag
>
;
...
...
ui/publicTags/PublicTagTable/PublicTagTableItem.tsx
View file @
6adbb406
...
@@ -36,7 +36,7 @@ const PublicTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
...
@@ -36,7 +36,7 @@ const PublicTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Tr
alignItems=
"top"
key=
{
item
.
id
}
>
<
Td
>
<
Td
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
>
<
VStack
spacing=
{
4
}
alignItems=
"unset"
>
{
item
.
addresses
.
split
(
'
;
'
).
map
((
address
)
=>
{
{
item
.
addresses
.
map
((
address
)
=>
{
return
(
return
(
<
HStack
spacing=
{
4
}
key=
{
address
}
overflow=
"hidden"
alignItems=
"start"
>
<
HStack
spacing=
{
4
}
key=
{
address
}
overflow=
"hidden"
alignItems=
"start"
>
<
AddressIcon
address=
{
address
}
/>
<
AddressIcon
address=
{
address
}
/>
...
...
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
View file @
6adbb406
...
@@ -60,7 +60,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -60,7 +60,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
companyName
:
data
?.
company
||
''
,
companyName
:
data
?.
company
||
''
,
companyUrl
:
data
?.
website
||
''
,
companyUrl
:
data
?.
website
||
''
,
tags
:
data
?.
tags
.
split
(
'
;
'
).
map
((
tag
)
=>
tag
).
join
(
'
;
'
)
||
''
,
tags
:
data
?.
tags
.
split
(
'
;
'
).
map
((
tag
)
=>
tag
).
join
(
'
;
'
)
||
''
,
addresses
:
data
?.
addresses
.
split
(
'
;
'
).
map
((
address
,
index
:
number
)
=>
({
name
:
`address.
${
index
}
.address`
,
address
}))
||
addresses
:
data
?.
addresses
.
map
((
address
,
index
:
number
)
=>
({
name
:
`address.
${
index
}
.address`
,
address
}))
||
[
{
name
:
'
address.0.address
'
,
address
:
''
}
],
[
{
name
:
'
address.0.address
'
,
address
:
''
}
],
comment
:
data
?.
additional_comment
||
''
,
comment
:
data
?.
additional_comment
||
''
,
action
:
data
?.
is_owner
===
undefined
||
data
?.
is_owner
?
'
add
'
:
'
report
'
,
action
:
data
?.
is_owner
===
undefined
||
data
?.
is_owner
?
'
add
'
:
'
report
'
,
...
@@ -84,7 +84,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
...
@@ -84,7 +84,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
company
:
formData
.
companyName
||
''
,
company
:
formData
.
companyName
||
''
,
website
:
formData
.
companyUrl
||
''
,
website
:
formData
.
companyUrl
||
''
,
is_owner
:
formData
.
action
===
'
add
'
,
is_owner
:
formData
.
action
===
'
add
'
,
addresses
_array
:
formData
.
addresses
?.
map
(({
address
})
=>
address
)
||
[],
addresses
:
formData
.
addresses
?.
map
(({
address
})
=>
address
)
||
[],
tags
:
formData
.
tags
?.
split
(
'
;
'
).
map
((
s
)
=>
s
.
trim
()).
join
(
'
;
'
)
||
''
,
tags
:
formData
.
tags
?.
split
(
'
;
'
).
map
((
s
)
=>
s
.
trim
()).
join
(
'
;
'
)
||
''
,
additional_comment
:
formData
.
comment
||
''
,
additional_comment
:
formData
.
comment
||
''
,
};
};
...
...
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