let test = Array.from(document.querySelectorAll(".featured-item"));
let regNumeric = /[^0-9\.]/g;
test.forEach(item => {
let button = item.querySelector("button.btn").dataset.id;
let amount = parseFloat(item.querySelector("div.item-amount").innerHTML.replace(regNumeric, ''));
let discount = item.querySelector("span.label") ? parseFloat(item.querySelector("span.label").innerHTML.replace(regNumeric, '')) : 0;
console.log({ id: button, amount, discount });
});
return ArrayHelper::map(Positions::find()->all(), 'id', 'title');
[
'attribute' => 'position_id',
'value' => 'position.title',
'label' => 'Должность',
'filterType' => GridView::FILTER_SELECT2,
'filter' => Positions::find()->select('title')->indexBy('id')->asArray(),
],