RESOLVED: Summary not working #45

Open
masterhelper0 opened this Issue Feb 24, 2016 · 2 comments

Projects

None yet

2 participants

@masterhelper0

require "vendor/autoload.php";
use CrudKit\CrudKitApp;
use CrudKit\Pages\MySQLTablePage;

// Create a new app
$app = new CrudKitApp();

// Create a new page mapped to a table
$sqlPage = new MySQLTablePage ("flat", "root", "0101", "radamira", array('charset'=>'utf8'));

$sqlPage->setTableName ("flat")

    ->setName ("Квартиры")
    ->setPrimaryColumn ("id")

    ->addColumn ("url", "Адрес страницы")
    ->addColumn ("name", "Название")
    ->addColumn ("cost", "Общая Стоимость")
    ->addColumn ("kvm", "Цена 1 кв.м.")
    ->addColumn ("type", "(0 = СТУДИЯ) или (1 = однушка) или (2 = двушка) или (3 = трешка)")

    ->addColumn ("rooms", "Количество Комнат")
    ->addColumn ("merged_toilet", "Санузел совмещен (1 = ДА) или (0 = НЕТ)")

    ->addColumn ("full", "Общая кв.м.")
    ->addColumn ("live", "Жилая кв.м.")
    ->addColumn ("toilet", "Туалет кв.м.")
    ->addColumn ("kitchen", "Кухня кв.м.")
    ->addColumn ("balcony", "Балкон кв.м.")

    ->addColumn ("windows", "Окна выходят на")
    ->addColumn ("bal_lod", "(1 = Балкон) или (0 = Лоджия)")

    ->addColumn ("address_short", "Короткое название дома")
    ->addColumn ("plan", "Файл с Планировкой")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")
    // ->addColumn ("_______________", "________________")

    // ->addColumn ("Country", "Country", [ // Additional configuration using options
    //     'validation' => [
    //         'required' => false,
    //     ]
    // ])

     ->setSummaryColumns (
        ["name"],
        ["balcony"]
    );

// Add the page to the app
$app->addPage($sqlPage);

// Render the app
$app->render();
?>

@masterhelper0

Resolved > incorrect setSummaryColumns array syntax. Should be:
->setSummaryColumns(array("name", "balcony"));

Thanks

@masterhelper0 masterhelper0 changed the title from Summary not working to RESOLVED: Summary not working Feb 24, 2016
@skyronic
Owner

Can I ask why you were using // ->addColumn ("_______________", "________________")

I'm gonna work on adding new features this week and if it's something that can help I can investigate adding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment