pipicar/modules/brand_models/app.json

499 lines
20 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"module": "pipicar",
"name": "pipicar.brand_models",
"type": "crud",
"title": "Модели автомобилей",
"withHeader": false,
"data": {
"table": "pipi_brand_models",
"pk": "id",
"limit": 25,
"segment": true,
"timestamp": false,
"fields": {
"id": {
"type": "pk"
},
"name": {
"type": "string"
},
"people": {
"type": "string"
},
"actuator": {
"type": "string"
},
"fuel_type": {
"type": "string"
},
"hp": {
"type": "string"
},
"engine_capacity": {
"type": "string"
},
"fuel_tank": {
"type": "string"
},
"year": {
"type": "string"
},
"conditioner": {
"type": "bool"
},
"photo_id": {
"type": "int",
"validation": "nullable|int"
},
"brand_id": {
"type": "foreign",
"table": "pipi_auto_brands",
"foreign": "id",
"display": [
"name"
],
"validation": "required|integer"
},
"equipment_id": {
"type": "foreign",
"table": "pipi_auto_equipment",
"foreign": "id",
"display": [
"name"
],
"validation": "nullable|integer"
},
"pipi_tariffs": {
"type": "subcrud",
"module": "pipicar",
"data": {
"table": "pipi_auto_tariffs",
"pk": "id",
"limit": 10,
"sort_order": "desc",
"sort_field": "id",
"left": "id",
"right": "model_id",
"fields": {
"id": {
"type": "pk"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"default": "dynamic"
},
"day_range_start": {
"type": "int"
},
"day_range_end": {
"type": "int"
},
"base_rate": {
"type": "int"
},
"deposit": {
"type": "int"
}
}
},
"ui": {
"grid": {
"title": "Тарифы",
"component": "App.components.Grid",
"cols": [
{
"name": "id",
"caption": "ИД"
},
{
"name": "name",
"caption": "Название"
},
{
"name": "base_rate",
"caption": "Цена"
}
],
"action": {
"head": [
"add"
],
"row": [
"edit",
"delete"
]
}
},
"forms": {
"add": {
"title": "Добавить тариф",
"component": "App.components.Show",
"form": {
"rows": [
{
"cols": [
{
"size": 4,
"input": {
"name": "name",
"label": "Название тарифа"
}
},
{
"size": 4,
"input": {
"name": "base_rate",
"label": "Базовая стоймость"
}
},
{
"size": 4,
"input": {
"name": "deposit",
"label": "Депозит"
}
}
]
},
{
"cols": [
{
"size": 2,
"input": {
"name": "day_range_start",
"label": "от скольки дней"
}
},
{
"size": 2,
"input": {
"name": "day_range_end",
"label": "до скольки дней"
}
}
]
}
],
"submits": "struct:crud.form.edit.submits"
}
},
"edit": {
"title": "Редактировать тариф",
"component": "App.components.Show",
"form": {
"rows": [
{
"cols": [
{
"size": 4,
"input": {
"name": "name",
"label": "Название тарифа"
}
},
{
"size": 4,
"input": {
"name": "base_rate",
"label": "Базовая стоймость"
}
},
{
"size": 4,
"input": {
"name": "deposit",
"label": "Депозит"
}
}
]
},
{
"cols": [
{
"size": 2,
"input": {
"name": "day_range_start",
"label": "от скольки дней"
}
},
{
"size": 2,
"input": {
"name": "day_range_end",
"label": "до скольки дней"
}
}
]
}
],
"submits": "struct:crud.form.edit.submits"
}
}
}
},
"actions": "struct:crud.actions"
}
}
},
"ui": {
"grid": {
"title": "Модели автомобилей",
"component": "App.components.Grid",
"cols": [
{
"name": "brand_id",
"caption": "Название марки"
},
{
"name": "name",
"caption": "Название модели"
},
{
"name": "year",
"caption": "Год выпуска"
}
],
"action": {
"head": [
"add"
],
"row": [
"edit",
"delete"
]
},
"filter": {
"template": "app.base.crud.filter",
"rows": [
{
"cols": [
{
"size": 6,
"input": {
"name": "name",
"label": "Название марки"
}
}
]
}
]
}
},
"forms": {
"add": {
"title": "Добавление модели",
"template": "app.base.crud.form",
"component": "App.components.Show",
"form": {
"submits": "struct:crud.form.edit.submits",
"rows": [
{
"cols": [
{
"size": 5,
"input": {
"name": "name",
"label": "Название"
}
},
{
"size": 5,
"input": {
"name": "brand_id",
"label": "Марка"
}
},
{
"size": 2,
"input": {
"name": "year",
"label": "Год"
}
},
{
"size": 4,
"input": {
"name": "equipment_id",
"label": "Комплектация"
}
},
{
"size": 2,
"input": {
"name": "people",
"label": "Количество мест"
}
},
{
"size": 2,
"input": {
"name": "actuator",
"label": "Привод"
}
},
{
"size": 2,
"input": {
"name": "fuel_type",
"label": "Тип топлива"
}
},
{
"size": 2,
"input": {
"name": "hp",
"label": "Мощность л.с"
}
},
{
"size": 2,
"input": {
"name": "engine_capacity",
"label": "Объем двигателя"
}
},
{
"size": 2,
"input": {
"name": "fuel_tank",
"label": "Объем топливного бака"
}
},
{
"size": 2,
"input": {
"name": "conditioner",
"label": "Кондиционер"
}
},
{
"size": 12,
"input": {
"name": "photo_id",
"label": "Фото",
"type": "file"
}
}
]
}
]
}
},
"edit": {
"title": "Редактирование модели",
"template": "app.base.crud.form",
"component": "App.components.Show",
"form": {
"rows": [
{
"cols": [
{
"size": 5,
"input": {
"name": "name",
"label": "Название"
}
},
{
"size": 5,
"input": {
"name": "brand_id",
"label": "Марка"
}
},
{
"size": 2,
"input": {
"name": "year",
"label": "Год"
}
},
{
"size": 4,
"input": {
"name": "equipment_id",
"label": "Комплектация"
}
},
{
"size": 2,
"input": {
"name": "people",
"label": "Количество мест"
}
},
{
"size": 2,
"input": {
"name": "actuator",
"label": "Привод"
}
},
{
"size": 2,
"input": {
"name": "fuel_type",
"label": "Тип топлива"
}
},
{
"size": 2,
"input": {
"name": "hp",
"label": "Мощность л.с"
}
},
{
"size": 2,
"input": {
"name": "engine_capacity",
"label": "Объем двигателя"
}
},
{
"size": 2,
"input": {
"name": "fuel_tank",
"label": "Объем топливного бака"
}
},
{
"size": 2,
"input": {
"name": "conditioner",
"label": "Кондиционер"
}
},
{
"size": 12,
"input": {
"name": "photo_id",
"label": "Фото",
"type": "file"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "pipi_tariffs",
"label": ""
}
}
]
}
],
"submits": "struct:crud.form.edit.submits"
}
}
}
},
"actions": "struct:crud.actions"
}