Skip to content

Commit 0a260e4

Browse files
committed
wip
1 parent cea128c commit 0a260e4

12 files changed

Lines changed: 96 additions & 36 deletions

File tree

app/Jobs/GenerateReport/Standard/Nurse/GenerateListReportJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ protected function normalizeValue(string $name, Model $record): mixed
6262

6363
if (\is_bool($value)) {
6464
$value = match ($value) {
65-
true => __('forms::components.select.boolean.true'),
66-
false => __('forms::components.select.boolean.false'),
65+
true => __('filament-forms::components.select.boolean.true'),
66+
false => __('filament-forms::components.select.boolean.false'),
6767
};
6868
}
6969

app/Models/Beneficiary.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,7 @@ public function scopeWhereHasRareDisease(Builder $query, string $rareDisease): B
242242
return $query->where('properties->attributes->category', 'VSG_BR')
243243
->where('properties->attributes->rare_disease', $rareDisease);
244244
})
245-
->fromSub(function (QueryBuilder $query) {
246-
$query
247-
->select([
248-
'beneficiaries.*',
249-
'counties.name as county',
250-
'cities.name as city',
251-
])
252-
->from('beneficiaries')
253-
->leftJoin('cities', 'beneficiaries.city_id', '=', 'cities.id')
254-
->leftJoin('counties', 'beneficiaries.county_id', '=', 'counties.id');
255-
}, 'beneficiaries');
245+
->leftJoin('cities', 'beneficiaries.city_id', '=', 'cities.id')
246+
->leftJoin('counties', 'beneficiaries.county_id', '=', 'counties.id');
256247
}
257248
}

app/Models/Disability.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public function vulnerabilityData(): VulnerabilityData
7575
new VulnerabilityEntry(
7676
label: __('field.cat_diz_iph'),
7777
value: $this->has_certificate
78-
? __('forms::components.select.boolean.true')
79-
: __('forms::components.select.boolean.false'),
78+
? __('filament-forms::components.select.boolean.true')
79+
: __('filament-forms::components.select.boolean.false'),
8080
),
8181
new VulnerabilityEntry(
8282
label: __('field.cat_diz_deb'),

app/Models/Intervention/InterventionableIndividualService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class InterventionableIndividualService extends Model
3636
];
3737

3838
protected $with = [
39-
'service',
39+
// 'service',
4040
];
4141

4242
protected static function booted(): void

app/Reports/Queries/Child/C21.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ public static function aggregateByColumn(): string
3333
return 'interventions.id';
3434
}
3535

36+
public static function includeLatestBeforeRange(): bool
37+
{
38+
return false;
39+
}
40+
41+
public static function selectColumns(): array
42+
{
43+
return array_keys(static::columns());
44+
}
45+
3646
public static function columns(): array
3747
{
3848
return [
@@ -72,12 +82,12 @@ public static function tapQuery(Builder $query): Builder
7282
public static function recordActionUrl(Model $record): ?string
7383
{
7484
return BeneficiaryResource::getUrl(
75-
name: 'interventions.view',
76-
params: [
85+
'interventions.view',
86+
[
7787
'beneficiary' => $record->beneficiary_id,
7888
'record' => $record,
7989
],
80-
isAbsolute: false
90+
false
8191
);
8292
}
8393
}

app/Reports/Queries/Child/C31.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ public static function dateColumn(): string
2626
return 'created_at';
2727
}
2828

29+
public static function includeLatestBeforeRange(): bool
30+
{
31+
return false;
32+
}
33+
34+
public static function selectColumns(): array
35+
{
36+
return array_keys(static::columns());
37+
}
38+
2939
public static function columns(): array
3040
{
3141
return [

app/Reports/Queries/General/G11.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ public static function aggregateByColumn(): string
3434
return 'interventions.id';
3535
}
3636

37+
public static function includeLatestBeforeRange(): bool
38+
{
39+
return false;
40+
}
41+
42+
public static function selectColumns(): array
43+
{
44+
return array_keys(static::columns());
45+
}
46+
3747
public static function columns(): array
3848
{
3949
return [
@@ -73,12 +83,12 @@ public static function tapQuery(Builder $query): Builder
7383
public static function recordActionUrl(Model $record): ?string
7484
{
7585
return BeneficiaryResource::getUrl(
76-
name: 'interventions.view',
77-
params: [
86+
'interventions.view',
87+
[
7888
'beneficiary' => $record->beneficiary_id,
7989
'record' => $record,
8090
],
81-
isAbsolute: false
91+
false
8292
);
8393
}
8494
}

app/Reports/Queries/General/G25.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,24 @@ class G25 extends ReportQuery
1818
public static function query(): Builder
1919
{
2020
return CommunityActivity::query()
21-
->whereCampaign(Campaign::SCREENING)
22-
->whereCampaign();
21+
->whereCampaign(Campaign::SCREENING);
2322
}
2423

2524
public static function dateColumn(): string
2625
{
2726
return 'created_at';
2827
}
2928

29+
public static function includeLatestBeforeRange(): bool
30+
{
31+
return false;
32+
}
33+
34+
public static function selectColumns(): array
35+
{
36+
return array_keys(static::columns());
37+
}
38+
3039
public static function columns(): array
3140
{
3241
return [

app/Reports/Queries/General/G27.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class G27 extends ReportQuery
2020
public static function query(): Builder
2121
{
2222
return Intervention::query()
23-
->without('appointment', 'interventionable')
23+
->without('appointment')
2424
->whereRealizedIndividualServiceWithCode('SES_08');
2525
}
2626

@@ -34,6 +34,16 @@ public static function aggregateByColumn(): string
3434
return 'interventions.id';
3535
}
3636

37+
public static function includeLatestBeforeRange(): bool
38+
{
39+
return false;
40+
}
41+
42+
public static function selectColumns(): array
43+
{
44+
return array_keys(static::columns());
45+
}
46+
3747
public static function columns(): array
3848
{
3949
return [
@@ -73,12 +83,12 @@ public static function tapQuery(Builder $query): Builder
7383
public static function recordActionUrl(Model $record): ?string
7484
{
7585
return BeneficiaryResource::getUrl(
76-
name: 'interventions.view',
77-
params: [
86+
'interventions.view',
87+
[
7888
'beneficiary' => $record->beneficiary_id,
7989
'record' => $record,
8090
],
81-
isAbsolute: false
91+
false
8292
);
8393
}
8494
}

app/Reports/Queries/General/G28.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class G28 extends ReportQuery
2020
public static function query(): Builder
2121
{
2222
return Intervention::query()
23-
->without('appointment', 'interventionable')
23+
->without('appointment')
2424
->whereRealizedIndividualServiceWithCode('SES_12');
2525
}
2626

@@ -34,6 +34,16 @@ public static function aggregateByColumn(): string
3434
return 'interventions.id';
3535
}
3636

37+
public static function includeLatestBeforeRange(): bool
38+
{
39+
return false;
40+
}
41+
42+
public static function selectColumns(): array
43+
{
44+
return array_keys(static::columns());
45+
}
46+
3747
public static function columns(): array
3848
{
3949
return [
@@ -73,12 +83,12 @@ public static function tapQuery(Builder $query): Builder
7383
public static function recordActionUrl(Model $record): ?string
7484
{
7585
return BeneficiaryResource::getUrl(
76-
name: 'interventions.view',
77-
params: [
86+
'interventions.view',
87+
[
7888
'beneficiary' => $record->beneficiary_id,
7989
'record' => $record,
8090
],
81-
isAbsolute: false
91+
false
8292
);
8393
}
8494
}

0 commit comments

Comments
 (0)