Skip to content

Commit

Permalink
Merge pull request #99 from bcgov/feature/bre-siebel-integration
Browse files Browse the repository at this point in the history
Quick fix to BRE badge formatting.
  • Loading branch information
brysonjbest authored Feb 4, 2025
2 parents d9b603a + 55f8340 commit 201f13a
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions app/Filament/Bre/Resources/RuleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ class RuleResource extends Resource

private static string $badgeTemplate = '
<a href="%s" style="text-decoration: none; display: inline-block; margin: 2px;">
<span class="fi-badge flex items-center justify-center gap-x-1 rounded-md text-xs font-medium ring-1 ring-inset px-2 min-w-[theme(spacing.6)] py-1 fi-color-custom bg-custom-50 text-custom-600 ring-custom-600/10 dark:bg-custom-400/10 dark:text-custom-400 dark:ring-custom-400/30 fi-color-primary" style="--c-50:var(--primary-50);--c-400:var(--primary-400);--c-600:var(--primary-600);">
<span class="grid">
<span class="truncate">%s</span>
</span>
</span>
</a>';

private static function formatBadge(string $url, string $text): string
Expand Down Expand Up @@ -88,8 +92,6 @@ public static function infolist(Infolist $infolist): Infolist
})->join('')
);
})
->badge()
->color('primary')
->html(),
TextEntry::make('breOutputs.name')
->formatStateUsing(function ($state, $record) {
Expand All @@ -102,8 +104,6 @@ public static function infolist(Infolist $infolist): Infolist
})->join('')
);
})
->badge()
->color('danger')
->html(),
TextEntry::make('parentRules.name')
->formatStateUsing(function ($state, $record) {
Expand All @@ -116,8 +116,6 @@ public static function infolist(Infolist $infolist): Infolist
})->join('')
);
})
->badge()
->color(Color::hex('#4169e1'))
->html(),
TextEntry::make('childRules.name')
->formatStateUsing(function ($state, $record) {
Expand All @@ -130,8 +128,6 @@ public static function infolist(Infolist $infolist): Infolist
})->join('')
);
})
->badge()
->color(Color::hex('#32cd32'))
->html(),
TextEntry::make('related_icm_cdw_fields')
->state(function (BRERule $record) {
Expand All @@ -148,7 +144,6 @@ public static function infolist(Infolist $infolist): Infolist
);
})
->html()
->badge()
->label('ICM CDW Fields used by the inputs and outputs of this Rule')
->columnSpanFull(),
TextEntry::make('input_siebel_business_objects')
Expand All @@ -166,8 +161,6 @@ public static function infolist(Infolist $infolist): Infolist
);
})
->html()
->badge()
->color(Color::hex('#D88373'))
->label('Siebel Business Objects used by inputs'),
TextEntry::make('output_siebel_business_objects')
->state(function (BRERule $record) {
Expand All @@ -184,8 +177,6 @@ public static function infolist(Infolist $infolist): Infolist
);
})
->html()
->badge()
->color(Color::hex('#E9C46A'))
->label('Siebel Business Objects used by outputs'),
TextEntry::make('input_siebel_business_components')
->state(function (BRERule $record) {
Expand All @@ -202,8 +193,6 @@ public static function infolist(Infolist $infolist): Infolist
);
})
->html()
->badge()
->color(Color::hex('#397367'))
->label('Siebel Business Components used by inputs'),
TextEntry::make('output_siebel_business_components')
->state(function (BRERule $record) {
Expand All @@ -220,8 +209,6 @@ public static function infolist(Infolist $infolist): Infolist
);
})
->html()
->badge()
->color(Color::hex('#4E0110'))
->label('Siebel Business Components used by outputs')
]);
}
Expand Down

0 comments on commit 201f13a

Please sign in to comment.