diff --git a/addons/default/visiosoft/profile-module/migrations/2018_11_15_125011_visiosoft.module.profile__create_profile_fields.php b/addons/default/visiosoft/profile-module/migrations/2018_11_15_125011_visiosoft.module.profile__create_profile_fields.php index 802125b83..0abcbdd7c 100644 --- a/addons/default/visiosoft/profile-module/migrations/2018_11_15_125011_visiosoft.module.profile__create_profile_fields.php +++ b/addons/default/visiosoft/profile-module/migrations/2018_11_15_125011_visiosoft.module.profile__create_profile_fields.php @@ -139,7 +139,15 @@ class VisiosoftModuleProfileCreateProfileFields extends Migration 'mode' => 'select', ] ], - 'deleted_at' => 'anomaly.field_type.datetime' + 'company' => 'anomaly.field_type.text', + 'tax_number' => 'anomaly.field_type.text', + 'tax_office' => 'anomaly.field_type.text', + 'is_company' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + ], + ], ]; } diff --git a/addons/default/visiosoft/profile-module/migrations/2018_11_17_112645_visiosoft.module.profile__create_adress_stream.php b/addons/default/visiosoft/profile-module/migrations/2018_11_17_112645_visiosoft.module.profile__create_adress_stream.php index acb72a223..2966ab2d9 100644 --- a/addons/default/visiosoft/profile-module/migrations/2018_11_17_112645_visiosoft.module.profile__create_adress_stream.php +++ b/addons/default/visiosoft/profile-module/migrations/2018_11_17_112645_visiosoft.module.profile__create_adress_stream.php @@ -12,11 +12,11 @@ class VisiosoftModuleProfileCreateAdressStream extends Migration */ protected $stream = [ 'slug' => 'adress', - 'title_column' => 'id', - 'translatable' => false, - 'trashable' => false, - 'searchable' => false, - 'sortable' => false, + 'title_column' => 'id', + 'translatable' => false, + 'trashable' => true, + 'searchable' => false, + 'sortable' => false, ]; /** @@ -41,16 +41,17 @@ class VisiosoftModuleProfileCreateAdressStream extends Migration 'city' => [ 'required' => true, ], - 'district' => [ - 'required' => true, - ], + 'district', 'adress_content' => [ 'required' => true, ], 'adress_gsm_phone' => [ 'required' => true, ], - 'deleted_at' + 'company', + 'tax_number', + 'tax_office', + 'is_company', ]; } diff --git a/addons/default/visiosoft/profile-module/resources/assets/js/address.js b/addons/default/visiosoft/profile-module/resources/assets/js/address.js index ef5f9dcde..e69de29bb 100644 --- a/addons/default/visiosoft/profile-module/resources/assets/js/address.js +++ b/addons/default/visiosoft/profile-module/resources/assets/js/address.js @@ -1 +0,0 @@ -phoneMask("input[name='adress_gsm_phone']") \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/assets/js/create.js b/addons/default/visiosoft/profile-module/resources/assets/js/create.js new file mode 100644 index 000000000..89d6d600a --- /dev/null +++ b/addons/default/visiosoft/profile-module/resources/assets/js/create.js @@ -0,0 +1,51 @@ +$(document).on('change', 'select[name="country"]', function () { + Locations($(this).val(), 1, "city"); +}); +$(document).on('change', 'select[name="city"]', function () { + Locations($(this).val(), 2, "district") +}); + +function Locations(cat, level, name) { + $.ajax({ + type: "GET", + async: false, + data: "cat=" + cat + "&level=" + level, + url: "/class/ajax", + success: function (msg) { + $('select[name="' + name + '"]').find('option').remove(); + $('select[name="' + name + '"]').append(''); + $.each(msg, function (key, value) { + $('select[name="' + name + '"]').append(''); + }); + } + }); +} + +if (country != "") { + //For Request + Locations(country, 1, "city"); + + if (city != "") { + $('select[name="city"]').val(city); + Locations(city, 2, "district"); + + if (district != "") { + $('select[name="district"]').val(district); + } + } +} else { + //Set Default + $('select[name="country"]').val(default_country); + Locations(default_country, 1, "city"); + + if (default_city != "") { + $('select[name="city"]').val(default_city); + Locations(default_city, 2, "district"); + + if (default_district != "") { + $('select[name="district"]').val(default_district); + } + } +} + +phoneMask("input[name='adress_gsm_phone']"); \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/config/settings/sections.php b/addons/default/visiosoft/profile-module/resources/config/settings/sections.php index c99cd34c0..85d63e090 100644 --- a/addons/default/visiosoft/profile-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/profile-module/resources/config/settings/sections.php @@ -8,7 +8,7 @@ return [ 'general_setting' => [ 'title' => 'visiosoft.module.profile::section.general_setting', 'fields' => [ - 'show_my_ads', 'upload_avatar' + 'show_my_ads', 'upload_avatar', 'show_tax_office' ], ], ], diff --git a/addons/default/visiosoft/profile-module/resources/config/settings/settings.php b/addons/default/visiosoft/profile-module/resources/config/settings/settings.php index f9ea8a35b..6308c2cbd 100644 --- a/addons/default/visiosoft/profile-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/profile-module/resources/config/settings/settings.php @@ -13,4 +13,11 @@ return [ 'default_value' => 1 ], ], + + 'show_tax_office' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => true, + ], + ], ]; \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/button.php b/addons/default/visiosoft/profile-module/resources/lang/en/button.php index 5e27a3d0b..24f21b7a2 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/button.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/button.php @@ -12,4 +12,6 @@ return [ 'edit' => 'Edit', 'go_profile' => 'Go to Profile Detail', 'go_user' => 'Go to User Detail', + 'personal' => 'Personal', + 'corporate' => 'Corporate', ]; diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/field.php b/addons/default/visiosoft/profile-module/resources/lang/en/field.php index b9dfb1529..3e696c26b 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/field.php @@ -431,5 +431,15 @@ return [ 'choose' => [ 'name' => 'Choose' ], - 'my_address' => 'My Address' + 'my_address' => 'My Address', + + 'company' => [ + 'name' => 'Company Name' + ], + 'tax_office' => [ + 'name' => 'Tax Office' + ], + 'tax_number' => [ + 'name' => 'Tax Number' + ], ]; diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/setting.php b/addons/default/visiosoft/profile-module/resources/lang/en/setting.php index 7dfd5b0a8..d97d7cb1d 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/setting.php @@ -7,4 +7,8 @@ return [ 'upload_avatar' => [ 'name' => 'Avatar Upload', ], + + 'show_tax_office' => [ + 'name' => 'Show Tax Office Field', + ], ]; diff --git a/addons/default/visiosoft/profile-module/resources/views/address/create.twig b/addons/default/visiosoft/profile-module/resources/views/address/create.twig index b7d4acabb..1aea1f279 100644 --- a/addons/default/visiosoft/profile-module/resources/views/address/create.twig +++ b/addons/default/visiosoft/profile-module/resources/views/address/create.twig @@ -5,78 +5,99 @@ {% block detail %}
-

{{ trans('visiosoft.module.profile::field.create_address.name') }}

+

+ {% if request().segment(3) == "edit" %} + {{ trans('visiosoft.module.profile::field.edit_address.name') }} + {% else %} + {{ trans('visiosoft.module.profile::field.create_address.name') }} + {% endif %} +

- {% set form = form('profile', 'adress').entry(adress.id).actions({'save':'save'}).get() %} - {{ form_open({ - 'class': 'form ' ~ form.options.class , - 'enctype': 'multipart/form-data', - 'url': 'profile/adress/create' - })|raw }} -
+ {% set form = form('address').entry(id).actions({'save':'save'}).get() %} -
- - {{ form.fields.adress_name.input|raw }} -
-
- - {{ form.fields.adress_gsm_phone.input|raw }} -
-
- - {{ form.fields.adress_first_name.input|raw }} -
-
- - {{ form.fields.adress_last_name.input|raw }} -
-
-
- -
- + {% set isCompany = form.entry.is_company %} + + + + +
+
+ {{ form_open({ + 'class': 'form ' ~ form.options.class , + 'enctype': 'multipart/form-data', + 'url':form.options.url + })|raw }} +
+ + {% include "visiosoft.module.profile::address/partials/fields" %} + +
+ {{ form.actions|raw }}
+ {{ form_close() }} -
- - {{ form.fields.city.input|raw }} -
-
- - {{ form.fields.district.input|raw }} -
-
-
-
- - {{ form.fields.adress_content.input|raw }} +
+ {% set form = form('addressCompany').entry(id).actions({'save':'save'}).get() %} + {{ form_open({ + 'class': 'form ' ~ form.options.class , + 'enctype': 'multipart/form-data', + 'url':form.options.url + })|raw }} +
+ +
+ {{ form.fields.company|raw }}
+ {% if setting_value('visiosoft.module.profile::show_tax_office') %} +
+ {{ form.fields.tax_office|raw }} +
+ {% endif %} +
+ {{ form.fields.tax_number|raw }} +
+ {% include "visiosoft.module.profile::address/partials/fields" %} +
+ {{ form.actions|raw }} +
+ {{ form_close() }} +
-
- {{ form.actions|raw }} -
+
+ + + {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/create.js") }} {% endblock %} {% endembed %} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/address/edit.twig b/addons/default/visiosoft/profile-module/resources/views/address/edit.twig deleted file mode 100644 index 947a255ba..000000000 --- a/addons/default/visiosoft/profile-module/resources/views/address/edit.twig +++ /dev/null @@ -1,82 +0,0 @@ -{% extends "theme::layouts/default" %} - -{% block content %} - {% embed 'visiosoft.module.profile::profile/index' %} - {% block detail %} -
-
-

{{ trans('visiosoft.module.profile::field.edit_address.name') }}

-
-
- {% set form = form('profile', 'adress').entry(adress.id).actions({'update':'update'}).get() %} - {{ form_open({ - 'class': 'form ' ~ form.options.class , - 'enctype': 'multipart/form-data', - 'url': 'profile/adress/update/'~ adress.id - })|raw }} -
- -
- - {{ form.fields.adress_name.input|raw }} -
-
- - {{ form.fields.adress_gsm_phone.input|raw }} -
-
- - {{ form.fields.adress_first_name.input|raw }} -
-
- - {{ form.fields.adress_last_name.input|raw }} -
-
-
- -
- -
-
- -
- - {{ form.fields.city.input|raw }} -
-
- - {{ form.fields.district.input|raw }} -
-
-
-
-
- - {{ adress.adress_content.input|raw }} -
- -
-
-
- {{ form.actions|raw }} -
-
- -
-
- - {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/country.js") }} - {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/address.js") }} - {% endblock %} - {% endembed %} -{% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig b/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig new file mode 100644 index 000000000..82e12095a --- /dev/null +++ b/addons/default/visiosoft/profile-module/resources/views/address/partials/fields.twig @@ -0,0 +1,36 @@ +
+ {{ form.fields.adress_name|raw }} +
+
+ {{ form.fields.adress_gsm_phone|raw }} +
+
+ {{ form.fields.adress_first_name|raw }} +
+
+ {{ form.fields.adress_last_name|raw }} +
+
+
+ {{ form.fields.country|raw }} +
+ +
+ {{ form.fields.city|raw }} +
+
+ {{ form.fields.district|raw }} +
+
+
+
+
+ + {{ form.fields.adress_content.input|raw }} +
+
+
\ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormBuilder.php b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormBuilder.php index d7795d1e1..a3056af25 100644 --- a/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormBuilder.php +++ b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormBuilder.php @@ -5,14 +5,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder; class AdressFormBuilder extends FormBuilder { - /** - * The form fields. - * - * @var array|string - */ - protected $fields = [ - ]; - /** * Additional validation rules. * @@ -49,6 +41,8 @@ class AdressFormBuilder extends FormBuilder * @var array */ protected $options = [ + 'redirect' => '/profile/address', + 'success_message' => 'visiosoft.module.profile::message.adress_success_create', ]; /** diff --git a/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormFields.php b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormFields.php new file mode 100644 index 000000000..1f99c9871 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormFields.php @@ -0,0 +1,36 @@ +setFields( + [ + 'adress_name' => [ + 'required' => true, + ], + 'adress_gsm_phone' => [ + 'required' => true, + ], + 'adress_first_name' => [ + 'required' => true, + ], + 'adress_last_name' => [ + 'required' => true, + ], + 'country' => [ + 'required' => true, + ], + 'city' => [ + 'required' => true, + ], + 'district', + 'adress_content' => [ + 'required' => true, + ], + ] + ); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormHandler.php b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormHandler.php new file mode 100644 index 000000000..c4a8b530a --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Adress/Form/AdressFormHandler.php @@ -0,0 +1,30 @@ +canSave()) { + return; + } + + $builder->saveForm(); + + $entry = $builder->getFormEntry(); + + $entry->user_id = Auth::id(); + + $entry->save(); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormBuilder.php b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormBuilder.php new file mode 100644 index 000000000..960ddb4d5 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormBuilder.php @@ -0,0 +1,65 @@ + '/profile/address', + 'success_message' => 'visiosoft.module.profile::message.adress_success_create', + ]; + + /** + * The form sections. + * + * @var array + */ + protected $sections = []; + + /** + * The form assets. + * + * @var array + */ + protected $assets = []; + +} diff --git a/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormFields.php b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormFields.php new file mode 100644 index 000000000..d647a9ffc --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormFields.php @@ -0,0 +1,48 @@ +setFields( + [ + 'company' => [ + 'required' => true, + ], + 'tax_number' => [ + 'required' => true, + ], + 'adress_name' => [ + 'required' => true, + ], + 'adress_gsm_phone' => [ + 'required' => true, + ], + 'adress_first_name' => [ + 'required' => true, + ], + 'adress_last_name' => [ + 'required' => true, + ], + 'country' => [ + 'required' => true, + ], + 'city' => [ + 'required' => true, + ], + 'district', + 'adress_content' => [ + 'required' => true, + ], + ] + ); + + if (setting_value('visiosoft.module.profile::show_tax_office')) { + $builder->addField('tax_office', [ + 'required' => true, + ]); + } + } +} diff --git a/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormHandler.php b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormHandler.php new file mode 100644 index 000000000..9aa52a88c --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Adress/FormCompany/AddressCompanyFormHandler.php @@ -0,0 +1,25 @@ +canSave()) { + return; + } + + $builder->saveForm(); + + $entry = $builder->getFormEntry(); + + $entry->user_id = Auth::id(); + $entry->is_company = true; + + $entry->save(); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/AddressController.php b/addons/default/visiosoft/profile-module/src/Http/Controller/AddressController.php new file mode 100644 index 000000000..0cf3c4fa8 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Http/Controller/AddressController.php @@ -0,0 +1,50 @@ +address = $address; + parent::__construct(); + } + + public function index(AdressTableBuilder $table) + { + $address = $this->address->getUserAdress(); + return $this->view->make('visiosoft.module.profile::address/list', compact('address')); + } + + public function create() + { + return $this->view->make('visiosoft.module.profile::address/create'); + } + + public function edit($id) + { + return $this->view->make('visiosoft.module.profile::address/create', compact('id')); + + } + + public function delete($id) + { + $address = $this->address->newQuery()->find($id); + + if ($address->user_id == Auth::id()) { + $address->delete(); + } + + return $this->redirect->back(); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php index 8dd0758d1..241a90b33 100644 --- a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php +++ b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php @@ -132,71 +132,6 @@ class MyProfileController extends PublicController } - public function adressEdit($id) - { - $adressModel = new AdressModel(); - $adress = $adressModel->getAdressFirst($id); - if ($adress->getAttribute('user_id') == Auth::id()) { - $country = CountryModel::all(); - return $this->view->make('visiosoft.module.profile::address/edit', compact('adress', 'country')); - } - } - - public function adressSoftDelete($id) - { - $address = $this->adressRepository->find($id); - if ($address->user_id == Auth::id()) { - $address->update([ - 'deleted_at' => date('Y-m-d H:i:s') - ]); - } - return $this->redirect->back(); - } - - public function adressUpdate(AdressFormBuilder $form, Request $request, $id) - { - $error = $form->build()->validate()->getFormErrors()->getMessages(); - if (!empty($error)) { - return $this->redirect->back(); - } - - $adressModel = new AdressModel(); - $adress = $adressModel->getAdressFirst($id); - - if ($adress->getAttribute('user_id') == Auth::id()) { - - $New_value = $request->all(); - $New_value['country_id'] = $New_value['country']; - unset($New_value['_token'], $New_value['action'], $New_value['country']); - $adressModel->getAdress($id)->update($New_value); - - $message = []; - $message[] = trans('visiosoft.module.profile::message.adress_success_update'); - return redirect(route('profile::address'))->with('success', $message); - } - } - - public function adressCreate(AdressFormBuilder $form, Request $request) - { - if (isset($request->request->all()['action']) == "save") { - $error = $form->build()->validate()->getFormErrors()->getMessages(); - if (!empty($error)) { - return $this->redirect->back(); - } - $new_adress = $request->request->all(); - unset($new_adress['action'], $new_adress['_to*ken']); - $new_adress['user_id'] = Auth::id(); - - $adressModel = new AdressModel(); - $adressModel->getAdress()->create($new_adress); - - $message = []; - $message[] = trans('visiosoft.module.profile::message.adress_success_create'); - return redirect(route('profile::address'))->with('success', $message); - } - $country = CountryModel::all(); - return $this->view->make('visiosoft.module.profile::address/create', compact('country')); - } public function adressAjaxCreate(AdressFormBuilder $form, Request $request) { @@ -274,13 +209,6 @@ class MyProfileController extends PublicController } } - public function Address() - { - $address = new AdressModel(); - $address = $address->getUserAdress(); - return $this->view->make('visiosoft.module.profile::address/list', compact('address')); - } - public function disableAccount() { diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php index 05a972874..023dc5658 100644 --- a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php +++ b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php @@ -5,6 +5,8 @@ use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface; use Visiosoft\ProfileModule\Adress\AdressRepository; use Anomaly\Streams\Platform\Model\Profile\ProfileAdressEntryModel; use Visiosoft\ProfileModule\Adress\AdressModel; +use Visiosoft\ProfileModule\Adress\Form\AdressFormBuilder; +use Visiosoft\ProfileModule\Adress\FormCompany\AddressCompanyFormBuilder; use Visiosoft\ProfileModule\Http\Middleware\authCheck; use Visiosoft\ProfileModule\Profile\Password\ForgotPassFormBuilder; use Visiosoft\ProfileModule\Profile\Password\PasswordFormBuilder; @@ -67,14 +69,7 @@ class ProfileModuleServiceProvider extends AddonServiceProvider 'admin/profile/editAdress/{id}' => 'Visiosoft\ProfileModule\Http\Controller\Admin\AdressController@edit', 'admin/profile/update/{id}' => 'Visiosoft\ProfileModule\Http\Controller\Admin\AdressController@adressupdate', 'profile/adress/update/{id}' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressUpdate', - 'profile/address' => [ - 'as' => 'profile::address', - 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@Address', - ], - 'profile/adress/create' => [ - 'as' => 'visiosoft.module.profile::adress_create', - 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressCreate' - ], + 'profile/adress/ajaxCreate' => [ 'as' => 'visiosoft.module.profile::adress_ajax_create', 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxCreate' @@ -87,14 +82,6 @@ class ProfileModuleServiceProvider extends AddonServiceProvider 'as' => 'visiosoft.module.profile::adress_ajax_detail', 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressAjaxDetail' ], - 'profile/adress/edit/{id}' => [ - 'as' => 'visiosoft.module.profile::address_edit', - 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressEdit' - ], - 'profile/adress/soft-del/{id}' => [ - 'as' => 'visiosoft.module.profile::address_soft_delete', - 'uses' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@adressSoftDelete' - ], /* Profile */ 'profile/edit' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@edit', @@ -128,6 +115,26 @@ class ProfileModuleServiceProvider extends AddonServiceProvider 'ajax/update-user-info' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile', + + //Address + 'profile/address' => [ + 'as' => 'profile::address', + 'uses' => 'Visiosoft\ProfileModule\Http\Controller\AddressController@index', + ], + 'profile/adress/create' => [ + 'as' => 'visiosoft.module.profile::adress_create', + 'uses' => 'Visiosoft\ProfileModule\Http\Controller\AddressController@create' + ], + 'profile/adress/edit/{id}' => [ + 'as' => 'visiosoft.module.profile::address_edit', + 'uses' => 'Visiosoft\ProfileModule\Http\Controller\AddressController@edit' + ], + 'profile/adress/delete/{id}' => [ + 'as' => 'visiosoft.module.profile::address_soft_delete', + 'uses' => 'Visiosoft\ProfileModule\Http\Controller\AddressController@delete' + ], + + // Cache links 'ajax/get-user-info' => 'Visiosoft\ProfileModule\Http\Controller\CacheController@getUserInfo', ]; @@ -189,6 +196,8 @@ class ProfileModuleServiceProvider extends AddonServiceProvider 'userProfile' => UserFormBuilder::class, 'profile' => ProfileFormBuilder::class, 'signIn' => SignInFormBuilder::class, + 'address' => AdressFormBuilder::class, + 'addressCompany' => AddressCompanyFormBuilder::class, ProfileAdressEntryModel::class => AdressModel::class, ];