Кузовы

pull/7/head
Rustem 2025-03-27 10:40:46 +05:00
parent 57eedf2cd4
commit ab9013c32a
2 changed files with 52 additions and 2 deletions

View File

@ -213,7 +213,7 @@ class MobileApiController extends Controller
$tariffs = UniModel::model('pipi_auto_tariffs')->where('model_id', $mark->id)->get();
$equipment = UniModel::model('pipi_auto_equipment')->where('id', $mark->equipment_id)->first();
$class = UniModel::model('pipi_auto_classes')->find($mark->class_id);
$bodywork = UniModel::model('pipi_auto_classes')->find($mark->bodywork_id);
$bodywork = UniModel::model('pipi_auto_bodywork')->find($mark->bodywork_id);
$path = null;
if ($mark?->photo_id) {
@ -242,7 +242,7 @@ class MobileApiController extends Controller
'engine_capacity' => $mark?->engine_capacity ?? '1591',
'fuel_tank' => $mark?->fuel_tank ?? '50',
'class' => $class->name ?? 'Эконом',
'bodywork' => $class->name ?? 'Седан',
'bodywork' => $bodywork->name ?? 'Седан',
'conditioner' => $mark?->conditioner,
'photo' => $path,
'tariffs' => $tariffs_new

View File

@ -63,6 +63,24 @@
],
"validation": "nullable|integer"
},
"class_id": {
"type": "foreign",
"table": "pipi_auto_classes",
"foreign": "id",
"display": [
"name"
],
"validation": "nullable|integer"
},
"bodywork_id": {
"type": "foreign",
"table": "pipi_auto_bodywork",
"foreign": "id",
"display": [
"name"
],
"validation": "nullable|integer"
},
"pipi_tariffs": {
"type": "subcrud",
"module": "pipicar",
@ -313,6 +331,22 @@
"label": "Год"
}
},
{
"size": 4,
"input": {
"name": "bodywork_id",
"label": "Кузов",
"readonly": true
}
},
{
"size": 4,
"input": {
"name": "class_id",
"label": "Класс",
"readonly": true
}
},
{
"size": 4,
"input": {
@ -411,6 +445,22 @@
"label": "Год"
}
},
{
"size": 4,
"input": {
"name": "bodywork_id",
"label": "Кузов",
"readonly": true
}
},
{
"size": 4,
"input": {
"name": "class_id",
"label": "Класс",
"readonly": true
}
},
{
"size": 4,
"input": {