1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00
invoiceninja/app/DataMapper/DefaultSettings.php
David Bomba eddb9adc73
Client Settings (#2668)
* Clean up Client Show

* Working on Show Client menu action

* working on client view permissions

* Finishing up Client Statement View

* Workig on client settings

* add mix manifest

* css for client settings

* Client Settings

* Working on Client Settings

* Implement StartupCheck and static seeders

* Implement cached statics in view composers

* Working on client settings

* Payment Terms

* Working on Payment Terms View Composer

* Payment Terms builder

* Client Settings

* refactor companies table

* Refactor for company settings, move settings to json

* Set object cast on settings column of Company table

* Fixes for refactor of companies and clients table

* Test

* Client Settings Datamapper

* Client Settings

* Default client language

* Client Settings

* Working on client settings options

* Client Settings

* Settings Json serialization/deserialization handling
2019-02-17 21:34:46 +11:00

55 lines
950 B
PHP

<?php
namespace App\DataMapper;
use App\Models\Client;
/**
* Class DefaultSettings
* @package App\DataMapper
*/
class DefaultSettings extends BaseSettings
{
/**
* @var int
*/
public static $per_page = 25;
/**
* @return \stdClass
*/
public static function userSettings() : \stdClass
{
return (object)[
class_basename(Client::class) => self::clientSettings(),
];
}
/**
* @return \stdClass
*/
private static function clientSettings() : \stdClass
{
return (object)[
'datatable' => (object) [
'per_page' => self::$per_page,
'column_visibility' => (object)[
'name' => true,
'contact' => true,
'email' => true,
'client_created_at' => true,
'last_login' => true,
'balance' => true,
'custom_value1' => false,
'custom_value2' => true,
'custom_value3' => false,
'custom_value4' => false,
]
]
];
}
}