Skip to content

Commit c230817

Browse files
database migration: add field specialNeedsTeacher to LearningSupportPlan
1 parent 74030cb commit c230817

12 files changed

Lines changed: 13310 additions & 20 deletions

File tree

school_data_hub_client/lib/src/protocol/_features/learning_support/models/learning_support_plan.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
2424
required this.planId,
2525
this.number,
2626
required this.createdBy,
27+
this.specialNeedsTeacher,
2728
this.socialPedagogue,
2829
this.proffesionalsInvolved,
2930
this.strengthsDescription,
@@ -45,6 +46,7 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
4546
required String planId,
4647
int? number,
4748
required String createdBy,
49+
String? specialNeedsTeacher,
4850
String? socialPedagogue,
4951
String? proffesionalsInvolved,
5052
String? strengthsDescription,
@@ -67,6 +69,7 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
6769
planId: jsonSerialization['planId'] as String,
6870
number: jsonSerialization['number'] as int?,
6971
createdBy: jsonSerialization['createdBy'] as String,
72+
specialNeedsTeacher: jsonSerialization['specialNeedsTeacher'] as String?,
7073
socialPedagogue: jsonSerialization['socialPedagogue'] as String?,
7174
proffesionalsInvolved:
7275
jsonSerialization['proffesionalsInvolved'] as String?,
@@ -114,6 +117,8 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
114117

115118
String createdBy;
116119

120+
String? specialNeedsTeacher;
121+
117122
String? socialPedagogue;
118123

