Skip to content

Commit e405bc5

Browse files
committed
specify extIdSupported for every evidence
1 parent fdf2324 commit e405bc5

File tree

7 files changed

+42
-24
lines changed

7 files changed

+42
-24
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ composer.lock
2222
/debian/php-spojenet-abraflexi-doc/
2323
/debian/php-spojenet-abraflexi-dev/
2424
/debian/.debhelper/
25+
/debian/php-spojenet-abraflexi-dev.debhelper.log
26+
/debian/php-spojenet-abraflexi-dev.substvars
27+
/debian/files
28+
/debian/php-spojenet-abraflexi-doc.debhelper.log
29+
/debian/php-spojenet-abraflexi-doc.substvars
30+
/debian/php-spojenet-abraflexi.debhelper.log
31+
/debian/php-spojenet-abraflexi.substvars

debian/apigendoc.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

debian/php-ondrakoupil-csob-doc.install

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"id":{"showToUser":"false","propertyName":"id","dbName":"IdTypSazbyDph","name":"ID","title":"ID","type":"integer","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"true","inSummary":"true","inDetail":"true","inExpensive":"false","mandatory":"false","isWritable":"false","isOverWritable":"false","hasBusinessLogic":"true","isUpperCase":"false","isLowerCase":"false","links":null},"lastUpdate":{"showToUser":"false","propertyName":"lastUpdate","dbName":"lastUpdate","name":"Posledn\u00ed zm\u011bna","title":"Posledn\u00ed zm\u011bna","type":"datetime","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"true","inDetail":"true","inExpensive":"false","mandatory":"false","isWritable":"false","isOverWritable":"false","hasBusinessLogic":"true","isUpperCase":"false","isLowerCase":"false","links":null},"typSzbDphK":{"showToUser":"true","propertyName":"typSzbDphK","dbName":"TypSzbDphK","name":"Typ sazby DPH","title":"Typ sazby DPH","type":"select","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"false","inDetail":"true","inExpensive":"false","mandatory":"true","maxLength":"50","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"true","isUpperCase":"false","isLowerCase":"false","links":null,"values":{"value":[{"@key":"typSzbDph.dphOsv","$":"osvobozeno"},{"@key":"typSzbDph.dphSniz","$":"sn\u00ed\u017een\u00e1"},{"@key":"typSzbDph.dphSniz2","$":"2. sn\u00ed\u017een\u00e1"},{"@key":"typSzbDph.dphZakl","$":"z\u00e1kladn\u00ed"}]}},"platiOd":{"showToUser":"true","propertyName":"platiOd","dbName":"PlatiOd","name":"Plat\u00ed od","title":"Plat\u00ed od","type":"date","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"false","inDetail":"true","inExpensive":"false","mandatory":"false","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"true","isUpperCase":"false","isLowerCase":"false","links":null},"platiDo":{"showToUser":"true","propertyName":"platiDo","dbName":"PlatiDo","name":"Plat\u00ed do","title":"Plat\u00ed do","type":"date","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"false","inDetail":"true","inExpensive":"false","mandatory":"false","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"true","isUpperCase":"false","isLowerCase":"false","links":null},"cenik":{"showToUser":"true","propertyName":"cenik","dbName":"IdCenik","name":"Cen\u00edk","title":"Cen\u00edk","type":"relation","fkName":"Cen\u00edk 6003","fkEvidencePath":"cenik","fkEvidenceType":"CENIK","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"true","inDetail":"true","inExpensive":"false","mandatory":"true","maxLength":"30","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"false","isUpperCase":"true","isLowerCase":"false","url":"http:\/\/demo.flexibee.eu\/c\/demo\/cenik","links":null},"stat":{"showToUser":"true","propertyName":"stat","dbName":"IdStatu","name":"St\u00e1t","title":"St\u00e1t","type":"relation","fkName":"St\u00e1ty 20004","fkEvidencePath":"stat","fkEvidenceType":"STAT","isVisible":"true","isSortable":"true","isHighlight":"false","inId":"false","inSummary":"false","inDetail":"true","inExpensive":"false","mandatory":"true","maxLength":"3","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"true","isUpperCase":"true","isLowerCase":"false","url":"http:\/\/demo.flexibee.eu\/c\/demo\/stat","links":null},"external-ids":{"showToUser":"false","propertyName":"external-ids","dbName":"extid","name":"external-ids","title":"extIDs","type":"relation","isVisible":"true","isSortable":"false","isHighlight":"false","inId":"true","inSummary":"true","inDetail":"true","inExpensive":"false","mandatory":"false","isWritable":"true","isOverWritable":"true","hasBusinessLogic":"false","isUpperCase":"false","isLowerCase":"false","links":null}}

tools/update_evidencelist_class.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getColumnsInfo($evidence, RO $syncer) {
4343
* From: ' . $statuser->url . '
4444
*
4545
* @author Vítězslav Dvořák <[email protected]>
46-
* @copyright (C) 2016-2017 Spoje.Net
46+
* @copyright (C) 2016-'.date('Y').' Spoje.Net
4747
*/
4848
4949
namespace AbraFlexi;
@@ -120,6 +120,12 @@ class EvidenceList extends RO
120120
$evlist[$evidence['evidencePath']] = $evidence['evidenceName'];
121121
$fullList[$evidence['evidencePath']] = $evidence;
122122
}
123+
124+
if (array_key_exists('extIdSupported', $evidence)) {
125+
$evidencies[$evidenceID]['extIdSupported'] = ($evidencies[$evidenceID]['extIdSupported'] == 'true');
126+
} else {
127+
$evidencies[$evidenceID]['extIdSupported'] = false;
128+
}
123129
}
124130

