diff --git a/addons/default/visiosoft/advs-module/resources/css/step.scss b/addons/default/visiosoft/advs-module/resources/css/step.scss new file mode 100644 index 000000000..b898317a4 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/step.scss @@ -0,0 +1,86 @@ +#stepProgressBar { + counter-reset: step; + + .step { + text-align: center; + min-width: 0; + + &.current { + &::after { + background: linear-gradient(to right, #209579 50%, #dfdfdf 50%); + } + + .bullet { + color: #209579; + background-color: #fff; + border: .2rem solid #209579; + @media only screen and (min-width: 768px) { + border: .3rem solid #209579; + } + } + + .step-text { + font-weight: 500; + } + + & ~ * { + &::after { + background-color: #dfdfdf; + } + + .bullet { + color: #999; + background-color: #DFDFDF; + } + } + } + + &::after { + content: ''; + position: absolute; + height: .16rem; + top: 0.96rem; + left: 0; + z-index: -1; + width: 100%; + background-color: #209579; + @media only screen and (min-width: 768px) { + height: .3rem; + top: 1.4rem; + } + } + + .bullet { + height: 2rem; + width: 2rem; + border-radius: 100%; + color: #fff; + display: inline-block; + position: relative; + line-height: 20px; + background-color: #209579; + @media only screen and (min-width: 768px) { + height: 3rem; + width: 3rem; + } + + &::before { + content: counter(step); + counter-increment: step; + font-size: 14px; + font-weight: 600; + @media only screen and (min-width: 768px) { + font-size: 20px; + } + } + } + + .step-text { + color: #999; + font-size: 12px; + @media only screen and (min-width: 768px) { + font-size: initial; + } + } + } +} diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 6fd4f4005..c3ec7489f 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -301,6 +301,10 @@ return [ // New create page 'options' => 'Options', + 'category_selection' => 'Category Selection', + 'listing_details' => 'Listing Details', + 'preview' => 'Preview', + 'congratulations' => 'Congratulations', 'free' => 'Free', 'ad_date' => 'Ad Date', diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig index 52c8200fe..40a74f785 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig @@ -2,6 +2,8 @@ {% block content %}
+ {% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %} +
{% endif %} diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig new file mode 100644 index 000000000..92757a6ff --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig @@ -0,0 +1,33 @@ + + +
+
+
+

+ {{ trans('visiosoft.module.advs::field.category_selection') }} +

+
+
+
+

+ {{ trans('visiosoft.module.advs::field.listing_details') }} +

+
+
+
+

+ {{ trans('visiosoft.module.advs::field.preview') }} +

+
+ + {{ addBlock('new-ad/steps/step', {'step': step})|raw }} + +
+
+

+ {{ trans('visiosoft.module.advs::field.congratulations') }} +

+
+
\ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig index 45666e944..330d1154c 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig @@ -1,14 +1,19 @@ {% extends layout('post-cat') %} {% block styles %} - {{ asset_style("visiosoft.module.advs::css/post-category.css") }} + {% endblock %} {% block content %}
+ {% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'post-cat'} %} + {% if setting_value('visiosoft.module.advs::show_breadcrumb_when_creating_ad') %} {% include "visiosoft.module.advs::new-ad/partials/breadcrumb" %} {% endif %} +
diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig index f016f7040..a3a710cec 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig @@ -1,6 +1,8 @@ {% extends "theme::layouts/default" %} {% block content %} + {% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'preview'} %} +

{{ trans('visiosoft.module.advs::field.preview_text.part_1') }} diff --git a/addons/default/visiosoft/advs-module/src/Productoption/Table/ProductoptionTableBuilder.php b/addons/default/visiosoft/advs-module/src/Productoption/Table/ProductoptionTableBuilder.php index 36dc31d43..f9eb7d19e 100644 --- a/addons/default/visiosoft/advs-module/src/Productoption/Table/ProductoptionTableBuilder.php +++ b/addons/default/visiosoft/advs-module/src/Productoption/Table/ProductoptionTableBuilder.php @@ -6,17 +6,6 @@ use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueReposit class ProductoptionTableBuilder extends TableBuilder { - - public function setTableEntries(\Illuminate\Support\Collection $entries) - { - $option_repository = app(ProductoptionRepositoryInterface::class); - $value_repository = app(ProductoptionsValueRepositoryInterface::class); - - $options_id = $option_repository->getWithCategoryId(7)->pluck('id')->all(); - - $values = $value_repository->getWithOptionsId($options_id); - return parent::setTableEntries($values); - } /** * The table views. * diff --git a/addons/default/visiosoft/advs-module/src/ProductoptionsValue/Support/MultipleFieldType/LookupTableBuilder.php b/addons/default/visiosoft/advs-module/src/ProductoptionsValue/Support/MultipleFieldType/LookupTableBuilder.php index da83a178c..168217fd7 100644 --- a/addons/default/visiosoft/advs-module/src/ProductoptionsValue/Support/MultipleFieldType/LookupTableBuilder.php +++ b/addons/default/visiosoft/advs-module/src/ProductoptionsValue/Support/MultipleFieldType/LookupTableBuilder.php @@ -1,6 +1,9 @@ valueTableBuilder = $valueTableBuilder; + parent::__construct($table); + } + public function setTableEntries(\Illuminate\Support\Collection $entries) { $option_repository = app(ProductoptionRepositoryInterface::class); $value_repository = app(ProductoptionsValueRepositoryInterface::class); - $options_id = $option_repository->getWithCategoryId(7)->pluck('id')->all(); + $options_id = $option_repository->getWithCategoryId($this->config('cat1'))->pluck('id')->all(); $values = $value_repository->getWithOptionsId($options_id); return parent::setTableEntries($values);