partner programm completed

This commit is contained in:
salam committed 2026-01-29 20:20:31 +01:00
1 parent 84bfa248cd
commit a883ccf0ea
22 files changed
+722 -28

No files matched your search

@@ -346,6 +346,9 @@ class EventsTable
)->when(
$data['starttime_period'],
function (Builder $query, $starttime_period) {
// dd($starttime_period);
if (isset($starttime_period['start']) && isset($starttime_period['end'])) {
$from = Carbon::createFromDate($starttime_period['start']);
$end = Carbon::createFromDate($starttime_period['end']);
@@ -462,17 +465,17 @@ class EventsTable
if ($data['filter_alarm_green'] ?? null) {
$title = OddsTable::where('name', $data['filter_alarm_green'])->value('title');
$indicators[] = Indicator::make('Alarm: '.$title)->removeField('filter_alarm_green')->color('success');
$indicators[] = Indicator::make('Alarms: '.$title)->removeField('filter_alarm_green')->color('success');
}
if ($data['filter_alarm_yellow'] ?? null) {
$title = OddsTable::where('name', $data['filter_alarm_yellow'])->value('title');
$indicators[] = Indicator::make('Alarm: '.$title)->removeField('filter_alarm_yellow')->color('warning');
$indicators[] = Indicator::make('Alarms: '.$title)->removeField('filter_alarm_yellow')->color('warning');
}
if ($data['filter_alarm_red'] ?? null) {
$title = OddsTable::where('name', $data['filter_alarm_red'])->value('title');
$indicators[] = Indicator::make('Alarm: '.$title)->removeField('filter_alarm_red')->color('danger');
$indicators[] = Indicator::make('Alarms: '.$title)->removeField('filter_alarm_red')->color('danger');
}
if ($data['starttime_period'] ?? null) {
@@ -526,10 +529,18 @@ class EventsTable
->deferFilters(false)
->hiddenFilterIndicators(false)
->persistFiltersInSession()
->emptyStateHeading('No events')
->emptyStateDescription('Modify the filter')
->recordActions([
Action::make('star')
->iconButton()
->color('gray')
->color(function ($record) {
if (isset($record->event_user_star->id)) {
return 'info';
} else {
return 'gray';
}
})
->icon(function ($record) {
if (isset($record->event_user_star->id)) {
return 'phosphor-star-fill';