Status timestamps on task pdf
This commit is contained in:
parent
302d52fe4f
commit
6b16dc234b
|
|
@ -229,21 +229,38 @@ Future<Uint8List> buildTaskPdfBytes(
|
||||||
child: pw.Text(actionTakenText),
|
child: pw.Text(actionTakenText),
|
||||||
),
|
),
|
||||||
pw.SizedBox(height: 12),
|
pw.SizedBox(height: 12),
|
||||||
pw.Text('History updates:'),
|
// Historical timestamps: always show the labels; values may be empty
|
||||||
pw.SizedBox(height: 6),
|
pw.Row(
|
||||||
pw.Column(
|
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
for (final log in logs)
|
pw.Text('Created At:'),
|
||||||
pw.Row(
|
pw.SizedBox(width: 8),
|
||||||
children: [
|
pw.Text(
|
||||||
pw.Text(AppTime.formatDate(log.createdAt)),
|
'${AppTime.formatDate(task.createdAt)} ${AppTime.formatTime(task.createdAt)}',
|
||||||
pw.SizedBox(width: 8),
|
),
|
||||||
pw.Text(AppTime.formatTime(log.createdAt)),
|
],
|
||||||
pw.SizedBox(width: 8),
|
),
|
||||||
pw.Text(log.actionType),
|
pw.SizedBox(height: 6),
|
||||||
],
|
pw.Row(
|
||||||
),
|
children: [
|
||||||
|
pw.Text('Started At:'),
|
||||||
|
pw.SizedBox(width: 8),
|
||||||
|
pw.Text(
|
||||||
|
task.startedAt == null
|
||||||
|
? ''
|
||||||
|
: '${AppTime.formatDate(task.startedAt!)} ${AppTime.formatTime(task.startedAt!)}',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
pw.SizedBox(height: 6),
|
||||||
|
pw.Row(
|
||||||
|
children: [
|
||||||
|
pw.Text('Closed At:'),
|
||||||
|
pw.SizedBox(width: 8),
|
||||||
|
pw.Text(
|
||||||
|
task.completedAt == null
|
||||||
|
? ''
|
||||||
|
: '${AppTime.formatDate(task.completedAt!)} ${AppTime.formatTime(task.completedAt!)}',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
pw.SizedBox(height: 12),
|
pw.SizedBox(height: 12),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user