Merge pull request #1088 from openclassify/vedatakd

added Delete Installer
This commit is contained in:
Fatih Alp 2021-05-31 11:29:05 +03:00 committed by GitHub
commit ff1bbc27d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 176 additions and 77 deletions

View File

@ -0,0 +1,30 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
class VisiosoftModuleAdvsCreateTaxField extends Migration
{
public function __construct()
{
//Maria DB will be removed when the version is updated.
\Illuminate\Support\Facades\DB::getDoctrineSchemaManager()
->getDatabasePlatform()->registerDoctrineTypeMapping('point', 'string');
}
protected $stream = [
'slug' => 'advs',
];
protected $fields = [
'tax' => [
'type' => 'anomaly.field_type.integer',
'config' => [
'default_value' => 0,
],
],
];
protected $assignments = [
'tax'
];
}

View File

@ -53,6 +53,7 @@ return [
'create_ad' => [
'title' => 'visiosoft.module.advs::section.create_ad',
'fields' => [
'show_tax_field',
'detailed_product_options',
'steps_color',
'create_ad_button_color',

View File

@ -180,7 +180,7 @@ return [
'type' => 'anomaly.field_type.checkboxes',
'required' => true,
'config' => [
'mode' => 'tags',
'mode' => 'tags',
'default_value' => function () {
return [config('streams::currencies.default')];
},
@ -403,34 +403,34 @@ return [
},
],
],
'favicon' => [
'type' => 'anomaly.field_type.file',
],
'ads_date_hidden' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_listing_header' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_filter_section' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_seller_info' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'disable_sentry' => 'anomaly.field_type.boolean',
'favicon' => [
'type' => 'anomaly.field_type.file',
],
'ads_date_hidden' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_listing_header' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_filter_section' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_seller_info' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'disable_sentry' => 'anomaly.field_type.boolean',
'detailed_product_options' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
@ -443,18 +443,18 @@ return [
'default_value' => false,
]
],
'show_price_to_members_only' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_ad_cat' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'show_price_to_members_only' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'hide_ad_cat' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'show_finish_and_publish_date' => [
'type' => 'anomaly.field_type.boolean',
@ -462,4 +462,11 @@ return [
'default_value' => false,
],
],
'show_tax_field' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
],
],
];

View File

@ -376,4 +376,7 @@ return [
'publish_at' => [
'name' => 'Publish Date'
],
'tax' => [
'name' => 'Tax'
],
];

View File

@ -276,4 +276,8 @@ return [
'name' => 'Show Finish Date And Publish Date For Create',
'instructions' => 'Displays the publish_at and finish_at fields on the ad creation page.'
],
'show_tax_field' => [
'name' => 'Show Tax Field',
'instructions' => 'When this option is enabled, you can set the tax rate on the ad creation page.'
],
];

View File

@ -374,4 +374,7 @@ return [
'publish_at' => [
'name' => 'Publish Date'
],
'tax' => [
'name' => 'KDV Oranı'
],
];

View File

