wip Nutzwerte pdf
This commit is contained in:
1 parent
4ad27d8c19
commit
2296b708eb
31 files changed
+528
-1656
No files matched your search
@@ -98,7 +98,7 @@ class EditProjekte extends EditRecord
|
||||
*/
|
||||
Action::make('nutzwerte')
|
||||
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->pdf_nutzwerte_status) ? true : false)
|
||||
->color('primary')
|
||||
->color('success')
|
||||
->label('Nutzwerte')
|
||||
->icon('icon-pdf')
|
||||
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'file']))
|
||||
|
||||
+6
-2
@@ -59,6 +59,9 @@ class OrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
'style' => 'position: sticky; left: 0; z-index: 1;',
|
||||
'class' => 'bg-gray-50 dark:bg-gray-900',
|
||||
]),
|
||||
TextInputColumn::make('geschoss')
|
||||
->width('1rem')
|
||||
->toggleable(),
|
||||
CheckboxColumn::make('nicht_in_orientierung')
|
||||
->label('NiO')
|
||||
->toggleable()
|
||||
@@ -76,6 +79,7 @@ class OrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
->label('Orientierung')
|
||||
->selectablePlaceholder(true)
|
||||
->options(Orientierung::pluck('name', 'id'))
|
||||
->selectablePlaceholder(false)
|
||||
->disableOptionWhen(fn (string $value): bool => in_array($value, [2, 11, 24, 33, 36]))
|
||||
->preloadOptions()->afterStateUpdated(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshOrientierung');
|
||||
@@ -230,8 +234,8 @@ class OrientierungZuAbschlaegesRelationManager extends RelationManager
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Orientierung Zu/Abschläge erstellen')
|
||||
->modalDescription('Alle bestehenden Daten in dieser Tabelle werden vorher gelöscht.')
|
||||
->modalSubmitActionLabel('Erstellen')
|
||||
->label('Erstellen')
|
||||
->modalSubmitActionLabel('Generieren')
|
||||
->label('Generieren')
|
||||
->tooltip('Daten werden aus "Räume Alle" gefiltert.')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->after(function (Component $livewire) {
|
||||
|
||||
+11
-4
@@ -208,11 +208,20 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->recordTitleAttribute('text')
|
||||
// ->recordClasses(fn ($record) => $record->part == 'gutachten' ? 'border-l border-primary-500' : 'border-l border-success-500')
|
||||
->columns([
|
||||
TextColumn::make('ordnungszahl')
|
||||
->alignCenter()
|
||||
->width('2rem')
|
||||
->label('Index')
|
||||
->getStateUsing(fn ($record): string => $record->ordnungszahl == '0' ? '' : number_format($record->ordnungszahl, 2)),
|
||||
->getStateUsing(fn ($record): string => $record->ordnungszahl == '0' ? '' : number_format($record->ordnungszahl, 2))
|
||||
->extraCellAttributes(function ($record) {
|
||||
if ($record->part == 1) {
|
||||
return ['class' => 'bg-primary-500/10'];
|
||||
} else {
|
||||
return ['class' => 'bg-success-500/10'];
|
||||
}
|
||||
}),
|
||||
IconColumn::make('neue_seite')
|
||||
->label('Seite')
|
||||
->tooltip('Start einer neue Seite')
|
||||
@@ -229,6 +238,7 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
||||
}),
|
||||
TextColumn::make('name')
|
||||
->wrap()
|
||||
->searchable()
|
||||
->weight(fn ($record): FontWeight => match ($record->ueberschrift_anzeigen) {
|
||||
1 => FontWeight::SemiBold,
|
||||
default => FontWeight::Thin,
|
||||
@@ -258,9 +268,6 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
||||
])
|
||||
->defaultSort('sort', direction: 'asc')
|
||||
->reorderable('sort')
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Action::make('generate')
|
||||
->action(fn (CreateProjektInhaltsverzeichnis $createInhaltsverzeichnis) => $createInhaltsverzeichnis->create($this->ownerRecord))
|
||||
|
||||
+41
-41
@@ -71,8 +71,8 @@ class ProjektMethodesRelationManager extends RelationManager
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Raum Methoden erstellen')
|
||||
->modalDescription('Alle bestehenden Daten in dieser Tabelle werden vorher gelöscht.')
|
||||
->modalSubmitActionLabel('Erstellen')
|
||||
->label('Erstellen')
|
||||
->modalSubmitActionLabel('Generieren')
|
||||
->label('Generieren')
|
||||
->tooltip('Daten werden aus "Räume Alle" Tabelle gefiltert.')
|
||||
->icon('heroicon-o-cog-8-tooth')
|
||||
->after(function (Component $livewire) {
|
||||
@@ -82,46 +82,46 @@ class ProjektMethodesRelationManager extends RelationManager
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
BulkAction::make('faktor')
|
||||
->color('primary')
|
||||
->label('Faktor zuweisen')
|
||||
->schema([
|
||||
TextInput::make('faktor')
|
||||
->prefixIcon('phosphor-function')
|
||||
->numeric()
|
||||
->required(),
|
||||
])
|
||||
->icon('phosphor-function')
|
||||
->action(function (Collection $records, array $data): void {
|
||||
foreach ($records as $record) {
|
||||
ProjektMethode::where('id', '=', $record->id)
|
||||
->update(
|
||||
['faktor' => $data['faktor']]
|
||||
);
|
||||
}
|
||||
})->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshMethods');
|
||||
}),
|
||||
->color('primary')
|
||||
->label('Faktor zuweisen')
|
||||
->schema([
|
||||
TextInput::make('faktor')
|
||||
->prefixIcon('phosphor-function')
|
||||
->numeric()
|
||||
->required(),
|
||||
])
|
||||
->icon('phosphor-function')
|
||||
->action(function (Collection $records, array $data): void {
|
||||
foreach ($records as $record) {
|
||||
ProjektMethode::where('id', '=', $record->id)
|
||||
->update(
|
||||
['faktor' => $data['faktor']]
|
||||
);
|
||||
}
|
||||
})->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshMethods');
|
||||
}),
|
||||
BulkAction::make('methode')
|
||||
->color('primary')
|
||||
->label('Methode zuweisen')
|
||||
->schema([
|
||||
Select::make('methode_id')
|
||||
->label('Methode')
|
||||
->prefixIcon('phosphor-calculator')
|
||||
->options(Methode::pluck('name', 'id'))
|
||||
->required(),
|
||||
])
|
||||
->icon('phosphor-calculator')
|
||||
->action(function (Collection $records, array $data): void {
|
||||
foreach ($records as $record) {
|
||||
ProjektMethode::where('id', '=', $record->id)
|
||||
->update(
|
||||
['methode_id' => $data['methode_id']]
|
||||
);
|
||||
}
|
||||
})->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshMethods');
|
||||
}),
|
||||
->color('primary')
|
||||
->label('Methode zuweisen')
|
||||
->schema([
|
||||
Select::make('methode_id')
|
||||
->label('Methode')
|
||||
->prefixIcon('phosphor-calculator')
|
||||
->options(Methode::pluck('name', 'id'))
|
||||
->required(),
|
||||
])
|
||||
->icon('phosphor-calculator')
|
||||
->action(function (Collection $records, array $data): void {
|
||||
foreach ($records as $record) {
|
||||
ProjektMethode::where('id', '=', $record->id)
|
||||
->update(
|
||||
['methode_id' => $data['methode_id']]
|
||||
);
|
||||
}
|
||||
})->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshMethods');
|
||||
}),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user