2namespace Bitrix\Report\VisualConstructor\Controller;
4use Bitrix\Report\VisualConstructor\Entity\DashboardRow;
5use Bitrix\Report\VisualConstructor\Helper\Util;
6use Bitrix\Report\VisualConstructor\Helper\Dashboard as DashboardHelper;
7use Bitrix\Report\VisualConstructor\Internal\Error\Error;
23 $dashboardForUser = DashboardHelper::getDashboardByKeyForCurrentUser(
$params[
'boardKey']);
24 if ($dashboardForUser)
27 $row->setLayoutMap(
$params[
'layoutMap']);
28 $row->setGId(Util::generateUserUniqueId());
29 $row->setBoardId(
$params[
'boardId']);
31 $dashboardForUser->addRows($row);
32 $dashboardForUser->save();
33 return array(
'id' => $row->getGId());
37 $this->adderror(
new Error(
'No dashboard for current user'));
51 $dashboardForUser = DashboardHelper::getDashboardByKeyForCurrentUser($boardKey);
52 if ($dashboardForUser)
54 $dashboardForUser->loadAttribute(
'rows');
55 $savedRows = $dashboardForUser->getRows();
58 foreach ($savedRows as $row)
60 if (isset(
$rows[$row->getGId()]))
62 $row->setWeight(
$rows[$row->getGId()][
'weight']);
68 $dashboardForUser->save();
73 $this->adderror(
new Error(
'No dashboard for current user'));
88 $dashboardForUser = DashboardHelper::getDashboardByKeyForCurrentUser($boardKey);
89 if ($dashboardForUser)
91 $row = DashboardRow::getCurrentUserRowByGId($rowId);
94 return $row->delete();
98 $this->adderror(
new Error(
'No Row with this id'));
104 $this->adderror(
new Error(
'No dashboard for current user'));
adjustWeightsAction($boardKey, $rows)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']