Skip to content
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

feat: implement rs school app tests preview page #2482

Merged
merged 29 commits into from
Sep 15, 2024
Merged

feat: implement rs school app tests preview page #2482

merged 29 commits into from
Sep 15, 2024

Conversation

Alphajax
Copy link
Contributor

@Alphajax Alphajax commented Jun 13, 2024

🟢 Add deploy label if you want to deploy this Pull Request to staging environment

🧑‍⚖️ Pull Request Naming Convention

  • Title should follow Conventional Commits
  • Do not put issue id in title
  • Do not put WIP in title. Use Draft PR functionality
  • Consider to add area:* label(s)
  • I followed naming convention rules

🤔 This is a ...

  • New feature
  • Bug fix
  • Performance optimization
  • Refactoring
  • Test Case
  • Documentation update
  • Other

🔗 Related issue link

Describe the source of requirement, like related issue link.

💡 Background and solution

implement page with auto tesk cards, when preview button is pressed, modal with full data opens
Снимок экрана 2024-07-07 в 17 10 02
Снимок экрана 2024-07-07 в 17 09 55

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Database migration is added or not needed
  • Documentation is updated/provided or not needed
  • Changes are tested locally

@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jun 18, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jun 19, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 7, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 7, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 7, 2024
@RequiredRoles([Role.Admin, CourseRole.Manager])
@ApiOperation({ operationId: 'getAllMinimizedRSSchoolAppTests' })
@ApiOkResponse({ type: [MinimizedAutoTestTaskDto] })
async getAllMinimizedRSSchoolAppTests() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove RSSchoolApp from the name as it looks redundant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I suggest another name. minimized looks confusing here as it's usually used for describing UI patterns.

What about the following names:

  • getAllAutoTests()
  • getBasicAutoTests()


@Get('/:id')
@RequiredRoles([Role.Admin, CourseRole.Manager])
@ApiOperation({ operationId: 'getRSSchoolAppTest' })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since module called auto-test, I would name it as getAutoTest. Application name looks weird in the name

constructor(task: Task) {
this.id = task.id;
this.name = task.name;
this.maxAttemptsNumber = Number(task?.attributes?.public?.maxAttemptsNumber);
Copy link
Member

@apalchys apalchys Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number(undefined) gives NaN. Please add handling when the value is undefined

@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 10, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 10, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 10, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 11, 2024
});
}

public async getOne(id: number) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findById

export default function () {
return (
<ActiveCourseProvider>
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  <SessionProvider allowedRoles={[CourseRole.Manager]}>

)}
{selectedTask?.descriptionUrl && (
<Descriptions.Item label="Description URL">
<a href={selectedTask?.descriptionUrl}>{selectedTask?.descriptionUrl}</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a href={selectedTask?.descriptionUrl}>{selectedTask?.descriptionUrl}</a>
<a href={selectedTask?.descriptionUrl} target="_blank">{selectedTask?.descriptionUrl}</a>

{selectedTask?.discipline?.name && (
<Descriptions.Item label="Discipline">{selectedTask?.discipline?.name}</Descriptions.Item>
)}
{selectedTask?.courses?.length && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{selectedTask?.courses?.length && (
{selectedTask?.courses?.length > 0 && (

export default function () {
return (
<ActiveCourseProvider>
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly>
<SessionProvider allowedRoles={[CourseRole.Manager]}>

@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 15, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Jul 15, 2024
@rolling-scopes rolling-scopes deleted a comment from github-actions bot Aug 30, 2024
@apalchys apalchys merged commit 3572400 into master Sep 15, 2024
6 checks passed
@apalchys apalchys deleted the rs-app-2424 branch September 15, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants