Исправления
This commit is contained in:
parent
b08f7f7d0a
commit
913a67d400
|
@ -140,7 +140,6 @@ class ProfileController extends Controller
|
|||
}
|
||||
|
||||
// Инициализация
|
||||
$delivery_from_terminal_list = $model->genListTerminalsFrom();
|
||||
$delivery_to_terminal_list = $model->genListTerminalsTo();
|
||||
$import_oem_list = $model->genListOem(Supply::searchByAccount(select: 'supply.onec["ЗначенияСвойств"]'));
|
||||
$array_unshift_in_start = function (array &$array, string|int $key, mixed $value) {
|
||||
|
@ -161,12 +160,10 @@ class ProfileController extends Controller
|
|||
};
|
||||
|
||||
// Сортировка по алфавиту
|
||||
asort($delivery_from_terminal_list);
|
||||
asort($delivery_to_terminal_list);
|
||||
asort($import_oem_list);
|
||||
|
||||
// Перемещение в начало массива значения "Выберите"
|
||||
$array_write_default_value($delivery_from_terminal_list);
|
||||
$array_write_default_value($delivery_to_terminal_list);
|
||||
$array_write_default_value($import_oem_list);
|
||||
|
||||
|
@ -179,7 +176,6 @@ class ProfileController extends Controller
|
|||
'main' => $this->renderPartial('index', compact(
|
||||
'model',
|
||||
'sidebar',
|
||||
'delivery_from_terminal_list',
|
||||
'delivery_to_terminal_list',
|
||||
'import_oem_list',
|
||||
'panel'
|
||||
|
@ -192,7 +188,6 @@ class ProfileController extends Controller
|
|||
return $this->render('index', compact(
|
||||
'model',
|
||||
'sidebar',
|
||||
'delivery_from_terminal_list',
|
||||
'delivery_to_terminal_list',
|
||||
'import_oem_list',
|
||||
'panel'
|
||||
|
|
|
@ -30,7 +30,6 @@ if (
|
|||
<?php if (!yii::$app->user->isGuest) : ?>
|
||||
<label class="btn button_white mb-0 mr-2" for="profile_panel_settings_account">Аккаунт</label>
|
||||
<?php if (yii::$app->user->identity->agnt) : ?>
|
||||
<label class="btn button_white mb-0 mr-2" for="profile_panel_settings_company">Компания</label>
|
||||
<label class="btn button_white mb-0" for="profile_panel_settings_import">Импорт</label>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
@ -69,37 +68,6 @@ if (
|
|||
</div>
|
||||
|
||||
<?php if (yii::$app->user->identity->agnt) : ?>
|
||||
<input type="radio" id="profile_panel_settings_company" name="main_panel" <?= $panel === 'profile_panel_settings_company' ? 'checked' : null ?> />
|
||||
<div class="col">
|
||||
<h5>Доставка</h5>
|
||||
<div class="dropdown-divider mb-3"></div>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'id' => 'form_profile_settings',
|
||||
'action' => false,
|
||||
'fieldConfig' => [
|
||||
'template' => '{label}{input}',
|
||||
],
|
||||
'options' => [
|
||||
'onsubmit' => 'return false;'
|
||||
]
|
||||
]);
|
||||
|
||||
// Инициализация
|
||||
$model ?? $model = yii::$app->user->identity;
|
||||
$delivery_from_terminal_list ?? $delivery_from_terminal_list = ['Нет данных'];
|
||||
?>
|
||||
|
||||
<?= $form->field($model, 'opts[delivery_from_terminal]', ['options' => ['class' => "mb-1"]])
|
||||
->dropDownList($delivery_from_terminal_list, [
|
||||
'onChange' => 'page_profile_settings(this.parentElement.parentElement, \'profile_panel_settings_company\')',
|
||||
'disabled' => count($delivery_from_terminal_list) <= 1
|
||||
])->label('Терминал'); ?>
|
||||
|
||||
<small class="d-block mb-1">Выберите терминал <b><u>отправителя</u></b> для <b>рассчёта доставки</b></small>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="profile_panel_settings_import" name="main_panel" <?= $panel === 'profile_panel_settings_import' ? 'checked' : null ?> />
|
||||
<div class="col">
|
||||
<h5>Параметры 1C</h5>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
Reference in New Issue