HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers85/equichecker.com/app/KommaApp/Customers/Kms/CustomerSection.php
<?php
/**
 *
 *
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma Mediadesign
 */

namespace KommaApp\Customers\Kms;

use Carbon\Carbon;
use KommaApp\Kms\Core\Kms;
use KommaApp\Kms\Core\Sections\KmsSectionTabs;
use KommaApp\Kms\Core\Sections\KmsSiteSection;

class CustomerSection extends KmsSiteSection
{
    protected $title = "Customers";
    protected $subTitle = "All customers";
    public $slug = "customers";

    protected $modelAttributesData = [
        'login_label' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
            'options' => [
                'title' => 'lang_get:kms/customers.account'
            ],
        ],
        'active' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'Actief'
            ]
        ],
        'active_from' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsDate',
            'options' => [
                'label' => 'Actief vanaf',
                'placeholder' => 'dd-mm-yyyy',
                'validation' => [
                    'rules' => 'required',
                    'messages' => [
                        'required' => 'You need to enter an start date of the subscription',
                    ]
            ],
            ]
        ],
        'active_until' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsDate',
            'options' => [
                'label' => 'Actief tot',
                'placeholder' => 'dd-mm-yyyy',
                'validation' => [
                    'rules' => 'required',
                    'messages' => [
                        'required' => 'You need to enter an end date of the subscription',
                ]
            ],
            ]
        ],
        'customer_number' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.account_nr',
                'placeholder' => 'Klantnummer voor intern gebruik',

            ]
        ],

        'email' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/global.email',
                'placeholder' => 'Bv: info@example.com',
                'lowercase' => true,
                'validation' => [
                    'rules' => 'required|email|unique:customers,email,[[modelId]]',
                    'messages' => [
                        'required' => 'You need to enter an email address',
                        'unique' => 'This email address is already registered'
                    ]
                ]
            ]
        ],
        'language_id' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsSelect',
            'options' => [
                'label' => 'lang_get:kms/global.language',
                'placeholder' => 'Bv: NL',
                'data' => [
                    ['value' => '104', 'content' => 'Nederlands', 'htmlContent' => 'Nederlands'],
                    ['value' => '40', 'content' => 'Engels', 'htmlContent' => 'Engels'],
                    ['value' => '50', 'content' => 'Duits', 'htmlContent' => 'Duits'],
                ],
            ]
        ],
        'information_label' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
            'options' => [
                'title' => 'lang_get:kms/global.information'
            ],
        ],
        'first_name' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/global.first_name',
                'placeholder' => 'Bv: John'
            ]
        ],
        'name_insertion' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/global.name_insertion',
                'placeholder' => 'Bv: van'
            ]
        ],
        'last_name' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/global.last_name',
                'placeholder' => 'Bv: Doe'
            ]
        ],
        'company' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.company_name',
                'placeholder' => 'Bv: Komma'
            ]
        ],
        'company_vat' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.company_vat',
                'placeholder' => 'Bv: NL0XXXXXXXXXX'
            ]
        ],
        'postal' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.postal',
                'placeholder' => 'Bv: 1234 AA'
            ]
        ],
        'city' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.city',
                'placeholder' => 'Bv: Budel'
            ]
        ],
        'street' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.street',
                'placeholder' => 'Bv: Wolfswinkel'
            ]
        ],
        'house_number' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.house_nr',
                'placeholder' => 'Bv: 5'
            ]
        ],
        'house_number_suffix' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.house_nr_addition',
                'placeholder' => 'Bv: a'
            ]
        ],

        'country' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsSelect',
            'options' => [
                'label' => 'lang_get:kms/global.country',
                'default_value' => 155,
                'placeholder' => 'Bv: Nederland',
                'data' => 'KommaApp\Countries\Kms\CountryRepository@getCountriesForSiteSelectBox',
            ],
        ],
        'telephone' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/customers.telephone',
                'placeholder' => 'Bv: +31 (0)6 12 45 78 45'
            ]
        ],
        'search_terms_stats' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsView',
            'options' => [
                'label' => 'lang_get:kms/stats.search_terms',
                'viewName' => 'kms.attributeCustomViews.customerSearchTermStats',
                'viewComposer' => '\KommaApp\Stats\Composers\CustomerSearchTermStatsComposer',
                'data' => [
                    'customerId' => '[[modelId]]'
                ],
            ],
            'tab' => 'Statistieken',
        ],
        'detail_page_stats' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsView',
            'options' => [
                'label' => 'lang_get:kms/stats.detail_pages',
                'viewName' => 'kms.attributeCustomViews.customerDetailPageStats',
                'viewComposer' => '\KommaApp\Stats\Composers\CustomerDetailPageStatsComposer',
                'data' => [
                    'customerId' => '[[modelId]]'
                ],
            ],
            'tab' => 'Statistieken',
        ],

    ];

    function __construct(
        Kms $kms,
        CustomerRepository $repository,
        KmsSectionTabs $tabs)
    {
        parent::__construct($kms, $repository, $tabs);
    }
}