119124
String? proffesionalsInvolved;
@@ -150,6 +155,7 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
150155
String? planId,
151156
int? number,
152157
String? createdBy,
158+
String? specialNeedsTeacher,
153159
String? socialPedagogue,
154160
String? proffesionalsInvolved,
155161
String? strengthsDescription,
@@ -172,6 +178,8 @@ abstract class LearningSupportPlan implements _i1.SerializableModel {
172178
'planId': planId,
173179
if (number != null) 'number': number,
174180
'createdBy': createdBy,
181+
if (specialNeedsTeacher != null)
182+
'specialNeedsTeacher': specialNeedsTeacher,
175183
if (socialPedagogue != null) 'socialPedagogue': socialPedagogue,
176184
if (proffesionalsInvolved != null)
177185
'proffesionalsInvolved': proffesionalsInvolved,
@@ -210,6 +218,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
210218
required String planId,
211219
int? number,
212220
required String createdBy,
221+
String? specialNeedsTeacher,
213222
String? socialPedagogue,
214223
String? proffesionalsInvolved,
215224
String? strengthsDescription,
@@ -229,6 +238,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
229238
planId: planId,
230239
number: number,
231240
createdBy: createdBy,
241+
specialNeedsTeacher: specialNeedsTeacher,
232242
socialPedagogue: socialPedagogue,
233243
proffesionalsInvolved: proffesionalsInvolved,
234244
strengthsDescription: strengthsDescription,
@@ -254,6 +264,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
254264
String? planId,
255265
Object? number = _Undefined,
256266
String? createdBy,
267+
Object? specialNeedsTeacher = _Undefined,
257268
Object? socialPedagogue = _Undefined,
258269
Object? proffesionalsInvolved = _Undefined,
259270
Object? strengthsDescription = _Undefined,
@@ -274,6 +285,9 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
274285
planId: planId ?? this.planId,
275286
number: number is int? ? number : this.number,
276287
createdBy: createdBy ?? this.createdBy,
288+
specialNeedsTeacher: specialNeedsTeacher is String?
289+
? specialNeedsTeacher
290+
: this.specialNeedsTeacher,
277291
socialPedagogue:
278292
socialPedagogue is String? ? socialPedagogue : this.socialPedagogue,
279293
proffesionalsInvolved: proffesionalsInvolved is String?

school_data_hub_flutter/lib/features/learning_support/presentation/widgets/learning_support_plan_card.dart

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -331,22 +331,6 @@ class _LearningSupportPlanCardState extends State<LearningSupportPlanCard> {
331331
return Column(
332332
crossAxisAlignment: CrossAxisAlignment.start,
333333
children: [
334-
const Gap(12),
335-
const Divider(),
336-
const Gap(8),
337-
338-
// Comment field
339-
const Text(
340-
'Ergänze Hinweise und Absprachen:',
341-
style: AppStyles.textLabel,
342-
),
343-
const Gap(4),
344-
TextField(
345-
controller: _commentController,
346-
maxLines: 3,
347-
decoration: AppStyles.textFieldDecoration(labelText: 'Kommentar'),
348-
),
349-
350334
const Gap(12),
351335

352336
// Social Pedagogue field
@@ -397,7 +381,17 @@ class _LearningSupportPlanCardState extends State<LearningSupportPlanCard> {
397381
labelText: 'Problembeschreibung',
398382
),
399383
),
400-
384+
// Comment field
385+
const Text(
386+
'Ergänze Hinweise und Absprachen:',
387+
style: AppStyles.textLabel,
388+
),
389+
const Gap(4),
390+
TextField(
391+
controller: _commentController,
392+
maxLines: 3,
393+
decoration: AppStyles.textFieldDecoration(labelText: 'Kommentar'),
394+
),
401395
const Gap(16),
402396

403397
// Save / Cancel buttons

school_data_hub_flutter/lib/features/learning_support/presentation/widgets/support_catagory_status/widgets/support_category_status_card.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class SupportCategoryStatusCard extends StatelessWidget {
2525
final learningSupportManager = di<SupportCategoryManager>();
2626
final int supportCategoryId =
2727
statusesWithSameGoalCategory[0].supportCategoryId;
28-
final Color supportCategoryColor = learningSupportManager.getCategoryColor(
29-
supportCategoryId,
30-
);
28+
// final Color supportCategoryColor = learningSupportManager.getCategoryColor(
29+
// supportCategoryId,
30+
// );
3131
return Card(
3232
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
3333
child: Column(

school_data_hub_server/lib/src/_features/learning_support/models/learning_support_plan.spy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ fields:
44
planId: String
55
number: int?
66
createdBy: String
7+
specialNeedsTeacher: String?
78
socialPedagogue: String?
89
proffesionalsInvolved: String?
910
strengthsDescription: String?

school_data_hub_server/lib/src/generated/_features/learning_support/models/learning_support_plan.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ abstract class LearningSupportPlan
2727
required this.planId,
2828
this.number,
2929
required this.createdBy,
30+
this.specialNeedsTeacher,
3031
this.socialPedagogue,
3132
this.proffesionalsInvolved,
3233
this.strengthsDescription,
@@ -48,6 +49,7 @@ abstract class LearningSupportPlan
4849
required String planId,
4950
int? number,
5051
required String createdBy,
52+
String? specialNeedsTeacher,
5153
String? socialPedagogue,
5254
String? proffesionalsInvolved,
5355
String? strengthsDescription,
@@ -70,6 +72,7 @@ abstract class LearningSupportPlan
7072
planId: jsonSerialization['planId'] as String,
7173
number: jsonSerialization['number'] as int?,
7274
createdBy: jsonSerialization['createdBy'] as String,
75+
specialNeedsTeacher: jsonSerialization['specialNeedsTeacher'] as String?,
7376
socialPedagogue: jsonSerialization['socialPedagogue'] as String?,
7477
proffesionalsInvolved:
7578
jsonSerialization['proffesionalsInvolved'] as String?,
@@ -119,6 +122,8 @@ abstract class LearningSupportPlan
119122

120123
String createdBy;
121124

125+
String? specialNeedsTeacher;
126+
122127
String? socialPedagogue;
123128

124129
String? proffesionalsInvolved;
@@ -158,6 +163,7 @@ abstract class LearningSupportPlan
158163
String? planId,
159164
int? number,
160165
String? createdBy,
166+
String? specialNeedsTeacher,
161167
String? socialPedagogue,
162168
String? proffesionalsInvolved,
163169
String? strengthsDescription,
@@ -180,6 +186,8 @@ abstract class LearningSupportPlan
180186
'planId': planId,
181187
if (number != null) 'number': number,
182188
'createdBy': createdBy,
189+
if (specialNeedsTeacher != null)
190+
'specialNeedsTeacher': specialNeedsTeacher,
183191
if (socialPedagogue != null) 'socialPedagogue': socialPedagogue,
184192
if (proffesionalsInvolved != null)
185193
'proffesionalsInvolved': proffesionalsInvolved,
@@ -211,6 +219,8 @@ abstract class LearningSupportPlan
211219
'planId': planId,
212220
if (number != null) 'number': number,
213221
'createdBy': createdBy,
222+
if (specialNeedsTeacher != null)
223+
'specialNeedsTeacher': specialNeedsTeacher,
214224
if (socialPedagogue != null) 'socialPedagogue': socialPedagogue,
215225
if (proffesionalsInvolved != null)
216226
'proffesionalsInvolved': proffesionalsInvolved,
@@ -287,6 +297,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
287297
required String planId,
288298
int? number,
289299
required String createdBy,
300+
String? specialNeedsTeacher,
290301
String? socialPedagogue,
291302
String? proffesionalsInvolved,
292303
String? strengthsDescription,
@@ -306,6 +317,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
306317
planId: planId,
307318
number: number,
308319
createdBy: createdBy,
320+
specialNeedsTeacher: specialNeedsTeacher,
309321
socialPedagogue: socialPedagogue,
310322
proffesionalsInvolved: proffesionalsInvolved,
311323
strengthsDescription: strengthsDescription,
@@ -331,6 +343,7 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
331343
String? planId,
332344
Object? number = _Undefined,
333345
String? createdBy,
346+
Object? specialNeedsTeacher = _Undefined,
334347
Object? socialPedagogue = _Undefined,
335348
Object? proffesionalsInvolved = _Undefined,
336349
Object? strengthsDescription = _Undefined,
@@ -351,6 +364,9 @@ class _LearningSupportPlanImpl extends LearningSupportPlan {
351364
planId: planId ?? this.planId,
352365
number: number is int? ? number : this.number,
353366
createdBy: createdBy ?? this.createdBy,
367+
specialNeedsTeacher: specialNeedsTeacher is String?
368+
? specialNeedsTeacher
369+
: this.specialNeedsTeacher,
354370
socialPedagogue:
355371
socialPedagogue is String? ? socialPedagogue : this.socialPedagogue,
356372
proffesionalsInvolved: proffesionalsInvolved is String?
@@ -401,6 +417,10 @@ class LearningSupportPlanTable extends _i1.Table<int?> {
401417
'createdBy',
402418
this,
403419
);
420+
specialNeedsTeacher = _i1.ColumnString(
421+
'specialNeedsTeacher',
422+
this,
423+
);
404424
socialPedagogue = _i1.ColumnString(
405425
'socialPedagogue',
406426
this,
@@ -445,6 +465,8 @@ class LearningSupportPlanTable extends _i1.Table<int?> {
445465

446466
late final _i1.ColumnString createdBy;
447467

468+
late final _i1.ColumnString specialNeedsTeacher;
469+
448470
late final _i1.ColumnString socialPedagogue;
449471

450472
late final _i1.ColumnString proffesionalsInvolved;
@@ -588,6 +610,7 @@ class LearningSupportPlanTable extends _i1.Table<int?> {
588610
planId,
589611
number,
590612
createdBy,
613+
specialNeedsTeacher,
591614
socialPedagogue,
592615
proffesionalsInvolved,
593616
strengthsDescription,

school_data_hub_server/lib/src/generated/protocol.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,12 @@ class Protocol extends _i1.SerializationManagerServer {
15321532
isNullable: false,
15331533
dartType: 'String',
15341534
),
1535+
_i2.ColumnDefinition(
1536+
name: 'specialNeedsTeacher',
1537+
columnType: _i2.ColumnType.text,
1538+
isNullable: true,
1539+
dartType: 'String?',
1540+
),
15351541
_i2.ColumnDefinition(
15361542
name: 'socialPedagogue',
15371543
columnType: _i2.ColumnType.text,

0 commit comments

Comments
 (0)