diff --git a/app/resources/locales/en_US/default.po b/app/resources/locales/en_US/default.po index fc2416610..68cf0efc5 100644 --- a/app/resources/locales/en_US/default.po +++ b/app/resources/locales/en_US/default.po @@ -590,6 +590,18 @@ msgstr "Filter" msgid "match.op.go" msgstr "Go" +msgid "match.op.highlight" +msgstr "Highlight:" + +msgid "match.op.highlight.both" +msgstr "both" + +msgid "match.op.highlight.differences" +msgstr "differences" + +msgid "match.op.highlight.matches" +msgstr "matches" + msgid "match.op.last" msgstr "Last" diff --git a/app/templates/Matchgrids/reconcile.php b/app/templates/Matchgrids/reconcile.php index c701c5305..589cb984e 100644 --- a/app/templates/Matchgrids/reconcile.php +++ b/app/templates/Matchgrids/reconcile.php @@ -29,25 +29,40 @@ use \App\Lib\Util\ArrayUtil; - // extract the attribute field names into a simple array + // Ensure that the candidates array is sorted by referenceid so we can easily match up identical adjacent referenceids. + // Note that this will retain the "New" record in first position (because the referenceid is empty). + array_multisort(array_column($vv_candidates, 'referenceid'), SORT_ASC, $vv_candidates); + + // Generate the referenceid label output by creating a simple array that contains the unique referenceid values + // along with the count of how many occurrences each has in the $vv_candidates structure (for colspan). + // Note that we must assign an empty string when encountering a NULL referenceid because array_count_values + // can only work on integers or strings. + $refIds = array(); + foreach ($vv_candidates as $candidate) { + $refIds[] = !empty($candidate['referenceid']) ? $candidate['referenceid'] : ''; + } + $refIds = array_count_values($refIds); + + // Extract the attribute field names into a simple array. $fieldNames = array(); foreach ($vv_candidates as $candidate) { $fieldNames = array_keys($candidate); break; } - // remove "referenceid" - it is given special treatment and should not be included in our structure + // Remove "referenceid" from the field names - it is given special treatment and should not be included in our + // attributes structure. array_splice($fieldNames, array_search('referenceid',$fieldNames), 1); - // build the data for the candidates into a structure for generating the view: + // Build the data for the candidates into a structure for generating the view: // attribute field name | attribute values | do the values match? $canAttr = array(); for($i = 0; $i < count($fieldNames); $i++) { - // put the field name in the first column + // Put the field name in the first column. $canAttr[$i][0] = $fieldNames[$i]; - // put all the values for the current attribute into the second column + // Put all the values for the current attribute into the second column. $canAttr[$i][1] = array(); foreach($vv_candidates as $c) { foreach($c as $key => $val) { @@ -60,8 +75,17 @@ // Test for content and equality between the row's attribute values and // set the third "match?" column to true (1) if non-empty equality found $canAttr[$i][2] = !empty($canAttr[$i][1][0]) && count(ArrayUtil::array_iunique($canAttr[$i][1])) === 1 ? 1 : 0; - } + + // Move request_time and resolution_time to the bottom + $tempArr = []; + foreach ($canAttr as $key => $val) { + if($val[0] == 'request_time' || $val[0] == 'resolution_time') { + $tempArr[] = $val; + unset($canAttr[$key]); + } + } + $canAttr = array_merge($canAttr, $tempArr); ?>
@@ -69,16 +93,30 @@

- +
+ +
+ + +
+
+ + +
+
+ + +
+
- +
- - - @@ -90,9 +128,9 @@ - - @@ -101,16 +139,16 @@ - - - - > + + $val): ?>
- + + $refIdCount): ?> + + - + $refIdCount): ?> + +
+ $refIdCount): ?> + Form->postLink(__('match.op.reconcile.' . (!empty($c['referenceid']) ? 'assign' : 'generate')), + $this->Form->postLink(__('match.op.reconcile.' . (!empty($refId) ? 'assign' : 'generate')), ['action' => 'reconcile', $vv_cur_mg->id], ['data' => [ 'rowid' => $vv_request['id'], // Default value needs to be the literal string "new" and not a localized text string - 'referenceid' => (!empty($c['referenceid']) ? $c['referenceid'] : 'new') + 'referenceid' => (!empty($refId) ? $refId : 'new') ], 'confirm' => __('match.op.assign.confirm'), 'class' => 'btn btn-primary nospin']); @@ -120,12 +158,29 @@
- + Html->link( $val, ['controller' => 'matchgrid-records', @@ -141,4 +196,14 @@
-
\ No newline at end of file + + + \ No newline at end of file diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 8c6b8f862..57ab08f60 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -694,9 +694,33 @@ body.logged-in #top-menu { #reconcile-table tr:nth-child(2n+1) td { background-color: var(--cmg-color-white); } -#reconcile-table tr.match td { +#reconcile-table.view-mode-match tr.match td, +#reconcile-table.view-mode-both tr.match td { background-color: var(--cmg-color-green-003); } +#reconcile-table.view-mode-diff tr.diff td, +#reconcile-table.view-mode-both tr.diff td { + background-color: var(--cmg-color-yellow-003); +} +#reconcile-table tr.defined-attr th { + background-color: var(--cmg-color-lightgray-001); + border-left: 4px solid var(--cmg-color-lightgray-007); +} +#reconcile-table tr.defined-attr td:last-child { + border-right: 2px solid var(--cmg-color-lightgray-007); +} +#reconcile-table tr.matr-sorid th, +#reconcile-table tr.matr-sorid td { + border-bottom: 2px solid var(--cmg-color-lightgray-007); +} +#reconcile-table tr.matr-request_time th, +#reconcile-table tr.matr-request_time td { + border-top: 2px solid var(--cmg-color-lightgray-007); +} +/* view-controls */ +.view-controls-title { + margin-right: 1em; +} /* MATCHGRID MANAGEMENT */ #matchgrid-management { padding: 0; diff --git a/app/webroot/css/co-color.css b/app/webroot/css/co-color.css index b5243f0a6..a9479ad62 100644 --- a/app/webroot/css/co-color.css +++ b/app/webroot/css/co-color.css @@ -63,7 +63,7 @@ --cmg-color-yellow-001: #f5f5bb; /* yellow warning */ --cmg-color-yellow-002: #fbec88; /* infobox informational area */ - --cmg-color-yellow-003: #ffd; /* forms: focused input */ + --cmg-color-yellow-003: #ffd; /* forms: focused input; diffing fields for reconciliation */ --cmg-color-red-001: #fcc; /* red warning */ --cmg-color-red-002: #c00; /* forms: error icons */