@ -27,7 +27,7 @@ return [
'favicon' => [
'name' => 'Favicon',
]
,'map_coordinates_long' => [
, 'map_coordinates_long' => [
'name' => 'Harita Long Koordinati',
],
'map_coordinates_lat' => [
@ -41,7 +41,7 @@ return [
],
'ogImage' => [
'name' => 'Sosyal Paylaşma Logosu',
'warning' => '1200 x 630 çözünürlükte olmalıdır.',
'warning' => '1200 x 630 çözünürlükte olmalıdır.',
],
'currencies' => [
@ -52,7 +52,7 @@ return [
],
'site_address' => [
'name' => 'Site Adresi',
'warning' => 'Otomatik eklendi www. www. <strong>sitename.com</strong>',
'warning' => 'Otomatik eklendi www. www. <strong>sitename.com</strong>',
],
'google_map_key' => [
'name' => 'Google Harita Api Anahtarı',
@ -134,9 +134,9 @@ return [
'market_place' => [
'name' => 'Pazar Yeri',
],
'price_area_hidden' => [
'name' => 'Fiyat Alanı Gizli',
],
'price_area_hidden' => [
'name' => 'Fiyat Alanı Gizli',
],
'hide_price_filter' => [
'name' => 'Fiyat Filtresini Gizle',
],
@ -215,18 +215,18 @@ return [
'name' => 'Oluşturulma Tarihini Gizle',
'instructions' => 'İlan detay sayfasında oluşturulan tarihi gizle',
],
'hide_listing_header' => [
'name' => 'Liste Başlığını Gizle',
'instructions' => 'Türleri sıralamak ve görüntülemek için gizleme',
],
'hide_filter_section' => [
'name' => 'Filtre Bölümünü Gizle',
'instructions' => 'Liste sayfasında sol filtre alanına gizleniyor',
],
'hide_seller_info' => [
'name' => 'Satıcı Bilgilerini Gizle',
'instructions' => 'İlan detay sayfasında satıcı bilgilerinin gizlenmesi',
],
'hide_listing_header' => [
'name' => 'Liste Başlığını Gizle',
'instructions' => 'Türleri sıralamak ve görüntülemek için gizleme',
],
'hide_filter_section' => [
'name' => 'Filtre Bölümünü Gizle',
'instructions' => 'Liste sayfasında sol filtre alanına gizleniyor',
],
'hide_seller_info' => [
'name' => 'Satıcı Bilgilerini Gizle',
'instructions' => 'İlan detay sayfasında satıcı bilgilerinin gizlenmesi',
],
'show_post_ad_agreement' => [
'name' => 'İlan Sonrası Sözleşmesini Göster',
'instructions' => 'Reklam oluşturma sayfasında bir gizlilik politikası sözleşmesi görüntülemek istiyorsanız bunu açın',
@ -251,9 +251,9 @@ return [
'name' => 'GET Kategorileri',
'instructions' => 'GET özelliğinin geçerli olacağı kategorileri temsil eder.'
],
'disable_sentry' => [
'name' => 'Sentry\'yi devre dışı bırak'
],
'disable_sentry' => [
'name' => 'Sentry\'yi devre dışı bırak'
],
'watermark' => [
'name' => 'Filigran',
'instructions' => 'Filigran etkin mi?'
@ -265,11 +265,19 @@ return [
'show_subcats_mobile' => [
'name' => 'Alt kategorileri mobil görünümde göster',
],
'show_price_to_members_only' => [
'name' => 'Sadece Üyelere Fiyat Göster',
],
'hide_ad_cat' => [
'name' => 'Kategorileri Gizle',
'instructions' => 'İlan listelemede ilan kategorilerini gizle'
]
'show_price_to_members_only' => [
'name' => 'Sadece Üyelere Fiyat Göster',
],
'hide_ad_cat' => [
'name' => 'Kategorileri Gizle',
'instructions' => 'İlan listelemede ilan kategorilerini gizle'
],
'show_finish_and_publish_date' => [
'name' => 'İlan Oluşturma Sayfasında Publish_at ve Finish_at göster',
'instructions' => 'İlan oluşturma sayfasında Publish_at ve Finish_at alanlarını gösterir.'
],
'show_tax_field' => [
'name' => 'Vergi Oranı Seçmeyi Göster',
'instructions' => 'Bu seçenek etkinleştirildiğinde ilan oluşturma sayfasında vergi oranı belirleyebilirsiniz.'
],
];

View File

@ -126,10 +126,12 @@
<span class="w-100 {{ HideStandardPrice }}">
{% set standardPriceValue = form.fields.standard_price.value|split('.') %}
<input class="mt-3 border-0 text-right standard-price-field whole-price flex-fill w-100"
placeholder="0" value="{{ standardPriceValue|first }}" type="text">
placeholder="0" value="{{ standardPriceValue|first }}"
type="text">
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
<input class="mt-3 border-0 ml-2 text-center standard-price-decimal decimal-price"
placeholder="00" type="text" value="{{ standardPriceValue[1] }}"
placeholder="00" type="text"
value="{{ standardPriceValue[1] }}"
maxlength="2">
{% endif %}
</span>
@ -143,6 +145,29 @@
</div>
</div>
</div>
{% if setting_value("visiosoft.module.advs::show_tax_field") %}
<div class="row mx-0 my-3">
<div class="col-4 px-0">
<label>
{{ trans('visiosoft.module.advs::field.tax.name') }}
<span class="required">*</span>
</label>
<div class="py-2 pr-3">
<div class="input-wrapper">
<select class="custom-select form-control" name="tax">
<option value="0" {{ (form.fields.tax.value == "0") ? 'selected':'' }}>0</option>
<option value="1" {{ (form.fields.tax.value == "1") ? 'selected':'' }}>%1</option>
<option value="8"{{ (form.fields.tax.value == "8") ? 'selected':'' }}>%8</option>
<option value="18"{{ (form.fields.tax.value == "18") ? 'selected':'' }}>%18</option>
</select>
</div>
</div>
</div>
</div>
{% endif %}
{% if setting_value("visiosoft.module.advs::show_finish_and_publish_date") %}
<div class="row mx-0 my-3">
<div class="col-6 px-0">

View File

@ -57,6 +57,7 @@ class AdvFormBuilder extends FormBuilder
'cat9',
'cat10',
'currency',
'tax',
'online_payment',
'stock',
'country' => [

View File

@ -146,10 +146,6 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
'as' => 'adv_add_cart_ajax',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@addCart',
],
'ajax/countPhone' => [
'as' => 'adv_count_show_phone',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@showPhoneCounter',
],
'view/{type}' => [
'as' => 'visiosoft.module.advs::view_type',
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@viewType',

View File

@ -0,0 +1,17 @@
<?php namespace Visiosoft\AdvsModule\Adv\Command;
use Illuminate\Filesystem\Filesystem;
class DeleteInstaller
{
public function handle(Filesystem $files)
{
$json = file_get_contents(base_path('composer.json'));
$pattern = '/,\s*("anomaly\/installer-module").*"/';
$files->put(base_path('composer.json'), preg_replace($pattern, '', $json));
$files->deleteDirectory(base_path('vendor/anomaly/installer-module'));
}
}

View File

@ -1,4 +1,5 @@
<?php
namespace Database\Seeders;
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
@ -16,6 +17,7 @@ use Anomaly\DashboardModule\Widget\Contract\WidgetRepositoryInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Visiosoft\AdvsModule\Adv\Command\DeleteInstaller;
use WidgetSeeder;
use ZipArchive;
@ -143,6 +145,9 @@ class DatabaseSeeder extends Seeder
$this->call(WidgetSeeder::class);
//Delete Installer
dispatch_now(new DeleteInstaller());
//Create Store Icon Folder
if (!$this->folders->findBySlug('ads_excel')) {
@ -218,8 +223,7 @@ class DatabaseSeeder extends Seeder
};
//Demodata Seeder
if(is_module_installed('visiosoft.module.demodata'))
{
if (is_module_installed('visiosoft.module.demodata')) {
$this->call(\Visiosoft\DemodataModule\Demodata\DemodataSeeder::class);
}