api, application, fix
parent
18fffad0d9
commit
5a7c805978
|
|
@ -32,7 +32,8 @@ class PipiCarInstallCommands extends InstallCommand
|
|||
'auto_tariffs', // Тарифы авто
|
||||
'owner_contracts', // Договор Владельца
|
||||
'owners', // Владелец авто
|
||||
'auto' // авто
|
||||
'auto', // авто
|
||||
'applications', //Заявки
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ namespace App\Http\Controllers;
|
|||
|
||||
use A7kz\Platform\Models\UniModel;
|
||||
use A7kz\Platform\Modules\Platform\Segment\Facades\Segment;
|
||||
use App\Modules\applications\Enum\ApplicationStatus;
|
||||
use Exception;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
|
@ -14,7 +17,7 @@ use Mpdf\Tag\Mark;
|
|||
|
||||
class MobileApiController extends Controller
|
||||
{
|
||||
public function getMarks() {
|
||||
public function getMarks(): JsonResponse {
|
||||
$data = [];
|
||||
$marks = UniModel::model('pipi_brand_models')->get();
|
||||
if (!isset($marks)) {
|
||||
|
|
@ -24,13 +27,52 @@ class MobileApiController extends Controller
|
|||
$brand = UniModel::model('pipi_auto_brands')->find($mark->brand_id);
|
||||
$tariffs = UniModel::model('pipi_auto_tariffs')->where('model_id', $mark->id)->first();
|
||||
if ($mark->name != 'Ввод остатков') {
|
||||
$data[$mark->name] = [
|
||||
$tariffs = [
|
||||
'name' => $tariffs?->name,
|
||||
'price' => $tariffs?->base_rate,
|
||||
'min' => $tariffs?->day_range_start,
|
||||
'max' => $tariffs?->day_range_end,
|
||||
];
|
||||
$data[$mark->name . '-' . $mark->year] = [
|
||||
'id' => $mark->id,
|
||||
'brand' => $brand->name,
|
||||
'mark' => $mark->name,
|
||||
'tariffs' => $tariffs?->toArray()
|
||||
'year' => $mark->year,
|
||||
'tariffs' => $tariffs
|
||||
];
|
||||
}
|
||||
}
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function sendApplication(Request $request): JsonResponse {
|
||||
$data = $request->all();
|
||||
$data['started_at'] = Carbon::parse($data['started_at'])?->format('Y-m-d H:i:s');
|
||||
$data['ended_at'] = Carbon::parse($data['ended_at'])?->format('Y-m-d H:i:s');
|
||||
$data['user_id'] = UniModel::model('core_users')
|
||||
->where('email',$data['email'])->first()?->id;
|
||||
$data['car_id'] = null;
|
||||
UniModel::model('pipi_applications')->create([
|
||||
'rent_day' => $data['rent_day'],
|
||||
'started_at' => $data['started_at'],
|
||||
'ended_at' => $data['ended_at'],
|
||||
'user_id' => $data['user_id'],
|
||||
'phone' => $data['phone'],
|
||||
'car_id' => $data['car_id'],
|
||||
'user_name' => $data['name'] ?? null,
|
||||
'user_surname' => $data['surname'] ?? null,
|
||||
'user_email' => $data['email'] ?? null,
|
||||
'status' => ApplicationStatus::pending->value
|
||||
]);
|
||||
|
||||
if (!isset($data['user_id'])) {
|
||||
return response()->json(['status' => 'OK', 'message' => 'Заявка создана, с вами свяжется наш оператор']);
|
||||
}
|
||||
return response()->json(['status' => 'OK', 'message' => 'Заявка создана']);
|
||||
}
|
||||
|
||||
public function getApplications(): JsonResponse
|
||||
{
|
||||
return response()->json(UniModel::model('pipi_applications')->get());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Modules\applications\Enum;
|
||||
|
||||
enum ApplicationStatus: string
|
||||
{
|
||||
case pending = 'pending';
|
||||
case approved = 'approved';
|
||||
case rejected = 'rejected';
|
||||
}
|
||||
|
|
@ -12,9 +12,18 @@ return new class extends Migration
|
|||
{
|
||||
$segments = Segment::listActive();
|
||||
foreach ($segments as $segment) {
|
||||
Schema::connection($segment->connector)->create('pipi_auto_colors', static function (Blueprint $table) {
|
||||
Schema::connection($segment->connector)->create('pipi_applications', static function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable()->comment('Наименование');
|
||||
$table->unsignedBigInteger('car_id')->nullable();
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->integer('rent_day')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->dateTime('started_at')->nullable();
|
||||
$table->dateTime('ended_at')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('user_name')->nullable();
|
||||
$table->string('user_surname')->nullable();
|
||||
$table->string('user_email')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,10 +25,19 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
{
|
||||
$segments = Segment::listActive();
|
||||
foreach ($segments as $segment) {
|
||||
if (!Schema::connection($segment->connector)->hasTable('pipi_auto_colors')) {
|
||||
Schema::connection($segment->connector)->create('pipi_auto_colors', static function (Blueprint $table) {
|
||||
if (!Schema::connection($segment->connector)->hasTable('pipi_applications')) {
|
||||
Schema::connection($segment->connector)->create('pipi_applications', static function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable()->comment('Наименование');
|
||||
$table->unsignedBigInteger('car_id')->nullable();
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->integer('rent_day')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->dateTime('started_at')->nullable();
|
||||
$table->dateTime('ended_at')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('user_name')->nullable();
|
||||
$table->string('user_surname')->nullable();
|
||||
$table->string('user_email')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
|
||||
#[NoReturn] private function seed(): void
|
||||
{
|
||||
$seed = Storage::disk('pipicar_crm')->get('auto/seeds/seed.json');
|
||||
$seed = Storage::disk('pipicar_crm')->get('auto/seeds/seeds.json');
|
||||
|
||||
if (str_starts_with($seed, "\xef\xbb\xbf")) {
|
||||
$seed = substr($seed, 3); // Удаляем первые 3 байта
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
public function update($module_name, $module_version): void
|
||||
{
|
||||
$this->upgrade();
|
||||
$this->seed();
|
||||
}
|
||||
|
||||
private function upgrade(): void
|
||||
|
|
@ -43,4 +44,14 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function seed()
|
||||
{
|
||||
$seed = Storage::disk('pipicar_crm')->get('auto_tariffs/seeds/seed.json');
|
||||
|
||||
$data = json_decode($seed, true);
|
||||
foreach ($data as $item) {
|
||||
dd(str_contains($item));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,444 @@
|
|||
[
|
||||
{
|
||||
"model": "Huyndai Accent",
|
||||
"manufacture_year": 2015,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 14000,
|
||||
"rate_nov_apr": 14000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 13000,
|
||||
"rate_nov_apr": 13000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 11000,
|
||||
"rate_nov_apr": 12000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 10000,
|
||||
"rate_nov_apr": 11000,
|
||||
"deposit": 30000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "KIA RIO",
|
||||
"manufacture_year": 2015,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 14000,
|
||||
"rate_nov_apr": 14000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 13000,
|
||||
"rate_nov_apr": 13000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 12000,
|
||||
"rate_nov_apr": 12000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 11000,
|
||||
"rate_nov_apr": 11000,
|
||||
"deposit": 30000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Accent",
|
||||
"manufacture_year": "2017 - 2019",
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 16000,
|
||||
"rate_nov_apr": 15000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 15000,
|
||||
"rate_nov_apr": 13000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 14000,
|
||||
"rate_nov_apr": 12000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 13000,
|
||||
"rate_nov_apr": 10000,
|
||||
"deposit": 30000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Toyota Camry 50",
|
||||
"manufacture_year": 2014,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 20000,
|
||||
"rate_nov_apr": 21000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 18000,
|
||||
"rate_nov_apr": 19000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 16000,
|
||||
"rate_nov_apr": 17000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 15000,
|
||||
"rate_nov_apr": 16000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Toyota Camry 55",
|
||||
"manufacture_year": 2016,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 22000,
|
||||
"rate_nov_apr": 20000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 20000,
|
||||
"rate_nov_apr": 18000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 18000,
|
||||
"rate_nov_apr": 16000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 17000,
|
||||
"rate_nov_apr": 15000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Accent",
|
||||
"manufacture_year": 2021,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 17000,
|
||||
"rate_nov_apr": 16000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 16000,
|
||||
"rate_nov_apr": 14000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 15000,
|
||||
"rate_nov_apr": 13000,
|
||||
"deposit": 30000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 14000,
|
||||
"rate_nov_apr": 12000,
|
||||
"deposit": 30000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Accent",
|
||||
"manufacture_year": 2023,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 18000,
|
||||
"rate_nov_apr": 18000,
|
||||
"deposit": 40000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 17000,
|
||||
"rate_nov_apr": 16000,
|
||||
"deposit": 40000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 16000,
|
||||
"rate_nov_apr": 14000,
|
||||
"deposit": 40000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 15000,
|
||||
"rate_nov_apr": 13000,
|
||||
"deposit": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Elantra",
|
||||
"manufacture_year": 2021,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 21000,
|
||||
"rate_nov_apr": 20000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 19000,
|
||||
"rate_nov_apr": 18000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 17000,
|
||||
"rate_nov_apr": 17000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 16000,
|
||||
"rate_nov_apr": 16000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Elantra",
|
||||
"manufacture_year": "2022 - 2023",
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 22000,
|
||||
"rate_nov_apr": 21000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 20000,
|
||||
"rate_nov_apr": 20000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 18000,
|
||||
"rate_nov_apr": 18000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 17000,
|
||||
"rate_nov_apr": 17000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Elantra",
|
||||
"manufacture_year": 2024,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 24000,
|
||||
"rate_nov_apr": 21000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 22000,
|
||||
"rate_nov_apr": 20000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 20000,
|
||||
"rate_nov_apr": 18000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 18000,
|
||||
"rate_nov_apr": 17000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Sonata",
|
||||
"manufacture_year": "2022 - 2023",
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 30000,
|
||||
"rate_nov_apr": 30000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 28000,
|
||||
"rate_nov_apr": 28000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 26000,
|
||||
"rate_nov_apr": 26000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 24000,
|
||||
"rate_nov_apr": 24000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "Huyndai Tucson",
|
||||
"manufacture_year": "2023 - 2024",
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 32000,
|
||||
"rate_nov_apr": 32000,
|
||||
"deposit": 60000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 30000,
|
||||
"rate_nov_apr": 30000,
|
||||
"deposit": 60000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 27000,
|
||||
"rate_nov_apr": 27000,
|
||||
"deposit": 60000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 26000,
|
||||
"rate_nov_apr": 25000,
|
||||
"deposit": 60000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"model": "KIA K5",
|
||||
"manufacture_year": 2021,
|
||||
"rental_periods": [
|
||||
{
|
||||
"min_days": 1,
|
||||
"max_days": 2,
|
||||
"rate_may_oct": 30000,
|
||||
"rate_nov_apr": 28000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 3,
|
||||
"max_days": 5,
|
||||
"rate_may_oct": 28000,
|
||||
"rate_nov_apr": 26000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 6,
|
||||
"max_days": 15,
|
||||
"rate_may_oct": 26000,
|
||||
"rate_nov_apr": 24000,
|
||||
"deposit": 50000
|
||||
},
|
||||
{
|
||||
"min_days": 15,
|
||||
"max_days": 30,
|
||||
"rate_may_oct": 24000,
|
||||
"rate_nov_apr": 23000,
|
||||
"deposit": 50000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -47,7 +47,8 @@
|
|||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"default": "dynamic"
|
||||
},
|
||||
"day_range_start": {
|
||||
"type": "int"
|
||||
|
|
@ -75,10 +76,6 @@
|
|||
"name": "name",
|
||||
"caption": "Название"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"caption": "Тип"
|
||||
},
|
||||
{
|
||||
"name": "base_rate",
|
||||
"caption": "Цена"
|
||||
|
|
@ -111,15 +108,15 @@
|
|||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "type",
|
||||
"label": "Тип тарифа"
|
||||
"name": "base_rate",
|
||||
"label": "Базовая стоймость"
|
||||
}
|
||||
},
|
||||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "base_rate",
|
||||
"label": "Базовая стоймость"
|
||||
"name": "deposit",
|
||||
"label": "Депозит"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -139,13 +136,6 @@
|
|||
"name": "day_range_end",
|
||||
"label": "до скольки дней"
|
||||
}
|
||||
},
|
||||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "deposit",
|
||||
"label": "Депозит"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -169,15 +159,15 @@
|
|||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "type",
|
||||
"label": "Тип тарифа"
|
||||
"name": "base_rate",
|
||||
"label": "Базовая стоймость"
|
||||
}
|
||||
},
|
||||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "base_rate",
|
||||
"label": "Базовая стоймость"
|
||||
"name": "deposit",
|
||||
"label": "Депозит"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -197,13 +187,6 @@
|
|||
"name": "day_range_end",
|
||||
"label": "до скольки дней"
|
||||
}
|
||||
},
|
||||
{
|
||||
"size": 4,
|
||||
"input": {
|
||||
"name": "deposit",
|
||||
"label": "Депозит"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
|
||||
#[NoReturn] private function seed(): void
|
||||
{
|
||||
$seed = Storage::disk('pipicar_crm')->get('owner_contracts/seeds/seed.json');
|
||||
$seed = Storage::disk('pipicar_crm')->get('owner_contracts/seeds/seeds.json');
|
||||
|
||||
if (str_starts_with($seed, "\xef\xbb\xbf")) {
|
||||
$seed = substr($seed, 3); // Удаляем первые 3 байта
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
|
|||
|
||||
private function seed(): void
|
||||
{
|
||||
$seed = Storage::disk('pipicar_crm')->get('owners/seeds/seed.json');
|
||||
$seed = Storage::disk('pipicar_crm')->get('owners/seeds/seeds.json');
|
||||
|
||||
if (str_starts_with($seed, "\xef\xbb\xbf")) {
|
||||
$seed = substr($seed, 3); // Удаляем первые 3 байта
|
||||
|
|
|
|||
|
|
@ -24,4 +24,6 @@ Route::prefix('1c')->group(function () {
|
|||
|
||||
Route::prefix('mobile')->group(function () {
|
||||
Route::get('getMarks', [MobileApiController::class, 'getMarks']);
|
||||
Route::post('sendApplication', [MobileApiController::class, 'sendApplication']);
|
||||
Route::post('getApplications', [MobileApiController::class, 'getApplications']);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue