Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-search-enroll-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Scott Berg
course-search-enroll-fe
Commits
3b5e6a2b
Commit
3b5e6a2b
authored
5 years ago
by
pnogal
Committed by
Paulina Nogal
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add default selection for primary degree plan and included terms in audit request form
parent
b2b55658
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/dars/new-audit-options/new-audit-options.component.html
+3
-6
3 additions, 6 deletions
...p/dars/new-audit-options/new-audit-options.component.html
src/app/dars/new-audit-options/new-audit-options.component.ts
+33
-7
33 additions, 7 deletions
...app/dars/new-audit-options/new-audit-options.component.ts
with
36 additions
and
13 deletions
src/app/dars/new-audit-options/new-audit-options.component.html
+
3
−
6
View file @
3b5e6a2b
...
...
@@ -64,7 +64,7 @@
<div
class=
"step-buttons-group"
>
<button
mat-button
matStepperPrevious
color=
"primary"
>
Back
</button>
<button
mat-button
matStepperNext
mat-stroked-button
color=
"primary"
(click)=
"getPlansList()"
>
Next
</button>
<button
mat-button
matStepperNext
mat-stroked-button
color=
"primary"
>
Next
</button>
</div>
</mat-step>
...
...
@@ -79,10 +79,7 @@
<mat-form-field
class=
"audit-settings-option"
>
<mat-label>
Include Courses From
</mat-label>
<mat-select
formControlName=
"includeCoursesFrom"
placeholder=
"Include Courses From"
aria-label=
"Include Courses From"
[disableOptionCentering]=
"true"
>
<mat-option
value=
"future"
>
Previous, current, future, and planned terms
</mat-option>
<mat-option
value=
"future"
>
Previous, current, future
</mat-option>
<mat-option
value=
"current"
>
Previous, current
</mat-option>
<mat-option
value=
"previous"
>
Previous
</mat-option>
<mat-option
*ngFor=
"let term of termsToInclude"
[value]=
'term'
id=
"{{ term.id }}"
>
{{ term.name }}
</mat-option>
</mat-select>
</mat-form-field>
...
...
@@ -90,7 +87,7 @@
<mat-form-field
class=
"audit-settings-option"
>
<mat-label>
Degree Plan
</mat-label>
<mat-select
formControlName=
"runAgainst"
placeholder=
"Degree Plan"
aria-label=
"Degree Plan"
[disableOptionCentering]=
"true"
>
<mat-option
*ngFor=
"let degreePlan of
(
degreePlans
$ | async)
"
value=
"{{ degreePlan.roadmapId }}"
>
{{ degreePlan.name }}
</mat-option>
<mat-option
*ngFor=
"let degreePlan of degreePlans"
value=
"{{ degreePlan.roadmapId }}"
>
{{ degreePlan.name }}
</mat-option>
</mat-select>
</mat-form-field>
<div
class=
"step-buttons-group"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/dars/new-audit-options/new-audit-options.component.ts
+
33
−
7
View file @
3b5e6a2b
...
...
@@ -34,10 +34,14 @@ export class NewAuditOptionsComponent implements OnInit {
public
courses
:
any
;
public
variableCreditCourses
:
any
;
public
degreePlans$
:
Observable
<
DARSState
[
'
degreePlans
'
]
>
;
public
degreePlans
:
any
[];
public
primaryPlan
:
any
[];
public
primaryPlanId
:
string
;
public
hasVariableCredits
:
boolean
;
public
creditsRange
:
any
[];
public
isLoaded
:
boolean
;
public
selectedAuditType
:
string
;
public
termsToInclude
:
any
[];
get
formArray
():
AbstractControl
|
null
{
return
this
.
newAuditForm
.
get
(
'
formArray
'
);
}
...
...
@@ -54,9 +58,32 @@ export class NewAuditOptionsComponent implements OnInit {
},
)
{
this
.
selectedAuditType
=
data
.
selectedAuditType
;
this
.
termsToInclude
=
[
{
name
:
'
Previous, current, future, and planned terms
'
,
id
:
'
future-whatif
'
,
value
:
'
future
'
,
},
{
name
:
'
Previous, current, future
'
,
id
:
'
future-degree
'
,
value
:
'
future
'
,
},
{
name
:
'
Previous, current
'
,
id
:
'
current
'
,
value
:
'
current
'
},
{
name
:
'
Previous
'
,
id
:
'
previous
'
,
value
:
'
previous
'
},
];
}
ngOnInit
()
{
// Get Degree plans
this
.
degreePlans$
=
this
.
store
.
pipe
(
select
(
selectors
.
degreePlans
));
this
.
degreePlans$
.
subscribe
(
plans
=>
{
this
.
degreePlans
=
plans
;
this
.
primaryPlan
=
plans
.
filter
(
function
(
plan
)
{
return
plan
.
primary
===
true
;
});
this
.
primaryPlanId
=
this
.
primaryPlan
[
0
].
roadmapId
.
toString
();
});
// Get student degree programs
this
.
api
.
getStudentDegreePrograms
().
subscribe
(
studentDegreeProgram
=>
{
this
.
studentDegreeProgram
=
studentDegreeProgram
;
...
...
@@ -81,7 +108,6 @@ export class NewAuditOptionsComponent implements OnInit {
}
}
});
this
.
newAuditForm
=
this
.
fb
.
group
({
formArray
:
this
.
fb
.
array
([
this
.
fb
.
group
({
...
...
@@ -94,8 +120,12 @@ export class NewAuditOptionsComponent implements OnInit {
}),
this
.
fb
.
group
({
honors
:
new
FormControl
(
'
Keep current status
'
),
includeCoursesFrom
:
new
FormControl
(
'
future
'
),
runAgainst
:
new
FormControl
(
''
),
includeCoursesFrom
:
new
FormControl
(
this
.
selectedAuditType
===
'
degree
'
?
this
.
termsToInclude
[
1
]
:
this
.
termsToInclude
[
0
],
),
runAgainst
:
new
FormControl
(
this
.
primaryPlanId
),
}),
this
.
fb
.
group
({
credits
:
new
FormControl
(
''
),
...
...
@@ -104,10 +134,6 @@ export class NewAuditOptionsComponent implements OnInit {
});
}
public
getPlansList
()
{
this
.
degreePlans$
=
this
.
store
.
pipe
(
select
(
selectors
.
degreePlans
));
}
public
getCoursesList
(
roadmapId
)
{
this
.
isLoaded
=
false
;
...
...
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