debug the excel reports

This commit is contained in:
2024-02-20 13:22:11 +00:00
parent c8538855ae
commit 79cde5bd69
85 changed files with 1001859 additions and 96 deletions

58
.env.example Normal file
View File

@@ -0,0 +1,58 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:R0FQ6mq9Ar2n5ToqeseUNN6zh94JGDnECsjF/pLOqaM=
APP_DEBUG=false
APP_URL=https://rms.witel.ir
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=rms_db
DB_USERNAME=rms_user
DB_PASSWORD=1qaz@WSX
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
PAYMENT_USERNAME="cspay"
PAYMENT_PASSWORD="cspay123"
PAYMENT_LINK="https://payment.rmto.ir"
RMS_VERSION=3.0
RMS_CTO_PHONE_NUMBER="09380220400"
TELESCOPE_RESPONSE_SIZE_LIMIT=128
DEBUGBAR_ENABLED=false

View File

@@ -229,7 +229,7 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$sum = [ $sum = [
'TarizRahCount' => 0, 'TarizRahCount' => 0,
@@ -262,31 +262,31 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
foreach ($data as $value) { foreach ($data as $value) {
$array[$value->province_id] = [ $array[$value->province_id] = [
'province_fa' => $value->province_fa, 'province_fa' => $value->province_fa,
'TarizRahCount' => $value->TarizRahCount ?? '-', 'TarizRahCount' => $value->TarizRahCount ?? 0,
'EslahGhosCount' => $value->EslahGhosCount ?? '-', 'EslahGhosCount' => $value->EslahGhosCount ?? 0,
'TaransheBardariCount' => $value->TaransheBardariCount ?? '-', 'TaransheBardariCount' => $value->TaransheBardariCount ?? 0,
'EhdasMeydanCount' => $value->EhdasMeydanCount ?? '-', 'EhdasMeydanCount' => $value->EhdasMeydanCount ?? 0,
'EhdasTaghatoCount' => $value->EhdasTaghatoCount ?? '-', 'EhdasTaghatoCount' => $value->EhdasTaghatoCount ?? 0,
'ImenSaziCount' => $value->ImenSaziCount ?? '-', 'ImenSaziCount' => $value->ImenSaziCount ?? 0,
'EslahVoroodiCount' => $value->EslahVoroodiCount ?? '-', 'EslahVoroodiCount' => $value->EslahVoroodiCount ?? 0,
'EhdasToonelCount' => $value->EhdasToonelCount ?? '-', 'EhdasToonelCount' => $value->EhdasToonelCount ?? 0,
'EhdasVariantCount' => $value->EhdasVariantCount ?? '-', 'EhdasVariantCount' => $value->EhdasVariantCount ?? 0,
'TarizAbnieFaniCount' => $value->TarizAbnieFaniCount ?? '-', 'TarizAbnieFaniCount' => $value->TarizAbnieFaniCount ?? 0,
'SakhtHaelCount' => $value->SakhtHaelCount ?? '-', 'SakhtHaelCount' => $value->SakhtHaelCount ?? 0,
'SayerCount' => $value->SakhtHaelCount ?? '-', 'SayerCount' => $value->SakhtHaelCount ?? 0,
'countAll' => $value->countAll ?? '-', 'countAll' => $value->countAll ?? 0,
'TarizRahAvg' => $value->TarizRahAvg ?? '-', 'TarizRahAvg' => $value->TarizRahAvg ?? 0,
'EslahGhosAvg' => $value->EslahGhosAvg ?? '-', 'EslahGhosAvg' => $value->EslahGhosAvg ?? 0,
'TaransheBardariAvg' => $value->TaransheBardariAvg ?? '-', 'TaransheBardariAvg' => $value->TaransheBardariAvg ?? 0,
'EhdasMeydanAvg' => $value->EhdasMeydanAvg ?? '-', 'EhdasMeydanAvg' => $value->EhdasMeydanAvg ?? 0,
'EhdasTaghatoAvg' => $value->EhdasTaghatoAvg ?? '-', 'EhdasTaghatoAvg' => $value->EhdasTaghatoAvg ?? 0,
'ImenSaziAvg' => $value->ImenSaziAvg ?? '-', 'ImenSaziAvg' => $value->ImenSaziAvg ?? 0,
'EslahVoroodiAvg' => $value->EslahVoroodiAvg ?? '-', 'EslahVoroodiAvg' => $value->EslahVoroodiAvg ?? 0,
'EhdasToonelAvg' => $value->EhdasToonelAvg ?? '-', 'EhdasToonelAvg' => $value->EhdasToonelAvg ?? 0,
'EhdasVariantAvg' => $value->EhdasVariantAvg ?? '-', 'EhdasVariantAvg' => $value->EhdasVariantAvg ?? 0,
'TarizAbnieFaniAvg' => $value->TarizAbnieFaniAvg ?? '-', 'TarizAbnieFaniAvg' => $value->TarizAbnieFaniAvg ?? 0,
'SakhtHaelAvg' => $value->SakhtHaelAvg ?? '-', 'SakhtHaelAvg' => $value->SakhtHaelAvg ?? 0,
'SayerAvg' => $value->SakhtHaelAvg ?? '-', 'SayerAvg' => $value->SakhtHaelAvg ?? 0,
]; ];
$sum['TarizRahCount'] += $value->TarizRahCount; $sum['TarizRahCount'] += $value->TarizRahCount;

View File

@@ -167,7 +167,7 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$sum = [ $sum = [
'BotoniDoing' => 0, 'BotoniDoing' => 0,

View File

@@ -69,11 +69,11 @@ class RoadUpgradeSafeties implements FromView, ShouldAutoSize, WithEvents, WithD
'RoshanayiNoghteyi' => $road->operation_type_id1 == '304' ? $road->operation_type_amount1 : 'RoshanayiNoghteyi' => $road->operation_type_id1 == '304' ? $road->operation_type_amount1 :
($road->operation_type_id2 == '304' ? $road->operation_type_amount2 : ($road->operation_type_id2 == '304' ? $road->operation_type_amount2 :
($road->operation_type_id3 == '304' ? $road->operation_type_amount3 : ($road->operation_type_id3 == '304' ? $road->operation_type_amount3 :
($road->operation_type_id4 == '304' ? $road->operation_type_amount4 : "-"))), ($road->operation_type_id4 == '304' ? $road->operation_type_amount4 : 0))),
'AlaemImeni' => $road->operation_type_id1 == '305' ? $road->operation_type_amount1 : 'AlaemImeni' => $road->operation_type_id1 == '305' ? $road->operation_type_amount1 :
($road->operation_type_id2 == '305' ? $road->operation_type_amount2 : ($road->operation_type_id2 == '305' ? $road->operation_type_amount2 :
($road->operation_type_id3 == '305' ? $road->operation_type_amount3 : ($road->operation_type_id3 == '305' ? $road->operation_type_amount3 :
($road->operation_type_id4 == '305' ? $road->operation_type_amount4 : "-"))), ($road->operation_type_id4 == '305' ? $road->operation_type_amount4 : 0))),
'Khatkeshi' => $road->operation_type_id1 == '306' ? $road->operation_type_amount1 : 'Khatkeshi' => $road->operation_type_id1 == '306' ? $road->operation_type_amount1 :
($road->operation_type_id2 == '306' ? $road->operation_type_amount2 : ($road->operation_type_id2 == '306' ? $road->operation_type_amount2 :
($road->operation_type_id3 == '306' ? $road->operation_type_amount3 : ($road->operation_type_id3 == '306' ? $road->operation_type_amount3 :
@@ -101,11 +101,11 @@ class RoadUpgradeSafeties implements FromView, ShouldAutoSize, WithEvents, WithD
'RoshanayiNoghteyi' => $road->operation_type_id1 == '304' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 : 'RoshanayiNoghteyi' => $road->operation_type_id1 == '304' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 :
($road->operation_type_id2 == '304' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 : ($road->operation_type_id2 == '304' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 :
($road->operation_type_id3 == '304' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 : ($road->operation_type_id3 == '304' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 :
($road->operation_type_id4 == '304' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : "-"))), ($road->operation_type_id4 == '304' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : 0))),
'AlaemImeni' => $road->operation_type_id1 == '305' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 : 'AlaemImeni' => $road->operation_type_id1 == '305' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 :
($road->operation_type_id2 == '305' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 : ($road->operation_type_id2 == '305' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 :
($road->operation_type_id3 == '305' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 : ($road->operation_type_id3 == '305' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 :
($road->operation_type_id4 == '305' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : "-"))), ($road->operation_type_id4 == '305' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : 0))),
'Khatkeshi' => $road->operation_type_id1 == '306' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 : 'Khatkeshi' => $road->operation_type_id1 == '306' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 :
($road->operation_type_id2 == '306' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 : ($road->operation_type_id2 == '306' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 :
($road->operation_type_id3 == '306' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 : ($road->operation_type_id3 == '306' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 :

View File

@@ -290,7 +290,7 @@ class summaryAccidentPerformanceCity implements FromView, ShouldAutoSize, WithEv
$query .= " GROUP BY city_id $query .= " GROUP BY city_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$array[$value->city_id] = [ $array[$value->city_id] = [

View File

@@ -271,7 +271,7 @@ class summaryAccidentPerformanceProject implements FromView, ShouldAutoSize, Wit
$query .= " GROUP BY unique_code $query .= " GROUP BY unique_code
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
return view('excel.Upgrade.summaryAccidentPerformanceProject', [ return view('excel.Upgrade.summaryAccidentPerformanceProject', [
'array' => $data, 'array' => $data,

View File

@@ -281,7 +281,7 @@ class summaryAccidentPerformanceProvince implements FromView, ShouldAutoSize, Wi
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$sum = [ $sum = [

View File

@@ -136,7 +136,7 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$provinces = \App\Models\Province::select('id', 'name_fa') $provinces = \App\Models\Province::select('id', 'name_fa')
->when($province, function($query, $province) { ->when($province, function($query, $province) {

View File

@@ -57,10 +57,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 601 THEN operation_type_amount3 WHEN operation_type_id3 = 601 THEN operation_type_amount3
WHEN operation_type_id4 = 601 THEN operation_type_amount4 WHEN operation_type_id4 = 601 THEN operation_type_amount4
END)) AS KhakiDoing, END)) AS KhakiDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 601 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100 ROUND(SUM(CASE WHEN operation_type_id1 = 601 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 601 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100 WHEN operation_type_id2 = 601 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 601 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100 WHEN operation_type_id3 = 601 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 601 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100 WHEN operation_type_id4 = 601 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS KhakiDone, END)) AS KhakiDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN operation_type_amount1 ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN operation_type_amount1
@@ -68,10 +68,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 602 THEN operation_type_amount3 WHEN operation_type_id3 = 602 THEN operation_type_amount3
WHEN operation_type_id4 = 602 THEN operation_type_amount4 WHEN operation_type_id4 = 602 THEN operation_type_amount4
END)) AS RosaziDoing, END)) AS RosaziDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100 ROUND(SUM(CASE WHEN operation_type_id1 = 602 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 602 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100 WHEN operation_type_id2 = 602 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 602 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100 WHEN operation_type_id3 = 602 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 602 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100 WHEN operation_type_id4 = 602 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS RosaziDone, END)) AS RosaziDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN operation_type_amount1 ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN operation_type_amount1
@@ -79,10 +79,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 603 THEN operation_type_amount3 WHEN operation_type_id3 = 603 THEN operation_type_amount3
WHEN operation_type_id4 = 603 THEN operation_type_amount4 WHEN operation_type_id4 = 603 THEN operation_type_amount4
END)) AS AbneyehDoing, END)) AS AbneyehDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100 ROUND(SUM(CASE WHEN operation_type_id1 = 603 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 603 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100 WHEN operation_type_id2 = 603 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 603 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100 WHEN operation_type_id3 = 603 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 603 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100 WHEN operation_type_id4 = 603 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS AbneyehDone, END)) AS AbneyehDone,
ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN operation_type_amount1 ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN operation_type_amount1
@@ -90,10 +90,10 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
WHEN operation_type_id3 = 604 THEN operation_type_amount3 WHEN operation_type_id3 = 604 THEN operation_type_amount3
WHEN operation_type_id4 = 604 THEN operation_type_amount4 WHEN operation_type_id4 = 604 THEN operation_type_amount4
END)) AS AsphaltDoing, END)) AS AsphaltDoing,
ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN (cast(operation_type_amount1 as int) * cast(operation_type_progress1 as int))/100 ROUND(SUM(CASE WHEN operation_type_id1 = 604 THEN (cast(operation_type_amount1 as unsigned) * cast(operation_type_progress1 as unsigned))/100
WHEN operation_type_id2 = 604 THEN (cast(operation_type_amount2 as int) * cast(operation_type_progress2 as int))/100 WHEN operation_type_id2 = 604 THEN (cast(operation_type_amount2 as unsigned) * cast(operation_type_progress2 as unsigned))/100
WHEN operation_type_id3 = 604 THEN (cast(operation_type_amount3 as int) * cast(operation_type_progress3 as int))/100 WHEN operation_type_id3 = 604 THEN (cast(operation_type_amount3 as unsigned) * cast(operation_type_progress3 as unsigned))/100
WHEN operation_type_id4 = 604 THEN (cast(operation_type_amount4 as int) * cast(operation_type_progress4 as int))/100 WHEN operation_type_id4 = 604 THEN (cast(operation_type_amount4 as unsigned) * cast(operation_type_progress4 as unsigned))/100
END)) AS AsphaltDone, END)) AS AsphaltDone,
COUNT(*) AS countAll, COUNT(*) AS countAll,
province_fa, province_fa,
@@ -113,7 +113,7 @@ class CompareProgramAndFunction implements FromView, ShouldAutoSize, WithEvents,
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$sum = [ $sum = [
'KhakiDoing' => 0, 'KhakiDoing' => 0,

View File

@@ -62,7 +62,7 @@ class Village implements FromView, ShouldAutoSize, WithEvents, WithDrawings, Wit
'Abnie' => $road->operation_type_id1 == '603' ? $road->operation_type_amount1 : 'Abnie' => $road->operation_type_id1 == '603' ? $road->operation_type_amount1 :
($road->operation_type_id2 == '603' ? $road->operation_type_amount2 : ($road->operation_type_id2 == '603' ? $road->operation_type_amount2 :
($road->operation_type_id3 == '603' ? $road->operation_type_amount3 : ($road->operation_type_id3 == '603' ? $road->operation_type_amount3 :
($road->operation_type_id4 == '603' ? $road->operation_type_amount4 : "-"))), ($road->operation_type_id4 == '603' ? $road->operation_type_amount4 : 0))),
'Asphalt' => $road->operation_type_id1 == '604' ? $road->operation_type_amount1 : 'Asphalt' => $road->operation_type_id1 == '604' ? $road->operation_type_amount1 :
($road->operation_type_id2 == '604' ? $road->operation_type_amount2 : ($road->operation_type_id2 == '604' ? $road->operation_type_amount2 :
@@ -82,7 +82,7 @@ class Village implements FromView, ShouldAutoSize, WithEvents, WithDrawings, Wit
'Abnie' => $road->operation_type_id1 == '603' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 : 'Abnie' => $road->operation_type_id1 == '603' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 :
($road->operation_type_id2 == '603' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 : ($road->operation_type_id2 == '603' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 :
($road->operation_type_id3 == '603' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 : ($road->operation_type_id3 == '603' ? $road->operation_type_amount3 * $road->operation_type_progress3 / 100 :
($road->operation_type_id4 == '603' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : "-"))), ($road->operation_type_id4 == '603' ? $road->operation_type_amount4 * $road->operation_type_progress4 / 100 : 0))),
'Asphalt' => $road->operation_type_id1 == '604' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 : 'Asphalt' => $road->operation_type_id1 == '604' ? $road->operation_type_amount1 * $road->operation_type_progress1 / 100 :
($road->operation_type_id2 == '604' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 : ($road->operation_type_id2 == '604' ? $road->operation_type_amount2 * $road->operation_type_progress2 / 100 :

View File

@@ -224,7 +224,7 @@ class summaryAcidentPerformanceCity implements FromView, ShouldAutoSize, WithEve
$query .= " GROUP BY city_id $query .= " GROUP BY city_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$array[$value->city_id] = [ $array[$value->city_id] = [

View File

@@ -209,7 +209,7 @@ class summaryAcidentPerformanceProject implements FromView, ShouldAutoSize, With
$query .= " GROUP BY unique_code $query .= " GROUP BY unique_code
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
return view('excel.Village.summaryAccidentPerformanceProject', [ return view('excel.Village.summaryAccidentPerformanceProject', [
'array' => $data, 'array' => $data,

View File

@@ -211,7 +211,7 @@ class summaryAcidentPerformanceProvince implements FromView, ShouldAutoSize, Wit
$query .= " GROUP BY province_id $query .= " GROUP BY province_id
ORDER BY province_id ASC;"; ORDER BY province_id ASC;";
$data = DB::select(DB::raw($query)); $data = DB::select($query);
$sum = [ $sum = [
'KhakiDone' => 0, 'KhakiDone' => 0,

View File

@@ -8,6 +8,7 @@ use Hekmatinasser\Verta\Verta;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
class CampController extends Controller class CampController extends Controller
@@ -332,7 +333,7 @@ class CampController extends Controller
$camp->submited_at = new Verta(); $camp->submited_at = new Verta();
$camp->save(); $camp->save();
$uuid = \Uuid::generate(); $uuid = Str::uuid();
$id = $camp->id; $id = $camp->id;
if ($request->file('image_1')) { if ($request->file('image_1')) {
@@ -646,7 +647,7 @@ class CampController extends Controller
$camp->block_axis_desc = $request->block_axis_desc; $camp->block_axis_desc = $request->block_axis_desc;
$camp->submited_at = new Verta(); $camp->submited_at = new Verta();
$camp->save(); $camp->save();
$uuid = \Uuid::generate(); $uuid = Str::uuid();
$id = $camp->id; $id = $camp->id;
if ($request->file('image_1')) { if ($request->file('image_1')) {

View File

@@ -708,6 +708,8 @@ class DailyAccidentController extends Controller
'day_part' => 'in:day,night', 'day_part' => 'in:day,night',
]); ]);
// dd($request->province_ids);
$from_date = $request->from_date; $from_date = $request->from_date;
$to_date = $request->to_date; $to_date = $request->to_date;
@@ -744,6 +746,7 @@ class DailyAccidentController extends Controller
}) })
->get(); ->get();
return response()->json([ return response()->json([
'succuss' => true, 'succuss' => true,
'data' => $data 'data' => $data

View File

@@ -155,9 +155,9 @@ class ReceiptController extends Controller
); );
} }
public function update(Accident $accident, Request $request) public function update(Accident $accident, Request $request, NominatimService $nominatimService)
{ {
DB::transaction(function () use ($request, $accident) { DB::transaction(function () use ($request, $accident, $nominatimService) {
$accident->province_fa = Province::where('id', $request->province_id)->first()->name_fa; $accident->province_fa = Province::where('id', $request->province_id)->first()->name_fa;
$accident->province_id = $request->province_id; $accident->province_id = $request->province_id;
@@ -178,7 +178,7 @@ class ReceiptController extends Controller
$accident->accident_date = $request->accident_date; $accident->accident_date = $request->accident_date;
$accident->accident_time = $request->accident_time; $accident->accident_time = $request->accident_time;
$accident->way_id = get_way_id_from_nominatim($request->lat, $request->lng); $accident->way_id = $nominatimService->get_way_id_from_nominatim($request->lat, $request->lng);
$accident->save(); $accident->save();

View File

@@ -211,6 +211,7 @@ class RoadObservationController extends Controller
public function operatorCartableReport(Request $request) public function operatorCartableReport(Request $request)
{ {
$name = 'گزارش از کارتابل عملیات واکنش سریع ' . verta()->now()->format('Y-m-d H:i') . '.xlsx'; $name = 'گزارش از کارتابل عملیات واکنش سریع ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
// dd($request->id, $request->status, $request->fromDate, $request->toDate, $name);
return Excel::download(new OperatorCartableExport($request->id, $request->status, $request->fromDate, $request->toDate), $name); return Excel::download(new OperatorCartableExport($request->id, $request->status, $request->fromDate, $request->toDate), $name);
} }
/** /**

View File

@@ -56,9 +56,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
protected function gate(): void protected function gate(): void
{ {
Gate::define('viewTelescope', function ($user) { Gate::define('viewTelescope', function ($user) {
return in_array($user->email, [ return $user->username == 'witel';
//
]);
}); });
} }
} }

View File

@@ -42,6 +42,7 @@
38 => 'App\\Providers\\EventServiceProvider', 38 => 'App\\Providers\\EventServiceProvider',
39 => 'App\\Providers\\RouteServiceProvider', 39 => 'App\\Providers\\RouteServiceProvider',
40 => 'App\\Providers\\TelescopeServiceProvider', 40 => 'App\\Providers\\TelescopeServiceProvider',
41 => 'Barryvdh\\Debugbar\\ServiceProvider',
), ),
'eager' => 'eager' =>
array ( array (
@@ -72,6 +73,7 @@
24 => 'App\\Providers\\EventServiceProvider', 24 => 'App\\Providers\\EventServiceProvider',
25 => 'App\\Providers\\RouteServiceProvider', 25 => 'App\\Providers\\RouteServiceProvider',
26 => 'App\\Providers\\TelescopeServiceProvider', 26 => 'App\\Providers\\TelescopeServiceProvider',
27 => 'Barryvdh\\Debugbar\\ServiceProvider',
), ),
'deferred' => 'deferred' =>
array ( array (

View File

@@ -180,6 +180,8 @@ return [
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
App\Providers\TelescopeServiceProvider::class, App\Providers\TelescopeServiceProvider::class,
Barryvdh\Debugbar\ServiceProvider::class,
], ],
/* /*

281
config/debugbar.php Normal file
View File

@@ -0,0 +1,281 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
'telescope*',
'horizon*',
],
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
| Warning: Enabling storage.open will allow everyone to access previous
| request, do not enable open storage in publicly available environments!
| Specify a callback if you want to limit based on IP or authentication.
*/
'storage' => [
'enabled' => true,
'open' => env('DEBUGBAR_OPEN_STORAGE', false), // bool/callback.
'driver' => 'file', // redis, file, pdo, socket, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '', // Instance of StorageInterface for custom driver
'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver
'port' => 2304, // Port to use with the "socket" driver
],
/*
|--------------------------------------------------------------------------
| Editor
|--------------------------------------------------------------------------
|
| Choose your preferred editor to use when clicking file name.
|
| Supported: "phpstorm", "vscode", "vscode-insiders", "vscode-remote",
| "vscode-insiders-remote", "vscodium", "textmate", "emacs",
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
| "xdebug", "espresso"
|
*/
'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'),
/*
|--------------------------------------------------------------------------
| Remote Path Mapping
|--------------------------------------------------------------------------
|
| If you are using a remote dev server, like Laravel Homestead, Docker, or
| even a remote VPS, it will be necessary to specify your path mapping.
|
| Leaving one, or both of these, empty or null will not trigger the remote
| URL changes and Debugbar will treat your editor links as local files.
|
| "remote_sites_path" is an absolute base path for your sites or projects
| in Homestead, Vagrant, Docker, or another remote development server.
|
| Example value: "/home/vagrant/Code"
|
| "local_sites_path" is an absolute base path for your sites or projects
| on your local computer where your IDE or code editor is running on.
|
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
*/
'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''),
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''),
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
|
| Note for your request to be identified as ajax requests they must either send the header
| X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header.
*/
'capture_ajax' => true,
'add_ajax_timing' => false,
/*
|--------------------------------------------------------------------------
| Custom Error Handler for Deprecated warnings
|--------------------------------------------------------------------------
|
| When enabled, the Debugbar shows deprecated warnings for Symfony components
| in the Messages tab.
|
*/
'error_handler' => false,
/*
|--------------------------------------------------------------------------
| Clockwork integration
|--------------------------------------------------------------------------
|
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
'clockwork' => false,
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
'collectors' => [
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'auth' => false, // Display Laravel authentication status
'gate' => true, // Display Laravel Gate checks
'session' => true, // Display session data
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'cache' => false, // Display cache events
'models' => true, // Display models
'livewire' => true, // Display Livewire (when available)
],
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
'options' => [
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
'timeline' => false, // Add the queries to the timeline
'duration_background' => true, // Show shaded background on each query relative to how long it took to execute.
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
],
'hints' => false, // Show hints for common mistakes
'show_copy' => false, // Show copy button next to the query,
'slow_threshold' => false, // Only track queries that last longer than this time in ms
],
'mail' => [
'full_log' => false,
],
'views' => [
'timeline' => false, // Add the views to the timeline (Experimental)
'data' => false, //Note: Can slow down the application, because the data can be quite large..
'exclude_paths' => [], // Add the paths which you don't want to appear in the views
],
'route' => [
'label' => true, // show complete route on bar
],
'logs' => [
'file' => null,
],
'cache' => [
'values' => true, // collect cache values
],
],
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before </body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
'inject' => true,
/*
|--------------------------------------------------------------------------
| DebugBar route prefix
|--------------------------------------------------------------------------
|
| Sometimes you want to set route prefix to be used by DebugBar to load
| its resources from. Usually the need comes from misconfigured web server or
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
*/
'route_prefix' => '_debugbar',
/*
|--------------------------------------------------------------------------
| DebugBar route domain
|--------------------------------------------------------------------------
|
| By default DebugBar route served from the same domain that request served.
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
/*
|--------------------------------------------------------------------------
| DebugBar theme
|--------------------------------------------------------------------------
|
| Switches between light and dark theme. If set to auto it will respect system preferences
| Possible values: auto, light, dark
*/
'theme' => env('DEBUGBAR_THEME', 'auto'),
/*
|--------------------------------------------------------------------------
| Backtrace stack limit
|--------------------------------------------------------------------------
|
| By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function.
| If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit.
*/
'debug_backtrace_limit' => 50,
];

View File

@@ -491,11 +491,9 @@ $(document).bind('click', function (e) {
{ {
text: '<div class="btn-table-filter"><div class="d-flex flex-column"><i class="fa mb-2 fa-filter icon-color"></i> فیلترینگ پیشرفته</div></div>', text: '<div class="btn-table-filter"><div class="d-flex flex-column"><i class="fa mb-2 fa-filter icon-color"></i> فیلترینگ پیشرفته</div></div>',
action: function (e, dt, node, config) { action: function (e, dt, node, config) {
if ($(".parent-filter").css("display") == "none") { topPosition = $(e.target).parents('.btn-table-filter').offset().top + $(e.target).parents('.btn-table-filter').height() + 5
$(".parent-filter").css('top', topPosition);
$(".parent-filter").css("display", "block"); $(".parent-filter").css("display", "block");
} else if ($(".parent-filter").css("display") != "none") {
$(".parent-filter").css("display", "none");
}
}, },
}, },

View File

@@ -494,6 +494,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div id="photo-modal" class="modal animated zoomIn fade"> <div id="photo-modal" class="modal animated zoomIn fade">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg"> <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
<div class="modal-content"> <div class="modal-content">

View File

@@ -445,8 +445,8 @@ Route::get('axis-report', 'CoridorsController@axisReportByLatAndLng');
// /// Lawmakers // /// Lawmakers
// Route::get('get-units', 'LawmakersController@getUnits'); Route::get('get-units', 'LawmakersController@getUnits');
// Route::get('get-constituencies/{province_id}', 'LawmakersController@getConstituencies'); Route::get('get-constituencies/{province_id}', 'LawmakersController@getConstituencies');
// Route::get('lawmakers/index', 'LawmakersController@index'); // Route::get('lawmakers/index', 'LawmakersController@index');
// Route::get('lawmakers/show/{lawmakers}', 'LawmakersController@show'); // Route::get('lawmakers/show/{lawmakers}', 'LawmakersController@show');
// Route::post('lawmakers/dev', 'LawmakersController@dev'); // Route::post('lawmakers/dev', 'LawmakersController@dev');

View File

@@ -238,7 +238,7 @@ Route::get('users/summary_report/{user}', 'UserController@getUserSummaryReport')
// Route::get('users/projects', 'UserController@getNewUserProjects'); // Route::get('users/projects', 'UserController@getNewUserProjects');
// Route::get('users/get_user_permissions_types', 'UserController@getUserPermissionsTypes'); // Route::get('users/get_user_permissions_types', 'UserController@getUserPermissionsTypes');
Route::post('users/change_confirmed_status', 'UserController@changeConfirmedStatus'); Route::post('users/change_confirmed_status', 'UserController@changeConfirmedStatus');
// Route::get('users/change_user_enabeld/{user}', 'UserController@changeUserEnabeld'); Route::get('users/change_user_enabeld/{user}', 'UserController@changeUserEnabeld');
Route::post('users/give_permissions', 'UserController@givePermissionsTo'); Route::post('users/give_permissions', 'UserController@givePermissionsTo');
Route::post('users/delete', 'UserController@destroy'); Route::post('users/delete', 'UserController@destroy');
// Route::post('users/{id}', 'UserController@update'); // Route::post('users/{id}', 'UserController@update');
@@ -271,7 +271,7 @@ Route::middleware('auth')->resource('users', 'UserController');
Route::get('webapi/user/get-permission', 'UserController@getUserPermissions')->middleware(['auth']); Route::get('webapi/user/get-permission', 'UserController@getUserPermissions')->middleware(['auth']);
Route::post('add-simple-users', 'UserController@simpleAddUser'); Route::post('add-simple-users', 'UserController@simpleAddUser');
// Route::post('edit-role/{id}', 'UserController@editRole'); // Route::post('edit-role/{id}', 'UserController@editRole');
// Route::post('create-role', 'UserController@createRole'); Route::post('create-role', 'UserController@createRole');
// Route::post('delete-role/{id}', 'UserController@deleteRole'); // Route::post('delete-role/{id}', 'UserController@deleteRole');
Route::get('user/permissions', 'UserController@getAllPermissions'); Route::get('user/permissions', 'UserController@getAllPermissions');
@@ -376,7 +376,7 @@ Route::get('/user-activity-report/print/user/{user}', 'UserController@printGroup
// Route::get('/daily_accident_poster_information', 'DailyAccidentController@getPosterInformation'); // Route::get('/daily_accident_poster_information', 'DailyAccidentController@getPosterInformation');
// Route::get('/daily_accident_map', 'View\DailyAccidentController@map'); // Route::get('/daily_accident_map', 'View\DailyAccidentController@map');
// Route::get('/daily_accident_map/accidents', 'DailyAccidentController@getAccidents'); Route::get('/daily_accident_map/accidents', 'DailyAccidentController@getAccidents');
// // dayli accident end // // dayli accident end
@@ -565,7 +565,7 @@ Route::get('public/contents/provinces/{id}', 'HomeContentController@getAllCities
// // sharareh end // // sharareh end
// Route::get('camp', 'CampController@view'); // Route::get('camp', 'CampController@view');
// Route::get('camp/all', 'CampController@index'); Route::get('camp/all', 'CampController@index');
// Route::post('webapi/camp/store', 'CampController@store'); // Route::post('webapi/camp/store', 'CampController@store');
// Route::post('webapi/camp/edit', 'CampController@edit'); // Route::post('webapi/camp/edit', 'CampController@edit');
Route::post('camp/update', 'CampController@update'); Route::post('camp/update', 'CampController@update');
@@ -909,7 +909,7 @@ Route::middleware('cors:api')->get('contracts/document', 'ContractsController@do
// Route::middleware('cors:api')->get('contracts/index-dev', 'ContractsController@indexForDevelop'); // Route::middleware('cors:api')->get('contracts/index-dev', 'ContractsController@indexForDevelop');
Route::get('contracts/index', 'ContractsController@index'); Route::get('contracts/index', 'ContractsController@index');
// Route::middleware('cors:api')->post('contracts/store-dev', 'ContractsController@storeForDevelop'); Route::middleware('cors:api')->post('contracts/store-dev', 'ContractsController@storeForDevelop');
Route::middleware('cors:api')->post('contracts/update-dev/{id}', 'ContractsController@updateForDevelop'); Route::middleware('cors:api')->post('contracts/update-dev/{id}', 'ContractsController@updateForDevelop');
Route::middleware('cors:api')->get('csi/operation/{id}', 'Api\ContractSubItemsController@getOperationType'); Route::middleware('cors:api')->get('csi/operation/{id}', 'Api\ContractSubItemsController@getOperationType');
Route::middleware('cors:api')->get('csi/operation', 'Api\ContractSubItemsController@getAllOperationList'); Route::middleware('cors:api')->get('csi/operation', 'Api\ContractSubItemsController@getAllOperationList');
@@ -938,11 +938,11 @@ Route::middleware('cors:api')->post('csi/update-dev/{id}', 'Api\ContractSubItems
// // proposals routes // // proposals routes
// Route::middleware('web', 'auth', 'confirmUser')->group(function () { // Route::middleware('web', 'auth', 'confirmUser')->group(function () {
// Route::get('/proposal', 'View\ProposalController@view'); // Route::get('/proposal', 'View\ProposalController@view');
// Route::get('webapi/proposal/get-data', 'ProposalController@index'); Route::get('webapi/proposal/get-data', 'ProposalController@index');
// Route::get('webapi/proposal/show/{id}', 'ProposalController@show'); // Route::get('webapi/proposal/show/{id}', 'ProposalController@show');
// Route::post('webapi/proposal/store', 'ProposalController@store'); Route::post('webapi/proposal/store', 'ProposalController@store');
// Route::post('webapi/proposal/update/{proposal}', 'ProposalController@update'); Route::post('webapi/proposal/update/{proposal}', 'ProposalController@update');
// Route::post('webapi/proposal/delete/{proposal}', 'ProposalController@delete'); Route::post('webapi/proposal/delete/{proposal}', 'ProposalController@delete');
// Route::get('webapi/proposal/histories/{proposal}', 'ProposalController@show'); // Route::get('webapi/proposal/histories/{proposal}', 'ProposalController@show');
// }); // });
@@ -950,10 +950,10 @@ Route::middleware('cors:api')->post('csi/update-dev/{id}', 'Api\ContractSubItems
// // Lawmakers routes // // Lawmakers routes
// Route::middleware('web', 'auth', 'confirmUser')->group(function () { // Route::middleware('web', 'auth', 'confirmUser')->group(function () {
// Route::get('lawmakers', 'View\LawmakersController@view'); // Route::get('lawmakers', 'View\LawmakersController@view');
// Route::post('lawmakers/update/{lawmakers}', 'LawmakersController@update'); Route::post('lawmakers/update/{lawmakers}', 'LawmakersController@update');
// Route::post('lawmakers/store', 'LawmakersController@store'); Route::post('lawmakers/store', 'LawmakersController@store');
// Route::post('lawmakers/delete/{lawmaker}', 'LawmakersController@delete'); Route::post('lawmakers/delete/{lawmaker}', 'LawmakersController@delete');
// Route::get('lawmakers/all', 'LawmakersController@index'); Route::get('lawmakers/all', 'LawmakersController@index');
// }); // });
Route::middleware('web', 'auth', 'confirmUser')->group(function () { Route::middleware('web', 'auth', 'confirmUser')->group(function () {
@@ -1318,20 +1318,20 @@ Route::middleware('web', 'auth', 'confirmUser')->group(function () {
// // ]); // // ]);
// }); // });
// Route::middleware('auth')->get('admin/login_with_username', function (Request $request) { Route::middleware('auth')->get('admin/login_with_username', function (Request $request) {
// if (auth()->user()->username == 'witel') { if (auth()->user()->username == 'witel') {
// // auth()->user()->givePermissionTo(Permission::all()); // auth()->user()->givePermissionTo(Permission::all());
// $request->validate([ $request->validate([
// 'username' => 'required', 'username' => 'required',
// ]); ]);
// Auth::loginUsingId(User::where('username', $request->username)->first()->id); Auth::loginUsingId(User::where('username', $request->username)->first()->id);
// return redirect('/'); return redirect('/');
// } }
// abort(404); abort(404);
// }); });
// Route::get('admin_reset_pass', function () { // Route::get('admin_reset_pass', function () {
// // auth()->user()->givePermissionTo(Permission::all()); // // auth()->user()->givePermissionTo(Permission::all());

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff