Skip to content

Commit ec4e426

Browse files
authored
Merge pull request #140 from openclassify/eids-verification-added
eids-verification-added
2 parents b2115a2 + 5523ee6 commit ec4e426

11 files changed

Lines changed: 218 additions & 58 deletions
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
3+
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentRepositoryInterface;
4+
use \Anomaly\Streams\Platform\Database\Migration\Migration;
5+
use Anomaly\Streams\Platform\Field\Contract\FieldRepositoryInterface;
6+
use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;
7+
8+
class VisiosoftModuleAdvsAddEidsFieldsToUser extends Migration
9+
{
10+
11+
public function up()
12+
{
13+
$streamRepository = app(StreamRepositoryInterface::class);
14+
$fieldRepository = app(FieldRepositoryInterface::class);
15+
$assignmentRepository = app(AssignmentRepositoryInterface::class);
16+
$stream = $streamRepository->findBySlugAndNamespace('users', 'users');
17+
18+
if ($stream) {
19+
20+
$fields = [
21+
[
22+
'name' => 'Eids Auth Code',
23+
'namespace' => 'users',
24+
'slug' => 'eids_auth_code',
25+
'type' => 'anomaly.field_type.text',
26+
'locked' => 0
27+
],
28+
[
29+
'name' => 'Is Eids Verified',
30+
'namespace' => 'users',
31+
'slug' => 'is_eids_verified',
32+
'type' => 'anomaly.field_type.boolean',
33+
'locked' => 0
34+
],
35+
];
36+
37+
foreach ($fields as $field) {
38+
$checkField = $fieldRepository->findBySlugAndNamespace($field['slug'], 'users');
39+
if (!$checkField) {
40+
$field = $fieldRepository->create($field);
41+
$assignmentRepository->create([
42+
'stream_id' => $stream->id,
43+
'field_id' => $field->id
44+
]);
45+
}
46+
}
47+
}
48+
}
49+
50+
public function down()
51+
{
52+
53+
if ($field = $this->fields()->findBySlugAndNamespace('eids_auth_code', 'users')) {
54+
$field->delete();
55+
}
56+
57+
if ($field = $this->fields()->findBySlugAndNamespace('is_eids_verified', 'users')) {
58+
$field->delete();
59+
}
60+
}
61+
62+
}

resources/config/settings/sections.php

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'general' => [
88
'title' => 'visiosoft.module.advs::section.general',
99
'fields' => [
10-
'favicon',
10+
'favicon',
1111
'market_place',
1212
'show_lang_url',
1313
'iban_numbers',
@@ -18,7 +18,7 @@
1818
'hide_price_categories',
1919
'tcmb_exchange_url',
2020
'enabled_currencies',
21-
'hide_ad_cat',
21+
'hide_ad_cat',
2222
'showDetailedAddress',
2323
'translatable_slug'
2424
],
@@ -34,7 +34,7 @@
3434
'popular_ads_limit',
3535
'ads_image_limit',
3636
'default_view_type',
37-
'show_price_to_members_only',
37+
'show_price_to_members_only',
3838
'price_area_hidden',
3939
'hide_listing_standard_price',
4040
'hide_zero_price',
@@ -49,19 +49,19 @@
4949
'update_publish_at'
5050
],
5151
],
52-
'ads_detail' => [
53-
'title' => 'visiosoft.module.advs::section.ads_detail',
54-
'fields' => [
55-
'ads_date_hidden',
56-
'hide_seller_info',
52+
'ads_detail' => [
53+
'title' => 'visiosoft.module.advs::section.ads_detail',
54+
'fields' => [
55+
'ads_date_hidden',
56+
'hide_seller_info',
5757
'hide_seller_info_by_category',
58-
]
59-
],
58+
]
59+
],
6060
'create_ad' => [
6161
'title' => 'visiosoft.module.advs::section.create_ad',
6262
'fields' => [
6363
'is_changeable_slug',
64-
'hide_contact_created_at',
64+
'hide_contact_created_at',
6565
'show_tax_field',
6666
'detailed_product_options',
6767
'steps_color',
@@ -119,7 +119,7 @@
119119
'title' => 'visiosoft.module.advs::section.filter',
120120
'fields' => [
121121
'hide_filter_section', 'hide_price_filter', 'hide_date_filter', 'hide_photo_filter', 'hide_map_filter',
122-
'hide_listing_header', 'user_filter_limit','hide_out_of_stock_products_without_listing', 'location_data_type_first'
122+
'hide_listing_header', 'user_filter_limit', 'hide_out_of_stock_products_without_listing', 'location_data_type_first'
123123
, 'location_data_type_second'
124124
],
125125
],
@@ -130,6 +130,13 @@
130130
'override_text',
131131
],
132132
],
133+
'eids' => [
134+
'title' => "Eids",
135+
'fields' => [
136+
'is_eids_verification_required',
137+
'eids_verification_url'
138+
]
139+
]
133140
],
134141
],
135142
];

resources/config/settings/settings.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,12 @@
484484
'default_value' => false,
485485
],
486486
],
487-
'hide_contact_created_at' => [
488-
'type' => 'anomaly.field_type.boolean',
489-
'config' => [
490-
'default_value' => false,
491-
]
492-
],
487+
'hide_contact_created_at' => [
488+
'type' => 'anomaly.field_type.boolean',
489+
'config' => [
490+
'default_value' => false,
491+
]
492+
],
493493
'show_input_flag' => [
494494
'type' => 'anomaly.field_type.boolean',
495495
'config' => [
@@ -539,13 +539,13 @@
539539
'default_value' => true,
540540
],
541541
],
542-
'show_ad_note' =>[
542+
'show_ad_note' => [
543543
'type' => 'anomaly.field_type.boolean',
544544
'config' => [
545545
'default_value' => false,
546546
],
547547
],
548-
'show_min_order_limit' =>[
548+
'show_min_order_limit' => [
549549
'type' => 'anomaly.field_type.boolean',
550550
'config' => [
551551
'default_value' => false,
@@ -648,4 +648,14 @@
648648
'default_value' => false
649649
]
650650
],
651+
'is_eids_verification_required' => [
652+
'type' => 'anomaly.field_type.boolean',
653+
'config' => [
654+
'default_value' => false
655+
]
656+
],
657+
'eids_verification_url' => [
658+
'type' => 'anomaly.field_type.text',
659+
'placeholder' => "https://eids.ticaret.gov.tr/oturum?firmaKodu=test-firma-kodu"
660+
]
651661
];

resources/lang/en/field.php

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119
'my_adv' => [
120120
'name' => 'ADVS'
121121
],
122-
'description' => 'Description',
123-
'explanation' => 'Explanation',
122+
'description' => 'Description',
123+
'explanation' => 'Explanation',
124124
'type' => [
125125
'name' => 'Type'
126126
],
@@ -137,7 +137,7 @@
137137
'home' => 'Home',
138138
'list-page' => 'List Page',
139139
'search' => 'Search',
140-
'reset' => 'Reset',
140+
'reset' => 'Reset',
141141
'recommended' => 'Recommended Ads for You',
142142
'filter' => 'Filter',
143143
'sort' => 'Sort',
@@ -150,16 +150,16 @@
150150
'oldest' => 'Oldest',
151151
'address_a_z' => 'Address (A to Z)',
152152
'address_z_a' => 'Address (Z to A)',
153-
'categories' => [
154-
'name' => 'Categories'
155-
],
153+
'categories' => [
154+
'name' => 'Categories'
155+
],
156156
'all_categories' => 'All Categories',
157157
'location' => 'Location',
158158
'send_message' => 'Send Message',
159159
'phone_gsm' => 'Gsm Phone',
160160
'phone_office' => 'Office Phone',
161161
'add_to_favorites' => "Add to Favorites",
162-
'add_to_cart'=> "Add to Cart",
162+
'add_to_cart' => "Add to Cart",
163163
'send' => 'Send',
164164
'search_name' => 'Search Name',
165165
'my_favorite_searches' => 'Favorite Searches',
@@ -170,7 +170,7 @@
170170
'edit' => 'Edit',
171171
'approve' => 'Approve',
172172
'passive' => "Passive",
173-
'sold' => 'Sold',
173+
'sold' => 'Sold',
174174
'offered_by' => 'Offered By',
175175
'more_ads_by' => 'More Ads By',
176176
'click_phone' => 'Show phone number',
@@ -371,17 +371,17 @@
371371
'advs' => 'Advs',
372372
'site' => 'Site',
373373
'subscription' => 'Subscription',
374-
'created' => 'Created',
375-
'product_option' => [
376-
'name' => 'Product Option'
377-
],
378-
'option_json' => [
379-
'name' => 'Option'
380-
],
374+
'created' => 'Created',
375+
'product_option' => [
376+
'name' => 'Product Option'
377+
],
378+
'option_json' => [
379+
'name' => 'Option'
380+
],
381381
'old_price' => [
382382
'name' => 'Old Price'
383383
],
384-
'save_search' => 'Save Search',
384+
'save_search' => 'Save Search',
385385
'publish_at' => [
386386
'name' => 'Publish Date'
387387
],
@@ -410,10 +410,10 @@
410410
'custom_field' => 'Custom Field',
411411

412412
// ads_bar_widget
413-
'pending_ads' => 'Pending Ads',
414-
'approved_ads' => 'Approved Ads',
415-
'outdated_ads' => 'Outdated Ads',
416-
'passive_ads' => 'Passive Ads',
413+
'pending_ads' => 'Pending Ads',
414+
'approved_ads' => 'Approved Ads',
415+
'outdated_ads' => 'Outdated Ads',
416+
'passive_ads' => 'Passive Ads',
417417
'adv_desc_metaTags' => 'visit our website to list our listings.',
418418
'tags' => [
419419
'name' => 'Tags'
@@ -427,4 +427,7 @@
427427

428428
'empty_title' => 'If empty, filled by title',
429429
'empty_description' => 'If empty, filled by description',
430+
431+
'is_eids_verified' => ['name' => "Is eids verified"],
432+
'eids_verification_url' => ['name' => "Eids Verification Url"]
430433
];

resources/lang/en/setting.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,4 +384,10 @@
384384
'show_seo_description' => [
385385
'name' => 'Show Seo Decription',
386386
],
387+
'is_eids_verification_required' => [
388+
'name' => "Is eids verification required"
389+
],
390+
'eids_verification_url' => [
391+
'name' => "Eids Verification Url"
392+
]
387393
];

resources/lang/tr/field.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
'my_adv' => [
123123
'name' => 'İlan'
124124
],
125-
'description' => 'Detaylar',
126-
'explanation' => 'Açıklama',
125+
'description' => 'Detaylar',
126+
'explanation' => 'Açıklama',
127127
'type' => [
128128
'name' => 'Tip'
129129
],
@@ -137,7 +137,7 @@
137137
'home' => 'Anasayfa',
138138
'list-page' => 'Liste Sayfası',
139139
'search' => 'Arama',
140-
'reset' => 'Sıfırla',
140+
'reset' => 'Sıfırla',
141141
'recommended' => 'Sizin için Önerilen İlanlar',
142142
'filter' => 'Filtre',
143143
'sort' => 'Çeşit',
@@ -150,16 +150,16 @@
150150
'oldest' => 'En eski',
151151
'address_a_z' => 'Adres (A\'dan Z\'ye)',
152152
'address_z_a' => 'Adres (Z\'den A\'ya)',
153-
'categories' => [
154-
'name' => 'Kategoriler'
155-
],
153+
'categories' => [
154+
'name' => 'Kategoriler'
155+
],
156156
'all_categories' => 'Tüm Kategoriler',
157157
'location' => 'Lokasyon',
158158
'send_message' => 'Mesaj Gönder',
159159
'phone_gsm' => 'Cep Telefonu',
160160
'phone_office' => 'Sabit telefon',
161161
'add_to_favorites' => "Favorilere Ekle",
162-
'add_to_cart'=> "Sepete Ekle",
162+
'add_to_cart' => "Sepete Ekle",
163163
'send' => 'Gönder',
164164
'search_name' => 'Arama Adı',
165165
'my_favorite_searches' => 'Favori Aramalar',
@@ -170,7 +170,7 @@
170170
'edit' => 'Düzenle',
171171
'approve' => 'Onayla',
172172
'passive' => "Pasif",
173-
'sold' => 'Satıldı',
173+
'sold' => 'Satıldı',
174174
'offered_by' => 'İlan Sahibi',
175175
'more_ads_by' => 'Diğer İlanlar',
176176
'click_phone' => 'Telefon Numarasını Göster',
@@ -374,17 +374,17 @@
374374
'advs' => 'Advs',
375375
'site' => 'Site',
376376
'subscription' => 'Abonelik',
377-
'created' => 'Oluşturuldu',
378-
'product_option' => [
379-
'name' => 'İlan Seçeneği'
380-
],
381-
'option_json' => [
382-
'name' => 'Seçenek'
383-
],
377+
'created' => 'Oluşturuldu',
378+
'product_option' => [
379+
'name' => 'İlan Seçeneği'
380+
],
381+
'option_json' => [
382+
'name' => 'Seçenek'
383+
],
384384
'old_price' => [
385385
'name' => 'Eski fiyat'
386386
],
387-
'save_search' => 'Aramayı Kaydet',
387+
'save_search' => 'Aramayı Kaydet',
388388
'publish_at' => [
389389
'name' => 'Yayın tarihi'
390390
],
@@ -413,6 +413,8 @@
413413
'empty_title' => 'Boşsa, başlığa göre doldurulur',
414414
'empty_description' => 'Boşsa, açıklamaya göre doldurulur',
415415

416+
'is_eids_verified' => ['name' => "Eids ile doğrulanmış"],
417+
'eids_auth_code' => ['name' => "Eids Yetki kodu"]
416418

417419

418420
];

resources/lang/tr/setting.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,10 @@
380380
'show_seo_description' => [
381381
'name' => 'Seo Açıklamayı Göster',
382382
],
383+
'is_eids_verification_required' => [
384+
'name' => "Eids doğrulaması zorunlu"
385+
],
386+
'eids_verification_url' => [
387+
'name' => "Eids Doğrulama Adresi"
388+
]
383389
];

0 commit comments

Comments
 (0)