Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
frontend
Commits
a1767c94
Commit
a1767c94
authored
9 months ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
comment schema
parent
a63b3880
No related branches found
No related tags found
2 merge requests
!223
reset the pin numbers before search results are fetch (so the results will be...
,
!200
Resolve "[MIN-113] Show comments on the map"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/models/commentSchema.ts
+20
-0
20 additions, 0 deletions
src/models/commentSchema.ts
src/types/comment.ts
+6
-0
6 additions, 0 deletions
src/types/comment.ts
src/types/models.ts
+2
-0
2 additions, 0 deletions
src/types/models.ts
with
28 additions
and
0 deletions
src/models/commentSchema.ts
0 → 100644
+
20
−
0
View file @
a1767c94
import
{
z
}
from
'
zod
'
;
const
coordinatesSchema
=
z
.
object
({
x
:
z
.
number
(),
y
:
z
.
number
(),
});
export
const
commentSchema
=
z
.
object
({
title
:
z
.
string
(),
icon
:
z
.
string
(),
type
:
z
.
enum
([
'
POINT
'
,
'
ALIAS
'
,
'
REACTION
'
]),
content
:
z
.
string
(),
removed
:
z
.
boolean
(),
coord
:
coordinatesSchema
,
modelId
:
z
.
number
(),
elementId
:
z
.
string
(),
id
:
z
.
number
(),
pinned
:
z
.
boolean
(),
owner
:
z
.
string
().
optional
(),
});
This diff is collapsed.
Click to expand it.
src/types/comment.ts
0 → 100644
+
6
−
0
View file @
a1767c94
import
{
Comment
}
from
'
./models
'
;
import
{
PinType
}
from
'
./pin
'
;
export
interface
CommentWithPinType
extends
Comment
{
pinType
:
PinType
;
}
This diff is collapsed.
Click to expand it.
src/types/models.ts
+
2
−
0
View file @
a1767c94
...
@@ -61,6 +61,7 @@ import { targetSchema } from '@/models/targetSchema';
...
@@ -61,6 +61,7 @@ import { targetSchema } from '@/models/targetSchema';
import
{
targetSearchNameResult
}
from
'
@/models/targetSearchNameResult
'
;
import
{
targetSearchNameResult
}
from
'
@/models/targetSearchNameResult
'
;
import
{
userPrivilegesSchema
}
from
'
@/models/userPrivilegesSchema
'
;
import
{
userPrivilegesSchema
}
from
'
@/models/userPrivilegesSchema
'
;
import
{
z
}
from
'
zod
'
;
import
{
z
}
from
'
zod
'
;
import
{
commentSchema
}
from
'
@/models/commentSchema
'
;
export
type
Project
=
z
.
infer
<
typeof
projectSchema
>
;
export
type
Project
=
z
.
infer
<
typeof
projectSchema
>
;
export
type
OverviewImageView
=
z
.
infer
<
typeof
overviewImageView
>
;
export
type
OverviewImageView
=
z
.
infer
<
typeof
overviewImageView
>
;
...
@@ -118,3 +119,4 @@ export type MarkerSurface = z.infer<typeof markerSurfaceSchema>;
...
@@ -118,3 +119,4 @@ export type MarkerSurface = z.infer<typeof markerSurfaceSchema>;
export
type
MarkerLine
=
z
.
infer
<
typeof
markerLineSchema
>
;
export
type
MarkerLine
=
z
.
infer
<
typeof
markerLineSchema
>
;
export
type
MarkerWithPosition
=
z
.
infer
<
typeof
markerWithPositionSchema
>
;
export
type
MarkerWithPosition
=
z
.
infer
<
typeof
markerWithPositionSchema
>
;
export
type
Marker
=
z
.
infer
<
typeof
markerSchema
>
;
export
type
Marker
=
z
.
infer
<
typeof
markerSchema
>
;
export
type
Comment
=
z
.
infer
<
typeof
commentSchema
>
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment