Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS699-Project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Meet Narendra
CS699-Project
Commits
cf0eb5fe
Commit
cf0eb5fe
authored
Nov 21, 2022
by
Meet Narendra
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fetch projects
parent
4cbcc81d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
frontend/sitcomm/src/app/profile/profile.component.html
frontend/sitcomm/src/app/profile/profile.component.html
+12
-2
frontend/sitcomm/src/app/profile/profile.component.ts
frontend/sitcomm/src/app/profile/profile.component.ts
+2
-0
sitcomm/api/urls.py
sitcomm/api/urls.py
+1
-0
sitcomm/api/views.py
sitcomm/api/views.py
+9
-3
No files found.
frontend/sitcomm/src/app/profile/profile.component.html
View file @
cf0eb5fe
...
@@ -75,9 +75,19 @@
...
@@ -75,9 +75,19 @@
</mat-step>
</mat-step>
<mat-step
[stepControl]=
"secondFormGroup"
>
<mat-step
[stepControl]=
"secondFormGroup"
>
<form
[formGroup]=
"secondFormGroup"
>
<form
[formGroup]=
"secondFormGroup"
>
<ng-template
matStepLabel
>
Fill out your address
</ng-template>
<ng-template
matStepLabel
>
Profile picture
</ng-template>
<input
type=
"file"
class=
"file-upload"
formControlName=
"secondCtrl"
onchange=
"console.log(event.target.files)"
>
<div>
<button
mat-button
matStepperPrevious
>
Back
</button>
<button
mat-button
matStepperNext
>
Next
</button>
</div>
</form>
</mat-step>
<mat-step
[stepControl]=
"thirdFormGroup"
>
<form
[formGroup]=
"thirdFormGroup"
>
<ng-template
matStepLabel
>
Bio
</ng-template>
<mat-form-field>
<mat-form-field>
<input
matInput
placeholder=
"Address"
formControlName=
"
secon
dCtrl"
required
>
<input
matInput
placeholder=
"Address"
formControlName=
"
thir
dCtrl"
required
>
</mat-form-field>
</mat-form-field>
<div>
<div>
<button
mat-button
matStepperPrevious
>
Back
</button>
<button
mat-button
matStepperPrevious
>
Back
</button>
...
...
frontend/sitcomm/src/app/profile/profile.component.ts
View file @
cf0eb5fe
...
@@ -10,9 +10,11 @@ import {FormBuilder, FormGroup} from '@angular/forms';
...
@@ -10,9 +10,11 @@ import {FormBuilder, FormGroup} from '@angular/forms';
export
class
ProfileComponent
implements
OnInit
{
export
class
ProfileComponent
implements
OnInit
{
firstFormGroup
:
FormGroup
;
firstFormGroup
:
FormGroup
;
secondFormGroup
:
FormGroup
;
secondFormGroup
:
FormGroup
;
thirdFormGroup
:
FormGroup
;
constructor
(
private
cookieService
:
CookieService
,
private
_formBuilder
:
FormBuilder
)
{
constructor
(
private
cookieService
:
CookieService
,
private
_formBuilder
:
FormBuilder
)
{
this
.
firstFormGroup
=
this
.
_formBuilder
.
group
({
firstCtrl
:
[
''
]});
this
.
firstFormGroup
=
this
.
_formBuilder
.
group
({
firstCtrl
:
[
''
]});
this
.
secondFormGroup
=
this
.
_formBuilder
.
group
({
secondCtrl
:
[
''
]});
this
.
secondFormGroup
=
this
.
_formBuilder
.
group
({
secondCtrl
:
[
''
]});
this
.
thirdFormGroup
=
this
.
_formBuilder
.
group
({
thirdCtrl
:
[
''
]});
}
}
ngOnInit
():
void
{
ngOnInit
():
void
{
...
...
sitcomm/api/urls.py
View file @
cf0eb5fe
...
@@ -14,5 +14,6 @@ urlpatterns = [
...
@@ -14,5 +14,6 @@ urlpatterns = [
path
(
'isAuthenticated/'
,
checkAuthViewSet
.
as_view
()),
path
(
'isAuthenticated/'
,
checkAuthViewSet
.
as_view
()),
path
(
'authenticate/'
,
authenticateViewSet
.
as_view
()),
path
(
'authenticate/'
,
authenticateViewSet
.
as_view
()),
path
(
'register/'
,
registerViewSet
.
as_view
()),
path
(
'register/'
,
registerViewSet
.
as_view
()),
path
(
'getRepos/'
,
getReposViewSet
.
as_view
()),
path
(
'api-auth/'
,
include
(
'rest_framework.urls'
))
path
(
'api-auth/'
,
include
(
'rest_framework.urls'
))
]
]
sitcomm/api/views.py
View file @
cf0eb5fe
...
@@ -59,7 +59,13 @@ class getReposViewSet(views.APIView):
...
@@ -59,7 +59,13 @@ class getReposViewSet(views.APIView):
user
=
Users
.
objects
.
get
(
uid
=
uid
)
user
=
Users
.
objects
.
get
(
uid
=
uid
)
if
user
is
None
:
if
user
is
None
:
return
Response
({
'status'
:
False
})
return
Response
({
'status'
:
False
})
repos
=
Projects
.
objects
.
filter
(
uid
=
user
)
access
=
Access
.
objects
.
filter
(
uid
=
user
)
.
values
(
'pid'
)
.
distinct
()
return
Response
({
'repos'
:
repos
,
'status'
:
True
})
try
:
repos
=
Projects
.
objects
.
filter
(
pid__in
=
access
)
print
(
"Projects"
,
Projects
.
objects
.
values
())
except
Exception
as
e
:
print
(
e
)
print
(
"Repos"
,
repos
)
return
Response
({
'repos'
:
repos
.
values
(),
'status'
:
True
})
except
:
except
:
return
Response
({
'status'
:
False
})
return
Response
({
'status'
:
False
})
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