mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
Merge pull request #1088 from openclassify/vedatakd
added Delete Installer
This commit is contained in:
commit
ff1bbc27d8
@ -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'
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -53,6 +53,7 @@ return [
|
|||||||
'create_ad' => [
|
'create_ad' => [
|
||||||
'title' => 'visiosoft.module.advs::section.create_ad',
|
'title' => 'visiosoft.module.advs::section.create_ad',
|
||||||
'fields' => [
|
'fields' => [
|
||||||
|
'show_tax_field',
|
||||||
'detailed_product_options',
|
'detailed_product_options',
|
||||||
'steps_color',
|
'steps_color',
|
||||||
'create_ad_button_color',
|
'create_ad_button_color',
|
||||||
|
|||||||
@ -462,4 +462,11 @@ return [
|
|||||||
'default_value' => false,
|
'default_value' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'show_tax_field' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => false,
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -376,4 +376,7 @@ return [
|
|||||||
'publish_at' => [
|
'publish_at' => [
|
||||||
'name' => 'Publish Date'
|
'name' => 'Publish Date'
|
||||||
],
|
],
|
||||||
|
'tax' => [
|
||||||
|
'name' => 'Tax'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -276,4 +276,8 @@ return [
|
|||||||
'name' => 'Show Finish Date And Publish Date For Create',
|
'name' => 'Show Finish Date And Publish Date For Create',
|
||||||
'instructions' => 'Displays the publish_at and finish_at fields on the ad creation page.'
|
'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.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -374,4 +374,7 @@ return [
|
|||||||
'publish_at' => [
|
'publish_at' => [
|
||||||
'name' => 'Publish Date'
|
'name' => 'Publish Date'
|
||||||
],
|
],
|
||||||
|
'tax' => [
|
||||||
|
'name' => 'KDV Oranı'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -271,5 +271,13 @@ return [
|
|||||||
'hide_ad_cat' => [
|
'hide_ad_cat' => [
|
||||||
'name' => 'Kategorileri Gizle',
|
'name' => 'Kategorileri Gizle',
|
||||||
'instructions' => 'İlan listelemede ilan kategorilerini 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.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -126,10 +126,12 @@
|
|||||||
<span class="w-100 {{ HideStandardPrice }}">
|
<span class="w-100 {{ HideStandardPrice }}">
|
||||||
{% set standardPriceValue = form.fields.standard_price.value|split('.') %}
|
{% 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"
|
<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') %}
|
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
|
||||||
<input class="mt-3 border-0 ml-2 text-center standard-price-decimal decimal-price"
|
<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">
|
maxlength="2">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
@ -143,6 +145,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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") %}
|
{% if setting_value("visiosoft.module.advs::show_finish_and_publish_date") %}
|
||||||
<div class="row mx-0 my-3">
|
<div class="row mx-0 my-3">
|
||||||
<div class="col-6 px-0">
|
<div class="col-6 px-0">
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class AdvFormBuilder extends FormBuilder
|
|||||||
'cat9',
|
'cat9',
|
||||||
'cat10',
|
'cat10',
|
||||||
'currency',
|
'currency',
|
||||||
|
'tax',
|
||||||
'online_payment',
|
'online_payment',
|
||||||
'stock',
|
'stock',
|
||||||
'country' => [
|
'country' => [
|
||||||
|
|||||||
@ -146,10 +146,6 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'as' => 'adv_add_cart_ajax',
|
'as' => 'adv_add_cart_ajax',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@addCart',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@addCart',
|
||||||
],
|
],
|
||||||
'ajax/countPhone' => [
|
|
||||||
'as' => 'adv_count_show_phone',
|
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@showPhoneCounter',
|
|
||||||
],
|
|
||||||
'view/{type}' => [
|
'view/{type}' => [
|
||||||
'as' => 'visiosoft.module.advs::view_type',
|
'as' => 'visiosoft.module.advs::view_type',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@viewType',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\AdvsController@viewType',
|
||||||
|
|||||||
17
database/Command/DeleteInstaller.php
Normal file
17
database/Command/DeleteInstaller.php
Normal 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'));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
||||||
@ -16,6 +17,7 @@ use Anomaly\DashboardModule\Widget\Contract\WidgetRepositoryInterface;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Visiosoft\AdvsModule\Adv\Command\DeleteInstaller;
|
||||||
use WidgetSeeder;
|
use WidgetSeeder;
|
||||||
use ZipArchive;
|
use ZipArchive;
|
||||||
|
|
||||||
@ -143,6 +145,9 @@ class DatabaseSeeder extends Seeder
|
|||||||
|
|
||||||
$this->call(WidgetSeeder::class);
|
$this->call(WidgetSeeder::class);
|
||||||
|
|
||||||
|
//Delete Installer
|
||||||
|
dispatch_now(new DeleteInstaller());
|
||||||
|
|
||||||
|
|
||||||
//Create Store Icon Folder
|
//Create Store Icon Folder
|
||||||
if (!$this->folders->findBySlug('ads_excel')) {
|
if (!$this->folders->findBySlug('ads_excel')) {
|
||||||
@ -218,8 +223,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Demodata Seeder
|
//Demodata Seeder
|
||||||
if(is_module_installed('visiosoft.module.demodata'))
|
if (is_module_installed('visiosoft.module.demodata')) {
|
||||||
{
|
|
||||||
$this->call(\Visiosoft\DemodataModule\Demodata\DemodataSeeder::class);
|
$this->call(\Visiosoft\DemodataModule\Demodata\DemodataSeeder::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user