- Updated client-edit template to change 'Firma' to 'Nazwa' and added 'Nazwa firmy' input field. - Modified main-view template to reflect the new naming conventions for clients. - Enhanced finances main-view to display a list of clients with revenue details. - Added client selection dropdown in operation-edit template. - Improved work-time template by adding keyboard shortcut for task confirmation. - Introduced CrmController for handling client-related actions. - Created FinancesController to manage finance operations and categories. - Implemented ClientRepository for client data management. - Developed FinanceRepository for finance operations and data handling.
66 lines
2.0 KiB
PHP
66 lines
2.0 KiB
PHP
<?php global $gdb;?>
|
|
<div class="row block-header">
|
|
<div class="col-12">
|
|
<h2>Lista <strong>klientów </strong></h2>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$grid = new \grid( 'crm_client' );
|
|
$grid -> debug = true;
|
|
$grid -> gdb_opt = $gdb;
|
|
$grid -> search = [
|
|
[ 'name' => 'Nazwa', 'db' => 'firm', 'type' => 'text' ],
|
|
[ 'name' => 'Status', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => \factory\Crm::$status ] ],
|
|
];
|
|
$grid -> order = [ 'column' => 'firm', 'type' => 'ASC' ];
|
|
$grid -> columns_view = [
|
|
[
|
|
'name' => 'Lp.',
|
|
'th' => [ 'class' => 'g-lp' ],
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'autoincrement' => true
|
|
], [
|
|
'name' => 'Zaktualizowano',
|
|
'db' => 'date_update',
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
|
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_update]" ) );',
|
|
'sort' => true
|
|
], [
|
|
'name' => 'Nazwa',
|
|
'db' => 'firm',
|
|
], [
|
|
'name' => 'Nazwa firmy',
|
|
'db' => 'firm_name',
|
|
], [
|
|
'name' => 'Telefony',
|
|
'db' => 'phones',
|
|
], [
|
|
'name' => 'Emaile',
|
|
'db' => 'emails'
|
|
], [
|
|
'name' => 'Edytuj',
|
|
'action' => [ 'type' => 'edit', 'url' => '/crm/client_edit/id=[id]' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
|
'td' => [ 'class' => 'g-center' ]
|
|
], [
|
|
'name' => 'Usuń',
|
|
'action' => [ 'type' => 'delete', 'url' => '/crm/client_delete/client_id=[id]' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
|
'td' => [ 'class' => 'g-center' ]
|
|
]
|
|
];
|
|
$grid -> buttons = [
|
|
[
|
|
'label' => 'Dodaj klienta',
|
|
'url' => '/crm/client_edit/',
|
|
'icon' => 'fa-plus-circle',
|
|
'class' => 'btn-success'
|
|
]
|
|
];
|
|
$grid -> hide_columns = false;
|
|
$grid -> default_buttons = false;
|
|
$grid -> limit = 25;
|
|
echo $grid -> draw();
|
|
?>
|