Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bodysch-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
KSZK
DevTeam
org
BodySCH
bodysch-frontend
Commits
64b0928c
Commit
64b0928c
authored
4 years ago
by
Rafael László
Browse files
Options
Downloads
Patches
Plain Diff
update types to match backend
parent
450c88fb
No related branches found
No related tags found
2 merge requests
!19
fix type imports
,
!9
update types
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/types/News.ts
+1
-1
1 addition, 1 deletion
src/types/News.ts
src/types/Profile.ts
+8
-9
8 additions, 9 deletions
src/types/Profile.ts
src/types/Term.ts
+4
-12
4 additions, 12 deletions
src/types/Term.ts
with
13 additions
and
22 deletions
src/types/News.ts
+
1
−
1
View file @
64b0928c
...
...
@@ -2,6 +2,6 @@ export interface INews {
title
:
string
;
text
:
string
;
publishedAt
:
Date
;
publishedBy
?
:
string
;
publishedBy
:
string
;
updatedBy
?:
string
;
}
This diff is collapsed.
Click to expand it.
src/types/Profile.ts
+
8
−
9
View file @
64b0928c
export
enum
Role
{
Admin
=
'
ADMIN
'
,
User
=
'
USER
'
,
// default
User
=
'
USER
'
,
}
export
interface
INotice
{
...
...
@@ -13,15 +13,14 @@ export interface INotice {
export
interface
IWarning
{
_id
:
string
;
text
:
string
;
date
?
:
Date
;
givenBy
?
:
string
;
date
:
Date
;
givenBy
:
string
;
}
export
interface
IProfile
{
_id
:
string
;
externalId
?:
string
;
studentCardNumber
:
string
;
roomNumber
:
Number
;
externalId
:
string
;
studentCardNumber
?:
string
;
roomNumber
?:
Number
;
newPicture
?:
string
;
acceptedPicture
?:
string
;
role
:
Role
;
...
...
@@ -29,6 +28,6 @@ export interface IProfile {
name
:
string
;
isStaffMember
?:
boolean
;
staffMemberText
?:
string
;
warnings
?
:
IWarning
[];
notices
?
:
INotice
[];
warnings
:
IWarning
[];
notices
:
INotice
[];
}
This diff is collapsed.
Click to expand it.
src/types/Term.ts
+
4
−
12
View file @
64b0928c
export
enum
MemberState
{
Accepted
=
'
ACCEPTED
'
,
Applied
=
'
APPLIED
'
,
// default
Applied
=
'
APPLIED
'
,
Rejected
=
'
REJECTED
'
,
}
export
enum
CardState
{
Created
=
'
CREATED
'
,
// default
Created
=
'
CREATED
'
,
Printed
=
'
PRINTED
'
,
Given
=
'
GIVEN
'
,
}
// When Term members listed
export
interface
IUserAsMember
{
_id
:
string
;
name
:
string
;
warnings
:
number
;
}
export
interface
IMember
{
_id
:
string
;
user
:
IUserAsMember
|
string
;
// ... | Mongoose ID
user
:
string
;
memberState
:
MemberState
;
cardState
:
CardState
;
cardNumber
:
number
;
...
...
@@ -29,7 +21,7 @@ export interface IMember {
export
interface
ITerm
{
backgroundFile
?:
string
;
name
:
string
;
createDate
:
Date
;
createDate
?
:
Date
;
startDate
:
Date
;
endDate
:
Date
;
deadline
:
Date
;
...
...
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