Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Jun 7, 2024
1 parent 2360ec5 commit 74ce8c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ protected static function aggressorSection(): array
->relationship('aggressor')
->columnSpanFull()
->hiddenLabel()
->columns()
->addActionLabel(__('beneficiary.section.personal_information.actions.add_aggressor'))
->schema([
Select::make('relationship')
Expand Down Expand Up @@ -241,7 +242,7 @@ protected static function aggressorSection(): array
Select::make('violence_types')
->label(__('field.aggressor_violence_types'))
->placeholder(__('placeholder.select_many'))
->visible(fn (Get $get) => Ternary::isYes($get('violence_history')))
->visible(fn (Get $get) => Ternary::isYes($get('has_violence_history')))
->options(Violence::options())
->rule(new MultipleIn(Violence::values()))
->multiple(),
Expand All @@ -259,7 +260,7 @@ protected static function aggressorSection(): array

TextInput::make('psychiatric_history_notes')
->label(__('field.aggressor_psychiatric_history_notes'))
->visible(fn (Get $get) => Ternary::isYes($get('psychiatric_history'))),
->visible(fn (Get $get) => Ternary::isYes($get('has_psychiatric_history'))),
]),

Grid::make()
Expand All @@ -285,7 +286,7 @@ protected static function aggressorSection(): array
Select::make('legal_history')
->label(__('field.aggressor_legal_history'))
->placeholder(__('placeholder.select_many'))
->visible(fn (Get $get) => Ternary::isYes($get('violence_history')))
->visible(fn (Get $get) => Ternary::isYes($get('has_violence_history')))
->options(AggressorLegalHistory::options())
->rule(new MultipleIn(AggressorLegalHistory::values()))
->multiple()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ protected static function aggressorSection(): array

EnumEntry::make('violence_types')
->label(__('field.aggressor_violence_types'))
->placeholder(__('placeholder.select_many')),
->placeholder(__('placeholder.select_many'))
->badge(),

]),

Expand All @@ -220,24 +221,19 @@ protected static function aggressorSection(): array
EnumEntry::make('has_drug_history')
->label(__('field.aggressor_has_drug_history'))
->placeholder(__('placeholder.select_one')),

EnumEntry::make('drugs')
->label(__('field.aggressor_drugs'))
->placeholder(__('placeholder.select_many'))
->badge(),

// TextEntry::make('drugs')
// ->label(__('field.aggressor_drugs'))
// ->placeholder(__('placeholder.select_many'))
// ->formatStateUsing(fn ($state) => dd($state)),
]),

Grid::make()
->schema([
EnumEntry::make('legal_history')
->label(__('field.aggressor_legal_history'))
->placeholder(__('placeholder.select_many')),
// observatii aspecte legale agresor
->placeholder(__('placeholder.select_many'))
->badge(),
]),

Grid::make()
Expand Down

0 comments on commit 74ce8c8

Please sign in to comment.