ikinci temizlik tamamlandı
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
// Fetch the cached dashboard content
|
||||
$cachedDashboardContent = Storage::get('cache/dashboard.blade.php');
|
||||
|
||||
// Display the cached dashboard content
|
||||
echo $cachedDashboardContent;
|
||||
?>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?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>
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
|
||||
<!-- pdf.js CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/pdfjs-dist@2.10.377/build/pdf.min.js"></script>
|
||||
<style>
|
||||
.flowchart .page {
|
||||
zoom: 50%;
|
||||
transition:all .5s
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function(){
|
||||
var zoom = 50;
|
||||
$(".zoomin").on("click", function(){
|
||||
zoom = zoom + 10;
|
||||
$(".flowchart .page").css("zoom", zoom + "%");
|
||||
|
||||
});
|
||||
$(".zoomout").on("click", function(){
|
||||
zoom = zoom - 10;
|
||||
$(".flowchart .page").css("zoom", zoom + "%");
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function(){
|
||||
const $pdf = '{{url("assets/diagram.pdf")}}';
|
||||
|
||||
const $initialState = {
|
||||
pdfDoc: null,
|
||||
currentPage: 1,
|
||||
pageCount: 0,
|
||||
zoom: 0.615,
|
||||
};
|
||||
|
||||
// Render the page.
|
||||
const renderPage = () => {
|
||||
// Load the first page.
|
||||
$initialState.pdfDoc
|
||||
.getPage($initialState.currentPage)
|
||||
.then((page) => {
|
||||
console.log('page', page);
|
||||
|
||||
const canvas = $('#canvas')[0];
|
||||
const $ctx = canvas.getContext('2d');
|
||||
const $viewport = page.getViewport({
|
||||
scale: $initialState.zoom,
|
||||
});
|
||||
|
||||
canvas.height = $viewport.height;
|
||||
canvas.width = $viewport.width;
|
||||
|
||||
// Render the PDF page into the canvas context.
|
||||
const renderCtx = {
|
||||
canvasContext: $ctx,
|
||||
viewport: $viewport,
|
||||
};
|
||||
|
||||
page.render(renderCtx);
|
||||
|
||||
$('#page_num').html($initialState.currentPage);
|
||||
});
|
||||
};
|
||||
|
||||
// Load the document.
|
||||
pdfjsLib
|
||||
.getDocument($pdf)
|
||||
.promise.then((doc) => {
|
||||
$initialState.pdfDoc = doc;
|
||||
console.log('pdfDocument', $initialState.pdfDoc);
|
||||
|
||||
$('#page_count').html($initialState.pdfDoc.numPages);
|
||||
|
||||
renderPage();
|
||||
})
|
||||
.catch((err) => {
|
||||
alert(err.message);
|
||||
});
|
||||
|
||||
function showPrevPage() {
|
||||
if ($initialState.pdfDoc === null || $initialState.currentPage <= 1)
|
||||
return;
|
||||
$initialState.currentPage--;
|
||||
// Render the current page
|
||||
$('#current_page').val($initialState.currentPage);
|
||||
renderPage();
|
||||
}
|
||||
|
||||
function showNextPage() {
|
||||
if (
|
||||
$initialState.pdfDoc === null ||
|
||||
$initialState.currentPage >=
|
||||
$initialState.pdfDoc._pdfInfo.numPages
|
||||
)
|
||||
return;
|
||||
|
||||
$initialState.currentPage++;
|
||||
$('#current_page').val($initialState.currentPage);
|
||||
renderPage();
|
||||
}
|
||||
|
||||
// Button events.
|
||||
$('#prev-page').click(showPrevPage);
|
||||
$('#next-page').click(showNextPage);
|
||||
|
||||
// Display a specific page.
|
||||
$('#current_page').on('keypress', (event) => {
|
||||
if ($initialState.pdfDoc === null) return;
|
||||
// Get the key code.
|
||||
const $keycode = event.keyCode ? event.keyCode : event.which;
|
||||
if ($keycode === 13) {
|
||||
// Get the new page number and render it.
|
||||
let desiredPage = $('#current_page')[0].valueAsNumber;
|
||||
|
||||
$initialState.currentPage = Math.min(
|
||||
Math.max(desiredPage, 1),
|
||||
$initialState.pdfDoc._pdfInfo.numPages,
|
||||
);
|
||||
renderPage();
|
||||
|
||||
$('#current_page').val($initialState.currentPage);
|
||||
}
|
||||
});
|
||||
|
||||
// Zoom functionality.
|
||||
$('#zoom_in').on('click', () => {
|
||||
if ($initialState.pdfDoc === null) return;
|
||||
$initialState.zoom *= 4 / 3;
|
||||
|
||||
renderPage();
|
||||
});
|
||||
|
||||
$('#zoom_out').on('click', () => {
|
||||
if ($initialState.pdfDoc === null) return;
|
||||
$initialState.zoom *= 2 / 3;
|
||||
renderPage();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<header>
|
||||
<table class="table ">
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: middle">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-outline-primary" id="zoom_in">
|
||||
<i class="fas fa-search-plus"></i>
|
||||
</button>
|
||||
|
||||
<button class="btn btn-outline-primary" id="zoom_out">
|
||||
<i class="fas fa-search-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td width="60%" class="text-center"><img src="{{url("assets/logo.svg")}}" class="p-1" alt=""></td>
|
||||
<td width="20%" style="vertical-align: bottom;font-size:16px">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</header>
|
||||
<div class="flowchart" style="overflow:auto;width:100%;height:80vh;margin-top:10px">
|
||||
|
||||
<!-- Canvas to place the PDF -->
|
||||
<canvas id="canvas" class="canvas__container"></canvas>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type="text" name="search" id="search" placeholder="{{e2("Search Training Videos...")}}" class="form-control mb-10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row videos">
|
||||
|
||||
<?php
|
||||
$basePath = "013_Others/video";
|
||||
$videos = glob("storage/documents/$basePath/*.mp4");
|
||||
|
||||
if(count($videos)>0) {
|
||||
foreach($videos AS $video) {
|
||||
$title = str_replace("storage/documents/013_Others/video/", "", $video);
|
||||
$title = str_replace(".mp4", "", $title);
|
||||
|
||||
?>
|
||||
{{col("col-md-6 col-xl-4 video ", $title)}}
|
||||
<div class="position-relative" style="min-height:300px;">
|
||||
|
||||
<video width="100%" height="100%" class="position-absolute" controls>
|
||||
<source src="{{$video}}" type="video/mp4">
|
||||
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
{{_col()}}
|
||||
|
||||
<?php }
|
||||
} else { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-warning">
|
||||
{{e2("No training videos have been uploaded yet.")}}
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#search").on("keyup", function() {
|
||||
var value = $(this).val().toLowerCase();
|
||||
$(".video").filter(function() {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user