From 2001aaad7889b1bcaf5907739eb8061bd1bfe864 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Thu, 30 Jun 2022 14:37:40 +0300 Subject: [PATCH 1/3] attributes of country component updated #33k7mh5 --- resources/views/common/companies/create.blade.php | 2 +- resources/views/components/contacts/form/address.blade.php | 2 +- resources/views/components/form/group/country.blade.php | 3 ++- resources/views/modals/customers/create.blade.php | 2 +- resources/views/modals/customers/edit.blade.php | 2 +- resources/views/modals/vendors/create.blade.php | 2 +- resources/views/modals/vendors/edit.blade.php | 2 +- resources/views/portal/profile/edit.blade.php | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/resources/views/common/companies/create.blade.php b/resources/views/common/companies/create.blade.php index de716fea0..db3fee04a 100644 --- a/resources/views/common/companies/create.blade.php +++ b/resources/views/common/companies/create.blade.php @@ -44,7 +44,7 @@ - + diff --git a/resources/views/components/contacts/form/address.blade.php b/resources/views/components/contacts/form/address.blade.php index af75dbdfe..901bbe9a3 100644 --- a/resources/views/components/contacts/form/address.blade.php +++ b/resources/views/components/contacts/form/address.blade.php @@ -24,7 +24,7 @@ @endif @if (! $hideCountry) - + @endif diff --git a/resources/views/components/form/group/country.blade.php b/resources/views/components/form/group/country.blade.php index d6a2a178b..4b7dc4732 100644 --- a/resources/views/components/form/group/country.blade.php +++ b/resources/views/components/form/group/country.blade.php @@ -3,7 +3,8 @@ label="{!! trans_choice('general.countries', 1) !!}" :options="trans('countries')" :selected="setting('company.country')" - not-required + required="{{ $required }}" + not-required="{{ $notRequired }}" model="form.country" form-group-class="{{ $formGroupClass }}" /> diff --git a/resources/views/modals/customers/create.blade.php b/resources/views/modals/customers/create.blade.php index 635760be7..466672633 100644 --- a/resources/views/modals/customers/create.blade.php +++ b/resources/views/modals/customers/create.blade.php @@ -72,7 +72,7 @@ - + diff --git a/resources/views/modals/customers/edit.blade.php b/resources/views/modals/customers/edit.blade.php index 2f5edb840..f2344bc83 100644 --- a/resources/views/modals/customers/edit.blade.php +++ b/resources/views/modals/customers/edit.blade.php @@ -72,7 +72,7 @@ - + diff --git a/resources/views/modals/vendors/create.blade.php b/resources/views/modals/vendors/create.blade.php index acf33f18a..8a7d39c57 100644 --- a/resources/views/modals/vendors/create.blade.php +++ b/resources/views/modals/vendors/create.blade.php @@ -72,7 +72,7 @@ - + diff --git a/resources/views/modals/vendors/edit.blade.php b/resources/views/modals/vendors/edit.blade.php index 8e1fc92e6..db5f67459 100644 --- a/resources/views/modals/vendors/edit.blade.php +++ b/resources/views/modals/vendors/edit.blade.php @@ -72,7 +72,7 @@ - + diff --git a/resources/views/portal/profile/edit.blade.php b/resources/views/portal/profile/edit.blade.php index 27344f74b..e68f5d28e 100644 --- a/resources/views/portal/profile/edit.blade.php +++ b/resources/views/portal/profile/edit.blade.php @@ -48,7 +48,7 @@ - + From 28385aee835a6dc4f69afa17035410c4e61195ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 30 Jun 2022 19:17:39 +0300 Subject: [PATCH 2/3] fixed utm links --- app/Abstracts/Notification.php | 2 +- app/Abstracts/Widget.php | 2 +- app/Listeners/Menu/ShowInNotifications.php | 4 ++-- app/Traits/Cloud.php | 12 ++++++------ .../layouts/modules/show/information.blade.php | 2 +- .../layouts/portal/finish/content.blade.php | 2 +- resources/views/portal/invoices/index.blade.php | 2 +- resources/views/portal/payments/index.blade.php | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/Abstracts/Notification.php b/app/Abstracts/Notification.php index 8162ff98c..367af653f 100644 --- a/app/Abstracts/Notification.php +++ b/app/Abstracts/Notification.php @@ -91,7 +91,7 @@ abstract class Notification extends BaseNotification implements ShouldQueue public function getFooter() { - $url = 'https://akaunting.com/lp/accounting-software?utm_source=email&utm_medium=software&utm_campaign=footer&utm_content=' . $this->template->alias; + $url = 'https://akaunting.com/lp/accounting-software?utm_source=email&utm_medium=footer&utm_campaign=plg&utm_content=' . $this->template->alias; $get_started = '' . trans('footer.get_started') . ''; diff --git a/app/Abstracts/Widget.php b/app/Abstracts/Widget.php index 92620a984..a5d8eccc9 100644 --- a/app/Abstracts/Widget.php +++ b/app/Abstracts/Widget.php @@ -63,7 +63,7 @@ abstract class Widget 'alias' => $alias, 'utm_source' => 'widget', 'utm_medium' => 'app', - 'utm_campaign' => Str::snake(Str::camel($alias)), + 'utm_campaign' => str_replace('-', '_', $alias), ]); } diff --git a/app/Listeners/Menu/ShowInNotifications.php b/app/Listeners/Menu/ShowInNotifications.php index c73da1ecc..db5168fdc 100644 --- a/app/Listeners/Menu/ShowInNotifications.php +++ b/app/Listeners/Menu/ShowInNotifications.php @@ -62,8 +62,8 @@ class ShowInNotifications $app_url = route('apps.app.show', [ 'alias' => $new_app->alias, 'utm_source' => 'notification', - 'utm_medium' => 'software', - 'utm_campaign' => str_replace('-', '', $new_app->alias), + 'utm_medium' => 'app', + 'utm_campaign' => str_replace('-', '_', $new_app->alias), ]); $new = new DatabaseNotification(); diff --git a/app/Traits/Cloud.php b/app/Traits/Cloud.php index 01a6e69c1..53c0231b4 100644 --- a/app/Traits/Cloud.php +++ b/app/Traits/Cloud.php @@ -15,10 +15,10 @@ trait Cloud return request()->getHost() == $this->cloud_host; } - public function getCloudRolesPageUrl() + public function getCloudRolesPageUrl($location = 'user') { if (! $this->isCloud()) { - return 'https://akaunting.com/plans?utm_source=user_role&utm_medium=software&utm_campaign=plg'; + return 'https://akaunting.com/apps/roles?utm_source=software&utm_medium=' . $location . '&utm_campaign=roles'; } if ($this->moduleIsEnabled('roles')) { @@ -26,20 +26,20 @@ trait Cloud } return route('cloud.plans.index', [ - 'utm_source' => 'user', + 'utm_source' => $location, 'utm_medium' => 'app', 'utm_campaign' => 'roles', ]); } - public function getCloudBankFeedsUrl() + public function getCloudBankFeedsUrl($location = 'widget') { if (! $this->isCloud()) { - return 'https://akaunting.com/features/connect-your-bank?utm_source=bank_feeds_widget&utm_medium=software&utm_campaign=plg'; + return 'https://akaunting.com/apps/bank-feeds?utm_source=software&utm_medium=' . $location . '&utm_campaign=bank_feeds'; } return route('cloud.plans.index', [ - 'utm_source' => 'widget', + 'utm_source' => $location, 'utm_medium' => 'app', 'utm_campaign' => 'bank_feeds', ]); diff --git a/resources/views/components/layouts/modules/show/information.blade.php b/resources/views/components/layouts/modules/show/information.blade.php index a917d1535..984ab4c8d 100644 --- a/resources/views/components/layouts/modules/show/information.blade.php +++ b/resources/views/components/layouts/modules/show/information.blade.php @@ -13,7 +13,7 @@ @else diff --git a/resources/views/components/layouts/portal/finish/content.blade.php b/resources/views/components/layouts/portal/finish/content.blade.php index 2a9905b44..5a7fbd70b 100644 --- a/resources/views/components/layouts/portal/finish/content.blade.php +++ b/resources/views/components/layouts/portal/finish/content.blade.php @@ -7,7 +7,7 @@ diff --git a/resources/views/portal/invoices/index.blade.php b/resources/views/portal/invoices/index.blade.php index 851d6dd6a..f405bbe23 100644 --- a/resources/views/portal/invoices/index.blade.php +++ b/resources/views/portal/invoices/index.blade.php @@ -158,7 +158,7 @@ diff --git a/resources/views/portal/payments/index.blade.php b/resources/views/portal/payments/index.blade.php index 34a2ce47b..f6a59d49c 100644 --- a/resources/views/portal/payments/index.blade.php +++ b/resources/views/portal/payments/index.blade.php @@ -35,7 +35,7 @@ @foreach($payments as $item) - + @@ -66,7 +66,7 @@ From 76dea1b1daef0b5895ea4d770dd4029ce69f5d58 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 1 Jul 2022 00:04:04 +0300 Subject: [PATCH 3/3] country validation #33k7mh5 --- resources/assets/js/views/common/companies.js | 17 +++++++++++++++++ .../views/common/companies/create.blade.php | 6 ++++++ resources/views/common/companies/edit.blade.php | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/resources/assets/js/views/common/companies.js b/resources/assets/js/views/common/companies.js index a6d7affbc..c43366979 100644 --- a/resources/assets/js/views/common/companies.js +++ b/resources/assets/js/views/common/companies.js @@ -30,5 +30,22 @@ const app = new Vue({ form: new Form('company'), bulk_action: new BulkAction('companies') } + }, + + methods: { + // Form Submit + onSubmit() { + this.form.loading = true; + + if (this.form.country === "") { + this.form.errors.set('country', [country_validation_required_message]); + + this.form.loading = false; + + return; + } + + this.form.submit(); + }, } }); diff --git a/resources/views/common/companies/create.blade.php b/resources/views/common/companies/create.blade.php index db3fee04a..272842883 100644 --- a/resources/views/common/companies/create.blade.php +++ b/resources/views/common/companies/create.blade.php @@ -65,5 +65,11 @@ + @push('scripts_end') + + @endpush + diff --git a/resources/views/common/companies/edit.blade.php b/resources/views/common/companies/edit.blade.php index 5b3220c24..db24f1977 100644 --- a/resources/views/common/companies/edit.blade.php +++ b/resources/views/common/companies/edit.blade.php @@ -69,5 +69,11 @@ + @push('scripts_end') + + @endpush +