fix: resolve plan selection off-by-one error in activation key generator
This commit is contained in:
@@ -56,7 +56,7 @@ class GenerateActivationKeys extends Page implements HasForms, HasTable
|
|||||||
->options(function () {
|
->options(function () {
|
||||||
return Plan::with('planTier')
|
return Plan::with('planTier')
|
||||||
->get()
|
->get()
|
||||||
->map(function ($plan) {
|
->mapWithKeys(function ($plan) {
|
||||||
$tierName = $plan->planTier ? $plan->planTier->name : '';
|
$tierName = $plan->planTier ? $plan->planTier->name : '';
|
||||||
$billingCycle = $plan->getBillingCycleDisplay();
|
$billingCycle = $plan->getBillingCycleDisplay();
|
||||||
$name = $plan->name;
|
$name = $plan->name;
|
||||||
@@ -68,7 +68,7 @@ class GenerateActivationKeys extends Page implements HasForms, HasTable
|
|||||||
$name .= " - {$billingCycle}";
|
$name .= " - {$billingCycle}";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $name;
|
return [$plan->id => $name];
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user