125131
asort($evlist);

tools/update_properties_class.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
define('EASE_LOGGER', 'console|syslog');
77

88
require_once '../testing/bootstrap.php';
9-
require_once __DIR__ . '/common.php';
9+
require_once __DIR__ . '/common.php';
1010

1111
function evidenceToClass($evidence) {
1212
return str_replace(' ', '', ucwords(str_replace('-', ' ', $evidence)));
@@ -44,6 +44,7 @@ class Properties
4444
$pos = 0;
4545
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
4646
$pos++;
47+
$evidenceInfo = EvidenceList::$evidences[$evidencePath];
4748
if ($evidencePath == 'nastaveni') {
4849
$info = json_decode(file_get_contents('nastaveni-properties.json'),
4950
true);
@@ -52,6 +53,31 @@ class Properties
5253
$structure = $syncer->getOnlineColumnsInfo($evidencePath);
5354
}
5455

56+
if (array_key_exists('extIdSupported', $evidenceInfo) && ($evidenceInfo['extIdSupported'] == true)) {
57+
$structure['external-ids'] = [
58+
"showToUser" => "false",
59+
"propertyName" => "external-ids",
60+
"dbName" => "extid",
61+
"name" => "external-ids",
62+
"title" => "extIDs",
63+
"type" => "relation",
64+
"isVisible" => "true",
65+
"isSortable" => "false",
66+
"isHighlight" => "false",
67+
"inId" => "true",
68+
"inSummary" => "true",
69+
"inDetail" => "true",
70+
"inExpensive" => "false",
71+
"mandatory" => "false",
72+
"isWritable" => "true",
73+
"isOverWritable" => "true",
74+
"hasBusinessLogic" => "false",
75+
"isUpperCase" => "false",
76+
"isLowerCase" => "false",
77+
"links" => null
78+
];
79+
}
80+
5581
if (count($structure)) {
5682
$syncer->addStatusMessage($pos . ' of ' . count(EvidenceList::$name) . ' ' . $evidencePath . ': structure obtained',
5783
'success');

0 commit comments

Comments
 (0)