Skip to content

Commit 2ce09d5

Browse files
authored
[ADVAPP-2519]: Some users have reported that the heading in example CSV form for importing programs to Advising App is incorrect (#2423)
* Fix Student Programs import CSV headers and labels to match table display, add missing Graduation Date and Catalog Year import columns, and fix major/minor storage keys * Align division label to College in create/edit form and change_dt label to Change Date in view modal and import for consistency
1 parent 2c4dfaf commit 2ce09d5

3 files changed

Lines changed: 47 additions & 17 deletions

File tree

app-modules/student-data-model/src/Filament/Imports/StudentProgramImporter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static function getColumns(): array
5353
return [
5454
ImportColumn::make('sisid')
5555
->label('Student ID')
56+
->exampleHeader('Student ID')
5657
->requiredMapping()
5758
->example('########')
5859
->rules([

app-modules/student-data-model/src/Filament/Resources/Students/Pages/Concerns/ImportColumns.php

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,27 @@ public static function getProgramColumns(): array
4848
{
4949
return [
5050
ImportColumn::make('acad_career')
51-
->label('ACAD career')
51+
->label('Academic Career')
52+
->exampleHeader('Academic Career')
5253
->example('CRED')
5354
->rules([
5455
'nullable',
5556
'string',
5657
'max:255',
5758
]),
5859
ImportColumn::make('division')
59-
->example('ABC01')
60+
->label('College')
61+
->exampleHeader('College')
6062
->example('ABC01')
6163
->rules([
6264
'nullable',
6365
'string',
6466
'max:255',
6567
]),
6668
ImportColumn::make('acad_plan_majors')
67-
->label('ACAD plan majors')
68-
->example('1076N|1077N')
69+
->label('ACAD Plan Majors')
70+
->exampleHeader('ACAD Plan Majors')
71+
->example('Computer Science|Mathematics')
6972
->array('|')
7073
->rules(['array'])
7174
->nestedRecursiveRules(['string', 'max:255'])
@@ -76,13 +79,14 @@ public static function getProgramColumns(): array
7679
$acadPlan = [];
7780
}
7881

79-
$acadPlan['majors'] = $state;
82+
$acadPlan['major'] = $state;
8083

8184
$record->acad_plan = $acadPlan;
8285
}),
8386
ImportColumn::make('acad_plan_minors')
84-
->label('ACAD plan minors')
85-
->example('2076N|2077N')
87+
->label('ACAD Plan Minors')
88+
->exampleHeader('ACAD Plan Minors')
89+
->example('Philosophy|Psychology')
8690
->array('|')
8791
->rules(['array'])
8892
->nestedRecursiveRules(['string', 'max:255'])
@@ -93,27 +97,31 @@ public static function getProgramColumns(): array
9397
$acadPlan = [];
9498
}
9599

96-
$acadPlan['minors'] = $state;
100+
$acadPlan['minor'] = $state;
97101

98102
$record->acad_plan = $acadPlan;
99103
}),
100104
ImportColumn::make('prog_status')
101-
->label('PROG status')
105+
->label('Program Status')
106+
->exampleHeader('Program Status')
102107
->example('AC')
103108
->rules([
104109
'nullable',
105110
'string',
106111
'max:255',
107112
]),
108113
ImportColumn::make('cum_gpa')
109-
->label('Cum GPA')
114+
->label('Cumulative GPA')
115+
->exampleHeader('Cumulative GPA')
110116
->numeric()
111117
->example('3.284')
112118
->rules([
113119
'nullable',
114120
'numeric',
115121
]),
116122
ImportColumn::make('semester')
123+
->label('Semester')
124+
->exampleHeader('Semester')
117125
->example('1234')
118126
->rules([
119127
'nullable',
@@ -122,34 +130,55 @@ public static function getProgramColumns(): array
122130
]),
123131
ImportColumn::make('descr')
124132
->label('Name')
125-
->example('Loream ipsum')
133+
->exampleHeader('Name')
134+
->example('Bachelor of Science')
126135
->rules([
127136
'nullable',
128137
'string',
129138
'max:255',
130139
]),
131140
ImportColumn::make('foi')
132-
->label('Field of interest')
133-
->example('Loream ipsum')
141+
->label('Field of Interest')
142+
->exampleHeader('Field of Interest')
143+
->example('Computer Science')
134144
->rules([
135145
'nullable',
136146
'string',
137147
'max:255',
138148
]),
139149
ImportColumn::make('change_dt')
140-
->label('Change date')
150+
->label('Change Date')
151+
->exampleHeader('Change Date')
141152
->example('1986-06-13 08:11:35')
142153
->rules([
143154
'nullable',
144155
'date',
145156
]),
146157
ImportColumn::make('declare_dt')
147-
->label('Declare date')
158+
->label('Start Date')
159+
->exampleHeader('Start Date')
160+
->example('1986-06-13 08:11:35')
161+
->rules([
162+
'nullable',
163+
'date',
164+
]),
165+
ImportColumn::make('graduation_dt')
166+
->label('Graduation Date')
167+
->exampleHeader('Graduation Date')
148168
->example('1986-06-13 08:11:35')
149169
->rules([
150170
'nullable',
151171
'date',
152172
]),
173+
ImportColumn::make('catalog_year')
174+
->label('Catalog Year')
175+
->exampleHeader('Catalog Year')
176+
->example('2024')
177+
->rules([
178+
'nullable',
179+
'string',
180+
'max:255',
181+
]),
153182
];
154183
}
155184

app-modules/student-data-model/src/Filament/Resources/Students/RelationManagers/ProgramsRelationManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function infolist(Schema $schema): Schema
101101
->placeholder('-')
102102
->visible($sisSystem?->hasProgramsDeclareDt() ?? true),
103103
TextEntry::make('change_dt')
104-
->label('Last Action Date')
104+
->label('Change Date')
105105
->dateTime()
106106
->placeholder('-')
107107
->visible($sisSystem?->hasProgramsChangeDt() ?? true),
@@ -268,7 +268,7 @@ public function form(Schema $schema): Schema
268268
TextInput::make('division')
269269
->string()
270270
->maxLength(255)
271-
->label('Division'),
271+
->label('College'),
272272
TextInput::make('acad_plan_major')
273273
->label('Major(s)')
274274
->helperText('Comma-separated, e.g. Computer Science, Mathematics')

0 commit comments

Comments
 (0)