Files
2026-04-28 21:15:09 +03:00

162 lines
9.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php $colSize = "col-6 col-md-6 col-xl-2 block-container"; ?>
<style>
.block-header {
padding: 0px 10px;
}
.badges .block-container {
flex: 0 0 14.27%;
max-width: 14.27%;
}
.badges .font-size-h3 {
font-size:20px;
}
@media screen and (max-width: 768px) {
.badges .block-container {
flex: 0 0 50%;
max-width: 50%;
}
}
</style>
<div class="row js-appear-enabled animated fadeIn badges" data-toggle="appear">
<!-- Row #1 -->
<div class="{{$colSize}}">
<a class="bg-earth-lighter block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/18%20Test%20Packets.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">{{db("test_packages")->where("test_package_number", "<>", "")->count()}} / {{db("test_packages")->whereNotNull("test_date")->count()}}</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Test Packages")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-primary-lighter block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/Manufacturing.png" width="48" alt="">
</div>
<?php
// Güncel (current) revizyonları say - her drawing_no için en yüksek revision_no
// VE sadece Piping discipline olanları
$currentRevisionsCount = db("document_revisions as dr1")
->whereNotNull('dr1.drawing_no')
->where('dr1.drawing_no', '<>', '')
->whereRaw('dr1.revision_no = (
SELECT MAX(dr2.revision_no)
FROM document_revisions dr2
WHERE dr2.drawing_no = dr1.drawing_no
)')
->where(function($q) {
$q->where('dr1.discipline', 'LIKE', '%Piping%')
->orWhereNull('dr1.discipline');
})
->count();
?>
<div class="font-size-h3 font-w600"><span>
{{$currentRevisionsCount}} /
{{apply_welded_filter(db("weld_logs"))->distinct()->count('iso_number')}}
</span></div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Isometry")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-elegance-lighter block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/11.8%20WPS.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">{{db("w_p_s")->count()}}</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("WPS")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-gd-leaf block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/11.3%20Naks%20Welder.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">{{db("naks_welders")->distinct('welder_id')->count()}}</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Welder")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-flat-lighter block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/13.3%20Weldlog.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">{{apply_welded_filter(db("weld_logs"))->count()}}</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Weld Logs")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-corporate-lighter block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/002-repair.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">
{{setting("repairRateAll")}}
%</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Repair Rate")}}</div>
</div>
</a>
</div>
<div class="{{$colSize}}">
<a class="bg-danger-light block block-link-shadow text-right" href="javascript:void(0)">
<div class="block-content block-content-full clearfix">
<div class="float-left mt-10 d-none d-sm-block">
<img src="assets/icons/002-repair.png" width="48" alt="">
</div>
<div class="font-size-h3 font-w600 js-count-to-enabled">
<?php
$repairLogs = json_decode(setting("repairLogs"), true);
$nullRepairDateCount = collect($repairLogs)->whereNull('repair_date')->count();
echo $nullRepairDateCount;
?>
</div>
<div class="font-size-sm font-w600 text-uppercase text-muted">{{e2("Repair QTY")}}</div>
</div>
</a>
</div>
<!-- END Row #1 -->
</div>
<div class="row js-appear-enabled animated fadeIn">
{{col("col-md-5","General Progress", 8)}}
<div style="height:400px; overflow:auto">
@include("admin.dashboard.chart.general-progress")
</div>
{{_col()}}
{{col("col-md-7","Progress", 6)}}
@include("admin.dashboard.chart.monthly-progress")
{{_col()}}
{{col("col-md-6","Spool Status", 5)}}
@include("admin.type.spool-release.spool-list-chart")
{{_col()}}
{{col("col-md-6","NDT Backlog", 10)}}
@include("admin.dashboard.chart.ndt-backlog")
{{_col()}}
{{col("col-md-6","Test Status", 11)}}
@include("admin.dashboard.chart.test-status")
{{_col()}}
{{col("col-md-6","Punch Status", 12)}}
@include("admin.dashboard.chart.punch-status")
{{_col()}}
</div>