* Refactor updateExecutionEsDateByGantt and updateEsDateByGantt method.
This commit is contained in:
@@ -49,3 +49,8 @@ $config->programplan->form->create['end'] = array('label' => $lang->progr
|
||||
$config->programplan->form->create['realBegan'] = array('label' => $lang->programplan->realBegan, 'type' => 'array', 'control' => 'date', 'required' => false, 'default' => '');
|
||||
$config->programplan->form->create['realEnd'] = array('label' => $lang->programplan->realEnd, 'type' => 'array', 'control' => 'date', 'required' => false, 'default' => '');
|
||||
$config->programplan->form->create['desc'] = array('label' => $lang->programplan->desc, 'type' => 'array', 'control' => 'textarea', 'required' => false, 'default' => '');
|
||||
|
||||
$config->programplan->form->updateDateByGantt['id'] = array('required' => false, 'type' => 'int', 'default' => 0);
|
||||
$config->programplan->form->updateDateByGantt['startDate'] = array('required' => false, 'type' => 'string', 'default' => null);
|
||||
$config->programplan->form->updateDateByGantt['endDate'] = array('required' => false, 'type' => 'string', 'default' => '');
|
||||
$config->programplan->form->updateDateByGantt['type'] = array('required' => false, 'type' => 'string', 'default' => '');
|
||||
|
||||
@@ -206,7 +206,8 @@ class programplan extends control
|
||||
|
||||
$objectID = $this->post->id;
|
||||
$objectType = $this->post->type;
|
||||
$this->loadModel('task')->updateEsDateByGantt($objectID, $objectType);
|
||||
$postData = form::data($this->config->programplan->form->updateDateByGantt)->get();
|
||||
$this->loadModel('task')->updateEsDateByGantt($postData);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
return $this->send(array('result' => 'success'));
|
||||
|
||||
Reference in New Issue
Block a user