Compare commits
35 Commits
8c381ba1ee
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 75be0410ad | |||
| 18b652902f | |||
| 73bacb864f | |||
| ca5b6402ea | |||
| 5deccec8ba | |||
| 1f2327c2d9 | |||
| 9d348f3e3a | |||
| 48d96f32c1 | |||
| ea2f24f0a4 | |||
| 5423f80fe6 | |||
| 41f29177b5 | |||
| 0c38b4a8c9 | |||
| 3b10c41c36 | |||
| 48f7f784b9 | |||
| 4d0f9b6309 | |||
| 551dcb390c | |||
| 987f498ec9 | |||
| a464a13ebd | |||
| fe248c0994 | |||
| 16f44e3a45 | |||
| d360a45e91 | |||
| 855b6d542b | |||
| 9aeb9a7b8a | |||
| d706eb9a87 | |||
| bdb49281b8 | |||
| 50e0f1b8ef | |||
| 3d8edf0b39 | |||
| 2d8e1f95ff | |||
| 4d5098a921 | |||
| fee24d1bce | |||
| edf15ae285 | |||
| ecaf8790dc | |||
| c363c76f31 | |||
| c2265a155d | |||
| e68efae28a |
4
.cache/fontconfig/CACHEDIR.TAG
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Signature: 8a477f597d28d172789f06886806bc55
|
||||||
|
# This file is a cache directory tag created by fontconfig.
|
||||||
|
# For information about cache directory tags, see:
|
||||||
|
# http://www.brynosaurus.com/cachedir/
|
||||||
7
.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
storage/app/public/
|
||||||
|
storage/logs/
|
||||||
|
storage/framework/
|
||||||
|
node_modules/
|
||||||
|
vendor/
|
||||||
|
.git/
|
||||||
|
postgres/
|
||||||
4
.gitignore
vendored
@@ -8,7 +8,6 @@ bootstrap/compiled.php
|
|||||||
app/storage/
|
app/storage/
|
||||||
|
|
||||||
# Laravel 5 & Lumen specific
|
# Laravel 5 & Lumen specific
|
||||||
public/storage
|
|
||||||
public/hot
|
public/hot
|
||||||
|
|
||||||
# Laravel 5 & Lumen specific with changed public path
|
# Laravel 5 & Lumen specific with changed public path
|
||||||
@@ -24,8 +23,9 @@ Homestead.json
|
|||||||
composer.lock
|
composer.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
/.idea
|
/.idea
|
||||||
/storage/
|
|
||||||
/storage/logs/
|
/storage/logs/
|
||||||
|
/storage/framework/
|
||||||
|
/storage/app/private/
|
||||||
/.vscode/
|
/.vscode/
|
||||||
/public/images/
|
/public/images/
|
||||||
/postgres/
|
/postgres/
|
||||||
|
|||||||
BIN
Screenshot 2026-04-06 at 17.32.39.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
@@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libzip-dev \
|
libzip-dev \
|
||||||
zip unzip \
|
zip unzip \
|
||||||
git \
|
git \
|
||||||
|
ghostscript \
|
||||||
libmagickwand-dev --no-install-recommends && \
|
libmagickwand-dev --no-install-recommends && \
|
||||||
docker-php-ext-install bcmath gd zip && \
|
docker-php-ext-install bcmath gd zip && \
|
||||||
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
|
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
|
||||||
@@ -19,6 +20,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY _docker/app/php.ini /usr/local/etc/php/conf.d/php.ini
|
COPY _docker/app/php.ini /usr/local/etc/php/conf.d/php.ini
|
||||||
|
COPY _docker/app/www.conf /usr/local/etc/php-fpm.d/www.conf
|
||||||
|
|
||||||
COPY app /var/www/app
|
COPY app /var/www/app
|
||||||
COPY bootstrap /var/www/bootstrap
|
COPY bootstrap /var/www/bootstrap
|
||||||
@@ -62,4 +64,9 @@ RUN mkdir -p /var/www/storage/app/public \
|
|||||||
chmod 755 -R /var/www && \
|
chmod 755 -R /var/www && \
|
||||||
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
|
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
|
||||||
|
|
||||||
|
COPY _docker/app/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
|||||||
16
_docker/app/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
cd /var/www
|
||||||
|
|
||||||
|
# Ensure storage symlink exists (recreate if missing or broken)
|
||||||
|
if [ ! -L /var/www/public/storage ] || [ ! -e /var/www/public/storage ]; then
|
||||||
|
rm -rf /var/www/public/storage
|
||||||
|
ln -sfn /var/www/storage/app/public /var/www/public/storage
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cache config (ignore errors)
|
||||||
|
php artisan config:cache --no-ansi 2>/dev/null || true
|
||||||
|
|
||||||
|
exec php-fpm
|
||||||
9
_docker/app/www.conf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[www]
|
||||||
|
user = www-data
|
||||||
|
group = www-data
|
||||||
|
listen = 9000
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 5
|
||||||
|
pm.start_servers = 2
|
||||||
|
pm.min_spare_servers = 1
|
||||||
|
pm.max_spare_servers = 3
|
||||||
@@ -5,6 +5,12 @@ server {
|
|||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
client_max_body_size 1024M;
|
client_max_body_size 1024M;
|
||||||
|
|
||||||
|
disable_symlinks off;
|
||||||
|
|
||||||
|
location /storage/ {
|
||||||
|
alias /var/www/storage/app/public/;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri /index.php?$query_string;
|
try_files $uri /index.php?$query_string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,22 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use App\Http\Controllers\QrController;
|
||||||
|
use setasign\Fpdi\Fpdi;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class AutoController extends Controller
|
class AutoController extends Controller
|
||||||
{
|
{
|
||||||
|
private function parseDate(?string $date): ?string
|
||||||
|
{
|
||||||
|
if (!$date) return null;
|
||||||
|
try {
|
||||||
|
return Carbon::createFromFormat('d.m.Y', $date)->format('Y-m-d');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function ordersQuery()
|
private function ordersQuery()
|
||||||
{
|
{
|
||||||
return DB::table('auto_orders as o')
|
return DB::table('auto_orders as o')
|
||||||
@@ -67,29 +80,137 @@ class AutoController extends Controller
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$concerns = DB::table('concerns')->get();
|
$concerns = DB::table('concerns')->get();
|
||||||
$purposes = DB::table('purposes')->get();
|
$purposeCases = DB::table('purposes')->get();
|
||||||
$regions = DB::table('regions')->get();
|
$regions = DB::table('regions')->get();
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
return view('auto.create', compact('concerns', 'purposes', 'regions', 'appraisers'));
|
$dillers = DB::table('users')->whereRaw('LOWER(role) = ?', ['diller'])->where('status', 'active')->get();
|
||||||
|
return view('auto.create', compact('concerns', 'purposeCases', 'regions', 'appraisers', 'dillers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
return redirect()->route('auto.index');
|
// Sanitize cost before validation
|
||||||
|
if ($request->has('cost')) {
|
||||||
|
$request->merge([
|
||||||
|
'cost' => str_replace(',', '', $request->cost)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'number' => 'required',
|
||||||
|
'purpose_id' => 'required',
|
||||||
|
'ordered_customer' => 'required',
|
||||||
|
'customer_type' => 'required|in:physical,juridical',
|
||||||
|
'owner_type' => 'required|in:physical,juridical',
|
||||||
|
'car_category' => 'required',
|
||||||
|
'car_mark' => 'required',
|
||||||
|
'cost' => 'required|numeric',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$id = DB::table('auto_orders')->insertGetId([
|
||||||
|
'number' => $request->number,
|
||||||
|
'status' => $request->status ?? 'draft',
|
||||||
|
'purpose_id' => $request->purpose_id,
|
||||||
|
'diller_id' => $request->diller_id ?: null,
|
||||||
|
'ordered_customer' => $request->ordered_customer,
|
||||||
|
'ordered_customer_phone' => $request->ordered_customer_phone,
|
||||||
|
'customer_type' => $request->customer_type,
|
||||||
|
'customer_last_name' => $request->customer_last_name,
|
||||||
|
'customer_first_name' => $request->customer_first_name,
|
||||||
|
'customer_patronymic' => $request->customer_patronymic,
|
||||||
|
'customer_company' => $request->customer_company,
|
||||||
|
'owner_type' => $request->owner_type,
|
||||||
|
'owner_last_name' => $request->owner_last_name,
|
||||||
|
'owner_first_name' => $request->owner_first_name,
|
||||||
|
'owner_patronymic' => $request->owner_patronymic,
|
||||||
|
'owner_company' => $request->owner_company,
|
||||||
|
'car_category' => $request->car_category,
|
||||||
|
'car_mark' => $request->car_mark,
|
||||||
|
'color' => $request->color,
|
||||||
|
'made_date' => $this->parseDate($request->made_date),
|
||||||
|
'body' => $request->body,
|
||||||
|
'engine' => $request->engine,
|
||||||
|
'car_number' => $request->car_number,
|
||||||
|
'type' => $request->type,
|
||||||
|
'shassi' => $request->shassi,
|
||||||
|
'tech_passport' => $request->tech_passport,
|
||||||
|
'tech_given_date' => $this->parseDate($request->tech_given_date),
|
||||||
|
'tech_given_whom' => $request->tech_given_whom,
|
||||||
|
'cost' => (int)str_replace(',', '', $request->cost ?? 0),
|
||||||
|
'note' => $request->note,
|
||||||
|
'created_at' => $this->parseDate($request->created_at) ?? now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
QrController::generateQr($id, 'auto_');
|
||||||
|
return redirect()->route('auto.show', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$order = DB::table('auto_orders')->find($id);
|
$order = DB::table('auto_orders')->find($id);
|
||||||
$concerns = DB::table('concerns')->get();
|
$concerns = DB::table('concerns')->get();
|
||||||
$purposes = DB::table('purposes')->get();
|
$purposeCases = DB::table('purposes')->get();
|
||||||
$regions = DB::table('regions')->get();
|
$regions = DB::table('regions')->get();
|
||||||
return view('auto.edit', compact('order', 'concerns', 'purposes', 'regions'));
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
|
$dillers = DB::table('users')->whereRaw('LOWER(role) = ?', ['diller'])->where('status', 'active')->get();
|
||||||
|
return view('auto.edit', compact('order', 'concerns', 'purposeCases', 'regions', 'appraisers', 'dillers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
return redirect()->route('auto.index');
|
// Sanitize cost before validation
|
||||||
|
if ($request->has('cost')) {
|
||||||
|
$request->merge([
|
||||||
|
'cost' => str_replace(',', '', $request->cost)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'number' => 'required',
|
||||||
|
'purpose_id' => 'required',
|
||||||
|
'ordered_customer' => 'required',
|
||||||
|
'customer_type' => 'required|in:physical,juridical',
|
||||||
|
'owner_type' => 'required|in:physical,juridical',
|
||||||
|
'car_category' => 'required',
|
||||||
|
'car_mark' => 'required',
|
||||||
|
'cost' => 'required|numeric',
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('auto_orders')->where('id', $id)->update([
|
||||||
|
'number' => $request->number,
|
||||||
|
'status' => $request->status,
|
||||||
|
'purpose_id' => $request->purpose_id,
|
||||||
|
'diller_id' => $request->diller_id ?: null,
|
||||||
|
'ordered_customer' => $request->ordered_customer,
|
||||||
|
'ordered_customer_phone' => $request->ordered_customer_phone,
|
||||||
|
'customer_type' => $request->customer_type,
|
||||||
|
'customer_last_name' => $request->customer_last_name,
|
||||||
|
'customer_first_name' => $request->customer_first_name,
|
||||||
|
'customer_patronymic' => $request->customer_patronymic,
|
||||||
|
'customer_company' => $request->customer_company,
|
||||||
|
'owner_type' => $request->owner_type,
|
||||||
|
'owner_last_name' => $request->owner_last_name,
|
||||||
|
'owner_first_name' => $request->owner_first_name,
|
||||||
|
'owner_patronymic' => $request->owner_patronymic,
|
||||||
|
'owner_company' => $request->owner_company,
|
||||||
|
'car_category' => $request->car_category,
|
||||||
|
'car_mark' => $request->car_mark,
|
||||||
|
'color' => $request->color,
|
||||||
|
'made_date' => $this->parseDate($request->made_date),
|
||||||
|
'body' => $request->body,
|
||||||
|
'engine' => $request->engine,
|
||||||
|
'car_number' => $request->car_number,
|
||||||
|
'type' => $request->type,
|
||||||
|
'shassi' => $request->shassi,
|
||||||
|
'tech_passport' => $request->tech_passport,
|
||||||
|
'tech_given_date' => $this->parseDate($request->tech_given_date),
|
||||||
|
'tech_given_whom' => $request->tech_given_whom,
|
||||||
|
'cost' => (int)str_replace(',', '', $request->cost ?? 0),
|
||||||
|
'note' => $request->note,
|
||||||
|
'created_at' => $this->parseDate($request->created_at) ?? now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
return redirect()->route('auto.show', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($order)
|
public function show($order)
|
||||||
@@ -117,11 +238,15 @@ class AutoController extends Controller
|
|||||||
$order->dillerUser = $dillerUser;
|
$order->dillerUser = $dillerUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
$members = DB::table('order_members')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
$members = DB::table('order_members as om')
|
||||||
|
->leftJoin('users as u', 'u.id', '=', 'om.user_id')
|
||||||
|
->select('om.*', 'u.name', 'u.avatar', 'u.phone', 'u.role')
|
||||||
|
->where('om.order_id', $order->id ?? 0)->where('om.order_type', 'auto_')->get();
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
$isAppraisers = $members->where('user_id', auth()->id())->count() > 0;
|
$isAppraisers = $members->where('user_id', auth()->id())->count() > 0;
|
||||||
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
||||||
return view('auto.show', compact('order', 'members', 'appraisers', 'isAppraisers', 'files'));
|
$conclusions = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'conclusion_')->get();
|
||||||
|
return view('auto.show', compact('order', 'members', 'appraisers', 'isAppraisers', 'files', 'conclusions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showActivities($order)
|
public function showActivities($order)
|
||||||
@@ -134,20 +259,62 @@ class AutoController extends Controller
|
|||||||
public function showTeam($order)
|
public function showTeam($order)
|
||||||
{
|
{
|
||||||
$order = DB::table('auto_orders')->find($order);
|
$order = DB::table('auto_orders')->find($order);
|
||||||
$members = DB::table('order_members')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
$members = DB::table('order_members as om')
|
||||||
|
->leftJoin('users as u', 'u.id', '=', 'om.user_id')
|
||||||
|
->select('om.*', 'u.name', 'u.avatar', 'u.phone', 'u.role')
|
||||||
|
->where('om.order_id', $order->id ?? 0)->where('om.order_type', 'auto_')->get()
|
||||||
|
->map(function ($member) {
|
||||||
|
$member->started = DB::table('order_members')->where('user_id', $member->user_id)->count();
|
||||||
|
$member->finished = 0; // Defaulting for now
|
||||||
|
$member->approved = 0;
|
||||||
|
$member->rejected = 0;
|
||||||
|
return $member;
|
||||||
|
});
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
return view('auto.show-team', compact('order', 'members', 'appraisers'));
|
return view('auto.show-team', compact('order', 'members', 'appraisers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showDocuments($order)
|
public function showDocuments($order, Request $request)
|
||||||
{
|
{
|
||||||
$order = DB::table('auto_orders')->find($order);
|
$order = DB::table('auto_orders')->find($order);
|
||||||
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
$type = $request->get('type', 'ALL');
|
||||||
return view('auto.show-documents', compact('order', 'files'));
|
$filesQuery = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_');
|
||||||
|
if ($type !== 'ALL') {
|
||||||
|
$filesQuery->where('type', $type);
|
||||||
|
}
|
||||||
|
$files = $filesQuery->paginate(20)->withQueryString();
|
||||||
|
$allFiles = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'auto_')->get();
|
||||||
|
$countDocs = $allFiles->whereIn('type', ['passport_customer', 'certificate', 'appraiser_certificate', 'insurance_policy', 'participate_certificate'])->count();
|
||||||
|
$countMediaFiles = $allFiles->whereIn('type', ['object_photo', 'object_files', 'compares'])->count();
|
||||||
|
$otherFiles = $allFiles->where('type', 'additional')->count();
|
||||||
|
$sizeInStorage = $allFiles->sum('size_in_bytes');
|
||||||
|
return view('auto.show-documents', compact('order', 'files', 'type', 'countDocs', 'countMediaFiles', 'otherFiles', 'sizeInStorage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orderClone($id)
|
public function orderClone($id)
|
||||||
{
|
{
|
||||||
return redirect()->route('auto.index');
|
return redirect()->route('auto.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generatePdf($id)
|
||||||
|
{
|
||||||
|
// If uploaded conclusion exists — serve it directly
|
||||||
|
$conclusionFile = DB::table('files')
|
||||||
|
->where('order_id', $id)
|
||||||
|
->where('order_type', 'conclusion_')
|
||||||
|
->orderByDesc('created_at')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($conclusionFile) {
|
||||||
|
$path = storage_path('app/public' . str_replace('/storage', '', $conclusionFile->path));
|
||||||
|
if (file_exists($path)) {
|
||||||
|
return response()->file($path, [
|
||||||
|
'Content-Type' => 'application/pdf',
|
||||||
|
'Content-Disposition' => 'attachment; filename="' . $conclusionFile->name . '.pdf"',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abort(404, 'Xulosa fayli topilmadi');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,20 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class BonusController extends Controller
|
class BonusController extends Controller
|
||||||
{
|
{
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$size = $request->get('size', 20);
|
$size = $request->get('size', 20);
|
||||||
$bonuses = DB::table('bonuses')->orderByDesc('id')->paginate($size);
|
$rawBonuses = DB::table('bonuses')->orderByDesc('id')->paginate($size)->withQueryString();
|
||||||
|
$bonuses = $rawBonuses->through(function ($b) {
|
||||||
|
$b->appraiser = $b->appraiser_id ? DB::table('users')->select('id', 'name', 'phone')->find($b->appraiser_id) : null;
|
||||||
|
$table = ($b->order_type ?? '') === 'auto_' ? 'auto_orders' : 'estate_orders';
|
||||||
|
$b->order = $b->order_id ? DB::table($table)->select('id', 'number')->find($b->order_id) : null;
|
||||||
|
return $b;
|
||||||
|
});
|
||||||
$bonus = null;
|
$bonus = null;
|
||||||
return view('bonus.index', compact('bonuses', 'bonus', 'size'));
|
return view('bonus.index', compact('bonuses', 'bonus', 'size'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,21 +3,202 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use setasign\Fpdi\Fpdi;
|
||||||
|
use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
||||||
|
|
||||||
class ConclusionController extends Controller
|
class ConclusionController extends Controller
|
||||||
{
|
{
|
||||||
public function create($id, $type)
|
public function create($id, $type)
|
||||||
{
|
{
|
||||||
return view('conclusion.create', compact('id', 'type'));
|
// type is enum name: 'AUTO' or 'ESTATE'
|
||||||
|
$orderType = $type === 'AUTO' ? 'auto_' : 'estate_';
|
||||||
|
$table = $type === 'AUTO' ? 'auto_orders' : 'estate_orders';
|
||||||
|
|
||||||
|
$order = DB::table($table . ' as o')
|
||||||
|
->selectRaw('o.*, o.ordered_customer as customer, CONCAT_WS(\' \', o.owner_last_name, o.owner_first_name, o.owner_patronymic) as owner')
|
||||||
|
->where('o.id', $id)->first();
|
||||||
|
|
||||||
|
if ($order) {
|
||||||
|
$dillerUser = $order->diller_id ? DB::table('users')->find($order->diller_id) : null;
|
||||||
|
$order->diller = $dillerUser->name ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('conclusion.add', compact('id', 'type', 'order'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
return redirect()->back();
|
$orderId = $request->input('order_id');
|
||||||
|
$orderType = $request->input('order_type'); // 'AUTO' or 'ESTATE'
|
||||||
|
$dbType = $orderType === 'AUTO' ? 'auto_' : 'estate_';
|
||||||
|
$table = $orderType === 'AUTO' ? 'auto_orders' : 'estate_orders';
|
||||||
|
|
||||||
|
// Update order prices
|
||||||
|
$updateData = ['updated_at' => now()];
|
||||||
|
if ($request->filled('object_price')) {
|
||||||
|
$updateData['object_price'] = preg_replace('/\D/', '', $request->object_price);
|
||||||
|
}
|
||||||
|
if ($request->filled('price')) {
|
||||||
|
$updateData['price'] = preg_replace('/\D/', '', $request->price);
|
||||||
|
}
|
||||||
|
DB::table($table)->where('id', $orderId)->update($updateData);
|
||||||
|
|
||||||
|
// Create debit if is_diller = yes
|
||||||
|
if ($request->input('is_diller') === 'yes') {
|
||||||
|
$order = DB::table($table)->find($orderId);
|
||||||
|
DB::table('debits')->insert([
|
||||||
|
'order_id' => $orderId,
|
||||||
|
'order_type' => $dbType,
|
||||||
|
'appraiser_id' => auth()->id(),
|
||||||
|
'cost' => $order->cost ?? 0,
|
||||||
|
'status' => 'nopaid',
|
||||||
|
'expired' => $request->input('expired'),
|
||||||
|
'customer' => $order->ordered_customer ?? '',
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle PDF file upload with QR watermark
|
||||||
|
if ($request->hasFile('file')) {
|
||||||
|
$file = $request->file('file');
|
||||||
|
$ext = strtolower($file->getClientOriginalExtension());
|
||||||
|
$name = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);
|
||||||
|
$size = $file->getSize();
|
||||||
|
|
||||||
|
$dir = 'public/attachments/' . $dbType . $orderId;
|
||||||
|
Storage::makeDirectory($dir);
|
||||||
|
|
||||||
|
$tmpPath = $file->getPathname();
|
||||||
|
$outputName = Str::uuid() . '.pdf';
|
||||||
|
$outputPath = storage_path('app/' . $dir . '/' . $outputName);
|
||||||
|
|
||||||
|
if ($ext === 'pdf') {
|
||||||
|
// Add QR watermark to PDF
|
||||||
|
try {
|
||||||
|
$qrPath = storage_path('app/public/attachments/' . $dbType . $orderId . '/qr.png');
|
||||||
|
if (!file_exists($qrPath)) {
|
||||||
|
Storage::makeDirectory('public/attachments/' . $dbType . $orderId);
|
||||||
|
$cleanType = strtolower($orderType);
|
||||||
|
$qrContent = route('qr.verify', ['type' => $cleanType, 'id' => $orderId]);
|
||||||
|
$qrImage = QrCode::format('png')->size(150)->generate($qrContent);
|
||||||
|
file_put_contents($qrPath, $qrImage);
|
||||||
|
chmod($qrPath, 0644);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert PDF to 1.4 compatible format so FPDI can parse any PDF version
|
||||||
|
$gsTmp = tempnam(sys_get_temp_dir(), 'gs_') . '.pdf';
|
||||||
|
exec('gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sOutputFile=' . escapeshellarg($gsTmp) . ' ' . escapeshellarg($tmpPath) . ' 2>/dev/null', $gsOut, $gsCode);
|
||||||
|
if ($gsCode === 0 && file_exists($gsTmp) && filesize($gsTmp) > 0) {
|
||||||
|
$tmpPath = $gsTmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf = new Fpdi();
|
||||||
|
$pageCount = $pdf->setSourceFile($tmpPath);
|
||||||
|
$qrSize = 30; // mm
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $pageCount; $i++) {
|
||||||
|
$tpl = $pdf->importPage($i);
|
||||||
|
$size2 = $pdf->getTemplateSize($tpl);
|
||||||
|
$pdf->AddPage($size2['orientation'], [$size2['width'], $size2['height']]);
|
||||||
|
$pdf->useTemplate($tpl);
|
||||||
|
|
||||||
|
if ($i === 1) {
|
||||||
|
// First page: right side, in the blank area below header separator lines
|
||||||
|
$sz = 35;
|
||||||
|
$qrX = $size2['width'] - $sz - 18;
|
||||||
|
$qrY = 15;
|
||||||
|
} else {
|
||||||
|
// Other pages: bottom-right
|
||||||
|
$sz = 22;
|
||||||
|
$qrX = $size2['width'] - $sz - 8;
|
||||||
|
$qrY = $size2['height'] - $sz - 6;
|
||||||
|
}
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect($qrX - 1, $qrY - 1, $sz + 2, $sz + 2, 'F');
|
||||||
|
$pdf->Image($qrPath, $qrX, $qrY, $sz, $sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append certificates from the database
|
||||||
|
$certificates = DB::table('certificates')->orderBy('sort')->get();
|
||||||
|
foreach ($certificates as $certificate) {
|
||||||
|
$certPath = storage_path('app/' . $certificate->path);
|
||||||
|
if (file_exists($certPath)) {
|
||||||
|
$extCert = strtolower(pathinfo($certPath, PATHINFO_EXTENSION));
|
||||||
|
if ($extCert === 'pdf') {
|
||||||
|
$certPageCount = $pdf->setSourceFile($certPath);
|
||||||
|
for ($j = 1; $j <= $certPageCount; $j++) {
|
||||||
|
$tplCert = $pdf->importPage($j);
|
||||||
|
$sizeCert = $pdf->getTemplateSize($tplCert);
|
||||||
|
$pdf->AddPage($sizeCert['orientation'], [$sizeCert['width'], $sizeCert['height']]);
|
||||||
|
$pdf->useTemplate($tplCert);
|
||||||
|
$cqX = $sizeCert['width'] - 22 - 8;
|
||||||
|
$cqY = $sizeCert['height'] - 22 - 6;
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect($cqX - 1, $cqY - 1, 24, 24, 'F');
|
||||||
|
$pdf->Image($qrPath, $cqX, $cqY, 22, 22);
|
||||||
|
}
|
||||||
|
} elseif (in_array($extCert, ['jpg', 'jpeg', 'png'])) {
|
||||||
|
$pdf->AddPage('P', 'A4');
|
||||||
|
$pdf->Image($certPath, 0, 0, 210, 297);
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect(210 - 22 - 8 - 1, 297 - 22 - 6 - 1, 24, 24, 'F');
|
||||||
|
$pdf->Image($qrPath, 210 - 22 - 8, 297 - 22 - 6, 22, 22);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->Output('F', $outputPath);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Illuminate\Support\Facades\Log::error('ConclusionController PDF/QR failed: ' . $e->getMessage(), [
|
||||||
|
'order_id' => $orderId, 'type' => $orderType, 'file' => $e->getFile(), 'line' => $e->getLine(),
|
||||||
|
]);
|
||||||
|
copy($tmpPath, $outputPath);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$file->move(storage_path('app/' . $dir), $outputName);
|
||||||
|
}
|
||||||
|
|
||||||
|
$storagePath = '/storage/attachments/' . $dbType . $orderId . '/' . $outputName;
|
||||||
|
|
||||||
|
DB::table('files')->insert([
|
||||||
|
'id' => (string) Str::uuid(),
|
||||||
|
'path' => $storagePath,
|
||||||
|
'extension' => $ext,
|
||||||
|
'order_id' => $orderId,
|
||||||
|
'order_type' => 'conclusion_',
|
||||||
|
'type' => 'conclusion',
|
||||||
|
'name' => $name,
|
||||||
|
'size' => round($size / 1024 / 1024, 2),
|
||||||
|
'size_in_bytes' => $size,
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table($table)->where('id', $orderId)->update([
|
||||||
|
'status' => \App\Enums\OrderStatusEnum::FINISHED->name,
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$route = $orderType === 'AUTO' ? 'auto.show' : 'estate.show';
|
||||||
|
return redirect()->route($route, $orderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reject(Request $request)
|
public function reject(Request $request)
|
||||||
{
|
{
|
||||||
|
$orderId = $request->input('order_id');
|
||||||
|
$orderType = $request->input('order_type'); // 'AUTO' or 'ESTATE'
|
||||||
|
$table = $orderType === 'AUTO' ? 'auto_orders' : 'estate_orders';
|
||||||
|
|
||||||
|
DB::table($table)->where('id', $orderId)->update([
|
||||||
|
'status' => 'rejected',
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,21 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use App\Http\Controllers\QrController;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class EstateController extends Controller
|
class EstateController extends Controller
|
||||||
{
|
{
|
||||||
|
private function parseDate(?string $date): ?string
|
||||||
|
{
|
||||||
|
if (!$date) return null;
|
||||||
|
try {
|
||||||
|
return Carbon::createFromFormat('d.m.Y', $date)->format('Y-m-d');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $date; // already in Y-m-d or null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$filters = $request->only(['search', 'period', 'status', 'appraiser', 'purpose_id']);
|
$filters = $request->only(['search', 'period', 'status', 'appraiser', 'purpose_id']);
|
||||||
@@ -47,30 +59,134 @@ class EstateController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$purposes = DB::table('purposes')->get();
|
$purposeCases = DB::table('purposes')->get();
|
||||||
$regions = DB::table('regions')->get();
|
$regions = DB::table('regions')->get();
|
||||||
|
$districts = DB::table('districts')->get();
|
||||||
$concerns = DB::table('concerns')->get();
|
$concerns = DB::table('concerns')->get();
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
return view('estate.create', compact('purposes', 'regions', 'concerns', 'appraisers'));
|
$dillers = DB::table('users')->whereRaw('LOWER(role) = ?', ['diller'])->where('status', 'active')->get();
|
||||||
|
return view('estate.create', compact('purposeCases', 'regions', 'districts', 'concerns', 'appraisers', 'dillers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
return redirect()->route('estate.index');
|
if ($request->has('cost')) {
|
||||||
|
$request->merge(['cost' => preg_replace('/\D/', '', $request->cost)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'number' => 'required',
|
||||||
|
'purpose_id' => 'required',
|
||||||
|
'ordered_customer' => 'required',
|
||||||
|
'customer_type' => 'required|in:physical,juridical',
|
||||||
|
'owner_type' => 'required|in:physical,juridical',
|
||||||
|
'name_of_object' => 'required',
|
||||||
|
'region' => 'required',
|
||||||
|
'district' => 'required',
|
||||||
|
'address' => 'required',
|
||||||
|
'cost' => 'required|numeric',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$id = DB::table('estate_orders')->insertGetId([
|
||||||
|
'number' => $request->number,
|
||||||
|
'status' => $request->status ?? 'draft',
|
||||||
|
'purpose_id' => $request->purpose_id,
|
||||||
|
'diller_id' => $request->diller_id ?: null,
|
||||||
|
'ordered_customer' => $request->ordered_customer,
|
||||||
|
'ordered_customer_phone' => $request->ordered_customer_phone,
|
||||||
|
'customer_type' => $request->customer_type,
|
||||||
|
'customer_last_name' => $request->customer_last_name,
|
||||||
|
'customer_first_name' => $request->customer_first_name,
|
||||||
|
'customer_patronymic' => $request->customer_patronymic,
|
||||||
|
'customer_company' => $request->customer_company,
|
||||||
|
'owner_type' => $request->owner_type,
|
||||||
|
'owner_last_name' => $request->owner_last_name,
|
||||||
|
'owner_first_name' => $request->owner_first_name,
|
||||||
|
'owner_patronymic' => $request->owner_patronymic,
|
||||||
|
'owner_company' => $request->owner_company,
|
||||||
|
'contract_date' => $this->parseDate($request->contract_date),
|
||||||
|
'name_of_object' => $request->name_of_object,
|
||||||
|
'region' => $request->region,
|
||||||
|
'district' => $request->district,
|
||||||
|
'address' => $request->address,
|
||||||
|
'home' => $request->home,
|
||||||
|
'area' => $request->area,
|
||||||
|
'overall_area' => $request->overall_area,
|
||||||
|
'usefull_area' => $request->usefull_area,
|
||||||
|
'live_area' => $request->live_area,
|
||||||
|
'cost' => (int)str_replace(',', '', $request->cost ?? 0),
|
||||||
|
'note' => $request->note,
|
||||||
|
'created_at' => $this->parseDate($request->created_at) ?? now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
QrController::generateQr($id, 'estate_');
|
||||||
|
return redirect()->route('estate.show', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$order = DB::table('estate_orders')->find($id);
|
$order = DB::table('estate_orders')->find($id);
|
||||||
$purposes = DB::table('purposes')->get();
|
$purposeCases = DB::table('purposes')->get();
|
||||||
$regions = DB::table('regions')->get();
|
$regions = DB::table('regions')->get();
|
||||||
|
$districts = DB::table('districts')->get();
|
||||||
$concerns = DB::table('concerns')->get();
|
$concerns = DB::table('concerns')->get();
|
||||||
return view('estate.edit', compact('order', 'purposes', 'regions', 'concerns'));
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
|
$dillers = DB::table('users')->whereRaw('LOWER(role) = ?', ['diller'])->where('status', 'active')->get();
|
||||||
|
return view('estate.edit', compact('order', 'purposeCases', 'regions', 'districts', 'concerns', 'appraisers', 'dillers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
return redirect()->route('estate.index');
|
if ($request->has('cost')) {
|
||||||
|
$request->merge(['cost' => preg_replace('/\D/', '', $request->cost)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'number' => 'required',
|
||||||
|
'purpose_id' => 'required',
|
||||||
|
'ordered_customer' => 'required',
|
||||||
|
'customer_type' => 'required|in:physical,juridical',
|
||||||
|
'owner_type' => 'required|in:physical,juridical',
|
||||||
|
'name_of_object' => 'required',
|
||||||
|
'region' => 'required',
|
||||||
|
'district' => 'required',
|
||||||
|
'address' => 'required',
|
||||||
|
'cost' => 'required|numeric',
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('estate_orders')->where('id', $id)->update([
|
||||||
|
'number' => $request->number,
|
||||||
|
'status' => $request->status,
|
||||||
|
'purpose_id' => $request->purpose_id,
|
||||||
|
'diller_id' => $request->diller_id ?: null,
|
||||||
|
'ordered_customer' => $request->ordered_customer,
|
||||||
|
'ordered_customer_phone' => $request->ordered_customer_phone,
|
||||||
|
'customer_type' => $request->customer_type,
|
||||||
|
'customer_last_name' => $request->customer_last_name,
|
||||||
|
'customer_first_name' => $request->customer_first_name,
|
||||||
|
'customer_patronymic' => $request->customer_patronymic,
|
||||||
|
'customer_company' => $request->customer_company,
|
||||||
|
'owner_type' => $request->owner_type,
|
||||||
|
'owner_last_name' => $request->owner_last_name,
|
||||||
|
'owner_first_name' => $request->owner_first_name,
|
||||||
|
'owner_patronymic' => $request->owner_patronymic,
|
||||||
|
'owner_company' => $request->owner_company,
|
||||||
|
'contract_date' => $this->parseDate($request->contract_date),
|
||||||
|
'name_of_object' => $request->name_of_object,
|
||||||
|
'region' => $request->region,
|
||||||
|
'district' => $request->district,
|
||||||
|
'address' => $request->address,
|
||||||
|
'home' => $request->home,
|
||||||
|
'area' => $request->area,
|
||||||
|
'overall_area' => $request->overall_area,
|
||||||
|
'usefull_area' => $request->usefull_area,
|
||||||
|
'live_area' => $request->live_area,
|
||||||
|
'cost' => (int)str_replace(',', '', $request->cost ?? 0),
|
||||||
|
'note' => $request->note,
|
||||||
|
'created_at' => $this->parseDate($request->created_at) ?? now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
return redirect()->route('estate.show', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($order)
|
public function show($order)
|
||||||
@@ -95,11 +211,15 @@ class EstateController extends Controller
|
|||||||
$order->dillerUser = $dillerUser;
|
$order->dillerUser = $dillerUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
$members = DB::table('order_members')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
$members = DB::table('order_members as om')
|
||||||
|
->leftJoin('users as u', 'u.id', '=', 'om.user_id')
|
||||||
|
->select('om.*', 'u.name', 'u.avatar', 'u.phone', 'u.role')
|
||||||
|
->where('om.order_id', $order->id ?? 0)->where('om.order_type', 'estate_')->get();
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
$isAppraisers = $members->where('user_id', auth()->id())->count() > 0;
|
$isAppraisers = $members->where('user_id', auth()->id())->count() > 0;
|
||||||
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
||||||
return view('estate.show', compact('order', 'members', 'appraisers', 'isAppraisers', 'files'));
|
$conclusions = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'conclusion_')->get();
|
||||||
|
return view('estate.show', compact('order', 'members', 'appraisers', 'isAppraisers', 'files', 'conclusions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showActivities($order)
|
public function showActivities($order)
|
||||||
@@ -112,16 +232,58 @@ class EstateController extends Controller
|
|||||||
public function showTeam($order)
|
public function showTeam($order)
|
||||||
{
|
{
|
||||||
$order = DB::table('estate_orders')->find($order);
|
$order = DB::table('estate_orders')->find($order);
|
||||||
$members = DB::table('order_members')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
$members = DB::table('order_members as om')
|
||||||
|
->leftJoin('users as u', 'u.id', '=', 'om.user_id')
|
||||||
|
->select('om.*', 'u.name', 'u.avatar', 'u.phone', 'u.role')
|
||||||
|
->where('om.order_id', $order->id ?? 0)->where('om.order_type', 'estate_')->get()
|
||||||
|
->map(function ($member) {
|
||||||
|
$member->started = DB::table('order_members')->where('user_id', $member->user_id)->count();
|
||||||
|
$member->finished = 0;
|
||||||
|
$member->approved = 0;
|
||||||
|
$member->rejected = 0;
|
||||||
|
return $member;
|
||||||
|
});
|
||||||
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
$appraisers = DB::table('users')->whereRaw('LOWER(role) = ?', ['appraiser'])->where('status', 'active')->get();
|
||||||
return view('estate.show-team', compact('order', 'members', 'appraisers'));
|
return view('estate.show-team', compact('order', 'members', 'appraisers'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showDocuments($order)
|
public function generatePdf($id)
|
||||||
|
{
|
||||||
|
// If uploaded conclusion exists — serve it directly
|
||||||
|
$conclusionFile = DB::table('files')
|
||||||
|
->where('order_id', $id)
|
||||||
|
->where('order_type', 'conclusion_')
|
||||||
|
->orderByDesc('created_at')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($conclusionFile) {
|
||||||
|
$path = storage_path('app/public' . str_replace('/storage', '', $conclusionFile->path));
|
||||||
|
if (file_exists($path)) {
|
||||||
|
return response()->file($path, [
|
||||||
|
'Content-Type' => 'application/pdf',
|
||||||
|
'Content-Disposition' => 'attachment; filename="' . $conclusionFile->name . '.pdf"',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abort(404, 'Xulosa fayli topilmadi');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showDocuments($order, Request $request)
|
||||||
{
|
{
|
||||||
$order = DB::table('estate_orders')->find($order);
|
$order = DB::table('estate_orders')->find($order);
|
||||||
$files = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
$type = $request->get('type', 'ALL');
|
||||||
return view('estate.show-documents', compact('order', 'files'));
|
$filesQuery = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_');
|
||||||
|
if ($type !== 'ALL') {
|
||||||
|
$filesQuery->where('type', $type);
|
||||||
|
}
|
||||||
|
$files = $filesQuery->paginate(20)->withQueryString();
|
||||||
|
$allFiles = DB::table('files')->where('order_id', $order->id ?? 0)->where('order_type', 'estate_')->get();
|
||||||
|
$countDocs = $allFiles->whereIn('type', ['passport_customer', 'certificate', 'appraiser_certificate', 'insurance_policy', 'participate_certificate'])->count();
|
||||||
|
$countMediaFiles = $allFiles->whereIn('type', ['object_photo', 'object_files', 'compares'])->count();
|
||||||
|
$otherFiles = $allFiles->where('type', 'additional')->count();
|
||||||
|
$sizeInStorage = $allFiles->sum('size_in_bytes');
|
||||||
|
return view('estate.show-documents', compact('order', 'files', 'type', 'countDocs', 'countMediaFiles', 'otherFiles', 'sizeInStorage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orderClone($id)
|
public function orderClone($id)
|
||||||
|
|||||||
@@ -3,26 +3,79 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class FileStoreController extends Controller
|
class FileStoreController extends Controller
|
||||||
{
|
{
|
||||||
public function attachFiles(Request $request)
|
public function attachFiles(Request $request)
|
||||||
{
|
{
|
||||||
return redirect()->back();
|
if (!$request->hasFile('file')) {
|
||||||
|
return response()->json(['error' => 'No file'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$file = $request->file('file');
|
||||||
|
$orderId = $request->input('order_id');
|
||||||
|
$orderType = $request->input('order_type', 'auto_');
|
||||||
|
$fileType = $request->input('file_type', 'additional');
|
||||||
|
|
||||||
|
$ext = strtolower($file->getClientOriginalExtension());
|
||||||
|
$name = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);
|
||||||
|
$filename = Str::uuid() . '.' . $ext;
|
||||||
|
$path = $file->storeAs('public/files/' . $orderType . $orderId, $filename);
|
||||||
|
$size = $file->getSize();
|
||||||
|
|
||||||
|
DB::table('files')->insert([
|
||||||
|
'id' => (string) Str::uuid(),
|
||||||
|
'path' => Storage::url($path),
|
||||||
|
'extension' => $ext,
|
||||||
|
'order_id' => $orderId,
|
||||||
|
'order_type' => $orderType,
|
||||||
|
'type' => $fileType,
|
||||||
|
'name' => $name,
|
||||||
|
'size' => round($size / 1024 / 1024, 2),
|
||||||
|
'size_in_bytes' => $size,
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json(['success' => true, 'name' => $name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attachProfileFiles(Request $request)
|
public function attachProfileFiles(Request $request)
|
||||||
{
|
{
|
||||||
return redirect()->back();
|
if (!$request->hasFile('file')) {
|
||||||
|
return response()->json(['error' => 'No file'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$file = $request->file('file');
|
||||||
|
$ext = strtolower($file->getClientOriginalExtension());
|
||||||
|
$filename = Str::uuid() . '.' . $ext;
|
||||||
|
$path = $file->storeAs('public/files/profile', $filename);
|
||||||
|
|
||||||
|
return response()->json(['success' => true, 'url' => Storage::url($path)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function downloadFile($file)
|
public function downloadFile($file)
|
||||||
{
|
{
|
||||||
abort(404);
|
$record = DB::table('files')->where('id', $file)->first();
|
||||||
|
if (!$record) abort(404);
|
||||||
|
|
||||||
|
$path = str_replace('/storage/', 'public/', $record->path);
|
||||||
|
if (!Storage::exists($path)) abort(404);
|
||||||
|
|
||||||
|
return Storage::download($path, $record->name . '.' . $record->extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($file)
|
public function delete($file)
|
||||||
{
|
{
|
||||||
|
$record = DB::table('files')->where('id', $file)->first();
|
||||||
|
if ($record) {
|
||||||
|
$path = str_replace('/storage/', 'public/', $record->path);
|
||||||
|
Storage::delete($path);
|
||||||
|
DB::table('files')->where('id', $file)->delete();
|
||||||
|
}
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,68 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class OrderMembersController extends Controller
|
class OrderMembersController extends Controller
|
||||||
{
|
{
|
||||||
public function remove(Request $request)
|
public function invite(Request $request)
|
||||||
{
|
{
|
||||||
|
$orderId = $request->input('order_id');
|
||||||
|
$orderType = $request->input('order_type'); // 'AUTO' or 'ESTATE'
|
||||||
|
$dbType = $orderType === 'AUTO' ? 'auto_' : 'estate_';
|
||||||
|
$table = $orderType === 'AUTO' ? 'auto_orders' : 'estate_orders';
|
||||||
|
|
||||||
|
// Collect checked appraiser IDs (checkboxes named by appraiser->id)
|
||||||
|
$appraiserIds = [];
|
||||||
|
foreach ($request->all() as $key => $value) {
|
||||||
|
if (is_numeric($key) && $value === 'on') {
|
||||||
|
$appraiserIds[] = (int)$key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($appraiserIds as $userId) {
|
||||||
|
// Avoid duplicate
|
||||||
|
$exists = DB::table('order_members')
|
||||||
|
->where('order_id', $orderId)
|
||||||
|
->where('order_type', $dbType)
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->exists();
|
||||||
|
|
||||||
|
if (!$exists) {
|
||||||
|
DB::table('order_members')->insert([
|
||||||
|
'order_id' => $orderId,
|
||||||
|
'order_type' => $dbType,
|
||||||
|
'user_id' => $userId,
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change status to started if members added
|
||||||
|
if (count($appraiserIds) > 0) {
|
||||||
|
DB::table($table)->where('id', $orderId)->update([
|
||||||
|
'status' => 'started',
|
||||||
|
'updated_at' => now(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invite(Request $request)
|
public function remove(Request $request)
|
||||||
{
|
{
|
||||||
|
$memberId = $request->input('id');
|
||||||
|
$orderId = $request->input('order_id');
|
||||||
|
$orderType = $request->input('order_type'); // 'AUTO' or 'ESTATE'
|
||||||
|
$dbType = $orderType === 'AUTO' ? 'auto_' : 'estate_';
|
||||||
|
|
||||||
|
DB::table('order_members')
|
||||||
|
->where('id', $memberId)
|
||||||
|
->where('order_id', $orderId)
|
||||||
|
->where('order_type', $dbType)
|
||||||
|
->delete();
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,21 @@ class ProfileController extends Controller
|
|||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
return view('profile.index');
|
return view('profile.profile');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showActivities()
|
public function showActivities()
|
||||||
{
|
{
|
||||||
return view('profile.show-activities');
|
return view('profile.activities');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showProjects()
|
public function showProjects()
|
||||||
{
|
{
|
||||||
return view('profile.show-projects');
|
return view('profile.projects');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showDocuments()
|
public function showDocuments()
|
||||||
{
|
{
|
||||||
return view('profile.show-documents');
|
return view('profile.documents');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
||||||
|
|
||||||
class QrController extends Controller
|
class QrController extends Controller
|
||||||
{
|
{
|
||||||
@@ -11,8 +13,82 @@ class QrController extends Controller
|
|||||||
return view('qr.show', compact('content'));
|
return view('qr.show', compact('content'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function verify($type, $id)
|
||||||
|
{
|
||||||
|
$table = $type === 'auto' ? 'auto_orders' : 'estate_orders';
|
||||||
|
$order = \Illuminate\Support\Facades\DB::table($table)->where('id', $id)->first();
|
||||||
|
|
||||||
|
if (!$order) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add display relations and formatting
|
||||||
|
$order->customer = $order->ordered_customer;
|
||||||
|
$order->purposeOne = \Illuminate\Support\Facades\DB::table('purposes')->where('id', $order->purpose_id)->first();
|
||||||
|
|
||||||
|
if ($type === 'auto') {
|
||||||
|
$order->concernOne = \Illuminate\Support\Facades\DB::table('concerns')->where('id', $order->car_category)->first();
|
||||||
|
$order->ownerName = trim($order->owner_last_name . ' ' . $order->owner_first_name . ' ' . $order->owner_patronymic);
|
||||||
|
$order->name = $order->car_mark;
|
||||||
|
} else {
|
||||||
|
$order->regions = \Illuminate\Support\Facades\DB::table('regions')->where('id', $order->region)->first();
|
||||||
|
$order->districts = \Illuminate\Support\Facades\DB::table('districts')->where('id', $order->district)->first();
|
||||||
|
$order->owner = trim($order->owner_last_name . ' ' . $order->owner_first_name . ' ' . $order->owner_patronymic);
|
||||||
|
$order->name = $order->name_of_object;
|
||||||
|
}
|
||||||
|
|
||||||
|
$conclusion = \Illuminate\Support\Facades\DB::table('files')
|
||||||
|
->where('order_id', $id)
|
||||||
|
->where('order_type', 'conclusion_')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
return view('qr.' . $type, compact('order', 'conclusion'));
|
||||||
|
}
|
||||||
|
|
||||||
public function reGenerate($id, $type)
|
public function reGenerate($id, $type)
|
||||||
{
|
{
|
||||||
|
self::generateQr($id, $type);
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function generateQr($id, $type)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$cleanType = str_replace('_', '', $type);
|
||||||
|
$url = route('qr.verify', ['type' => $cleanType, 'id' => $id]);
|
||||||
|
$dir = 'public/attachments/' . $type . $id;
|
||||||
|
$absDir = storage_path('app/' . $dir);
|
||||||
|
|
||||||
|
if (!is_dir($absDir)) {
|
||||||
|
mkdir($absDir, 0755, true);
|
||||||
|
} else {
|
||||||
|
chmod($absDir, 0755);
|
||||||
|
}
|
||||||
|
|
||||||
|
$qr = QrCode::format('png')->size(200)->generate($url);
|
||||||
|
$qrPath = $absDir . '/qr.png';
|
||||||
|
file_put_contents($qrPath, $qr);
|
||||||
|
chmod($qrPath, 0644);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Illuminate\Support\Facades\Log::error('QR generate failed: ' . $e->getMessage(), [
|
||||||
|
'id' => $id, 'type' => $type,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function qrImage($type, $id)
|
||||||
|
{
|
||||||
|
$dbType = $type === 'auto' ? 'auto_' : 'estate_';
|
||||||
|
$path = storage_path('app/public/attachments/' . $dbType . $id . '/qr.png');
|
||||||
|
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
self::generateQr($id, $dbType);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->file($path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
app/Models/File.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
class File
|
||||||
|
{
|
||||||
|
public static function getFileSizeInMB(int $bytes): string
|
||||||
|
{
|
||||||
|
if ($bytes <= 0) return '0';
|
||||||
|
$mb = $bytes / 1024 / 1024;
|
||||||
|
return number_format($mb, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
@@ -13,6 +14,8 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
if (config('app.env') === 'production') {
|
||||||
|
URL::forceScheme('https');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www
|
- ./:/var/www
|
||||||
- storage_data:/var/www/storage
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
web:
|
web:
|
||||||
@@ -18,7 +17,6 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/var/www
|
- ./:/var/www
|
||||||
- storage_data:/var/www/storage
|
|
||||||
- ./_docker/nginx/conf.d:/etc/nginx/conf.d
|
- ./_docker/nginx/conf.d:/etc/nginx/conf.d
|
||||||
ports:
|
ports:
|
||||||
- "8005:80"
|
- "8005:80"
|
||||||
@@ -39,4 +37,3 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
storage_data:
|
|
||||||
|
|||||||
18
dummy.pdf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
%PDF-1.4
|
||||||
|
1 0 obj <</Type /Catalog /Pages 2 0 R>> endobj
|
||||||
|
2 0 obj <</Type /Pages /Kids [3 0 R] /Count 1>> endobj
|
||||||
|
3 0 obj <</Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R>> endobj
|
||||||
|
4 0 obj <</Length 22>> stream
|
||||||
|
BT /F1 24 Tf 100 700 Td (Hello World) Tj ET
|
||||||
|
endstream endobj
|
||||||
|
xref
|
||||||
|
0 5
|
||||||
|
0000000000 65535 f
|
||||||
|
0000000009 00000 n
|
||||||
|
0000000056 00000 n
|
||||||
|
0000000111 00000 n
|
||||||
|
0000000212 00000 n
|
||||||
|
trailer <</Size 5 /Root 1 0 R>>
|
||||||
|
startxref
|
||||||
|
284
|
||||||
|
%%EOF
|
||||||
36
public/assets/js/pages/orders/create.js
vendored
@@ -1 +1,37 @@
|
|||||||
let handleCustomerClick=function(e){var n=document.getElementById("customer-block"),o=document.getElementById("customer-company-block");"physical"===e?(n.classList.remove("d-none"),o.classList.add("d-none")):(n.classList.add("d-none"),o.classList.remove("d-none"))},handleOwnerClick=function(e){var n=document.getElementById("owner-block"),o=document.getElementById("owner-company-block");"physical"===e?(n.classList.remove("d-none"),o.classList.add("d-none")):(n.classList.add("d-none"),o.classList.remove("d-none"))};
|
let handleCustomerClick=function(e){var n=document.getElementById("customer-block"),o=document.getElementById("customer-company-block");"physical"===e?(n.classList.remove("d-none"),o.classList.add("d-none")):(n.classList.add("d-none"),o.classList.remove("d-none"))},handleOwnerClick=function(e){var n=document.getElementById("owner-block"),o=document.getElementById("owner-company-block");"physical"===e?(n.classList.remove("d-none"),o.classList.add("d-none")):(n.classList.add("d-none"),o.classList.remove("d-none"))};
|
||||||
|
|
||||||
|
// Bootstrap needs-validation
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
var forms = document.querySelectorAll('.needs-validation');
|
||||||
|
Array.prototype.slice.call(forms).forEach(function (form) {
|
||||||
|
// Common required fields for both auto and estate
|
||||||
|
var requiredNames = [
|
||||||
|
'number', 'created_at', 'purpose_id',
|
||||||
|
'customer_type', 'owner_type',
|
||||||
|
'ordered_customer', 'cost',
|
||||||
|
// auto specific
|
||||||
|
'car_mark', 'car_number', 'body', 'engine', 'shassi', 'made_date', 'type',
|
||||||
|
// estate specific
|
||||||
|
'name_of_object', 'region', 'district', 'address', 'home', 'contract_date',
|
||||||
|
];
|
||||||
|
requiredNames.forEach(function(name) {
|
||||||
|
var el = form.querySelector('[name="' + name + '"]');
|
||||||
|
if (el) el.setAttribute('required', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
form.addEventListener('submit', function (event) {
|
||||||
|
if (!form.checkValidity()) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
// Scroll to first invalid field
|
||||||
|
var firstInvalid = form.querySelector(':invalid');
|
||||||
|
if (firstInvalid) {
|
||||||
|
firstInvalid.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
firstInvalid.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.classList.add('was-validated');
|
||||||
|
}, false);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|||||||
1
public/storage
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../storage/app/public
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
validate>
|
validate>
|
||||||
@csrf
|
@csrf
|
||||||
@method('put')
|
@method('put')
|
||||||
<input type="hidden" name="status" value="{{ App\Enums\OrderStatusEnum::DRAFT->name }}">
|
<input type="hidden" name="status" value="{{ $order->status }}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('number') is-invalid @enderror"
|
class="form-control text-uppercase @error('number') is-invalid @enderror"
|
||||||
name="number" placeholder="@lang('translation.write-number')"
|
name="number" placeholder="@lang('translation.write-number')"
|
||||||
id="order-number-input" value="{{ $order->number }}"
|
id="order-number-input" value="{{ old('number', $order->number) }}"
|
||||||
tabindex="1">
|
tabindex="1">
|
||||||
@error('number')
|
@error('number')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control flatpickr-input @error('created_at') is-invalid @enderror"
|
class="form-control flatpickr-input @error('created_at') is-invalid @enderror"
|
||||||
id="auto-created_date-input"
|
id="auto-created_date-input"
|
||||||
name="created_at" value="{{ $order->created_at }}"
|
name="created_at" value="{{ old('created_at', $order->created_at ? \Carbon\Carbon::parse($order->created_at)->format('d.m.Y') : '') }}"
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
data-provider="flatpickr" data-date-format="d.m.Y"
|
||||||
data-maxDate="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-maxDate="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
id="choices-purpose-input" tabindex="3">
|
id="choices-purpose-input" tabindex="3">
|
||||||
@foreach($purposeCases as $purposeItem)
|
@foreach($purposeCases as $purposeItem)
|
||||||
<option value="{{ $purposeItem->id }}"
|
<option value="{{ $purposeItem->id }}"
|
||||||
@if(old('purpose_id') == $purposeItem->id)selected @endif>
|
@if((old('purpose_id') ?? $order->purpose_id) == $purposeItem->id)selected @endif>
|
||||||
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
|
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<!-- Inline Checkbox -->
|
<!-- Inline Checkbox -->
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
@if($order->customer_type=='physical') checked @endif
|
@if(old('customer_type', $order->customer_type)=='physical') checked @endif
|
||||||
name="customer_type"
|
name="customer_type"
|
||||||
onclick="handleCustomerClick(this.value);" value="physical"
|
onclick="handleCustomerClick(this.value);" value="physical"
|
||||||
id="flexRadioDefault2">
|
id="flexRadioDefault2">
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input is " type="radio"
|
<input class="form-check-input is " type="radio"
|
||||||
@if($order->customer_type=='juridical') checked
|
@if(old('customer_type', $order->customer_type)=='juridical') checked
|
||||||
@endif name="customer_type"
|
@endif name="customer_type"
|
||||||
onclick="handleCustomerClick(this.value);" value="juridical"
|
onclick="handleCustomerClick(this.value);" value="juridical"
|
||||||
id="flexRadioDefault1">
|
id="flexRadioDefault1">
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row gy-4 @if($order->customer_type=='juridical') d-none @endif" id="customer-block">
|
<div class="row gy-4 @if(old('customer_type', $order->customer_type)=='juridical') d-none @endif" id="customer-block">
|
||||||
|
|
||||||
<div class="mb-3 col-xxl-4 col-md-6">
|
<div class="mb-3 col-xxl-4 col-md-6">
|
||||||
<label class="form-label" for="order-customer_last_name-input">
|
<label class="form-label" for="order-customer_last_name-input">
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
|
||||||
name="customer_last_name" id="order-customer_last_name-input"
|
name="customer_last_name" id="order-customer_last_name-input"
|
||||||
value="{{ $order->customer_last_name }}"
|
value="{{ old('customer_last_name', $order->customer_last_name) }}"
|
||||||
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
|
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
|
||||||
@error('customer_last_name')
|
@error('customer_last_name')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
|
||||||
name="customer_first_name" id="order-customer_first_name-input"
|
name="customer_first_name" id="order-customer_first_name-input"
|
||||||
value="{{ $order->customer_first_name }}"
|
value="{{ old('customer_first_name', $order->customer_first_name) }}"
|
||||||
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
|
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
|
||||||
@error('customer_first_name')
|
@error('customer_first_name')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
|
||||||
name="customer_patronymic" id="order-customer_patronymic-input"
|
name="customer_patronymic" id="order-customer_patronymic-input"
|
||||||
value="{{ $order->customer_patronymic }}"
|
value="{{ old('customer_patronymic', $order->customer_patronymic) }}"
|
||||||
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
|
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
|
||||||
@error('customer_patronymic')
|
@error('customer_patronymic')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -159,14 +159,14 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row gy-4 @if($order->customer_type=='physical') d-none @endif"
|
<div class="row gy-4 @if(old('customer_type', $order->customer_type)=='physical') d-none @endif"
|
||||||
id="customer-company-block">
|
id="customer-company-block">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="order-customer_company-input">
|
<label class="form-label" for="order-customer_company-input">
|
||||||
@lang('translation.customer-juridical-name')
|
@lang('translation.customer-juridical-name')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase" name="customer_company"
|
<input type="text" class="form-control text-uppercase @error('customer_company') is-invalid @enderror" name="customer_company"
|
||||||
id="order-customer_company-input" value="{{ $order->customer_company }}"
|
id="order-customer_company-input" value="{{ old('customer_company', $order->customer_company) }}"
|
||||||
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
|
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
|
||||||
@error('customer_company')
|
@error('customer_company')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<!-- Inline Checkbox -->
|
<!-- Inline Checkbox -->
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input" type="radio" @if($order->owner_type=='physical') checked
|
<input class="form-check-input" type="radio" @if(old('owner_type', $order->owner_type)=='physical') checked
|
||||||
@endif name="owner_type"
|
@endif name="owner_type"
|
||||||
onclick="handleOwnerClick(this.value);" value="physical"
|
onclick="handleOwnerClick(this.value);" value="physical"
|
||||||
id="flexRadioDefault3">
|
id="flexRadioDefault3">
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input is " type="radio"
|
<input class="form-check-input is " type="radio"
|
||||||
@if($order->owner_type=='juridical') checked
|
@if(old('owner_type', $order->owner_type)=='juridical') checked
|
||||||
@endif name="owner_type"
|
@endif name="owner_type"
|
||||||
onclick="handleOwnerClick(this.value);" value="juridical"
|
onclick="handleOwnerClick(this.value);" value="juridical"
|
||||||
id="flexRadioDefault4">
|
id="flexRadioDefault4">
|
||||||
@@ -207,13 +207,13 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row gy-4 @if($order->owner_type=='juridical')d-none @endif" id="owner-block">
|
<div class="row gy-4 @if(old('owner_type', $order->owner_type)=='juridical')d-none @endif" id="owner-block">
|
||||||
|
|
||||||
<div class="mb-3 col-xxl-4 col-md-6">
|
<div class="mb-3 col-xxl-4 col-md-6">
|
||||||
<label class="form-label" for="order-owner_last_name-input">
|
<label class="form-label" for="order-owner_last_name-input">
|
||||||
@lang('translation.owner-last-name')
|
@lang('translation.owner-last-name')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" value="{{ $order->owner_last_name }}"
|
<input type="text" value="{{ old('owner_last_name', $order->owner_last_name) }}"
|
||||||
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
|
||||||
name="owner_last_name" id="order-owner_last_name-input"
|
name="owner_last_name" id="order-owner_last_name-input"
|
||||||
placeholder="@lang('translation.write-owner-last-name')" tabindex="7">
|
placeholder="@lang('translation.write-owner-last-name')" tabindex="7">
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
|
||||||
name="owner_first_name" value="{{ $order->owner_first_name }}"
|
name="owner_first_name" value="{{ old('owner_first_name', $order->owner_first_name) }}"
|
||||||
id="order-owner_first_name-input"
|
id="order-owner_first_name-input"
|
||||||
placeholder="@lang('translation.write-owner-first-name')" tabindex="8">
|
placeholder="@lang('translation.write-owner-first-name')" tabindex="8">
|
||||||
@error('owner_first_name')
|
@error('owner_first_name')
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
<label class="form-label" for="order-owner_patronymic-input">
|
<label class="form-label" for="order-owner_patronymic-input">
|
||||||
@lang('translation.owner-patronymic')
|
@lang('translation.owner-patronymic')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" value="{{ $order->owner_patronymic }}"
|
<input type="text" value="{{ old('owner_patronymic', $order->owner_patronymic) }}"
|
||||||
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
|
||||||
name="owner_patronymic" id="order-owner_patronymic-input"
|
name="owner_patronymic" id="order-owner_patronymic-input"
|
||||||
placeholder="@lang('translation.write-owner-patronymic')" tabindex="9">
|
placeholder="@lang('translation.write-owner-patronymic')" tabindex="9">
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row gy-4 @if($order->owner_type=='physical')d-none @endif"
|
<div class="row gy-4 @if(old('owner_type', $order->owner_type)=='physical')d-none @endif"
|
||||||
id="owner-company-block">
|
id="owner-company-block">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="order-owner_company-input">
|
<label class="form-label" for="order-owner_company-input">
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
|
||||||
name="owner_company" value="{{ $order->owner_company }}"
|
name="owner_company" value="{{ old('owner_company', $order->owner_company) }}"
|
||||||
id="order-owner_company-input"
|
id="order-owner_company-input"
|
||||||
placeholder="@lang('translation.write-owner-juridical-name')" tabindex="">
|
placeholder="@lang('translation.write-owner-juridical-name')" tabindex="">
|
||||||
@error('owner_company')
|
@error('owner_company')
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
id="choose-order-car-category" name="car_category" tabindex="10">
|
id="choose-order-car-category" name="car_category" tabindex="10">
|
||||||
@foreach ($concerns as $concern)
|
@foreach ($concerns as $concern)
|
||||||
<option value="{{ $concern->id }}"
|
<option value="{{ $concern->id }}"
|
||||||
{{ $concern->car_category == $concern->id ? 'selected' : '' }}>
|
{{ (old('car_category') ?? $order->car_category) == $concern->id ? 'selected' : '' }}>
|
||||||
@lang($concern->{str_replace('_', '-', app()->getLocale())})
|
@lang($concern->{str_replace('_', '-', app()->getLocale())})
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('car_mark') is-invalid @enderror"
|
class="form-control text-uppercase @error('car_mark') is-invalid @enderror"
|
||||||
id="auto-car_mark-input" name="car_mark" value="{{ $order->car_mark }}"
|
id="auto-car_mark-input" name="car_mark" value="{{ old('car_mark', $order->car_mark) }}"
|
||||||
placeholder="@lang('translation.write-car-mark')" tabindex="12">
|
placeholder="@lang('translation.write-car-mark')" tabindex="12">
|
||||||
@error('car_mark')
|
@error('car_mark')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -321,7 +321,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('color') is-invalid @enderror"
|
class="form-control text-uppercase @error('color') is-invalid @enderror"
|
||||||
id="auto-color-input" name="color" value="{{ $order->color }}"
|
id="auto-color-input" name="color" value="{{ old('color', $order->color) }}"
|
||||||
placeholder="@lang('translation.write-car-color')" tabindex="22">
|
placeholder="@lang('translation.write-car-color')" tabindex="22">
|
||||||
@error('color')
|
@error('color')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
class="form-control text-uppercase @error('made_date') is-invalid @enderror"
|
class="form-control text-uppercase @error('made_date') is-invalid @enderror"
|
||||||
id="auto-made_date-input" name="made_date"
|
id="auto-made_date-input" name="made_date"
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
data-provider="flatpickr" data-date-format="d.m.Y"
|
||||||
value="{{ $order->made_date }}"
|
value="{{ old('made_date', $order->made_date ? \Carbon\Carbon::parse($order->made_date)->format('d.m.Y') : '') }}"
|
||||||
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
placeholder="@lang('translation.write-car-made-date')"
|
placeholder="@lang('translation.write-car-made-date')"
|
||||||
tabindex="13">
|
tabindex="13">
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('body') is-invalid @enderror"
|
class="form-control text-uppercase @error('body') is-invalid @enderror"
|
||||||
id="auto-body-input" name="body" value="{{ $order->body }}"
|
id="auto-body-input" name="body" value="{{ old('body', $order->body) }}"
|
||||||
placeholder="@lang('translation.write-car-body')" tabindex="14">
|
placeholder="@lang('translation.write-car-body')" tabindex="14">
|
||||||
@error('body')
|
@error('body')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('engine') is-invalid @enderror"
|
class="form-control text-uppercase @error('engine') is-invalid @enderror"
|
||||||
id="auto-engine-input" name="engine" value="{{ $order->engine }}"
|
id="auto-engine-input" name="engine" value="{{ old('engine', $order->engine) }}"
|
||||||
placeholder="@lang('translation.write-car-engine')" tabindex="15">
|
placeholder="@lang('translation.write-car-engine')" tabindex="15">
|
||||||
@error('engine')
|
@error('engine')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('car_number') is-invalid @enderror"
|
class="form-control text-uppercase @error('car_number') is-invalid @enderror"
|
||||||
id="auto-car_number-input" name="car_number" value="{{ $order->car_number }}"
|
id="auto-car_number-input" name="car_number" value="{{ old('car_number', $order->car_number) }}"
|
||||||
placeholder="@lang('translation.write-car-number')" tabindex="16">
|
placeholder="@lang('translation.write-car-number')" tabindex="16">
|
||||||
@error('car_number')
|
@error('car_number')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -399,7 +399,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('type') is-invalid @enderror"
|
class="form-control text-uppercase @error('type') is-invalid @enderror"
|
||||||
id="auto-type-input" name="type" value="{{ $order->type }}"
|
id="auto-type-input" name="type" value="{{ old('type', $order->type) }}"
|
||||||
placeholder="@lang('translation.write-car-type')" tabindex="17">
|
placeholder="@lang('translation.write-car-type')" tabindex="17">
|
||||||
@error('type')
|
@error('type')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -413,7 +413,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('shassi') is-invalid @enderror"
|
class="form-control text-uppercase @error('shassi') is-invalid @enderror"
|
||||||
id="auto-shassi-input" name="shassi" value="{{ $order->shassi }}"
|
id="auto-shassi-input" name="shassi" value="{{ old('shassi', $order->shassi) }}"
|
||||||
placeholder="@lang('translation.write-car-shassi')" tabindex="18">
|
placeholder="@lang('translation.write-car-shassi')" tabindex="18">
|
||||||
@error('shassi')
|
@error('shassi')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -430,7 +430,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
|
class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
|
||||||
id="auto-tech_passport-input"
|
id="auto-tech_passport-input"
|
||||||
name="tech_passport" value="{{ $order->tech_passport }}"
|
name="tech_passport" value="{{ old('tech_passport', $order->tech_passport) }}"
|
||||||
placeholder="@lang('translation.write-car-technical-passport')" tabindex="19">
|
placeholder="@lang('translation.write-car-technical-passport')" tabindex="19">
|
||||||
@error('tech_passport')
|
@error('tech_passport')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
class="form-control flatpickr-input @error('tech_given_date') is-invalid @enderror"
|
class="form-control flatpickr-input @error('tech_given_date') is-invalid @enderror"
|
||||||
id="auto-tech_given_date-input"
|
id="auto-tech_given_date-input"
|
||||||
name="tech_given_date"
|
name="tech_given_date"
|
||||||
value="{{ $order->tech_given_date }}"
|
value="{{ old('tech_given_date', $order->tech_given_date ? \Carbon\Carbon::parse($order->tech_given_date)->format('d.m.Y') : '') }}"
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
data-provider="flatpickr" data-date-format="d.m.Y"
|
||||||
data-default="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-default="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
placeholder="@lang('translation.write-car-technical-passport-given-date')"
|
placeholder="@lang('translation.write-car-technical-passport-given-date')"
|
||||||
@@ -466,7 +466,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
|
class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
|
||||||
id="auto-tech_given_whom-input"
|
id="auto-tech_given_whom-input"
|
||||||
name="tech_given_whom" value="{{ $order->tech_given_whom }}"
|
name="tech_given_whom" value="{{ old('tech_given_whom', $order->tech_given_whom) }}"
|
||||||
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
|
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
|
||||||
tabindex="21">
|
tabindex="21">
|
||||||
@error('tech_given_whom')
|
@error('tech_given_whom')
|
||||||
@@ -500,16 +500,16 @@
|
|||||||
@lang('translation.select-diller')
|
@lang('translation.select-diller')
|
||||||
</label>
|
</label>
|
||||||
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
|
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
|
||||||
name="diller" class="form-select @error('diller') is-invalid @enderror"
|
name="diller_id" class="form-select @error('diller_id') is-invalid @enderror"
|
||||||
id="choices-diller-input"
|
id="choices-diller-input"
|
||||||
tabindex="23">
|
tabindex="23">
|
||||||
@foreach($dillers as $diller)
|
@foreach($dillers as $diller)
|
||||||
<option value="{{ $diller->id}}" @if($order->diller== $diller->id) selected @endif>
|
<option value="{{ $diller->id}}" @if((old('diller_id') ?? $order->diller_id) == $diller->id) selected @endif>
|
||||||
{{ $diller->name }}
|
{{ $diller->name }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
@error('diller')
|
@error('diller_id')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.diller')])</strong>
|
<strong>@lang($message,['attribute'=>trans('translation.diller')])</strong>
|
||||||
</span>
|
</span>
|
||||||
@@ -531,7 +531,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
|
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
|
||||||
id="auto-ordered_customer-input"
|
id="auto-ordered_customer-input"
|
||||||
name="ordered_customer" value="{{ $order->ordered_customer }}"
|
name="ordered_customer" value="{{ old('ordered_customer', $order->ordered_customer) }}"
|
||||||
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
|
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
|
||||||
@error('ordered_customer')
|
@error('ordered_customer')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -546,7 +546,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
|
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
|
||||||
name="ordered_customer_phone" id="cleave-phone-init"
|
name="ordered_customer_phone" id="cleave-phone-init"
|
||||||
value="{{ $order->ordered_customer_phone }}"
|
value="{{ old('ordered_customer_phone', $order->ordered_customer_phone) }}"
|
||||||
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
|
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
|
||||||
@error('ordered_customer_phone')
|
@error('ordered_customer_phone')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -573,7 +573,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('cost') is-invalid @enderror"
|
class="form-control text-uppercase @error('cost') is-invalid @enderror"
|
||||||
name="cost"
|
name="cost"
|
||||||
id="cleave-numeral" value="{{ $order->cost }}"
|
id="cleave-numeral" value="{{ old('cost', $order->cost) }}"
|
||||||
placeholder="123,450" aria-label="Price"
|
placeholder="123,450" aria-label="Price"
|
||||||
aria-describedby="product-price-addon"
|
aria-describedby="product-price-addon"
|
||||||
tabindex="26">
|
tabindex="26">
|
||||||
@@ -600,7 +600,7 @@
|
|||||||
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
|
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
|
||||||
id="auto-note-input"
|
id="auto-note-input"
|
||||||
placeholder="@lang('translation.write-cost-note')"
|
placeholder="@lang('translation.write-cost-note')"
|
||||||
rows="3" tabindex="27">{{ $order->note }}</textarea>
|
rows="3" tabindex="27">{{ old('note', $order->note) }}</textarea>
|
||||||
@error('note')
|
@error('note')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
|
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
|
||||||
|
|||||||
@@ -121,14 +121,22 @@
|
|||||||
{{ __('translation.conclusions') }}
|
{{ __('translation.conclusions') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
@if(in_array($order->status,[\App\Enums\OrderStatusEnum::STARTED->name,\App\Enums\OrderStatusEnum::REJECTED->name])&& $isAppraisers)
|
@if($conclusions->count() > 0)
|
||||||
|
<a href="{{ route('auto.generate_pdf', $order->id) }}"
|
||||||
|
target="_blank"
|
||||||
|
class="btn btn-soft-success btn-sm me-1">
|
||||||
|
<i class="ri-download-2-line me-1 align-bottom"></i>
|
||||||
|
Tayyor xulosani yuklab olish
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(!in_array($order->status, [\App\Enums\OrderStatusEnum::APPROVED->value, \App\Enums\OrderStatusEnum::MODERATED->value]) && (in_array(Auth::user()?->role, ['admin', 'manager']) || $isAppraisers))
|
||||||
<a href="{{ route('conclusion.add', ['id' => $order->id, 'type' => \App\Enums\OrderTypeEnum::AUTO->name]) }}"
|
<a href="{{ route('conclusion.add', ['id' => $order->id, 'type' => \App\Enums\OrderTypeEnum::AUTO->name]) }}"
|
||||||
type="button" class="btn btn-soft-info btn-sm">
|
type="button" class="btn btn-soft-info btn-sm">
|
||||||
<i class="ri-upload-2-fill me-1 align-bottom"></i>
|
<i class="ri-upload-2-fill me-1 align-bottom"></i>
|
||||||
{{ __('translation.upload') }}
|
{{ __('translation.upload') }}
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if($order->status == \App\Enums\OrderStatusEnum::FINISHED->name && in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
@if($order->status == \App\Enums\OrderStatusEnum::FINISHED->value && in_array(Auth::user()?->role, ['admin', 'manager']))
|
||||||
<button type="button" class="btn btn-soft-info btn-sm"
|
<button type="button" class="btn btn-soft-info btn-sm"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#givingBonusModal">
|
data-bs-target="#givingBonusModal">
|
||||||
@@ -311,7 +319,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header align-items-center d-flex border-bottom-dashed">
|
<div class="card-header align-items-center d-flex border-bottom-dashed">
|
||||||
<h4 class="card-title mb-0 flex-grow-1"> @lang('translation.member-appraisers')</h4>
|
<h4 class="card-title mb-0 flex-grow-1"> @lang('translation.member-appraisers')</h4>
|
||||||
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
@if(in_array(Auth::user()?->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
<button type="button" class="btn btn-soft-danger btn-sm"
|
<button type="button" class="btn btn-soft-danger btn-sm"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
@@ -343,7 +351,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
<div class="d-flex align-items-center gap-1">
|
<div class="d-flex align-items-center gap-1">
|
||||||
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
@if(in_array(Auth::user()?->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
||||||
<form name="order-member{{ $member->id }}"
|
<form name="order-member{{ $member->id }}"
|
||||||
action="{{ route('member.remove') }}"
|
action="{{ route('member.remove') }}"
|
||||||
method="post"
|
method="post"
|
||||||
@@ -505,7 +513,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Page content end row -->
|
<!-- Page content end row -->
|
||||||
|
|
||||||
@if(Auth::user()->role!=\App\Enums\RoleEnum::USER->name)
|
@if(Auth::user()?->role!=\App\Enums\RoleEnum::USER->name)
|
||||||
<!-- Attachment adding Modal -->
|
<!-- Attachment adding Modal -->
|
||||||
<div class="modal fade" id="attachModal" tabindex="-1" aria-labelledby="attachModalLabel" aria-hidden="true">
|
<div class="modal fade" id="attachModal" tabindex="-1" aria-labelledby="attachModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
@@ -590,7 +598,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Attachment adding end modal -->
|
<!-- Attachment adding end modal -->
|
||||||
@endif
|
@endif
|
||||||
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
@if(in_array(Auth::user()?->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
||||||
<!-- Invite members Modal -->
|
<!-- Invite members Modal -->
|
||||||
<div class="modal fade" id="inviteMembersModal" tabindex="-1" aria-labelledby="inviteMembersModalLabel"
|
<div class="modal fade" id="inviteMembersModal" tabindex="-1" aria-labelledby="inviteMembersModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="text-muted mb-2"> @lang('translation.conclusion-file-pdf') </p>
|
<p class="text-muted mb-2"> @lang('translation.conclusion-file-pdf') </p>
|
||||||
<input type="file" class="form-control @error('file') is-invalid @enderror" name="file">
|
<input type="file" class="form-control @error('file') is-invalid @enderror" name="file" required accept="application/pdf">
|
||||||
@error('file')
|
@error('file')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.file')])</strong>
|
<strong>@lang($message,['attribute'=>trans('translation.file')])</strong>
|
||||||
|
|||||||
@@ -576,6 +576,5 @@
|
|||||||
@section('script')
|
@section('script')
|
||||||
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
|
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
|
||||||
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
|
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
|
||||||
<script src="{{ URL::asset('/assets/js/pages/orders/show.js') }}"></script>
|
|
||||||
<script src="{{ URL::asset('/assets/js/pages/orders/create.js') }}"></script>
|
<script src="{{ URL::asset('/assets/js/pages/orders/create.js') }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('number') is-invalid @enderror"
|
class="form-control text-uppercase @error('number') is-invalid @enderror"
|
||||||
name="number" placeholder="@lang('translation.write-number')"
|
name="number" placeholder="@lang('translation.write-number')"
|
||||||
id="order-number-input" value="{{ $order->number }}"
|
id="order-number-input" value="{{ old('number', $order->number) }}"
|
||||||
tabindex="1">
|
tabindex="1">
|
||||||
@error('number')
|
@error('number')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control flatpickr-input @error('created_at') is-invalid @enderror"
|
class="form-control flatpickr-input @error('created_at') is-invalid @enderror"
|
||||||
id="auto-created_date-input"
|
id="auto-created_date-input"
|
||||||
name="created_at" value="{{ $order->created_at }}"
|
name="created_at" value="{{ old('created_at', $order->created_at ? \Carbon\Carbon::parse($order->created_at)->format('d.m.Y') : '') }}"
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
data-provider="flatpickr" data-date-format="d.m.Y"
|
||||||
data-maxDate="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-maxDate="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
id="choices-purpose-input" tabindex="3">
|
id="choices-purpose-input" tabindex="3">
|
||||||
@foreach($purposeCases as $purposeItem)
|
@foreach($purposeCases as $purposeItem)
|
||||||
<option value="{{ $purposeItem->id }}"
|
<option value="{{ $purposeItem->id }}"
|
||||||
@if(old('purpose_id') == $purposeItem->id)selected @endif>
|
@if(old('purpose_id', $order->purpose_id) == $purposeItem->id)selected @endif>
|
||||||
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
|
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<!-- Inline Checkbox -->
|
<!-- Inline Checkbox -->
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
@if($order->customer_type=='physical') checked @endif
|
@if(old('customer_type', $order->customer_type)=='physical') checked @endif
|
||||||
name="customer_type"
|
name="customer_type"
|
||||||
onclick="handleCustomerClick(this.value);" value="physical"
|
onclick="handleCustomerClick(this.value);" value="physical"
|
||||||
id="flexRadioDefault2">
|
id="flexRadioDefault2">
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input is " type="radio"
|
<input class="form-check-input is " type="radio"
|
||||||
@if($order->customer_type=='juridical') checked
|
@if(old('customer_type', $order->customer_type)=='juridical') checked
|
||||||
@endif name="customer_type"
|
@endif name="customer_type"
|
||||||
onclick="handleCustomerClick(this.value);" value="juridical"
|
onclick="handleCustomerClick(this.value);" value="juridical"
|
||||||
id="flexRadioDefault1">
|
id="flexRadioDefault1">
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
|
||||||
name="customer_last_name" id="order-customer_last_name-input"
|
name="customer_last_name" id="order-customer_last_name-input"
|
||||||
value="{{ $order->customer_last_name }}"
|
value="{{ old('customer_last_name', $order->customer_last_name) }}"
|
||||||
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
|
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
|
||||||
@error('customer_last_name')
|
@error('customer_last_name')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
|
||||||
name="customer_first_name" id="order-customer_first_name-input"
|
name="customer_first_name" id="order-customer_first_name-input"
|
||||||
value="{{ $order->customer_first_name }}"
|
value="{{ old('customer_first_name', $order->customer_first_name) }}"
|
||||||
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
|
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
|
||||||
@error('customer_first_name')
|
@error('customer_first_name')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
|
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
|
||||||
name="customer_patronymic" id="order-customer_patronymic-input"
|
name="customer_patronymic" id="order-customer_patronymic-input"
|
||||||
value="{{ $order->customer_patronymic }}"
|
value="{{ old('customer_patronymic', $order->customer_patronymic) }}"
|
||||||
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
|
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
|
||||||
@error('customer_patronymic')
|
@error('customer_patronymic')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
@lang('translation.customer-juridical-name')
|
@lang('translation.customer-juridical-name')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase" name="customer_company"
|
<input type="text" class="form-control text-uppercase" name="customer_company"
|
||||||
id="order-customer_company-input" value="{{ $order->customer_company }}"
|
id="order-customer_company-input" value="{{ old('customer_company', $order->customer_company) }}"
|
||||||
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
|
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
|
||||||
@error('customer_company')
|
@error('customer_company')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<!-- Inline Checkbox -->
|
<!-- Inline Checkbox -->
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input" type="radio" @if($order->owner_type=='physical') checked
|
<input class="form-check-input" type="radio" @if(old('owner_type', $order->owner_type)=='physical') checked
|
||||||
@endif name="owner_type"
|
@endif name="owner_type"
|
||||||
onclick="handleOwnerClick(this.value);" value="physical"
|
onclick="handleOwnerClick(this.value);" value="physical"
|
||||||
id="flexRadioDefault3">
|
id="flexRadioDefault3">
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-check form-check-inline mb-2">
|
<div class="form-check form-check-inline mb-2">
|
||||||
<input class="form-check-input is " type="radio"
|
<input class="form-check-input is " type="radio"
|
||||||
@if($order->owner_type=='juridical') checked
|
@if(old('owner_type', $order->owner_type)=='juridical') checked
|
||||||
@endif name="owner_type"
|
@endif name="owner_type"
|
||||||
onclick="handleOwnerClick(this.value);" value="juridical"
|
onclick="handleOwnerClick(this.value);" value="juridical"
|
||||||
id="flexRadioDefault4">
|
id="flexRadioDefault4">
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
<label class="form-label" for="order-owner_last_name-input">
|
<label class="form-label" for="order-owner_last_name-input">
|
||||||
@lang('translation.owner-last-name')
|
@lang('translation.owner-last-name')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" value="{{ $order->owner_last_name }}"
|
<input type="text" value="{{ old('owner_last_name', $order->owner_last_name) }}"
|
||||||
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
|
||||||
name="owner_last_name" id="order-owner_last_name-input"
|
name="owner_last_name" id="order-owner_last_name-input"
|
||||||
placeholder="@lang('translation.write-owner-last-name')" tabindex="7">
|
placeholder="@lang('translation.write-owner-last-name')" tabindex="7">
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
|
||||||
name="owner_first_name" value="{{ $order->owner_first_name }}"
|
name="owner_first_name" value="{{ old('owner_first_name', $order->owner_first_name) }}"
|
||||||
id="order-owner_first_name-input"
|
id="order-owner_first_name-input"
|
||||||
placeholder="@lang('translation.write-owner-first-name')" tabindex="8">
|
placeholder="@lang('translation.write-owner-first-name')" tabindex="8">
|
||||||
@error('owner_first_name')
|
@error('owner_first_name')
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
<label class="form-label" for="order-owner_patronymic-input">
|
<label class="form-label" for="order-owner_patronymic-input">
|
||||||
@lang('translation.owner-patronymic')
|
@lang('translation.owner-patronymic')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" value="{{ $order->owner_patronymic }}"
|
<input type="text" value="{{ old('owner_patronymic', $order->owner_patronymic) }}"
|
||||||
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
|
||||||
name="owner_patronymic" id="order-owner_patronymic-input"
|
name="owner_patronymic" id="order-owner_patronymic-input"
|
||||||
placeholder="@lang('translation.write-owner-patronymic')" tabindex="9">
|
placeholder="@lang('translation.write-owner-patronymic')" tabindex="9">
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
|
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
|
||||||
name="owner_company" value="{{ $order->owner_company }}"
|
name="owner_company" value="{{ old('owner_company', $order->owner_company) }}"
|
||||||
id="order-owner_company-input"
|
id="order-owner_company-input"
|
||||||
placeholder="@lang('translation.write-owner-juridical-name')" tabindex="">
|
placeholder="@lang('translation.write-owner-juridical-name')" tabindex="">
|
||||||
@error('owner_company')
|
@error('owner_company')
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
class="form-control text-uppercase @error('contract_date') is-invalid @enderror"
|
class="form-control text-uppercase @error('contract_date') is-invalid @enderror"
|
||||||
id="estate-contract-date-input" name="contract_date"
|
id="estate-contract-date-input" name="contract_date"
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
data-provider="flatpickr" data-date-format="d.m.Y"
|
||||||
value="{{ $order->contract_date }}"
|
value="{{ old('contract_date', $order->contract_date ? \Carbon\Carbon::parse($order->contract_date)->format('d.m.Y') : '') }}"
|
||||||
placeholder="@lang('translation.write-estate-contract-date')"
|
placeholder="@lang('translation.write-estate-contract-date')"
|
||||||
tabindex="13">
|
tabindex="13">
|
||||||
@error('contract_date')
|
@error('contract_date')
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('name_of_object') is-invalid @enderror"
|
class="form-control text-uppercase @error('name_of_object') is-invalid @enderror"
|
||||||
id="estate-name-of-object-input" name="name_of_object"
|
id="estate-name-of-object-input" name="name_of_object"
|
||||||
value="{{ $order->name_of_object }}"
|
value="{{ old('name_of_object', $order->name_of_object) }}"
|
||||||
placeholder="@lang('translation.write-estate-name-of-object')" tabindex="14">
|
placeholder="@lang('translation.write-estate-name-of-object')" tabindex="14">
|
||||||
@error('name_of_object')
|
@error('name_of_object')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
id="choices-region-input" tabindex="3">
|
id="choices-region-input" tabindex="3">
|
||||||
@foreach($regions as $region)
|
@foreach($regions as $region)
|
||||||
<option value="{{ $region->id }}"
|
<option value="{{ $region->id }}"
|
||||||
@if($order->region == $region->id)selected @endif>
|
@if(old('region', $order->region) == $region->id)selected @endif>
|
||||||
{{ $region->{str_replace('_', '-', app()->getLocale())} }}
|
{{ $region->{str_replace('_', '-', app()->getLocale())} }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
id="choices-district-input" tabindex="3">
|
id="choices-district-input" tabindex="3">
|
||||||
@foreach($districts as $district)
|
@foreach($districts as $district)
|
||||||
<option value="{{ $district->id }}"
|
<option value="{{ $district->id }}"
|
||||||
@if($order->district == $district->id)selected @endif>
|
@if(old('district', $order->district) == $district->id)selected @endif>
|
||||||
{{ $district->{str_replace('_', '-', app()->getLocale())} }}
|
{{ $district->{str_replace('_', '-', app()->getLocale())} }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('address') is-invalid @enderror"
|
class="form-control text-uppercase @error('address') is-invalid @enderror"
|
||||||
id="estate-address-input" name="address"
|
id="estate-address-input" name="address"
|
||||||
value="{{ $order->address }}"
|
value="{{ old('address', $order->address) }}"
|
||||||
placeholder="@lang('translation.select-estate-address')" tabindex="11">
|
placeholder="@lang('translation.select-estate-address')" tabindex="11">
|
||||||
@error('address')
|
@error('address')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -380,7 +380,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('home') is-invalid @enderror"
|
class="form-control text-uppercase @error('home') is-invalid @enderror"
|
||||||
id="estate-home-input" name="home" value="{{ $order->home }}"
|
id="estate-home-input" name="home" value="{{ old('home', $order->home) }}"
|
||||||
placeholder="@lang('translation.write-home')" tabindex="12">
|
placeholder="@lang('translation.write-home')" tabindex="12">
|
||||||
@error('home')
|
@error('home')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -395,7 +395,7 @@
|
|||||||
@lang('translation.area')
|
@lang('translation.area')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase @error('area') is-invalid @enderror"
|
<input type="text" class="form-control text-uppercase @error('area') is-invalid @enderror"
|
||||||
id="estate-area-input" name="area" value="{{ $order->area }}"
|
id="estate-area-input" name="area" value="{{ old('area', $order->area) }}"
|
||||||
placeholder="@lang('translation.write-estate-area')" tabindex="16">
|
placeholder="@lang('translation.write-estate-area')" tabindex="16">
|
||||||
@error('area')
|
@error('area')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
@lang('translation.overall-area')
|
@lang('translation.overall-area')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase @error('overall_area') is-invalid @enderror"
|
<input type="text" class="form-control text-uppercase @error('overall_area') is-invalid @enderror"
|
||||||
id="estate-overall-area-input" name="overall_area" value="{{ $order->overall_area }}"
|
id="estate-overall-area-input" name="overall_area" value="{{ old('overall_area', $order->overall_area) }}"
|
||||||
placeholder="@lang('translation.write-overall-area')" tabindex="17">
|
placeholder="@lang('translation.write-overall-area')" tabindex="17">
|
||||||
@error('overall_area')
|
@error('overall_area')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
@lang('translation.usefull-area')
|
@lang('translation.usefull-area')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase @error('usefull_area') is-invalid @enderror"
|
<input type="text" class="form-control text-uppercase @error('usefull_area') is-invalid @enderror"
|
||||||
id="estate-usefull-area-input" name="usefull_area" value="{{ $order->usefull_area }}"
|
id="estate-usefull-area-input" name="usefull_area" value="{{ old('usefull_area', $order->usefull_area) }}"
|
||||||
placeholder="@lang('translation.write-estate-usefull-area')" tabindex="18">
|
placeholder="@lang('translation.write-estate-usefull-area')" tabindex="18">
|
||||||
@error('usefull_area')
|
@error('usefull_area')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -434,7 +434,7 @@
|
|||||||
@lang('translation.live-area')
|
@lang('translation.live-area')
|
||||||
</label>
|
</label>
|
||||||
<input type="text" class="form-control text-uppercase @error('live_area') is-invalid @enderror"
|
<input type="text" class="form-control text-uppercase @error('live_area') is-invalid @enderror"
|
||||||
id="estate-live-area-input" name="live_area" value="{{ $order->live_area }}"
|
id="estate-live_area-input" name="live_area" value="{{ old('live_area', $order->live_area) }}"
|
||||||
placeholder="@lang('translation.write-estate-live-area')" tabindex="18">
|
placeholder="@lang('translation.write-estate-live-area')" tabindex="18">
|
||||||
@error('live_area')
|
@error('live_area')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -443,57 +443,6 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{--<div class="row gy-4">
|
|
||||||
<div class="mb-3 col-xxl-4 col-md-6">
|
|
||||||
<label class="form-label" for="estate-tech-passport-input">
|
|
||||||
@lang('translation.estate-technical-passport')
|
|
||||||
</label>
|
|
||||||
<input type="text" class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
|
|
||||||
id="estate-tech-passport-input"
|
|
||||||
name="tech_passport" value="{{ $order->tech_passport }}"
|
|
||||||
placeholder="@lang('translation.write-estate-technical-passport')" tabindex="19">
|
|
||||||
@error('tech_passport')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.estate-technical-passport')])</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
<div class="mb-3 col-xxl-4 col-md-6">
|
|
||||||
<label class="form-label"
|
|
||||||
for="estate-tech-given-date-input">
|
|
||||||
@lang('translation.estate-technical-passport-given-date')
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-control flatpickr-input text-uppercase @error('tech_given_date') is-invalid @enderror"
|
|
||||||
id="estate-tech-given-date-input"
|
|
||||||
name="tech_given_date"
|
|
||||||
value="{{ $order->tech_given_date }}"
|
|
||||||
data-provider="flatpickr" data-date-format="d.m.Y"
|
|
||||||
placeholder="@lang('translation.write-car-technical-passport-given-date')"
|
|
||||||
tabindex="20">
|
|
||||||
@error('tech_given_date')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-date')])</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
<div class="mb-3 col-xxl-4 col-md-6">
|
|
||||||
<label class="form-label"
|
|
||||||
for="estate-given-by-whom-input">
|
|
||||||
@lang('translation.technical-passport-given-by-whom')
|
|
||||||
</label>
|
|
||||||
<input type="text" class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
|
|
||||||
id="estate-given-by-whom-input"
|
|
||||||
name="tech_given_whom" value="{{ $order->tech_given_whom }}"
|
|
||||||
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
|
|
||||||
tabindex="21">
|
|
||||||
@error('tech_given_whom')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-by-whom')])</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>--}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end card -->
|
<!-- end card -->
|
||||||
@@ -517,11 +466,11 @@
|
|||||||
@lang('translation.select-diller')
|
@lang('translation.select-diller')
|
||||||
</label>
|
</label>
|
||||||
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
|
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
|
||||||
name="diller" class="form-select @error('diller') is-invalid @enderror"
|
name="diller_id" class="form-select @error('diller_id') is-invalid @enderror"
|
||||||
id="choices-diller-input"
|
id="choices-diller-input"
|
||||||
tabindex="23">
|
tabindex="23">
|
||||||
@foreach($dillers as $diller)
|
@foreach($dillers as $diller)
|
||||||
<option value="{{ $diller->id}}" @if($order->diller== $diller->id) selected @endif>
|
<option value="{{ $diller->id}}" @if(old('diller_id', $order->diller_id)== $diller->id) selected @endif>
|
||||||
{{ $diller->name }}
|
{{ $diller->name }}
|
||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -548,7 +497,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
|
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
|
||||||
id="auto-ordered_customer-input"
|
id="auto-ordered_customer-input"
|
||||||
name="ordered_customer" value="{{ $order->ordered_customer }}"
|
name="ordered_customer" value="{{ old('ordered_customer', $order->ordered_customer) }}"
|
||||||
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
|
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
|
||||||
@error('ordered_customer')
|
@error('ordered_customer')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -563,7 +512,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
|
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
|
||||||
name="ordered_customer_phone" id="cleave-phone-init"
|
name="ordered_customer_phone" id="cleave-phone-init"
|
||||||
value="{{ $order->ordered_customer_phone }}"
|
value="{{ old('ordered_customer_phone', $order->ordered_customer_phone) }}"
|
||||||
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
|
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
|
||||||
@error('ordered_customer_phone')
|
@error('ordered_customer_phone')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
@@ -590,7 +539,7 @@
|
|||||||
<input type="text"
|
<input type="text"
|
||||||
class="form-control text-uppercase @error('cost') is-invalid @enderror"
|
class="form-control text-uppercase @error('cost') is-invalid @enderror"
|
||||||
name="cost"
|
name="cost"
|
||||||
id="cleave-numeral" value="{{ $order->cost }}"
|
id="cleave-numeral" value="{{ old('cost', $order->cost) }}"
|
||||||
placeholder="123,450" aria-label="Price"
|
placeholder="123,450" aria-label="Price"
|
||||||
aria-describedby="product-price-addon"
|
aria-describedby="product-price-addon"
|
||||||
tabindex="26">
|
tabindex="26">
|
||||||
@@ -617,7 +566,7 @@
|
|||||||
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
|
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
|
||||||
id="auto-note-input"
|
id="auto-note-input"
|
||||||
placeholder="@lang('translation.write-cost-note')"
|
placeholder="@lang('translation.write-cost-note')"
|
||||||
rows="3" tabindex="27">{{ $order->note }}</textarea>
|
rows="3" tabindex="27">{{ old('note', $order->note) }}</textarea>
|
||||||
@error('note')
|
@error('note')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="invalid-feedback" role="alert">
|
||||||
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
|
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
|
||||||
|
|||||||
@@ -116,15 +116,22 @@
|
|||||||
<h4 class="card-title mb-0 flex-grow-1">
|
<h4 class="card-title mb-0 flex-grow-1">
|
||||||
{{ __('translation.conclusions') }}
|
{{ __('translation.conclusions') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flex-shrink-0">
|
@if($conclusions->count() > 0)
|
||||||
@if(in_array($order->status,[\App\Enums\OrderStatusEnum::STARTED->name,\App\Enums\OrderStatusEnum::REJECTED->name]) && $isAppraisers)
|
<a href="{{ route('estate.generate_pdf', $order->id) }}"
|
||||||
|
target="_blank"
|
||||||
|
class="btn btn-soft-success btn-sm me-1">
|
||||||
|
<i class="ri-download-2-line me-1 align-bottom"></i>
|
||||||
|
Tayyor xulosani yuklab olish
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(!in_array($order->status, [\App\Enums\OrderStatusEnum::APPROVED->value, \App\Enums\OrderStatusEnum::MODERATED->value]) && (in_array(Auth::user()?->role, ['admin', 'manager']) || $isAppraisers))
|
||||||
<a href="{{ route('conclusion.add', ['id' => $order->id, 'type' => \App\Enums\OrderTypeEnum::ESTATE->name]) }}"
|
<a href="{{ route('conclusion.add', ['id' => $order->id, 'type' => \App\Enums\OrderTypeEnum::ESTATE->name]) }}"
|
||||||
type="button" class="btn btn-soft-info btn-sm">
|
type="button" class="btn btn-soft-info btn-sm">
|
||||||
<i class="ri-upload-2-fill me-1 align-bottom"></i>
|
<i class="ri-upload-2-fill me-1 align-bottom"></i>
|
||||||
{{ __('translation.upload') }}
|
{{ __('translation.upload') }}
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if($order->status == \App\Enums\OrderStatusEnum::FINISHED->name && in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
|
@if($order->status == \App\Enums\OrderStatusEnum::FINISHED->value && in_array(Auth::user()?->role, ['admin', 'manager']))
|
||||||
<button type="button" class="btn btn-soft-info btn-sm"
|
<button type="button" class="btn btn-soft-info btn-sm"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#givingBonusModal">
|
data-bs-target="#givingBonusModal">
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-body p-4">
|
<div class="card-body p-4">
|
||||||
<div class="text-center mt-2">
|
<div class="text-center mt-2">
|
||||||
<img width="100" src="{{ URL::asset('storage/attachments/auto_'.$order->id.'/qr.png') }}"
|
<img width="100" src="{{ route('qr.image', ['type' => 'auto', 'id' => $order->id]) }}"
|
||||||
alt="Order qr code image">
|
alt="Order qr code image">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 mt-4">
|
<div class="p-2 mt-4">
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-body p-4">
|
<div class="card-body p-4">
|
||||||
<div class="text-center mt-2">
|
<div class="text-center mt-2">
|
||||||
<img width="100" src="{{ URL::asset('storage/attachments/estate_'.$order->id.'/qr.png') }}"
|
<img width="100" src="{{ route('qr.image', ['type' => 'estate', 'id' => $order->id]) }}"
|
||||||
alt="Order qr code image">
|
alt="Order qr code image">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 mt-4">
|
<div class="p-2 mt-4">
|
||||||
|
|||||||
@@ -42,7 +42,11 @@ Route::get('index/{locale}', [HomeController::class, 'lang']);
|
|||||||
|
|
||||||
Route::get('/', [HomeController::class, 'index'])->name('root');
|
Route::get('/', [HomeController::class, 'index'])->name('root');
|
||||||
Route::get('index', [HomeController::class, 'index'])->name('index');
|
Route::get('index', [HomeController::class, 'index'])->name('index');
|
||||||
|
Route::get('v/{type}/{id}', [QrController::class, 'verify'])->name('qr.verify');
|
||||||
|
Route::get('qr-image/{type}/{id}', [QrController::class, 'qrImage'])->name('qr.image');
|
||||||
|
Route::get('/download/{file}', [FileStoreController::class, 'downloadFile'])->name('download');
|
||||||
|
|
||||||
|
Route::group(['middleware' => ['auth']], function () {
|
||||||
//Update User Details
|
//Update User Details
|
||||||
Route::post('/update-profile/{id}', [ProfileController::class, 'updateProfile'])->name('updateProfile');
|
Route::post('/update-profile/{id}', [ProfileController::class, 'updateProfile'])->name('updateProfile');
|
||||||
Route::post('/update-password/{id}', [ProfileController::class, 'updatePassword'])->name('updatePassword');
|
Route::post('/update-password/{id}', [ProfileController::class, 'updatePassword'])->name('updatePassword');
|
||||||
@@ -62,6 +66,7 @@ Route::get('/estate/show/{order}', [EstateController::class, 'show'])->name('est
|
|||||||
Route::get('/estate/show-activities/{order}', [EstateController::class, 'showActivities'])->name('estate.show-activities');
|
Route::get('/estate/show-activities/{order}', [EstateController::class, 'showActivities'])->name('estate.show-activities');
|
||||||
Route::get('/estate/show-team/{order}', [EstateController::class, 'showTeam'])->name('estate.show-team');
|
Route::get('/estate/show-team/{order}', [EstateController::class, 'showTeam'])->name('estate.show-team');
|
||||||
Route::get('/estate/show-documents/{order}', [EstateController::class, 'showDocuments'])->name('estate.show-documents');
|
Route::get('/estate/show-documents/{order}', [EstateController::class, 'showDocuments'])->name('estate.show-documents');
|
||||||
|
Route::get('/estate/generate-pdf/{order}', [EstateController::class, 'generatePdf'])->name('estate.generate_pdf');
|
||||||
Route::put('/estate/order-clone/{id}', [EstateController::class, 'orderClone'])->name('estate.clone');
|
Route::put('/estate/order-clone/{id}', [EstateController::class, 'orderClone'])->name('estate.clone');
|
||||||
|
|
||||||
Route::get('/auto', [AutoController::class, 'index'])->name('auto.index');
|
Route::get('/auto', [AutoController::class, 'index'])->name('auto.index');
|
||||||
@@ -73,13 +78,13 @@ Route::get('/auto/show/{order}', [AutoController::class, 'show'])->name('auto.sh
|
|||||||
Route::get('/auto/show-activities/{order}', [AutoController::class, 'showActivities'])->name('auto.show-activities');
|
Route::get('/auto/show-activities/{order}', [AutoController::class, 'showActivities'])->name('auto.show-activities');
|
||||||
Route::get('/auto/show-team/{order}', [AutoController::class, 'showTeam'])->name('auto.show-team');
|
Route::get('/auto/show-team/{order}', [AutoController::class, 'showTeam'])->name('auto.show-team');
|
||||||
Route::get('/auto/show-documents/{order}', [AutoController::class, 'showDocuments'])->name('auto.show-documents');
|
Route::get('/auto/show-documents/{order}', [AutoController::class, 'showDocuments'])->name('auto.show-documents');
|
||||||
|
Route::get('/auto/generate-pdf/{order}', [AutoController::class, 'generatePdf'])->name('auto.generate_pdf');
|
||||||
Route::put('/auto/order-clone/{id}', [AutoController::class, 'orderClone'])->name('auto.clone');
|
Route::put('/auto/order-clone/{id}', [AutoController::class, 'orderClone'])->name('auto.clone');
|
||||||
|
|
||||||
Route::get('/conclusion/add/{id}/{type}', [ConclusionController::class, 'create'])->name('conclusion.add');
|
Route::get('/conclusion/add/{id}/{type}', [ConclusionController::class, 'create'])->name('conclusion.add');
|
||||||
Route::post('/conclusion/store', [ConclusionController::class, 'store'])->name('conclusion.store');
|
Route::post('/conclusion/store', [ConclusionController::class, 'store'])->name('conclusion.store');
|
||||||
Route::put('/conclusion/reject', [ConclusionController::class, 'reject'])->name('conclusion.reject');
|
Route::put('/conclusion/reject', [ConclusionController::class, 'reject'])->name('conclusion.reject');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/tools', [ToolsController::class, 'index'])->name('tools.index');
|
Route::get('/tools', [ToolsController::class, 'index'])->name('tools.index');
|
||||||
Route::get('/user', [UserController::class, 'index'])->name('user.index');
|
Route::get('/user', [UserController::class, 'index'])->name('user.index');
|
||||||
Route::post('/user/store', [UserController::class, 'create'])->name('user.store');
|
Route::post('/user/store', [UserController::class, 'create'])->name('user.store');
|
||||||
@@ -97,7 +102,7 @@ Route::get('/profile/show-activities', [ProfileController::class, 'showActivitie
|
|||||||
Route::get('/profile/show-projects', [ProfileController::class, 'showProjects'])->name('profile.show-projects');
|
Route::get('/profile/show-projects', [ProfileController::class, 'showProjects'])->name('profile.show-projects');
|
||||||
Route::get('/profile/show-documents', [ProfileController::class, 'showDocuments'])->name('profile.show-documents');
|
Route::get('/profile/show-documents', [ProfileController::class, 'showDocuments'])->name('profile.show-documents');
|
||||||
|
|
||||||
Route::get('/user/profile', [ProfileController::class, 'profile'], 'profile')->name('profile');
|
Route::get('/user/profile', [ProfileController::class, 'profile'])->name('profile');
|
||||||
Route::put('/user/activate/{id}', [UserController::class, 'activate'])->name('user.activate');
|
Route::put('/user/activate/{id}', [UserController::class, 'activate'])->name('user.activate');
|
||||||
Route::put('/user/block/{id}', [UserController::class, 'block'])->name('user.block');
|
Route::put('/user/block/{id}', [UserController::class, 'block'])->name('user.block');
|
||||||
Route::get('/user/appraisers', [UserController::class, 'appraisers'])->name('user.appraisers');
|
Route::get('/user/appraisers', [UserController::class, 'appraisers'])->name('user.appraisers');
|
||||||
@@ -109,10 +114,8 @@ Route::get('/role', [RoleController::class, 'index'])->name('role.index');
|
|||||||
Route::put('/role/permit', [RoleController::class, 'permit'])->name('role.permit');
|
Route::put('/role/permit', [RoleController::class, 'permit'])->name('role.permit');
|
||||||
Route::get('/notification/type', NotificationTypeController::class)->name('notification.type.index');
|
Route::get('/notification/type', NotificationTypeController::class)->name('notification.type.index');
|
||||||
Route::get('/notification/template', [NotificationTemplateController::class, 'index'])->name('notification.template.index');
|
Route::get('/notification/template', [NotificationTemplateController::class, 'index'])->name('notification.template.index');
|
||||||
//Route::post('/store/my/file', [FileStoreController::class, 'storeMyFile'])->name('store.my.file');
|
|
||||||
Route::post('/attach/file', [FileStoreController::class, 'attachFiles'])->name('attach.files');
|
Route::post('/attach/file', [FileStoreController::class, 'attachFiles'])->name('attach.files');
|
||||||
Route::post('/attach/profile-file', [FileStoreController::class, 'attachProfileFiles'])->name('profile.files');
|
Route::post('/attach/profile-file', [FileStoreController::class, 'attachProfileFiles'])->name('profile.files');
|
||||||
Route::get('/download/{file}', [FileStoreController::class, 'downloadFile'])->name('download');
|
|
||||||
Route::delete('file/delete/{file}', [FileStoreController::class, 'delete'])->name('file.delete');
|
Route::delete('file/delete/{file}', [FileStoreController::class, 'delete'])->name('file.delete');
|
||||||
Route::put('debit/credit', [BonusController::class, 'storeCredit'])->name('credit.store');
|
Route::put('debit/credit', [BonusController::class, 'storeCredit'])->name('credit.store');
|
||||||
Route::resource('/debit', DebitController::class);
|
Route::resource('/debit', DebitController::class);
|
||||||
@@ -123,5 +126,6 @@ Route::resource('regions', RegionController::class);
|
|||||||
Route::get('/regions/districts/{id}', [RegionController::class, 'districts'])->name('regions.districts');
|
Route::get('/regions/districts/{id}', [RegionController::class, 'districts'])->name('regions.districts');
|
||||||
Route::resource('districts', DistrictController::class);
|
Route::resource('districts', DistrictController::class);
|
||||||
Route::resource('concerns', ConcernController::class);
|
Route::resource('concerns', ConcernController::class);
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('{any}', [HomeController::class, 'pages'])->name('pages');
|
Route::get('{any}', [HomeController::class, 'pages'])->name('pages');
|
||||||
|
|||||||
0
storage/app/public/.gitkeep
Normal file
BIN
storage/app/public/attachments/AUTO7884/qr.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_1/qr.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
storage/app/public/attachments/auto_7883/qr.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
storage/app/public/attachments/auto_7884/qr.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7885/qr.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7886/qr.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
storage/app/public/attachments/auto_7887/qr.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7889/qr.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7890/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7891/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7892/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7893/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7894/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7895/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_7896/qr.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
storage/app/public/attachments/auto_7897/qr.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
storage/app/public/attachments/auto_9999/qr.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
storage/app/public/attachments/estate_8179/qr.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 19 KiB |
BIN
storage/app/public/test_qr.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |