Skip to content

Commit

Permalink
[TM-812] Remove project establishment and seed collection from workda…
Browse files Browse the repository at this point in the history
…y collections.
  • Loading branch information
roguenet committed Apr 15, 2024
1 parent 3789e2b commit e11ad5a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 60 deletions.
20 changes: 0 additions & 20 deletions app/Models/V2/Projects/ProjectReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,6 @@ public function treeSpecies()
return $this->morphMany(TreeSpecies::class, 'speciesable');
}

public function workdaysPaidProjectEstablishment()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_PAID_PROJECT_ESTABLISHMENT);
}

public function workdaysPaidNurseryOperations()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_PAID_NURSERY_OPRERATIONS);
Expand All @@ -254,21 +249,11 @@ public function workdaysPaidProjectManagement()
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_PAID_PROJECT_MANAGEMENT);
}

public function workdaysPaidSeedCollection()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_PAID_SEED_COLLECTION);
}

public function workdaysPaidOtherActivities()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_PAID_OTHER);
}

public function workdaysVolunteerProjectEstablishment()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_VOLUNTEER_PROJECT_ESTABLISHMENT);
}

public function workdaysVolunteerNurseryOperations()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_VOLUNTEER_NURSERY_OPRERATIONS);
Expand All @@ -279,11 +264,6 @@ public function workdaysVolunteerProjectManagement()
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_VOLUNTEER_PROJECT_MANAGEMENT);
}

public function workdaysVolunteerSeedCollection()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_VOLUNTEER_SEED_COLLECTION);
}

public function workdaysVolunteerOtherActivities()
{
return $this->morphMany(Workday::class, 'workdayable')->where('collection', Workday::COLLECTION_PROJECT_VOLUNTEER_OTHER);
Expand Down
8 changes: 0 additions & 8 deletions app/Models/V2/Workdays/Workday.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,19 @@ class Workday extends Model
'indigeneity',
];

public const COLLECTION_PROJECT_PAID_PROJECT_ESTABLISHMENT = 'paid-project-establishment';
public const COLLECTION_PROJECT_PAID_NURSERY_OPRERATIONS = 'paid-nursery-operations';
public const COLLECTION_PROJECT_PAID_PROJECT_MANAGEMENT = 'paid-project-management';
public const COLLECTION_PROJECT_PAID_SEED_COLLECTION = 'paid-seed-collection';
public const COLLECTION_PROJECT_PAID_OTHER = 'paid-other-activities';
public const COLLECTION_PROJECT_VOLUNTEER_PROJECT_ESTABLISHMENT = 'volunteer-project-establishment';
public const COLLECTION_PROJECT_VOLUNTEER_NURSERY_OPRERATIONS = 'volunteer-nursery-operations';
public const COLLECTION_PROJECT_VOLUNTEER_PROJECT_MANAGEMENT = 'volunteer-project-management';
public const COLLECTION_PROJECT_VOLUNTEER_SEED_COLLECTION = 'volunteer-seed-collection';
public const COLLECTION_PROJECT_VOLUNTEER_OTHER = 'volunteer-other-activities';

public static $projectCollections = [
self::COLLECTION_PROJECT_PAID_PROJECT_ESTABLISHMENT => 'Paid Project Establishment',
self::COLLECTION_PROJECT_PAID_NURSERY_OPRERATIONS => 'Paid Nursery Operations',
self::COLLECTION_PROJECT_PAID_PROJECT_MANAGEMENT => 'Paid Project Management',
self::COLLECTION_PROJECT_PAID_SEED_COLLECTION => 'Paid Seed Collection',
self::COLLECTION_PROJECT_PAID_OTHER => 'Paid Other Activities',
self::COLLECTION_PROJECT_VOLUNTEER_PROJECT_ESTABLISHMENT => 'Volunteer Project Establishment',
self::COLLECTION_PROJECT_VOLUNTEER_NURSERY_OPRERATIONS => 'Volunteer Nursery Operations',
self::COLLECTION_PROJECT_VOLUNTEER_PROJECT_MANAGEMENT => 'Volunteer Project Management',
self::COLLECTION_PROJECT_VOLUNTEER_SEED_COLLECTION => 'Volunteer Seed Collection',
self::COLLECTION_PROJECT_VOLUNTEER_OTHER => 'Volunteer Other Activities',
];

Expand Down
32 changes: 0 additions & 32 deletions config/wri/linked-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,6 @@
'input_type' => 'treeSpecies',
'collection' => 'tree-planted',
],
// 'pro-rep-rel-paid-project-establishment' => [
// 'property' => 'workdaysPaidProjectEstablishment',
// 'label' => 'Paid Project Establishment',
// 'resource' => 'App\Http\Resources\V2\Workdays\WorkdayResource',
// 'input_type' => 'workdays',
// 'collection' => 'paid-project-establishment',
// 'option_list_key' => 'workdays-ethnicity',
// ],
'pro-rep-rel-paid-nursery-operations' => [
'property' => 'workdaysPaidNurseryOperations',
'label' => 'Paid Nursery Operations',
Expand All @@ -448,14 +440,6 @@
'collection' => 'paid-project-management',
'option_list_key' => 'workdays-ethnicity',
],
// 'pro-rep-rel-paid-seed-collection' => [
// 'property' => 'workdaysPaidSeedCollection',
// 'label' => 'Paid Seed Collection',
// 'resource' => 'App\Http\Resources\V2\Workdays\WorkdayResource',
// 'input_type' => 'workdays',
// 'collection' => 'paid-seed-collection',
// 'option_list_key' => 'workdays-ethnicity',
// ],
'pro-rep-rel-paid-other-activities' => [
'property' => 'workdaysPaidOtherActivities',
'label' => 'Paid Other Activities',
Expand All @@ -464,14 +448,6 @@
'collection' => 'paid-other-activities',
'option_list_key' => 'workdays-ethnicity',
],
// 'pro-rep-rel-volunteer-project-establishment' => [
// 'property' => 'workdaysVolunteerProjectEstablishment',
// 'label' => 'Volunteer Project Establishment',
// 'resource' => 'App\Http\Resources\V2\Workdays\WorkdayResource',
// 'input_type' => 'workdays',
// 'collection' => 'volunteer-project-establishment',
// 'option_list_key' => 'workdays-ethnicity',
// ],
'pro-rep-rel-volunteer-nursery-operations' => [
'property' => 'workdaysVolunteerNurseryOperations',
'label' => 'Volunteer Nursery Operations',
Expand All @@ -488,14 +464,6 @@
'collection' => 'volunteer-project-management',
'option_list_key' => 'workdays-ethnicity',
],
// 'pro-rep-rel-volunteer-seed-collection' => [
// 'property' => 'workdaysVolunteerSeedCollection',
// 'label' => 'Volunteer Seed Collection',
// 'resource' => 'App\Http\Resources\V2\Workdays\WorkdayResource',
// 'input_type' => 'workdays',
// 'collection' => 'volunteer-seed-collection',
// 'option_list_key' => 'workdays-ethnicity',
// ],
'pro-rep-rel-volunteer-other-activities' => [
'property' => 'workdaysVolunteerOtherActivities',
'label' => 'Volunteer Other Activities',
Expand Down

0 comments on commit e11ad5a

Please sign in to comment.