-
Notifications
You must be signed in to change notification settings - Fork 2
Implementation of project page #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development_2.0.0
Are you sure you want to change the base?
Changes from 1 commit
2ab42c6
3adece2
50e1551
7d0884a
5661496
7636f2d
1d0b80c
e3ec58b
91b1a8d
76b97ae
1f316b0
125543f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <template> | ||
| <p>To be implemented</p> | ||
| <ProjectsView /> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| // | ||
| import ProjectsView from './pages/projects/ProjectsView.vue' | ||
| </script> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -90,21 +90,24 @@ | |||||
| .then((response: any) => { | ||||||
| notifier.notify({ | ||||||
| title: 'Success', | ||||||
| description: 'Project created Successfully', | ||||||
| description: response.data.message, | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, you could do
Suggested change
|
||||||
| showProgressBar: true, | ||||||
| timeout: 7_000, | ||||||
| type: 'success', | ||||||
| }) | ||||||
| }) | ||||||
| .catch((err: any) => { | ||||||
| let description = 'Can not create project' | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if (err.response) { | ||||||
| description = err.response.data.detail | ||||||
| } | ||||||
| notifier.notify({ | ||||||
| title: 'Fail', | ||||||
| description: 'Can not create project', | ||||||
| description, | ||||||
| showProgressBar: true, | ||||||
| timeout: 7_000, | ||||||
| type: 'error', | ||||||
| }) | ||||||
| console.error(err) | ||||||
| }) | ||||||
| } | ||||||
abdahmed22 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
|
|
||||||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -103,17 +103,20 @@ | |||||
| const getPage = async (page: number) => { | ||||||
| getProjects(page).then((response: any) => { | ||||||
| projects.value = response.data.results | ||||||
| // count.value = response.body.total_count | ||||||
| count.value = response.data.total_count | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you want to use pagination, let's do it |
||||||
| }) | ||||||
| .catch((err: any) => { | ||||||
| let description = 'Can not get projects' | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if (err.response) { | ||||||
| description = err.response.data.detail | ||||||
| } | ||||||
| notifier.notify({ | ||||||
| title: 'Fail', | ||||||
| description: 'Can not get projects', | ||||||
| description, | ||||||
| showProgressBar: true, | ||||||
| timeout: 7_000, | ||||||
| type: 'error', | ||||||
| }) | ||||||
| console.error(err) | ||||||
| }) | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -132,14 +135,17 @@ | |||||
| .then((response: any) => { | ||||||
| }) | ||||||
| .catch((err: any) => { | ||||||
| let description = 'Can not search for projects' | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if (err.response) { | ||||||
| description = err.response.data.detail | ||||||
| } | ||||||
| notifier.notify({ | ||||||
| title: 'Fail', | ||||||
| description: 'Can not search projects', | ||||||
| description, | ||||||
| showProgressBar: true, | ||||||
| timeout: 7_000, | ||||||
| type: 'error', | ||||||
| }) | ||||||
| console.error(err) | ||||||
| }) | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ import { createRouter, createWebHistory } from 'vue-router/auto' | |
| const router = createRouter({ | ||
| history: createWebHistory(import.meta.env.BASE_URL), | ||
| routes: [ | ||
| { path: '/', component: () => import('@/pages/DashboardView.vue') }, | ||
|
||
| { path: '/projects/:projectId', name: 'projectDetails', component: () => import('@/pages/projects/ProjectDetailsView.vue'), props: true }, | ||
| ], | ||
| }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,73 @@ | ||
| enum Status { | ||
| NOT_STARTED='not_started', | ||
| IN_PROGRESS='in_progress', | ||
| COMPLETED='completed', | ||
| } | ||
|
|
||
| export type Activity = { | ||
| action: string, | ||
| date: string, | ||
| } | ||
|
|
||
| export type TestPlan = { | ||
| id: number, | ||
| modified: string, | ||
| created: string, | ||
| title: string, | ||
| type: string, | ||
| } | ||
|
|
||
| export type Requirement = { | ||
| id: number, | ||
| updated: string, | ||
| created: string, | ||
| title: string, | ||
| requirements: string[], | ||
| } | ||
|
|
||
| export type TestSuite = { | ||
| id: number, | ||
| modified: string, | ||
| created: string, | ||
| title: string, | ||
| number_of_test_cases: number, | ||
| test_plan: number, | ||
| } | ||
|
|
||
| export type TestRun = { | ||
|
|
||
| } | ||
|
Comment on lines
+37
to
+39
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Design this, check the serializer class to get familiar with the response |
||
|
|
||
| export type TestCase = { | ||
| id: number, | ||
| modified: string, | ||
| created: string, | ||
| title: string, | ||
| testcase_title: string, | ||
| requirement: string | ||
| last_saved: { | ||
| id: number, | ||
| full_name: string, | ||
| } | ||
| test_suite: string, | ||
| description: string, | ||
| test_steps: string, | ||
| expected_result: string, | ||
| } | ||
| export type Project = { | ||
| id: number, | ||
| user: string, | ||
| teams: string[], | ||
| modified: string, | ||
| created: string, | ||
| activity: Activity[], | ||
| total_test_plan: any, | ||
| total_requirements_docs: any, | ||
| total_suites: any, // update the any to type of each attribute | ||
| total_test_runs: any, | ||
| incomplete_test_runs_assigned_to_you: any, | ||
| people_with_the_most_incomplete_test_runs: any, | ||
| title:string, | ||
| repo_link:string, | ||
| short_description:string, | ||
| total_test_plan: TestPlan[], | ||
| total_requirements_docs: Requirement[], | ||
| total_suites: TestSuite[], | ||
| total_test_runs: TestRun[], | ||
| incomplete_test_runs_assigned_to_you: TestRun[], | ||
| people_with_the_most_incomplete_test_runs: TestRun[], | ||
| title: string, | ||
| repo_link: string, | ||
| short_description: string, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,7 +186,7 @@ class ProjectMembersAPIView(GenericAPIView): | |
| """This class to return all project members""" | ||
|
|
||
| serializer_class = ProjectTeamSerializer | ||
| permission_classes = (HasProjectAccess,) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why you removed the permission classes? please return them back and apply it on all classes |
||
|
|
||
|
|
||
| def get(self, request: Request, project_id: str) -> Response: | ||
| """Use this endpoint to get all project members""" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.