- 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.
76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
<?
|
|
global $db;
|
|
ob_start();
|
|
?>
|
|
<?= \Html::input( [
|
|
'label' => 'Nazwa',
|
|
'name' => 'firm',
|
|
'id' => 'firm',
|
|
'value' => $this -> client -> firm,
|
|
'inline' => true
|
|
] );?>
|
|
<?= \Html::input( [
|
|
'label' => 'Nazwa firmy',
|
|
'name' => 'firm_name',
|
|
'id' => 'firm_name',
|
|
'value' => $this -> client -> firm_name,
|
|
'inline' => true
|
|
] );?>
|
|
<?= \Html::input( [
|
|
'label' => 'Emaile',
|
|
'name' => 'emails',
|
|
'id' => 'emails',
|
|
'value' => $this -> client -> emails,
|
|
'inline' => true
|
|
] );?>
|
|
<?= \Html::input( [
|
|
'label' => 'Telefony',
|
|
'name' => 'phones',
|
|
'id' => 'phones',
|
|
'value' => $this -> client -> phones,
|
|
'inline' => true
|
|
] );?>
|
|
<?= \Html::textarea( [
|
|
'label' => 'Notatki',
|
|
'name' => 'notes',
|
|
'id' => 'notes',
|
|
'value' => $this -> client -> notes,
|
|
'rows' => 10
|
|
] );?>
|
|
<?
|
|
$out = ob_get_clean();
|
|
|
|
$grid = new \gridEdit;
|
|
$grid -> id = 'client-edit';
|
|
$grid -> gdb_opt = $gdb;
|
|
$grid -> include_plugins = true;
|
|
$grid -> title = 'edycja <strong>klient</strong>';
|
|
$grid -> title_small = 'Zarządzaj klientem';
|
|
$grid -> fields = [
|
|
[
|
|
'db' => 'id',
|
|
'type' => 'hidden',
|
|
'value' => $this -> client -> id
|
|
]
|
|
];
|
|
$grid -> external_code = $out;
|
|
$grid -> actions = [
|
|
'save' => [ 'url' => '/crm/client_save/', 'back_url' => '/crm/main_view/' ],
|
|
'cancel' => [ 'url' => '/crm/main_view/' ]
|
|
];
|
|
$grid -> persist_edit = true;
|
|
$grid -> id_param = 'id';
|
|
echo $grid -> draw();
|
|
?>
|
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
|
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function ()
|
|
{
|
|
$('textarea#notes').ckeditor({
|
|
toolbar: 'Basic',
|
|
language: 'pl',
|
|
height: '100'
|
|
});
|
|
});
|
|
</script>
|