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),
|
||||
),
|
||||
pw.SizedBox(height: 12),
|
||||
pw.Text('History updates:'),
|
||||
pw.SizedBox(height: 6),
|
||||
pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.start,
|
||||
children: [
|
||||
for (final log in logs)
|
||||
// Historical timestamps: always show the labels; values may be empty
|
||||
pw.Row(
|
||||
children: [
|
||||
pw.Text(AppTime.formatDate(log.createdAt)),
|
||||
pw.Text('Created At:'),
|
||||
pw.SizedBox(width: 8),
|
||||
pw.Text(AppTime.formatTime(log.createdAt)),
|
||||
pw.SizedBox(width: 8),
|
||||
pw.Text(log.actionType),
|
||||
pw.Text(
|
||||
'${AppTime.formatDate(task.createdAt)} ${AppTime.formatTime(task.createdAt)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
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),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user