mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Rename "native" to "primary".
This commit is contained in:
@@ -183,9 +183,9 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
|
||||
return $all->map(static function (TransactionCurrency $current) use ($local) {
|
||||
$hasId = $local->contains(static fn (TransactionCurrency $entry) => $entry->id === $current->id);
|
||||
$isNative = $local->contains(static fn (TransactionCurrency $entry) => 1 === (int) $entry->pivot->group_default && $entry->id === $current->id);
|
||||
$isPrimary = $local->contains(static fn (TransactionCurrency $entry) => 1 === (int) $entry->pivot->group_default && $entry->id === $current->id);
|
||||
$current->userGroupEnabled = $hasId;
|
||||
$current->userGroupNative = $isNative;
|
||||
$current->userGroupNative = $isPrimary;
|
||||
|
||||
return $current;
|
||||
});
|
||||
@@ -437,7 +437,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
$this->userGroup->currencies()->syncWithoutDetaching([$currency->id => ['group_default' => true]]);
|
||||
if ($current->id !== $currency->id) {
|
||||
Log::debug('Trigger on a different default currency.');
|
||||
// clear all native amounts through an event.
|
||||
// clear all primary currency amounts through an event.
|
||||
event(new UserGroupChangedDefaultCurrency($this->userGroup));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user