Skip to content

Commit

Permalink
Use badges for Status,ConfidenceMode Enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Nov 9, 2021
1 parent 6fd8e2d commit aae6708
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
42 changes: 0 additions & 42 deletions app/resources/locales/en_US/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -164,87 +164,45 @@ msgstr "Danger"
msgid "match.en.PermissionEnum.A"
msgstr "Platform Administrator"

msgid "match.en.PermissionEnum.A.warn.level"
msgstr "Secondary"

msgid "match.en.PermissionEnum.MA"
msgstr "Matchgrid Administrator"

msgid "match.en.PermissionEnum.MA.warn.level"
msgstr "Light"

msgid "match.en.PermissionEnum.RM"
msgstr "Reconciliation Manager"

msgid "match.en.PermissionEnum.RM.warn.level"
msgstr "Light"

msgid "match.en.PermissionEnum.RS"
msgstr "Reconciliation Support"

msgid "match.en.PermissionEnum.RS.warn.level"
msgstr "Light"

msgid "match.en.PermissionEnum.X"
msgstr "None"

msgid "match.en.PermissionEnum.X.warn.level"
msgstr "Warning"

msgid "match.en.ReferenceIdEnum.S"
msgstr "Sequence"

msgid "match.en.ReferenceIdEnum.S.warn.level"
msgstr "Light"

msgid "match.en.ReferenceIdEnum.U"
msgstr "UUID (Type 4)"

msgid "match.en.ReferenceIdEnum.U.warn.level"
msgstr "Light"

msgid "match.en.ResolutionModeEnum.E"
msgstr "External"

msgid "match.en.ResolutionModeEnum.E.warn.level"
msgstr "Light"

msgid "match.en.ResolutionModeEnum.I"
msgstr "Interactive"

msgid "match.en.ResolutionModeEnum.I.warn.level"
msgstr "Light"

msgid "match.en.SearchTypeEnum.D"
msgstr "Distance"

msgid "match.en.SearchTypeEnum.D.warn.level"
msgstr "Light"

msgid "match.en.SearchTypeEnum.E"
msgstr "Exact"

msgid "match.en.SearchTypeEnum.E.warn.level"
msgstr "Light"

msgid "match.en.SearchTypeEnum.M"
msgstr "Mapping"

msgid "match.en.SearchTypeEnum.M.warn.level"
msgstr "Light"

msgid "match.en.SearchTypeEnum.X"
msgstr "Skip"

msgid "match.en.SearchTypeEnum.X.warn.level"
msgstr "Light"

msgid "match.en.SearchTypeEnum.S"
msgstr "Substring"

msgid "match.en.SearchTypeEnum.S.warn.level"
msgstr "Light"

msgid "match.en.StatusEnum.A"
msgstr "Active"

Expand Down
4 changes: 4 additions & 0 deletions app/src/View/Helper/BadgeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public function getBadgeColor(string $color): ?string {
'Dark' => 'dark',
];

if(!isset($color_map[$color])) {
return null;
}

return $color_map[$color];
}

Expand Down
6 changes: 5 additions & 1 deletion app/templates/Standard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ function _column_key($modelsName, $c, $tz=null) {
$warning_level = __('match.en.'.$cfg['class'].'.'.$entity->$col . '.warn.level');
$title = __('match.en.'.$cfg['class'].'.'.$entity->$col);

print $this->Badge->badgeIt($title, $this->Badge->getBadgeColor($warning_level));
if(!empty($warning_level) && strpos($warning_level, '.warn.level') === false) {
print $this->Badge->badgeIt($title, $this->Badge->getBadgeColor($warning_level));
} else {
print $title;
}
}
break;
case 'fk':
Expand Down

0 comments on commit aae6708

Please sign in to comment.