feat: add datagrid module template for Radiographic Test management
This commit is contained in:
@@ -0,0 +1,134 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* CITRUS CMS - Datagrid Module Template
|
||||||
|
*
|
||||||
|
* Bu şablon, DevExtreme (dxDataGrid) kullanarak hızlıca CRUD modülleri oluşturmak için tasarlanmıştır.
|
||||||
|
* Aşağıdaki değişkenler ve yapılar, modülün hem listeleme hem de düzenleme davranışını belirler.
|
||||||
|
*
|
||||||
|
* --- TEMEL DEĞİŞKENLER ---
|
||||||
|
*/
|
||||||
|
|
||||||
|
use App\Models\RadiographicTest; // Modülün bağlı olduğu Eloquent Model
|
||||||
|
|
||||||
|
// Modülün sayfa başlığı
|
||||||
|
$title = "Radiographic Test";
|
||||||
|
|
||||||
|
// Veritabanındaki tablo adı (CRUD işlemleri için kritik)
|
||||||
|
$tableName = "radiographic_tests";
|
||||||
|
|
||||||
|
// Genişlik ayarı
|
||||||
|
$tableWidth = "100%";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --- RELATION DATAS (Sütun Özelleştirmeleri) ---
|
||||||
|
*
|
||||||
|
* Her bir sütunun veri tipini ve davranışını burada tanımlayabilirsiniz.
|
||||||
|
* Mevcut Tipler: string, integer, decimal, float, date, datetime, time,
|
||||||
|
* select, select-dropdown, link-search, long-text, multiple-choice, auto-complete
|
||||||
|
*/
|
||||||
|
$relationDatas = [
|
||||||
|
'report_file' => [
|
||||||
|
'type' => 'link-search', // PDF/Dosya önizleme ve linki
|
||||||
|
'html' => '<i class="fa fa-pdf"></i>',
|
||||||
|
'caption' => 'PDF Report', // Sütun başlığını ezmek için
|
||||||
|
'allowEditing' => true, // Hücre içinde manuel path düzenleme
|
||||||
|
],
|
||||||
|
'rt_result' => [
|
||||||
|
'type' => 'select', // Açılır menü
|
||||||
|
'dataSource' => [ // Select için veri kaynağı (Opsiyonel: array veya URL olabilir)
|
||||||
|
['id' => 'ACCEPTED', 'name' => 'ACCEPTED'],
|
||||||
|
['id' => 'REJECTED', 'name' => 'REJECTED'],
|
||||||
|
['id' => 'REPAIR', 'name' => 'REPAIR'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'welding_date' => [
|
||||||
|
'type' => 'date', // Tarih seçici
|
||||||
|
],
|
||||||
|
'rt_scope' => [
|
||||||
|
'type' => 'integer', // Sayısal giriş
|
||||||
|
],
|
||||||
|
'other' => [
|
||||||
|
'type' => 'long-text', // Çok satırlı metin (TextArea)
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --- BLOCK GROUPS (Sütun Gruplandırma) ---
|
||||||
|
*
|
||||||
|
* Datagrid üzerinde sütunları "Banded Columns" (Gruplanmış Başlıklar) şeklinde gösterir.
|
||||||
|
* Her key bir grup başlığıdır, value ise o gruba ait sütun isimleridir.
|
||||||
|
*/
|
||||||
|
$blockGroup = [
|
||||||
|
'General Info' => [
|
||||||
|
'report_file',
|
||||||
|
'contractor',
|
||||||
|
'project',
|
||||||
|
],
|
||||||
|
'Invoice Details' => [
|
||||||
|
'invoice_number',
|
||||||
|
'invoice_date',
|
||||||
|
],
|
||||||
|
'Technical Specs' => [
|
||||||
|
'design_area',
|
||||||
|
'line_specification',
|
||||||
|
'line_number',
|
||||||
|
'fluid_code',
|
||||||
|
],
|
||||||
|
'RT Test Data' => [
|
||||||
|
'rt_scope',
|
||||||
|
'rt_request_no',
|
||||||
|
'rt_request_date',
|
||||||
|
'rt_report',
|
||||||
|
'rt_test_date',
|
||||||
|
'rt_result',
|
||||||
|
],
|
||||||
|
'Other' => [
|
||||||
|
'other',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --- UPLOAD CONFIGURATION ---
|
||||||
|
*
|
||||||
|
* Sayfanın üst kısmında bulunan toplu dosya yükleme mekanizması ayarları.
|
||||||
|
*/
|
||||||
|
$firstUploadFolder = '004_QA/0001_RT/'; // Dosyaların yükleneceği dizin (public/storage altı)
|
||||||
|
$firstUploadTitle = 'Upload PDF Reports'; // Yükleme butonu metni
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --- EKSTRA AYARLAR (Opsiyonel) ---
|
||||||
|
*/
|
||||||
|
// $tableType = "datagrid"; // Varsayılan "datagrid". Farklı görünüm varsa değiştirilebilir.
|
||||||
|
// $excepts = ['created_at', 'updated_at']; // Listelenmesini istemediğiniz sütunlar
|
||||||
|
// $requiredFields = ['invoice_number', 'welding_date']; // Zorunlu alanlar
|
||||||
|
// $noRemoteOperations = true; // Tüm işlemlerin client-side yapılmasını zorlamak için
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Sayfa Özel Scriptleri -->
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
// Sayfa yüklendiğinde çalışacak özel kodlar
|
||||||
|
console.log("{{ $title }} module loaded.");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Custom DevExtreme Event Handlers buraya eklenebilir
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Sayfa Özel Stilleri -->
|
||||||
|
<style>
|
||||||
|
/* Tabloya özel CSS düzenlemeleri */
|
||||||
|
.dx-datagrid-headers {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Üst Kısım: Dosya Yükleme Paneli -->
|
||||||
|
@include("admin.type.document.upload")
|
||||||
|
|
||||||
|
<!-- Alt Kısım: Ana Datagrid Bloğu -->
|
||||||
|
@include("components.blocks.module-block")
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
<?php
|
|
||||||
use App\Models\RadiographicTest;
|
|
||||||
//$noRemoteOperations = true;
|
|
||||||
|
|
||||||
|
|
||||||
$title = "Radiographic Test";
|
|
||||||
$tableWidth="100%";
|
|
||||||
$listDatas = RadiographicTest::orderBy("id","DESC")->paginate(setting('row_count'));
|
|
||||||
$tableName = "radiographic_tests";
|
|
||||||
|
|
||||||
//$tableType = "datagrid";
|
|
||||||
|
|
||||||
$relationDatas = [
|
|
||||||
'report_file' => [
|
|
||||||
'type' => 'link-search',
|
|
||||||
'html' => '<i class="fa fa-pdf"></i>'
|
|
||||||
],
|
|
||||||
];
|
|
||||||
$blockGroup = [
|
|
||||||
'Info' => [
|
|
||||||
'report_file',
|
|
||||||
'contractor',
|
|
||||||
],
|
|
||||||
|
|
||||||
'Invoice' => [
|
|
||||||
'invoice_number',
|
|
||||||
'invoice_date',
|
|
||||||
],
|
|
||||||
'Laboratory' => [
|
|
||||||
'test_laboratory_rt',
|
|
||||||
|
|
||||||
],
|
|
||||||
'Project' => [
|
|
||||||
'project',
|
|
||||||
|
|
||||||
],
|
|
||||||
'Design' => [
|
|
||||||
'design_area',
|
|
||||||
'line_specification',
|
|
||||||
'line_number',
|
|
||||||
'fluid_code',
|
|
||||||
'service_category',
|
|
||||||
'fluid_group',
|
|
||||||
'operating_temperature_s',
|
|
||||||
'operating_pressure_mpa',
|
|
||||||
'external_finish_type',
|
|
||||||
|
|
||||||
],
|
|
||||||
'ISO Info' => [
|
|
||||||
'iso_number',
|
|
||||||
'quantity_of_iso',
|
|
||||||
'iso_rev',
|
|
||||||
'spool_number',
|
|
||||||
'type_of_joint',
|
|
||||||
'no_of_the_joint_as_per_as_built_survey',
|
|
||||||
'type_of_welds',
|
|
||||||
],
|
|
||||||
'Welding Info' => [
|
|
||||||
'welding_date',
|
|
||||||
'wps_no',
|
|
||||||
'welding_method',
|
|
||||||
'welding_materials_1',
|
|
||||||
'welding_materials_1_lot_no',
|
|
||||||
'welding_materials_1_certificate_no',
|
|
||||||
'welding_materials_2',
|
|
||||||
'welding_materials_2_lot_no',
|
|
||||||
'welding_materials_2_certificate_no',
|
|
||||||
'welder_1',
|
|
||||||
'welder_2',
|
|
||||||
],
|
|
||||||
'Element Info' => [
|
|
||||||
'certificate_no_1',
|
|
||||||
'wpq_report_1',
|
|
||||||
'certificate_no_2',
|
|
||||||
'wpq_report_2',
|
|
||||||
'member_no_1',
|
|
||||||
'material_no_1',
|
|
||||||
'ru_material_group_1',
|
|
||||||
'certificate_number_of_1',
|
|
||||||
'heat_number_1',
|
|
||||||
'nps_1',
|
|
||||||
'thickness_by_asme_1',
|
|
||||||
'outside_diameter_1',
|
|
||||||
'wall_thickness_1',
|
|
||||||
'element_code_1',
|
|
||||||
'member_no_2',
|
|
||||||
'material_no_2',
|
|
||||||
'ru_material_group_2',
|
|
||||||
'certificate_number_of_2',
|
|
||||||
'heat_number_2',
|
|
||||||
'nps_2',
|
|
||||||
'thickness_by_asme_2',
|
|
||||||
'outside_diameter_2',
|
|
||||||
'wall_thickness_2',
|
|
||||||
'element_code_2',
|
|
||||||
],
|
|
||||||
'RT Info' => [
|
|
||||||
'rt_scope',
|
|
||||||
'rt_request_no',
|
|
||||||
'rt_request_date',
|
|
||||||
'rt_report',
|
|
||||||
'rt_test_date',
|
|
||||||
'rt_result',
|
|
||||||
'tester_name',
|
|
||||||
'real_welder_1',
|
|
||||||
'real_welder_2',
|
|
||||||
|
|
||||||
],
|
|
||||||
'Other' => [
|
|
||||||
'aa',
|
|
||||||
'ab',
|
|
||||||
'ac',
|
|
||||||
'ba',
|
|
||||||
'bb',
|
|
||||||
'bc',
|
|
||||||
'ca',
|
|
||||||
'cb',
|
|
||||||
'cc',
|
|
||||||
'da',
|
|
||||||
'db',
|
|
||||||
'dc',
|
|
||||||
'ea',
|
|
||||||
'eb',
|
|
||||||
'ec',
|
|
||||||
'fa',
|
|
||||||
'fb',
|
|
||||||
'fc',
|
|
||||||
'other',
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
$firstUploadFolder = '004_QA/0001_RT/';
|
|
||||||
$firstUploadTitle = 'Upload PDF';
|
|
||||||
?>
|
|
||||||
<script>
|
|
||||||
$(function(){
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<div class="content">
|
|
||||||
<div class="row">
|
|
||||||
@include("admin.type.document.upload")
|
|
||||||
@include("components.blocks.module-block")
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Reference in New Issue
Block a user