- 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.
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
namespace factory;
|
|
|
|
/**
|
|
* @deprecated Use \Domain\Crm\ClientRepository and \Controllers\CrmController instead.
|
|
*/
|
|
class Crm
|
|
{
|
|
public static $source = [ 0 => 'ceidg', 1 => 'kontakt własny', 2 => 'BNI' ];
|
|
public static $status = [ 0 => 'kontakt pozyskany', 1 => 'oferta wysłana', 2 => 'follow up', 3 => 'klient niezainteresowany' ];
|
|
|
|
static public function settings()
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> settings();
|
|
}
|
|
|
|
static public function get_client_name( int $client_id )
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> getName( $client_id );
|
|
}
|
|
|
|
static public function get_client_list()
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> all();
|
|
}
|
|
|
|
static public function client_delete( int $client_id )
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> delete( $client_id );
|
|
}
|
|
|
|
public static function client_details( int $client_id )
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> getById( $client_id );
|
|
}
|
|
|
|
public static function client_save( $client_id, $firm, $firm_name, $emails, $phones, $notes )
|
|
{
|
|
$repository = new \Domain\Crm\ClientRepository();
|
|
return $repository -> save( (int)$client_id, $firm, $firm_name, $emails, $phones, $notes );
|
|
}
|
|
}
|