@iapps/ng-dhis2-ui 1.2.164 → 1.2.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4310,6 +4310,7 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
4310
4310
  ? teisRaw
4311
4311
  : [teisRaw];
4312
4312
  const orgUnitLabel = metaData.orgUnitLabel;
4313
+ const incidentDateLabel = metaData.incidentDateLabel;
4313
4314
  const orgUnitMap = response.data
4314
4315
  .orgUnitsMap;
4315
4316
  const attributeColumns = metaData.displayInListTrackedEntityAttributes
@@ -4369,6 +4370,14 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
4369
4370
  label: orgUnitLabel || 'Registering unit',
4370
4371
  key: 'orgUnit',
4371
4372
  },
4373
+ ...(metaData.displayIncidentDate
4374
+ ? [
4375
+ {
4376
+ label: incidentDateLabel || 'Incident date',
4377
+ key: 'incidentDate',
4378
+ },
4379
+ ]
4380
+ : []),
4372
4381
  ...attributeColumns,
4373
4382
  ...dataElementColumns,
4374
4383
  ];
@@ -4468,6 +4477,11 @@ const getTrackedEntityTableData = (response, programId, pager, metaData, searche
4468
4477
  const orgUnitName = orgUnitMap?.get(orgUnitId) || '-';
4469
4478
  row['orgUnitId'] = { value: orgUnitId || '-' };
4470
4479
  row['orgUnit'] = { value: orgUnitName };
4480
+ row['incidentDate'] = {
4481
+ value: enrollment.incidentDate
4482
+ ? formatDate(enrollment.incidentDate)
4483
+ : '-',
4484
+ };
4471
4485
  const teiObject = typeof tei.toObject === 'function' ? tei.toObject() : null;
4472
4486
  row['responseData'] = {
4473
4487
  value: teiObject || null,