Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
feature(HumanResources) stream feature UI
Browse files Browse the repository at this point in the history
Change-Id: I1431e72152966663afe1377ab66f03c10ec910c4
Reviewed-on: http://gerrit.tine20.com/customers/18543
Tested-by: Jenkins CI (http://ci.tine20.com/) <tine20-jenkins@metaways.de>
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
  • Loading branch information
corneliusweiss committed Nov 30, 2020
1 parent 73e0f2d commit 6220751
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
21 changes: 19 additions & 2 deletions tine20/HumanResources/Frontend/Json.php
Expand Up @@ -87,9 +87,26 @@ public function searchStreams($filter, $paging)
HumanResources_Model_Stream::class);
}

public function saveStream($data)
/**
* Return a single stream
*
* @param string $id
* @return array stream data
*/
public function getStream($id)
{
return $this->_get($id, HumanResources_Controller_Stream::getInstance());
}

/**
* creates/updates a stream
*
* @param array $recordData
* @return array created/updated stream
*/
public function saveStream($recordData)
{
return $this->_save($data, HumanResources_Controller_Stream::getInstance(), HumanResources_Model_Stream::class);
return $this->_save($recordData, HumanResources_Controller_Stream::getInstance(), HumanResources_Model_Stream::class);
}

public function generateStreamReport($streamId)
Expand Down
3 changes: 3 additions & 0 deletions tine20/HumanResources/Model/StreamModalReport.php
Expand Up @@ -47,6 +47,8 @@ class HumanResources_Model_StreamModalReport extends Tinebase_Record_NewAbstract
*/
protected static $_modelConfiguration = [
self::VERSION => 1,
self::RECORD_NAME => 'Modality Report',
self::RECORDS_NAME => 'Modality Reports', // ngettext('Modality Report', 'Modality Reports', n)
self::HAS_RELATIONS => true,
self::COPY_RELATIONS => false,
self::MODLOG_ACTIVE => true,
Expand Down Expand Up @@ -81,6 +83,7 @@ class HumanResources_Model_StreamModalReport extends Tinebase_Record_NewAbstract
self::FLD_STREAM_MODALITY_ID => [
self::TYPE => self::TYPE_RECORD,
self::VALIDATORS => [Zend_Filter_Input::ALLOW_EMPTY => false, 'presence'=>'required'],
self::DISABLED => true,
self::CONFIG => [
self::APP_NAME => HumanResources_Config::APP_NAME,
self::MODEL_NAME => HumanResources_Model_StreamModality::MODEL_NAME_PART,
Expand Down
9 changes: 9 additions & 0 deletions tine20/HumanResources/Model/StreamModality.php
Expand Up @@ -53,6 +53,8 @@ class HumanResources_Model_StreamModality extends Tinebase_Record_NewAbstract
*/
protected static $_modelConfiguration = [
self::VERSION => 1,
self::RECORD_NAME => 'Modality',
self::RECORDS_NAME => 'Modalities', // ngettext('Modality', 'Modalities', n)
self::HAS_RELATIONS => true,
self::COPY_RELATIONS => false,
self::HAS_NOTES => true,
Expand All @@ -63,6 +65,8 @@ class HumanResources_Model_StreamModality extends Tinebase_Record_NewAbstract
self::APP_NAME => HumanResources_Config::APP_NAME,
self::MODEL_NAME => self::MODEL_NAME_PART,

self::TITLE_PROPERTY=> "{# {{start - sorting! #}{{ start |localizeddate('short', 'none', app.request.locale ) }} - {% if end %}{{ end | localizeddate('short', 'none', app.request.locale ) }}{% else %}...{% endif %} {{ interval }} {{ num_interval }}× á {{ hours_interval }}h",

self::ASSOCIATIONS => [
ClassMetadataInfo::MANY_TO_ONE => [
self::FLD_STREAM_ID => [
Expand All @@ -89,6 +93,7 @@ class HumanResources_Model_StreamModality extends Tinebase_Record_NewAbstract
self::FLD_STREAM_ID => [
self::TYPE => self::TYPE_RECORD,
self::VALIDATORS => [Zend_Filter_Input::ALLOW_EMPTY => false, 'presence'=>'required'],
self::DISABLED => true,
self::CONFIG => [
self::APP_NAME => HumanResources_Config::APP_NAME,
self::MODEL_NAME => HumanResources_Model_Stream::MODEL_NAME_PART,
Expand All @@ -106,6 +111,7 @@ class HumanResources_Model_StreamModality extends Tinebase_Record_NewAbstract
self::FLD_END => [
self::LABEL => 'End', // _('End')
self::TYPE => self::TYPE_VIRTUAL,
self::READ_ONLY => true,
self::CONFIG => [
self::TYPE => self::TYPE_DATE,
]
Expand Down Expand Up @@ -150,6 +156,9 @@ class HumanResources_Model_StreamModality extends Tinebase_Record_NewAbstract
self::FLD_REPORTS => [
self::LABEL => 'Stream Modality Reports', // _('Stream Modality Reports')
self::TYPE => self::TYPE_RECORDS,
self::UI_CONFIG => [
self::READ_ONLY => true,
],
self::CONFIG => [
self::APP_NAME => HumanResources_Config::APP_NAME,
self::MODEL_NAME => HumanResources_Model_StreamModalReport::MODEL_NAME_PART,
Expand Down

0 comments on commit 6220751

Please sign in to comment.