Skip to content

Commit

Permalink
changed module urls
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Oct 18, 2023
1 parent 3c582c7 commit b1c209a
Showing 1 changed file with 36 additions and 14 deletions.
50 changes: 36 additions & 14 deletions app/Traits/Cloud.php
Expand Up @@ -14,28 +14,50 @@ public function getCloudRolesPageUrl($location = 'user')
return route('roles.roles.index');
}

if (request()->isNotCloudHost()) {
return 'https://akaunting.com/apps/roles?utm_source=software&utm_medium=' . $location . '&utm_campaign=roles';
if ($this->moduleExists('roles')) {
return route('apps.app.show', [
'alias' => 'roles',
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'roles',
]);
}

return route('cloud.plans.index', [
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'roles',
]);
if (request()->isCloudHost()) {
return route('cloud.plans.index', [
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'roles',
]);
}

return 'https://akaunting.com/apps/roles?utm_source=software&utm_medium=' . $location . '&utm_campaign=roles';
}

public function getCloudBankFeedsUrl($location = 'widget')
{
if (request()->isNotCloudHost()) {
return 'https://akaunting.com/apps/bank-feeds?utm_source=software&utm_medium=' . $location . '&utm_campaign=bank_feeds';
if ($this->moduleIsEnabled('bank-feeds')) {
return route('bank-feeds.bank-connections.index');
}

if ($this->moduleExists('bank-feeds')) {
return route('apps.app.show', [
'alias' => 'bank-feeds',
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'bank_feeds',
]);
}

if (request()->isCloudHost()) {
return route('cloud.plans.index', [
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'bank_feeds',
]);
}

return route('cloud.plans.index', [
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'bank_feeds',
]);
return 'https://akaunting.com/apps/bank-feeds?utm_source=software&utm_medium=' . $location . '&utm_campaign=bank_feeds';
}

// @deprecated 3.1
Expand Down

0 comments on commit b1c209a

Please sign in to comment.