mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add ajax get transactions function skeletons
This commit is contained in:
parent
cecb8b0f5c
commit
2893c51b01
@ -21,7 +21,7 @@ class StateBalancesController extends AppController
|
|||||||
{
|
{
|
||||||
parent::initialize();
|
parent::initialize();
|
||||||
//$this->Auth->allow(['add', 'edit']);
|
//$this->Auth->allow(['add', 'edit']);
|
||||||
$this->Auth->allow(['overview', 'overviewGdt', 'ajaxGetBalance', 'ajaxListTransactions']);
|
$this->Auth->allow(['overview', 'overviewGdt', 'ajaxGetBalance', 'ajaxListTransactions', 'ajaxGdtOverview']);
|
||||||
$this->loadComponent('JsonRequestClient');
|
$this->loadComponent('JsonRequestClient');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -208,7 +208,7 @@ class StateBalancesController extends AppController
|
|||||||
$this->set('timeUsed', microtime(true) - $startTime);
|
$this->set('timeUsed', microtime(true) - $startTime);
|
||||||
$this->set('gdtSum', $gdtSum);
|
$this->set('gdtSum', $gdtSum);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajaxGetBalance($session_id = 0)
|
public function ajaxGetBalance($session_id = 0)
|
||||||
{
|
{
|
||||||
if(!$session_id) {
|
if(!$session_id) {
|
||||||
@ -249,8 +249,9 @@ class StateBalancesController extends AppController
|
|||||||
|
|
||||||
return $this->returnJson(['state' => 'success', 'balance' => $state_balances[0]->amount]);
|
return $this->returnJson(['state' => 'success', 'balance' => $state_balances[0]->amount]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajaxListTransactions($session_id = 0, $sort = 'ASC')
|
|
||||||
|
public function ajaxListTransactions($session_id, $page, $count)
|
||||||
{
|
{
|
||||||
if(!$session_id) {
|
if(!$session_id) {
|
||||||
return $this->returnJson(['state' => 'error', 'msg' => 'invalid session id']);
|
return $this->returnJson(['state' => 'error', 'msg' => 'invalid session id']);
|
||||||
@ -383,6 +384,17 @@ class StateBalancesController extends AppController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ajaxListTransactions($page = 0, $count = 20)
|
||||||
|
{
|
||||||
|
// TODO: add efficient paging with additional table: state_user_transactions
|
||||||
|
return $this->returnJson(['state' => 'success', 'transactions' => [], 'transactionExecutingCount' => 0, 'count' => 0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ajaxGdtOverview()
|
||||||
|
{
|
||||||
|
return $this->returnJson(['state' => 'success', 'gdt' => ['sum' => 0, 'count' => 0]]);
|
||||||
|
}
|
||||||
|
|
||||||
public function overviewGdt()
|
public function overviewGdt()
|
||||||
{
|
{
|
||||||
$this->set(
|
$this->set(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user