WIP Productchange
This commit is contained in:
@@ -427,10 +427,6 @@ class OrderController extends mfBaseController {
|
||||
return $this->addAction();
|
||||
}
|
||||
|
||||
protected function upgradesAction() {
|
||||
|
||||
}
|
||||
|
||||
protected function setwaitingAction() {
|
||||
$order_id = $this->request->id;
|
||||
$order = new Order($order_id);
|
||||
@@ -462,6 +458,41 @@ class OrderController extends mfBaseController {
|
||||
$this->redirect("Order","Index", $qs);
|
||||
}
|
||||
|
||||
protected function upgradesAction() {
|
||||
$this->layout()->setTemplate("Order/Upgrades");
|
||||
|
||||
$rfilter = $this->request->filter;
|
||||
if(!$rfilter) {
|
||||
$rfilter = [];
|
||||
}
|
||||
|
||||
$this->layout->set("filter", $rfilter);
|
||||
$filter = $this->getPreparedFilter($this->request->filter);
|
||||
|
||||
// pagination defaults
|
||||
$pagination = [];
|
||||
$pagination['start'] = 0;
|
||||
$pagination['count'] = 20;
|
||||
$pagination['maxItems'] = 0;
|
||||
|
||||
if(is_numeric($this->request->s)) {
|
||||
$pagination['start'] = intval($this->request->s);
|
||||
}
|
||||
|
||||
$upgrade_search = [
|
||||
"type" => "upgrade",
|
||||
"contract_creator_address_id" => $this->me->address_id,
|
||||
"finish_date_null_or_gte" => date("U"),
|
||||
"price>=" => 0
|
||||
];
|
||||
|
||||
|
||||
$pagination["maxItems"] = ContractLinkModel::countWithContracts($upgrade_search);
|
||||
|
||||
$upgrades = ContractLinkModel::searchWithContracts($upgrade_search, $pagination);
|
||||
$this->layout()->set("upgrades", $upgrades);
|
||||
$this->layout()->set("pagination", $pagination);
|
||||
}
|
||||
protected function addUpgrade() {
|
||||
//$this->layout()->setTemplate("Order/Productchange");
|
||||
Helper::renderVue($this, "OrderProductchange", "Neuer Produktwechsel", ["CONTRACT_API_URL" => $this->getUrl("Contract", "api"),
|
||||
|
||||
Reference in New Issue
Block a user